How to define new materials in MPM simulation #696
Unanswered
AyumuYasue0421
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
#Final goal
Successful concrete flow simulation
#Current issues
I don't know how to set a new material (e.g. concrete)
##Steps procedure
(1)Create "genesis/engine/materials/MPM/concrete.py"
(2)Modify "genesis/engine/materials/MPM/init.py"
[Modifications content]
Add "from .concrete import Concrete"
(3)Modify "examples/mpm_liquid.py"
[Modifications content]
"material=gs.materials.MPM.Liquid(),"
→"material=gs.materials.MPM.Concrete(),"
I added the concrete material code as above and applied it to the sample code. However, the following error occurred.
##Error content
"Traceback (most recent call last):
File "/home/iga/Genesis_ws/Genesis/examples/mpm_liquid_attempt.py", line 44, in
material=gs.materials.MPM.Concrete(),
AttributeError: module 'genesis.engine.materials.MPM' has no attribute 'Concrete'"
#Fundamental problem
In addition to the above problem, if I delete
"from .liquid import Liquid"
in
"genesis/engine/materials/MPM/init.py"
, the original
"examples/mpm_liquid.py"
before modification runs without any problems.
In other words, I don't seem to understand the fundamental connection between the material definition and the sample code in Genesis' MPM simulation (examples/mpm_liquid.py etc...).
#Discussion content
Please tell me how to set up a new material in the genesis/engine/materials/MPM/
folder and apply it to the MPM simulation.
Beta Was this translation helpful? Give feedback.
All reactions