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

Initial gravity field #28

Open
Yihao-Shi opened this issue Feb 22, 2025 · 0 comments
Open

Initial gravity field #28

Yihao-Shi opened this issue Feb 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Yihao-Shi
Copy link
Owner

Currently, the code can only compute the initial gravity field accurately for rectangular initial geometries. For arbitrarily shaped material points, the calculation may be incorrect due to the simplicity of the embedded algorithm.

To achieve accurate gravity field computation for arbitrary shapes, you can manually input the distance of each material point from its free surface as a numpy array and assign it using the GravityField keyword, as shown below:

mpm.add_body(body={
                       "Template": {
                                       "RegionName":         "region1",
                                       "nParticlesPerCell":  2,
                                       "BodyID":             0,
                                       "MaterialID":         1,
                                       "ParticleStress": {
                                                              "GravityField":     /**your_input_array**/,
                                                              "InternalStress":   ti.Vector([-0., -0., -0., 0., 0., 0.]),
                                                              "Traction":         {}
                                                         },
                                       "InitialVelocity":ti.Vector([0, 0, 0]),
                                       "FixVelocity":    ["Free", "Free", "Free"]    
                                       
                                   }
                   })
@Yihao-Shi Yihao-Shi added the bug Something isn't working label Feb 22, 2025
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

1 participant