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.

How to set a maximum temperature

Please login with a confirmed email address before reporting spam

I am using a heat transfer model in order to predict the temperature distribution on a plate with a single heat source. However I want to limit the maximum temperature I can have. In order words I do not want the temperature to go over a certain value.

Can someone help me?

4 Replies Last Post 23.11.2009, 12:54 GMT-5
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: 2 decades ago 18.11.2009, 16:02 GMT-5
Hi

From my understanding this is normally what you use the optimisation module for, but there are also a few examples in the documentation how you can add simple equations to restrain or limit some variables.

see also the blog of Niklas of August 2009, or

www.comsol.com/support/knowledgebase/1042/

Good luck
Ivar
Hi From my understanding this is normally what you use the optimisation module for, but there are also a few examples in the documentation how you can add simple equations to restrain or limit some variables. see also the blog of Niklas of August 2009, or http://www.comsol.com/support/knowledgebase/1042/ Good luck Ivar

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: 2 decades ago 23.11.2009, 08:20 GMT-5
Hi

you also have the thermostat example (somwhere in the docs ;)

Exactly what are you trying to do ?
i.e if you want to find the optimum source power Qin [W/m^3] of a thermal source to get a given temperature in a precise location you can do it by following the example mentionned earlier.

I can also propose a simple example attached:

I have made in [v3.5a-htgh-2D] a rectangle (0.6x1m but this is arbitrary), its in iron like material, I have added a small 0.1^2[m^2] Cu box with a volumetric heat source Qin [W/m^3].
Note: Qin is not yet defined I'll do it later hereafter.
I have also made a small area 0.1x0.05[m^2] on the left side, where I have my temperature measurement (thermostat or thermometer ...).

I define subdomain material constants:
Cu: the "htgh" default material, and
iron: k=75[W/m/K], rho=7750[kg/m^3], and Cp=440[J/kg/K],
these are good approximations, but you can also use the material library if you have this option.

I then define some constants, I use for the boundary conditions:
"T0" the ambient temperature applied to the higher wall 7,
"Tfix" a fixed temperature applied to the lower wall 2,
wall 13 is isolated,
while the left wall 1,3,5 is set to Heat Flux "Qout0*Length1", where the constant Qout0=-2000[W/m^3] an arbitrary value I have defined in the constants, and Length1 is defined in Options - Integration coupling variables - boundary variables: Length1 = int(1,ds) that means that I'm integrating ds over the boundary length, hence my result is the total length of my boundary.
Of course as I know the length, I could have used 1[m] instead, but this way is independent of any later geoemtrical changes, and does not cost a lot of calculations.

Finally I define the constant "Ttarget" = 22.5[degC] (but any value is OK), and
"Qin0" that I used first, in place of "Qin" for the Cu source volume to tune the Q values such to have a nice "rainbow" temperature distribution on my model,
I then replaced the "Qin0" by "Qin" for the Cu to do my optimisation.

In the same way I create the Options - Integration coupling variables - sub-domain variables:
"Area2" = int(1,dx*dy) on sub-domain 2 the temperature sensor, this variable is simply the area of my surface, and I have defined the
"T2ave" = int(T/Area2,dx*dy), the average temperature over the boundary 2 = the termometer readout.
In the same time I define Ares3 = int(1,dx*dy) over subdomain 3 for alter heat flux calculations.

So now I'm ready to define the global equation "Qin" such that it is optimised to give T2ave=Ttarget :
Select Global Equation, type Name: Qin, Equation: (T2ave-Ttraget), and you can leave the initial conditions at "0", or put the Qin0 as the initial Init(u).
NOTE: u here is not u=displacement along x but the arbitrary vector "u" as per COMSOL documentation and represents any of the displacement or its time derivatives ut, utt ...
The global equations are minimised to "=0" therefore T2ave-Ttraget=0 is the same as T2ave=Ttarget

