Adding a new contact Law

Asked by Nima Goudarzi

Hello All,
 I am completely new in using YADE (very limited preliminary knowledge) but as a part of my research Ph.D. thesis, I have to implement a new contact law between particles. Before getting my hands dirty, I have to make sure if I will be able to do this in a short period of time (less than 3 weeks). The contact law I need to implement is a rolling resistance model for nonconvex, nonsmooth contact proposed by Jiang et al. (Two-Dimensional Discrete Element Theory for Rough Particles,2009). The authors, originally have implemented their model in a code called revised 2D DEM and obtained satisfactory results. I am going to repeat the same scenario using YADE. I need your help guiding me what to do:

1- I am new in both C++ and Python and don't know a lot about YADE. What are the steps for adding a code? Do I need to start C++ and Python from the beginning ? I know that I have to read Programmer's Manual Too.
2- I have installed YADE itself but I think I need Yade/Trunk for modifying the source code. If yes, I don't know how to install and compile YADE/TRUNK. I read something about that but am not sure how to install it (when I go to code repository at Git Hub, I don't know what to download and how to install and compile Yade/Trunk then)

All your help will be highly appreciated

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

Hello,
1/ You'll need to first read serious books on C++, and learn some basics of python.
2/ check the installation page
3/ make sure the model you are going to implement is not already present as is or in a slightly different form. It seem to be your case, in the sense that the model you mention can be relatively closely reproduced by the CohesiveFrictional contact model with appropriate setting of its parameters.
Cheers
Bruno

Revision history for this message
Nima Goudarzi (nimagoudarzi58) said :
#2

Hello Bruno,

Thanks for the reply. I'll finally write my code with C++ (It will take some times, however). But there are some issues:

1- I have only installed YADE itself. Is there anything else I must do for compiling my own code (I mean do I need to install YADE by source code?) If yes I don't know how.

2- How I can check the installation package? Is this a place in which I can access already existing contact laws. If yes, I think I can check what is inside to have a better insight about what I have to prepare for compiling. Please let me know how I can access installation package. Do I need to write a command in the terminal?

3- The model I want to implement may be similar to some existing models but this is not the only one I need to implement. I will start with this one and need to develop some other models as well.

Sincerely Yours and thanks for your help and patience

Nima Goudarzi

Revision history for this message
Jérôme Duriez (jduriez) said :
#3

1- and 2-
Installation of Yade sources should be sufficiently well described in the "installation page" referred to by Bruno. You can find this page at https://yade-dem.org/doc/installation.html#source-code

I strongly recommend you give a close look to almost all https://yade-dem.org/doc/ ("User's Manual" and "Programmer's Manual" sections at least) since you need to become an "advanced" YADE user in order to achieve your task.

Jérôme

Revision history for this message
Nima Goudarzi (nimagoudarzi58) said :
#4

Thanks so much Jerome,

1- I finally have to find out how to write the C++ code. As I understood so far, there is no separate installation for the open source. I mean if I finish my C++ code and put it in DEM Package which I have installed from the link you provided and run YADE as usual, it will be fine. Is this right?

2- The model I want to implement is a 2D DEM model but as far as I know, YADE does not do purely 2D analyses. Do you have any recommendation on this also?

Sincerely Yours,

Nima

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.