← Back to team overview

yade-users team mailing list archive

Re: How to use constitutive laws in Python scripts

 

> I joined a script as an example but, 
Nay you didn't! (this is Monty Python, not Python ;-) )

> 1 - How can we manage the value of the physical parameters in a python
> script? In almost all the examples, parameters are not assigned. I
> assume that their default are then used, but what is the way of
> writing in order to control them?
>
> To be sure that I am enough clear, how can we, for example, manage kn,
> ks and frictionAngle in the basic ElasticContactLaw (or in the
> CundallStrackLaw)?
The InteractionPhysicsFunctors  (like Ip2_CpmMat_CpmMat_CpmPhys, or, not
yet named properly, SimpleELasticRelationships) compute parameters of
the InteractionPhysics (e.g. kn, ks and all others) from 2 Material
instances they receive. SimpleElasticRelationships receives
2xGranularMat and constructs an ElasticContactInteraction instance, with
rigidities computed using some weird formulas. Ip2_CpmMat_CpmMat_CpmPhys
receives 2 CpmMat instances, creates a CpmPhys, but most of its values
are assigned from values of the functor itself. (The names are being
regularized now a little bit)
> 2 - I tried to do the same simulation with different Laws (see the
> script), but unfortunately, only the elactic ones works. I suspect
> that the possible interaction between spheres and facets is at the
> origin of the problem... Probably wrong, but here it comes to my third
> question...
>
> 3 - Is it possible to create a simulation with several constitutive
> laws? For example, can we define an elastic law between some elements
> (spheres and facets?) and a cohesive one (RockPM) between others
> (spheres and spheres), or do we have to define the two objects in the
> same law
Yes, it is possible. LawDispatcher dispatches based on
InteractionGeometry and InteractionPhysics types. If this combination is
different, you can handle by a different constitutive law as well. We
might add some more flexibility here, if it is desired.

Have a look at http://beta.arcig.cz/~eudoxos/yade/sphinx/ ; although in
nascent state, you might gather some useful information from there.

v



References