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.

Maximum of point probe over time during solution

Please login with a confirmed email address before reporting spam

Hello,

I'm running a large batch of time-dependent models. The simulation time should change for each model depending on the parameters I input, so right now I'm using a really long solution time and a stop condition that looks like:

if(t > 0.003 && mod1.focalPointDisplacement < 10^-7, -1, 1)

Such that when the domain point probe "focalPointDisplacement" falls below 10^-7, the simulation stops and I can carry on with the next one.

The problem is that for some inputs, *all* displacement will be below 10^-7. However, what I really want is to stop it after the values have "relaxed", as the focalPointDisplacement will increase to some maximum then drop down to (essentially) 0 (at which point I want to stop it). Ideally, I want to use a stop condition like

if(mod1.focalPointDisplacement < (0.05 * max(mod1.focalPointDisplacement)), -1, 1)

where "max(mod1.focalPointDisplacement)" is the maximum value recorded by that probe over time, up till the current solution time. Of couse, "max" doesn't work, and using a maxop doesn't seem to work either: maxop1(solid.disp) seems to always be exactly equal to mod1.focalPointDisplacement when they're both defined at the same location in space.

So, any way to grab the maximum of a probe over time and use it in a stop condition?

Thanks so much for any help you can offer!

0 Replies Last Post 4 févr. 2014, 17:24 UTC−5
COMSOL Moderator

Hello Kenton Hamaluik

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

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.