This page is a compact user guide to CRMTerrain, with direct comparison to SCMTerrain.
Quick choice
- Use SCM if you want fast deformable-soil simulation, simple terramechanics parameterization, and minimal setup.
- Use CRM if you need SPH continuum soil flow/deformation and are willing to pay a slightly higher computational cost.
Difference in Physics
- SCM terrain is a deformable height-field model: soil deformation is represented on a grid through node deflection along the terrain normal, with Bekker/Janosi/Mohr-style terramechanics parameters.
- CRM terrain is an SPH continuum representation of deformable soil: the terrain is represented by particles and uses CRM rheology (e.g.,
MU_OF_IorMCC).
From a user perspective: SCM is the lighter-weight choice, while CRM is the higher-fidelity choice.
API differences that matter most
- Class role:
SCMTerrainis aChTerrainimplementation.CRMTerrainis bothChTerrainandChFsiProblemCartesian(an SPH-FSI problem builder).
- Terrain construction:
- SCM: call
Initialize(...)(flat grid, heightmap, or mesh). - CRM: call
Construct(...)(box, heightmap, or particle/BCE files), thenInitialize().
- SCM: call
- Soil model parameters:
- SCM:
SetSoilParameters(...)orRegisterSoilParametersCallback(...). - CRM:
SetElasticSPH(...)andSetSPHParameters(...)(SPH material + solver settings).
- SCM:
- Vehicle/solid coupling:
- SCM: vehicle interaction comes through regular Chrono contact shapes (no explicit FSI registration).
- CRM: you must explicitly add interacting solids to FSI (
AddRigidBody(...),AddFeaMesh(...)), so BCE markers are generated.
- Time stepping ownership:
- SCM: usually the vehicle/system step advances terrain effects through contact.
- CRM: call
terrain.Advance(step)(orDoStepDynamics(step)) to advance coupled SPH+MBS.
- Moving-domain features:
- SCM:
AddActiveDomain(...)reduces ray-casting work. - CRM:
SetActiveDomain(...)limits active SPH particles andConstructMovingPatch(...)can relocate soil forward.
- SCM:
- Terrain query semantics:
- SCM:
GetHeight/GetNormal/GetCoefficientFrictionare meaningful. - CRM: these currently return placeholder values (
0, world-up normal,0friction), so CRM is not intended for height/normal/friction-based tire models.
- SCM:
Minimal API patterns
SCM pattern:
CRM pattern:
Simulation-loop difference (important)
With SCM, your normal vehicle step drives the contact-based terrain response:
With CRM, the coupled SPH-FSI step is explicit:
If you called RegisterVehicle(...), the vehicle dynamics are advanced inside CRM's FSI step (see CRM vehicle demos).
VSG visualization plugins
- SCM visualization plugin: ChScmVisualizationVSG
- CRM visualization plugin: ChSphVisualizationVSG
Both are VSG plugins attached to a host visual system with AttachPlugin(...).
You render only through the host visual system (Run()/Render()); there is no separate render loop for the plugin.
Notes:
- CRM run-time visualization can be expensive at large particle counts because SPH/BCE marker data is copied each render call.
SCMTerrainrequires a collision system to be associated with the Chrono system before terrain creation.
Demo map (recommended starting points)
CRM terrain demos:
src/demos/vehicle/terrain/demo_VEH_CRMTerrain_WheeledVehicle.cppsrc/demos/vehicle/terrain/demo_VEH_CRMTerrain_TrackedVehicle.cppsrc/demos/vehicle/terrain/demo_VEH_CRMTerrain_MovingPatch.cppsrc/demos/vehicle/test_rigs/demo_VEH_TireTestRig_CRM.cpp
SCM terrain demos:
src/demos/vehicle/terrain/demo_VEH_SCMTerrain_WheeledVehicle.cppsrc/demos/vehicle/terrain/demo_VEH_SCMTerrain_TrackedVehicle.cppsrc/demos/vehicle/terrain/demo_VEH_SCMTerrain_RigidTire.cppsrc/demos/vehicle/terrain/demo_VEH_SCMTerrain_FEATire.cppsrc/demos/vehicle/terrain/demo_VEH_RigidSCMTerrain_MixedPatches.cpp