gs.materials.SPH.Liquid#

class genesis.engine.materials.SPH.liquid.Liquid(rho=1000.0, stiffness=50000.0, exponent=7.0, mu=0.005, gamma=0.01, sampler='regular')[source]#

Bases: Base

The liquid material class for SPH.

Parameters:
  • rho (float, optional) – The density (kg/m^3) the material tends to maintain in equilibrium (i.e., the “rest” or undeformed state). Default is 1000.

  • stiffness (float, optional) – State stiffness (N/m^2). A material constant controlling how pressure increases with compression. Default is 50000.0.

  • exponent (float, optional) – State exponent. Controls how nonlinearly pressure scales with density. Larger values mean stiffer response to compression. Default is 7.0.

  • mu (float, optional) – The viscosity of the liquid. A measure of the internal friction of the fluid or material. Default is 0.005

  • gamma (float, optional) – The surface tension of the liquid. Controls how strongly the material “clumps” together at boundaries. Default is 0.01

  • sampler (str, optional) – Particle sampler (‘pbs’, ‘regular’, ‘random’). Note that ‘pbs’ is only supported on Linux x86 for now. Defaults to ‘regular’ because: SPH is sensitive to the initial particle distribution, as it directly determines the initial density and pressure fields. To ensure numerical stability, particles must be initialized using a regular sampler that enforces near-uniform spacing. Irregular samplers (e.g. pbs, random) introduce local density fluctuations at initialization, which lead to large spurious pressure forces and can cause the simulation to become unstable or diverge.

property rho#

The density (kg/m^3) the material tends to maintain in equilibrium (i.e., the “rest” or undeformed state).

property stiffness#

State stiffness (N/m^2). A material constant controlling how pressure increases with compression.

property exponent#

State exponent. Controls how nonlinearly pressure scales with density. Larger values mean stiffer response to compression.

property mu#

The viscosity of the liquid. A measure of the internal friction of the fluid or material.

property gamma#

The surface tension of the liquid. Controls how strongly the material “clumps” together at boundaries.