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
7 juin 2012, 07:40 UTC−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