Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior occurs when running 2 mpm in one file #5

Closed
Mathias0 opened this issue May 10, 2024 · 1 comment
Closed

Unexpected behavior occurs when running 2 mpm in one file #5

Mathias0 opened this issue May 10, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Mathias0
Copy link

First of all, thank you very much for developping this powerful GeoTaichi!!

I find the codes well structured and I want to write a 2-grid MPM code using GeoTaichi. So I began from defining 2 MPM in one file. If everything goes well, I can then define how the fields in 2 MPM interacts with each other (known as 2-grid MPM).

When I try to run 2 MPM in one file, I observed one weird behavior. In the code I shared, I define 2 MPM and no interaction between them is defined. It is about the dam-breaking of same kind of Newtonian fluid initially occupying 2 symmetric rectangle region. It is expected that their behavior is also symmetric.

As written in the code I shared, if the order of the last 2 lines is

mpm2.run()
mpm1.run()

then everything goes well, the dam-break behavior being symmetric.

However, when the order is changed like this:

mpm1.run()
mpm2.run()

the behavior is no longer symmetric, which is unexpected and undesired.

I know the way I use GeoTaichi is not the common way or the normal way. The problem I occured would almost never be occurred for those who use GeoTaichi in a normal way. But I just really want to find out what is causing this so that I could find a way to fix it or avoid it. (When I tried further coupling the 2 MPM, this problem is always happening and cannot be solved by simply change the ordes)

Are there some infomations shared by the two instances of MPM() ?

(When I tried further coupling the 2 MPM, this problem is always happening and cannot be solved by simply change the order. The way I tried to further coupling is like expanding the run() into:

...

while current_time<time:

 ...

 mpm1.solver.engine.compute_nodal_kinematic(mpm1.solver.sims, mpm1.scene)
 mpm2.solver.engine.compute_nodal_kinematic(mpm2.solver.sims, mpm2.scene)

 exchange_momentum(mpm1.scene.node, mpm2.scene.node)

 mpm1.solver.engine.compute_grid_velcity(mpm1.solver.sims, mpm1.scene)
 mpm2.solver.engine.compute_grid_velcity(mpm2.solver.sims, mpm2.scene)

 mpm1.solver.engine.apply_kinematic_constraints(mpm1.solver.sims, mpm1.scene)
 mpm2.solver.engine.apply_kinematic_constraints(mpm2.solver.sims, mpm2.scene)

 ...

)
(The background where I am applying this kind of coupling is simulating sand released in water.)

@Yihao-Shi Yihao-Shi self-assigned this May 11, 2024
@Yihao-Shi Yihao-Shi added the bug Something isn't working label May 11, 2024
@Yihao-Shi
Copy link
Owner

Yihao-Shi commented May 15, 2024

hello Mathias0, sorry for the late reply. We have correct this issue, please download the latest version 1e4c9a3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants