control_transient

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Applications > Control >

control_transient

Previous pageReturn to chapter overviewNext page

{  CONTROL_TRANSIENT.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.

 

   The temperature on the outer surface is prescribed, with a time-sinusoidal  

   oscillation.  

 

   The input power is driven by a time-relaxation equation.  The coefficient

   of the right hand side is the reciprocal of the response time of the power.

 

   This problem is a modification of CONTROL_STEADY.PDE, showing the use of

   time-dependent GLOBAL equations.  

 

}  

 

TITLE "Time-dependent Control test"  

 

VARIABLES  

 temp     { The temperature field }  

 

GLOBAL VARIABLES  

 power     { a single value for input power }  

 

DEFINITIONS  

 

 setpoint = 700           { the desired average temperature }  

 skintemp = 325+20*sin(t) { oscillating outer boundary temperature }  

 responsetime = 0.1       { response time of the power input }  

 k=1       { conductivity }  

 heat=0   { the heat function for the temperature.

               it is non-zero only in the heater region }  

 

{ the control function, average temperature }  

 tcontrol = integral(temp)/integral(1)    

{  tcontrol = val(temp,0,0)   -- an alternative control method, which tracks the

                               temperature value at a specified point (unused here) }  

 

{initial guess for temperature distribution }  

 tinit1=min(1767-400*abs(x), 1767-400*abs(y))  

 

INITIAL VALUES  

 temp=min(1500,tinit1)  

 power=137     { initial guess for power  }  

 

EQUATIONS  

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

{ single equation defining power.  response time is 1/100  }  

 power:  dt(power) = (setpoint - tcontrol)/responsetime    

 

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  

 

TIME 0 to 20 by 1e-4  

 

PLOTS  

for cycle=10  

contour(temp)  

  report power  

  report tcontrol as "Avg Temp"  

 

HISTORIES  

History(tcontrol-setpoint, skintemp-325) as "Skin Temperature and Error"  

History(tcontrol-setpoint) as "Controlled temperature error"  

History(power)  

 

END