test a new contact model

Asked by Chenguang Liang

Recently, I have created new cpp and hpp files related to the jkr contact model referring to Hertz-Mindlin.cpp. I test the new code following the tutorial file 01-bouncing-sphere.py , it run well as was expected. Are there any other tests necessary to check my code, can you give me a guide? thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Chenguang Liang
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

TL;TR: it is very individual

> Are there any other tests necessary to check my code ... ?

It depends on many factors and on the definition of "necessary".

How many people / how often will use the model?
Just you for one article?
You and your team for a longer-term project?
You and your team and you want to publish it and let anybody use it?
...?
The more people you want to use it, the better it should be tested (IMO).

The answer strongly depends on the model, its purpose and its typical usage (please provide more information).
If its primary purpose is some behavior at bouncing and rebouncing (which according to JKR and wikipedia seems yes), then probably a bouncing simulation is OK.

Concerning bounding simulation, it strongly depends on what "following the tutorial file" means (please provide more information).
You can test one specific case.
On the other hand, even testing "just" bouncing, you can test different radii of spheres, different angles of impact, different impact velocities, impact + rotating sphere etc. etc. etc.

All in all, it is very individual, depends on many factors etc.

Cheers
Jan

Revision history for this message
Chenguang Liang (liang-ceo) said :
#2

thanks,my friend. I will try to test the simulations as you said. When there is no bugs and other problems, i am happy to share it on yade to make it better.