Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Simple Heat Optimization

Please login with a confirmed email address before reporting spam

Hello.

I've just started to learn optimization module. But It difficult to understand, how does it work.
I try to fix temperature on the one boundary (boundary №5) of 2D rectangle, and find the best initial temperature for some other boundary (boundary №9).

Thank you for your help.


1 Reply Last Post 07.06.2012, 07:40 GMT-4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 07.06.2012, 07:40 GMT-4
Hi

For this example with only 1 free parameter you can even do without the optmisation module, with a ODE node, the principle remains the same:

1) you want the average or integrated temperature of boundary "5" to be equal to some "Tset" (lets assume 400[K] you define "Tset" as a Paramer,

2) then you add a Optimisation "Boundary - Integral Objective" on boundary "5" with the equation (T-Tset)^2 which means that the inegration over the boundary of (T(s)-Tset)^2 is compared to "0" and is minimised.

3) Then you need to add a Boundary Control variable Field node, on boundary "9" to be controlled, where you define the control variable i.e. "Tin" and set an initial condition fo example 450[K]

4) Then you go back to your HT Temperature node field and replace the 500[K] by "Tin" (that is controlled by the optimisation module)

5) Last step, important, go down to the Study Stationary Extension node and turn on the "optimisation" tick

With this COSMOL adds the new dependent variables, and as you have alreaady a solved solution it is wise to delete it and regenerate the sequence from fresh (but you loose your saved Results and results settings like that)

then you solve and you check the value by either averaging T-Tset over boundary "5" or you get the derived variable global "opt.iobj1" variable into a table

Eeasy no ? but its all written in the manuals, and described in the model library, you learn quicker by reading these first ;)

--
Good luck
Ivar
Hi For this example with only 1 free parameter you can even do without the optmisation module, with a ODE node, the principle remains the same: 1) you want the average or integrated temperature of boundary "5" to be equal to some "Tset" (lets assume 400[K] you define "Tset" as a Paramer, 2) then you add a Optimisation "Boundary - Integral Objective" on boundary "5" with the equation (T-Tset)^2 which means that the inegration over the boundary of (T(s)-Tset)^2 is compared to "0" and is minimised. 3) Then you need to add a Boundary Control variable Field node, on boundary "9" to be controlled, where you define the control variable i.e. "Tin" and set an initial condition fo example 450[K] 4) Then you go back to your HT Temperature node field and replace the 500[K] by "Tin" (that is controlled by the optimisation module) 5) Last step, important, go down to the Study Stationary Extension node and turn on the "optimisation" tick With this COSMOL adds the new dependent variables, and as you have alreaady a solved solution it is wise to delete it and regenerate the sequence from fresh (but you loose your saved Results and results settings like that) then you solve and you check the value by either averaging T-Tset over boundary "5" or you get the derived variable global "opt.iobj1" variable into a table Eeasy no ? but its all written in the manuals, and described in the model library, you learn quicker by reading these first ;) -- Good luck Ivar

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.