← Back to team overview

yade-users team mailing list archive

Re: [Question #697799]: CPM model "omega threshold" parameter in source code

 

Question #697799 on Yade changed:
https://answers.launchpad.net/yade/+question/697799

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> I would like to know what it means by
> (void)">=1.

concerning line [1], have a look at documentation [2] how it looks "rendered".
">=1. ... is a part of a docstring (note the starting quotation mark)
(void) ... this is C++ way to cast (change) types, here a "string" to void (for some internal reasons). Have a look at [3] and search "(void)" (there are 2 occurrences and explanation for almost this case).

> In addition, If I want to delete a cohesive contact when the omega Threshold reaching to 0.8, should the code block be modified to the following format,
> (Real,omegaThreshold,((void)">=0.8 to deactivate, i.e. never delete any contacts",0.8),,"damage after which the contact disappears (<0.8), since omega reaches 1 only for strain →+∞"))

NO!
It is possible to do it this way, but it is very discouraged approach for various reasons (one is the need to recompilation, other is divergence from git source code)
The first and third 0.8 is inside quotation marks and appear only in docstrings (have absolutely no effect on computation itself).
The second 0.8 is default value. But I think 1.0 is more reasonable.

The way to change the value for simulation is:
###
O.engines = [
    ...
        Law2_ScGeom_CpmPhys_Cpm(omegaThreshold=0.8),
    ...
]
###

Cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/ConcretePM.hpp#L284
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Law2_ScGeom_CpmPhys_Cpm.omegaThreshold
[3] https://yade-dem.org/doc/prog.html

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.