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.
Is there a simple way to obtain the historic maximum of a variable?
Posted Nov 3, 2011, 5:58 p.m. EDT Materials, Parameters, Variables, & Functions, Structural Mechanics Version 4.2a, Version 4.3a 10 Replies
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
in the data set node you can extract the min max of a region and then analyse that separately, or you can get it into a table. Check the doc on the Posprocessing nodes
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
And what I need is a field variable which is the maximum of another field variable at the same position in history. Similar as the plastic strain in elasto-plastic analysis, but unfortunately, COMSOL hide the details of implementation on plastic strain. This is very important in material modeling involving internal variables. I believe it is not too difficult to implement as an operator, hope COMSOL could consider it in the next version.
Please login with a confirmed email address before reporting spam
with a maxop1() operator I believe you can manage, I have added a simple example, it's nonsense in physics, I add here a boundary force driven by the maximum of the face displacement, but it illustrates the use of a model global variable defined as the maximum of a face, used in the solving process
It's a v4.2a model file
--
Good luck
Ivar
Attachments:
Please login with a confirmed email address before reporting spam
I need a field, not a global variable, and I need to take the maximum in time, not space. In your example, I need the boundary force on any point to be a function of the maximum displacement of the same point from t=0 to t.
Please login with a confirmed email address before reporting spam
I didn't use any CAD tools, but it could be a 4.2a effect.
Indeed I didn't catch your true issue then, with a projection operator you can extract, for a given time the values of your boundary, but then how to accumulate the max over time ? Even your field will become rather discontinuous I believe. Probably you have only matlab/scripting to get around
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Actually, COMSOL has used such a feature in the Structure Mechanics module. The plastic strain is a variable like that (loading increase it, unloading / reloading up to the historic maximum would not change it, overloading it would renew the value). Such a field should not be too discontinuous. COMSOL has hidden the implementation from user for some reason, so it can not be modified, and we have no clue how it is implemented.
It is almost impossible even with a matlab script. Because this is a field, i.e. each point would carry a different value, and it needs to be stored somewhere throughout the simulation.
Thank you anyway.
Wei
Please login with a confirmed email address before reporting spam
I think everybody could workaround if we could directly access a local variable at the END of the LAST converged timestep....then we could work with some if and comparison operators....but I guess also adressing specific time steps- iin particular the last converged one- is not possible?
Please login with a confirmed email address before reporting spam
You can do this by creating a ODE and assigning the co-efficient to 0 and using the command "ODE variable - ((variable>=ODE variable)*variable +(variable<ODE variable)*ODE variable) for f. This will assign the maximum field value of the variable to the ODE variable which you can access in the end. Use segregated solver to solve for the variable first and then solve for the ODE.
Hope this helps.
Best
Lakshmi.
Please login with a confirmed email address before reporting spam
It would be helpful if you can post an example mph file how you do this within a steady state setting. With time dependent solver, it is easy with the ODE. But with steady state, once the coefficients da and ea are set to zero, it will not work, at least for me.
Thank you,
Suresh
Hi,
You can do this by creating a ODE and assigning the co-efficient to 0 and using the command "ODE variable - ((variable>=ODE variable)*variable +(variable<ODE variable)*ODE variable) for f. This will assign the maximum field value of the variable to the ODE variable which you can access in the end. Use segregated solver to solve for the variable first and then solve for the ODE.
Hope this helps.
Best
Lakshmi.
Please login with a confirmed email address before reporting spam
d(Tmax)/dt = dT/dt*(dT/dt>0)*(T>Tmax)
if you need to find a maximum of variable T in time. It worked well for me.
Regards,
Denis
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.
Suggested Content
- KNOWLEDGE BASE Error: Internal Error in Geometry Decomposition
- FORUM Is there a simple way to obtain the historic maximum of a variable?
- KNOWLEDGE BASE BDF, Generalized Alpha, and Runge-Kutta Methods
- KNOWLEDGE BASE How to Debug an External Material
- BLOG A Tour of the Famous Scientists Laid to Rest in Göttingen City Cemetery