MPMSolver#
The MPMSolver implements the Material Point Method (MPM) for simulating a wide range of materials including elastic solids, granular materials, fluids, and phase transitions.
Overview#
MPM combines:
Lagrangian particles: Track material points
Eulerian grid: Solve momentum equations
Particle-grid transfers: MLS-MPM for stability
Supported Materials#
Material |
Description |
|---|---|
|
Neo-Hookean elasticity |
|
Plasticity with yield |
|
Drucker-Prager granular |
|
Snow plasticity |
|
Weakly compressible fluid |
|
Active muscle material |
Usage#
import genesis as gs
gs.init()
scene = gs.Scene(
mpm_options=gs.options.MPMOptions(
dt=1e-4,
lower_bound=(-1, -1, 0),
upper_bound=(1, 1, 2),
grid_density=64,
),
)
# Add MPM entity
soft_box = scene.add_entity(
gs.morphs.Box(pos=(0, 0, 0.5), size=(0.2, 0.2, 0.2)),
material=gs.materials.MPM.Elastic(
E=1e5, # Young's modulus
nu=0.3, # Poisson's ratio
rho=1000, # Density
),
)
scene.build()
for i in range(1000):
scene.step()
Configuration#
Key options in MPMOptions:
Option |
Type |
Description |
|---|---|---|
|
float |
Internal timestep |
|
tuple |
Grid lower corner |
|
tuple |
Grid upper corner |
|
int |
Grid cells per unit |
|
float |
Particle spacing |
Grid Setup#
MPM requires a background grid for computation:
mpm_options = gs.options.MPMOptions(
lower_bound=(-2, -2, 0), # Grid min
upper_bound=(2, 2, 4), # Grid max
grid_density=128, # Resolution
)
Material Parameters#
Elastic Material#
material = gs.materials.MPM.Elastic(
E=1e5, # Young's modulus (Pa)
nu=0.3, # Poisson's ratio
rho=1000, # Density (kg/m^3)
)
Granular (Sand)#
material = gs.materials.MPM.Sand(
E=1e6,
nu=0.2,
rho=1500,
friction_angle=30, # degrees
)
See Also#
MPMEntity - MPMEntity
MPM - MPM materials
gs.options.MPMOptions - Full options