power_control

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Optimization >

power_control

Previous pageReturn to chapter overviewNext page

{  POWER_CONTROL.PDE

 

  This example shows the use of the MINIMIZE optimization feature. It is

  analogous to the APPLICATIONS/CONTROL/CONTROL_STEADY.PDE example.

 

  We wish to find the required power input to a heater, such that the resulting

  average temperature over the domain is a specified value.

}

 

TITLE "Optimization using MINIMIZE"

 

VARIABLES

 temp     { The temperature field }

 

DEFINITIONS

 setpoint=700     { the desired average temperature }

 skintemp=325     { fixed outer boundary temperature }

 k=1               { conductivity }

 heat=0           { the heat function for the temperature.

                     it is non-zero only in the heater region }

 

 tcontrol=integral(temp)/integral(1)   { the control function, average temperature }

{ tcontrol=val(temp,0,0)     -- an alternative control method, unused here }

 

 power     ! total power input

 

INITIAL VALUES

 temp = setpoint

 

EQUATIONS

 temp:   div(-k*grad(temp))-heat = 0   { diffusion of temperature field }

 

{ Here is the optimization request:

 Modify "power" until the average temperature is equal to setpoint.

 "power" starts at 50, and the initial range of "power" samples is 20.

 "power" is constrained to be greater than 0 and less than 1000.

 Iteration continues until "abs(tcontrol-setpoint)" is less than OPTERRLIM (default 2e-6)

 or "power" is bracketed to less than OPTERRLIM*power. }

MINIMIZE abs(tcontrol-setpoint) vs power(50, 20, 0, 1000)

 

BOUNDARIES

 

REGION 'Insulation'

   k=0.1

   heat=0

  start(-4,-4)

    value(temp)=skintemp

  line to (4,-4) to (4,4) to (-4,4) to close

 

REGION 'Heater'

   k=50

   heat=power

  start(-1,-1) line to (1,-1) to (1,1) to (-1,1) to close

 

MONITORS

contour(temp)

  report power

  report tcontrol

History(abs(tcontrol-setpoint),power)

 

PLOTS

contour(temp)

  report power

  report power*integral(1,'heater') as "Total Power"

  report tcontrol as "Average Temp"

elevation(temp) from(-4,0) to (4,0)

History(abs(tcontrol-setpoint),power)

Summary

    report power*integral(1,'heater') as "Total Power needed to establish an average temperature of 700 "

 

END