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.

Temperature condition depending on time

Please login with a confirmed email address before reporting spam

Hi

I would like to know if it is possible to force the temperature of a subdomain with values depending on time (convection and conduction module).

Thanks

5 Replies Last Post 06.04.2010, 07:49 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 30.03.2010, 15:10 GMT-4
Hi

yes why not, but to solve with respect to time "t" (default time variable in COMSOL) you must use "physics - transient" as equation mode, depending on what you are doing you will see the equations being updated and the time derivative appear.

Then it's up to you to define the way the BC changes with time, either as function of the time, with a predefined "function" or with na bolean condition T = T0*(t<t1)+T1*(t>=t1). But note that abrupt steps might give some difficulties to the solver so smoohing the steps are often recommended, you can use the heaviside functions (do a search on "flc" on your doc, or go directly to the "command.pdf" for the function description, but will find examples in the other docs.

Note that "t" is not defined if you are changing the solving mode i.e. to stationary, so you must update your BC equations.

Good luck
Ivar

Hi yes why not, but to solve with respect to time "t" (default time variable in COMSOL) you must use "physics - transient" as equation mode, depending on what you are doing you will see the equations being updated and the time derivative appear. Then it's up to you to define the way the BC changes with time, either as function of the time, with a predefined "function" or with na bolean condition T = T0*(t=t1). But note that abrupt steps might give some difficulties to the solver so smoohing the steps are often recommended, you can use the heaviside functions (do a search on "flc" on your doc, or go directly to the "command.pdf" for the function description, but will find examples in the other docs. Note that "t" is not defined if you are changing the solving mode i.e. to stationary, so you must update your BC equations. Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 02.04.2010, 15:21 GMT-4
I am using the transient mode but what I really want to do is to force the subdomains temperature and not the BC. Maybe it is not possible once we are solving for the temperature. My problem demands that the temperature of a material should change periodically by an amount of delta(T) (magnetocaloric effect). If I could at least change the temperature as an initial condition of a material (a subdomain) without changing the solution of the other subdomains I could divide my problem in time to smaller ones. Can you tell me how can I use the "current solution" and change the temperature of a subdomain at the same time as the initial condition for the new problem?

Thanks
I am using the transient mode but what I really want to do is to force the subdomains temperature and not the BC. Maybe it is not possible once we are solving for the temperature. My problem demands that the temperature of a material should change periodically by an amount of delta(T) (magnetocaloric effect). If I could at least change the temperature as an initial condition of a material (a subdomain) without changing the solution of the other subdomains I could divide my problem in time to smaller ones. Can you tell me how can I use the "current solution" and change the temperature of a subdomain at the same time as the initial condition for the new problem? Thanks

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 04.04.2010, 02:18 GMT-4
Hi

There are probably a couple of way around. If you insist on changing the temperature, for a restart, I would save the solution and export it to matlab and adapt the initial temperature where needed and restart.
Now to get that to flow nicely, it's better to pilot it fully from Matlab.

But, my second question/comment would be why change the temperature ?
is it not possible to say that you have an energy increase of the type volumic power input Q(t)[W/m^3] and you pilot your model energy, which is the basic physicsal value we balancing and are solving for ?

Good luck
Ivar
Hi There are probably a couple of way around. If you insist on changing the temperature, for a restart, I would save the solution and export it to matlab and adapt the initial temperature where needed and restart. Now to get that to flow nicely, it's better to pilot it fully from Matlab. But, my second question/comment would be why change the temperature ? is it not possible to say that you have an energy increase of the type volumic power input Q(t)[W/m^3] and you pilot your model energy, which is the basic physicsal value we balancing and are solving for ? Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 06.04.2010, 05:01 GMT-4
I think I will increase the temperature by making use of Q(t) but on a very short delta(t). Just one more question: what are the solver parameters that I have to change to decrease delta(t) and obtain a reasonable solution (for example for delta(t)=0.01s)?

thanks
I think I will increase the temperature by making use of Q(t) but on a very short delta(t). Just one more question: what are the solver parameters that I have to change to decrease delta(t) and obtain a reasonable solution (for example for delta(t)=0.01s)? thanks

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 06.04.2010, 07:49 GMT-4
Hi

you should read through the transient solver settings in the doc, and do a couple of exercices related, the importance is how you set the time step in the definition of "t" time (I usually use 3-5 points per steep slopes, with different time steps in different regions, but always a monotoneous time sequence.

Then I ususally leave the rest as default, leaving COMSOL to decide on intermediate points etc, but these settings might also be required to tweak, specially with short pulses.

Good luck
Ivar
Hi you should read through the transient solver settings in the doc, and do a couple of exercices related, the importance is how you set the time step in the definition of "t" time (I usually use 3-5 points per steep slopes, with different time steps in different regions, but always a monotoneous time sequence. Then I ususally leave the rest as default, leaving COMSOL to decide on intermediate points etc, but these settings might also be required to tweak, specially with short pulses. 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.