yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #00475
Re: Is there a method to change the parameters during a simulation
Yes. Look what is done in TriaxialCompressionEngine.cpp (from last SVN
snapshot, you can download it if you have only the last release). You
can see that at line 85 :
if ( ... && ((Omega::instance().getCurrentIteration()) >=
(FinalIterationPhase1+1000)))
{....
Its almost the same problem as yours, I have to change the parameters of
some engines during the simulation (strain rate in this case). I see at
least two methods :
Method 1 :
-define a ModifiedCundallNonViscousForceDamping that inherits from
CundallNonViscousForceDamping and define its action() function like this :
ModifiedCundallNonViscousForceDamping::action(Body* body)
{
if ( (Omega::instance().getCurrentIteration()) >= limit) damping = ...;
CundallNonViscousForceDamping::action(body);
}
It should work, this is basically what I do when
TriaxialCompressionEngine inherits from TriaxialStressController.
Method 2 :
Define a new engine "DampingModifier" that contains a shared pointer p
to CundallNonViscousForceDamping, and do the test in this engine :
if ( (Omega::instance().getCurrentIteration()) >= limit) p->damping = ...;
The problem here is that you must find a way to link both engines so
that the link will still exist when the simulation is loaded from the
xml. Its doable but I don't remember exactly how I did that before.
Perhaps in preprocessor::CreateActors, try something like this (but not
sure its enough) :
{ ...
shared_ptr<CundallNonViscousForceDamping> actionForceDamping(new
CundallNonViscousForceDamping);
actionForceDamping->damping = ...;
shared_ptr<DampingModifier> dampingModifier(new DampingModifier);
dampingModifier->p = dampingForce;
....
....
....
rootBody->engines.push_back(dampingModifier);
... }
I hope it helps.
Bruno
Feng, Chen a écrit :
>Hi, all:
>
>I am now trying to make a simulation of based on SDECSpheresPlane, however, I
>want to make the damping coefficient 0.3 for the first 1000 steps and 0.4 for
>the next 1000 steps, is it possible to program it in YADE?
>
>Thanks a lot!
>
>Feng Chen
>
>_______________________________________________
>Yade-users mailing list
>Yade-users@xxxxxxxxxxxxxxxx
>https://lists.berlios.de/mailman/listinfo/yade-users
>
>
>
>
--
_______________
Chareyre Bruno
Maître de conférence
Institut National Polytechnique de Grenoble
Laboratoire 3S (Soils Solids Structures) - bureau I08
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 04.56.52.86.21
________________
_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users
Follow ups
References