Normally you can now solve and you get your temperature distribution, I have the surface temperature shown, as well as countours (with fixed white color lines to better illustrate the mapping).

I need a Qin=3.23197e5[W/m^3] to achieve my 22.5[degC] at T2ave.

This is read out by Postprocessing Subdoman Integration on subdomain 3 of the value Q_htgh/Area3
NOTE: the units are not displayed today correctly for V3.5a when you use integration variables, so you can rewrite this by first integrating the expression "1" over area 3, you will read 0.01 [m^2] in the lower pan, that you can copy and paste this into the expression Q_htgh/(0.01 [m^2]) with Q_htgh being the default htgh Heat Source term.
Note that this large value is due to the small surface we are talking bout a few [kW/m].
Further note in 2D we re talking about "per meter depth" as default, since COMSOL is in fact always working 3D in background, it just rescales the missing dimension(s) to 1, in this way the units remain coherent.

You can also analyse the heat flux exchanges along the boundaries, by selecting these sequentially and integrating the normal heat flux over their respective length (check you units and divide by the 1[m] depth if you want surface exchange values. You will notice that the "isolation boundary" is not perfectly isolating, and the -2000 is not fully reached. On the constant temperature boundaries you get certain values. If you want more precise value, turn on the "weak constraints" and integrate "lm1" over these boundaries. There is little difference, but that depends also on the meshing you use.
NOTE: that "lm1" is only defined on boundaries with fixed temperatures.

Now this is for an "=" case, it is not a "smaller than" inequality.
But I do not really uderstand what you want to do in detail with a bolean test. With the example above you get the maximum source power to reach your tempeature limit, then its up to you to use this as maximum Qin for a time simulation.

Hope this helps, it got rather lengthy

good luck
Ivar
Hi you also have the thermostat example (somwhere in the docs ;) Exactly what are you trying to do ? i.e if you want to find the optimum source power Qin [W/m^3] of a thermal source to get a given temperature in a precise location you can do it by following the example mentionned earlier. I can also propose a simple example attached: I have made in [v3.5a-htgh-2D] a rectangle (0.6x1m but this is arbitrary), its in iron like material, I have added a small 0.1^2[m^2] Cu box with a volumetric heat source Qin [W/m^3]. Note: Qin is not yet defined I'll do it later hereafter. I have also made a small area 0.1x0.05[m^2] on the left side, where I have my temperature measurement (thermostat or thermometer ...). I define subdomain material constants: Cu: the "htgh" default material, and iron: k=75[W/m/K], rho=7750[kg/m^3], and Cp=440[J/kg/K], these are good approximations, but you can also use the material library if you have this option. I then define some constants, I use for the boundary conditions: "T0" the ambient temperature applied to the higher wall 7, "Tfix" a fixed temperature applied to the lower wall 2, wall 13 is isolated, while the left wall 1,3,5 is set to Heat Flux "Qout0*Length1", where the constant Qout0=-2000[W/m^3] an arbitrary value I have defined in the constants, and Length1 is defined in Options - Integration coupling variables - boundary variables: Length1 = int(1,ds) that means that I'm integrating ds over the boundary length, hence my result is the total length of my boundary. Of course as I know the length, I could have used 1[m] instead, but this way is independent of any later geoemtrical changes, and does not cost a lot of calculations. Finally I define the constant "Ttarget" = 22.5[degC] (but any value is OK), and "Qin0" that I used first, in place of "Qin" for the Cu source volume to tune the Q values such to have a nice "rainbow" temperature distribution on my model, I then replaced the "Qin0" by "Qin" for the Cu to do my optimisation. In the same way I create the Options - Integration coupling variables - sub-domain variables: "Area2" = int(1,dx*dy) on sub-domain 2 the temperature sensor, this variable is simply the area of my surface, and I have defined the "T2ave" = int(T/Area2,dx*dy), the average temperature over the boundary 2 = the termometer readout. In the same time I define Ares3 = int(1,dx*dy) over subdomain 3 for alter heat flux calculations. So now I'm ready to define the global equation "Qin" such that it is optimised to give T2ave=Ttarget : Select Global Equation, type Name: Qin, Equation: (T2ave-Ttraget), and you can leave the initial conditions at "0", or put the Qin0 as the initial Init(u). NOTE: u here is not u=displacement along x but the arbitrary vector "u" as per COMSOL documentation and represents any of the displacement or its time derivatives ut, utt ... The global equations are minimised to "=0" therefore T2ave-Ttraget=0 is the same as T2ave=Ttarget Normally you can now solve and you get your temperature distribution, I have the surface temperature shown, as well as countours (with fixed white color lines to better illustrate the mapping). I need a Qin=3.23197e5[W/m^3] to achieve my 22.5[degC] at T2ave. This is read out by Postprocessing Subdoman Integration on subdomain 3 of the value Q_htgh/Area3 NOTE: the units are not displayed today correctly for V3.5a when you use integration variables, so you can rewrite this by first integrating the expression "1" over area 3, you will read 0.01 [m^2] in the lower pan, that you can copy and paste this into the expression Q_htgh/(0.01 [m^2]) with Q_htgh being the default htgh Heat Source term. Note that this large value is due to the small surface we are talking bout a few [kW/m]. Further note in 2D we re talking about "per meter depth" as default, since COMSOL is in fact always working 3D in background, it just rescales the missing dimension(s) to 1, in this way the units remain coherent. You can also analyse the heat flux exchanges along the boundaries, by selecting these sequentially and integrating the normal heat flux over their respective length (check you units and divide by the 1[m] depth if you want surface exchange values. You will notice that the "isolation boundary" is not perfectly isolating, and the -2000 is not fully reached. On the constant temperature boundaries you get certain values. If you want more precise value, turn on the "weak constraints" and integrate "lm1" over these boundaries. There is little difference, but that depends also on the meshing you use. NOTE: that "lm1" is only defined on boundaries with fixed temperatures. Now this is for an "=" case, it is not a "smaller than" inequality. But I do not really uderstand what you want to do in detail with a bolean test. With the example above you get the maximum source power to reach your tempeature limit, then its up to you to use this as maximum Qin for a time simulation. Hope this helps, it got rather lengthy good luck Ivar


Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 23.11.2009, 09:49 GMT-5
Hi

I am trying to study the temperature distribution on a plate when submitted to a heat source on the surface. However I want to limit the maximum temperature that can be achieved.

I have already set a rectangular box with a heat source on the surface and stabilished different boudaries condition. One of the bondary conditions is a heat flux, in order to simulate a moving heat source. However when I increase the intensity of the heat source I do not want the temperature to go higher than a certain value and if it does go higher I want the remaining intensity to be considered has losses.

Does this make any sense to you?

Best regards

Eurico
Hi I am trying to study the temperature distribution on a plate when submitted to a heat source on the surface. However I want to limit the maximum temperature that can be achieved. I have already set a rectangular box with a heat source on the surface and stabilished different boudaries condition. One of the bondary conditions is a heat flux, in order to simulate a moving heat source. However when I increase the intensity of the heat source I do not want the temperature to go higher than a certain value and if it does go higher I want the remaining intensity to be considered has losses. Does this make any sense to you? Best regards Eurico

Please login with a confirmed email address before reporting spam

Posted: 2 decades ago 23.11.2009, 12:54 GMT-5
I am sending you the model I have created to give you a better idea of what I am doing.

What I need now is to "tell" the model that the temperature can not go higher than a certain value, for example 2000 K.

However I have no idea on how to do that.

Best regards

Eurico
I am sending you the model I have created to give you a better idea of what I am doing. What I need now is to "tell" the model that the temperature can not go higher than a certain value, for example 2000 K. However I have no idea on how to do that. Best regards Eurico

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.