← Back to team overview

yade-users team mailing list archive

Re: [Question #705129]: Question about the development of polyhedral contact laws

 

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

    Status: Open => Answered

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

> Does this mean that I only need to use the existing law2 and ip2
functions in Polyhedra_02.cpp as templates to build new functions, and
then add the declaration of the new function to the hpp file?

Yes, it is one option.

> My main concern is that I am not particularly clear about the
dependency relationships between functions in different files, such as
the Ig2 function. My current idea is to copy the first 22 lines of
Polyhedra_02.cpp into my newly written cpp file. Is this feasible?

Yes, it should be feasible.
You can read User's manual, Tutorial, DEM Formulation... to get basic idea about Yade design.

As I understood your description, you will modify how the force is computed based on contact geometry.
It is a task of Law2.
Probably you also would need to modify Ip2, which stores "physics" information about interaction (e.g. some friction history).
It should not be necessary to touch Ig2 (geometry part of the contact - overlaps etc.).

> After building the new function (law2,ip2), if I want to test the
model, should I put the cpp file in the yade source file path and then
recompile according to the method provided in the installation?

Yes

> Does this mean that I need to recompile the entire source code every
time I make a modification?

Yes.
But the compiler is "clever enough" to compile only necessary part of the code (the modified files + files depending on them)

Cheers
Jan

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