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 get time when Temperaure reached at a value?

Please login with a confirmed email address before reporting spam

Hello!

I'd like to store time value to local variable during solution. Could you show me about how to get time value when dependent variable(Temperature, etc. reached at a certain value?


1 Reply Last Post 2018年3月21日 GMT-4 07:46
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 2018年3月21日 GMT-4 07:46

Hi,

One way to get a value for when a dependent variable (or rather, some aspect of it, such as the mean temperature or temperature in a point, since the dependent variable typically is a field) is to add a stop condition to the time-dependent solver. The stop condition will stop the time stepping when the condition is fulfilled (for example, that the threshold temperature minus the temperature in a point becomes negative).

Another way, if you want a variable that you can plot and evaluate, could be to define an ODE, perhaps using a Point ODEs and DAEs interface at a point of interest in the geometry. Then integrate the ODE variable with a source term that is a Boolean variable that is 1 initially and becomes 0 when the temperature reaches a certain value (such as T_inpoint<400[K], where T_inpoint represents the temperature in that point. The value of the ODE variable is then equal to time, up unitl the temperture reaches 400 kelvin; the value then stays at the time when the temperature reached 400 K.

Best regards, Magnus Ringh, COMSOL

Hi, One way to get a value for when a dependent variable (or rather, some aspect of it, such as the mean temperature or temperature in a point, since the dependent variable typically is a field) is to add a stop condition to the time-dependent solver. The stop condition will stop the time stepping when the condition is fulfilled (for example, that the threshold temperature minus the temperature in a point becomes negative). Another way, if you want a variable that you can plot and evaluate, could be to define an ODE, perhaps using a Point ODEs and DAEs interface at a point of interest in the geometry. Then integrate the ODE variable with a source term that is a Boolean variable that is 1 initially and becomes 0 when the temperature reaches a certain value (such as `T_inpoint

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.