Input files¶
JSON input file format¶
Many CabanaPD numerical inputs are specified via JSON values.
Others, such as the model to be used can only be specified in .cpp files.
All CabanaPD examples are within the examples/ directory; subdirectories contain the
primary categories: dem, mechanics, and thermomechanics, and each of these contains
an inputs/ subdirectory with the JSON input files.
Required inputs¶
The following are required for any CabanaPD simulation:
- System size
system_sizeor bothlow_cornerandhigh_corner(per dimension) - Number of cells
num_cellsor spacingdx(per dimension) - Mass density
density - Bulk modulus
bulk_modulusor elastic moduluselastic_modulus(potentially per material) - Neighbor horizon (search cutoff)
horizonor m-ratiom(horzizon / dx) - Timestep
timestep - Final simulation time
final_time - Output step frequency
output_frequency
Further inputs are commonly used across example cases, but not required.
Mapping input values to variables in the simulation¶
To extract values from JSON inputs within a given case, use: