size_control

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Optimization >

size_control

Previous pageReturn to chapter overviewNext page

{  SIZE_CONTROL.PDE

 

  This example shows the use of the MINIMIZE optimization feature applied to geometric size.

 

  We wish to find the correct size of a heater with fixed power input, such that the resulting

  average temperature over the domain is a specified value.

}

 

TITLE "Optimization of geometry 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 = 550.5 ! total power input (as reported by POWER_CONTROL.PDE)

 len

 

INITIAL VALUES

 temp = setpoint

 

EQUATIONS

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

 

{ Here is the optimization request:

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

 "len" starts at 1.5, and the initial range of "len" samples is 1.

 "len" is constrained to be greater than 0.1 and less than 4.

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

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

MINIMIZE abs(tcontrol-setpoint) vs len(1.5, 1, 0.1, 4)

 

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 !fixed outer size

 

REGION 'Heater'

   k=50

   heat=power/integral(1,'Heater') ! convert total power to power density

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

 

MONITORS

contour(temp)

  report power

  report tcontrol

History(abs(tcontrol-setpoint),len)

 

PLOTS

contour(temp)

  report len

  report tcontrol as "Average Temp"

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

History(abs(tcontrol-setpoint),len)

History(len)

Summary report len as "Length needed to establish an average temperature of 700 "

 

END