Magnus Ringh
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
7 years ago
21 mars 2018, 07:46 UTC−4
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