﻿ Sample Problems > Applications > Control > control_steady

Navigation:  Sample Problems > Applications > Control >

This example shows the use of a GLOBAL VARIABLE in a control application.

It is analogous to the example USAGE/OPTIMIZATION/POWER_CONTROL.PDE.

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.

}

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 }

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

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

INITIAL VALUES

temp = setpoint

power= 100       { initial guess for power  }

EQUATIONS

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

power:  tcontrol = setpoint           { single equation defining power }

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

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)

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

summary

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

END