Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
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.
stop condition
Posted Mar 15, 2011, 3:07 p.m. EDT Version 3.5a, Version 4.0a, Version 4.1, Version 4.3 11 Replies
Please login with a confirmed email address before reporting spam
How can i do it? any suggestion?
Maybe i have to create a expresion like max(T)?
Thanks
Please login with a confirmed email address before reporting spam
if I remember right in v3.5a you need to use matlab to get a max(T(x,y,z)) over a (sub-)Domain.
And there is a "stop conditions field" somewhere in the solver sub-tabs
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
I'm trying to implement a Stop condition on a time-dependent simulation. From what I've read, Comsol stops if the expression introduced goes negative, so here's the deal; I have a global variable gap which I defined as height + mod1.v . I simply introduced gap at the expression box, but I get the following error:
Expression could not be evaluated
I tried also with mod1.v alone and I get the same result. However if I put the time variable t it simulates. Any ideas?
Thanks in advance.
I'm in 4.0a by the way.
Please login with a confirmed email address before reporting spam
Attached an example of time-dependent simulation with stop condition.
Movement will stop, if max. stress in the plate is bigger than stress_max.
Stop condition is in Study 1 -> Solver Configurations -> Solver 1 -> Time-Dependent Solver 1 -> Stop Condition 1.
You can include it with right-click...
It is for solid in V4.1.
Ralf
Attachments:
Please login with a confirmed email address before reporting spam
Shouldn't one use rather a boolean expression than a "real number" with a <= or >= or >, > ?
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
The example above is correct and shows how to form a scalar expression that COMSOL evaluates as a stop condition. The time stepping stops when the expression becomes negative (that is, when the maximum effective stress becomes greater than the stress level defined by the parameter stress_max).
The problem with using mod1.v is that it is a field quantity (the Y-component of the displacement) and not a scalar. In the example model above, an expression like 3e-4-mod1.maxop1(mod1.v) works and stops the time stepping when the maximum y-direction displacement exceeds 3e-4.
Best regards,
Magnus Ringh, COMSOL
Please login with a confirmed email address before reporting spam
Thanks for the precision Magnus, indeed, I did not, read fully trough the help section, only halfway ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Thank you very much for your response. I realized later that the expressions for stop condition cannot contain variables which depend on spacial directions. However, I had aborted that approach and used a conditional expression on a boundary condition. But now, I'm gonna try the maxop and see what happens, still, there's a little doubt about that; How does comsol understand the maxop1, as the first maximum which exceeds the condition, or does it compare with the global maximum of the expression?
Thanks in advance.
Please login with a confirmed email address before reporting spam
maxop1 is an operatzor to get the maximum value out from a domain or a boundary or ... (see the maxop1 definition in the definition node, so its the max over the implicit or explicit variables used for the expression, seen over the selected entity(ies), no ?
By the way maxop is v4 (dosent exist in 3.5, there one needed to go via Matlab)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
I am attempting to create a stop condition very similar to what was accomplished here except for the variables I would like the stop condition follow. In my model I am looking to stop the solver when a steady state temperature is reached. This is defined as less than a 1degC increase in temperature over an hour. The expression would be something along the lines of: maxT(t) - maxT(t-3600) > 1. My question is what the correct expression would be in order to grab the temperature at the previous hour. Thank you for your time.
Best,
Matt
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.