|
HeaterSSI |
Top Previous Next |
|
{ HEATERSSI.PDE } {
This example shows the use of a GLOBAL VARIABLE in a control application. We wish to find the required power input to a heater, such that the resulting average temperature over the domain is a specified value.
Notice that the equation nominally defining power does not explicitly reference the power variable, but is coupled through the heat term in the temperature equation. }
TITLE "steady-state Heater test"
VARIABLES temp { The temperature field }
global variables power { a single value for input power }
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 }
{ tc=val(temp,0,0) -- an alternative control method unused here }
tc=integral(temp)/integral(1) { the control function, average temperature }
INITIAL VALUES temp=setpoint power=100 { initial guess for power }
EQUATIONS temp: div(-k*grad(temp))-heat = 0 { diffusion of temperature field } power: tc = setpoint { single equation defining power }
BOUNDARIES
REGION 1 '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 2 '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 tc
PLOTS contour(temp) report power report tc
end |