SPH
Settings.cpp
Go to the documentation of this file.
2 #include "io/Output.h"
3 #include "system/Settings.impl.h"
4 
6 
7 static auto DEFAULT_QUANTITY_IDS = OutputQuantityFlag::POSITION | OutputQuantityFlag::VELOCITY |
11 
12 
13 static RegisterEnum<OutputQuantityFlag> sQuantity({
14  { OutputQuantityFlag::POSITION, "position", "Positions of particles, always a vector quantity." },
15  { OutputQuantityFlag::SMOOTHING_LENGTH, "smoothing_length", "Smoothing lenghts of particles." },
16  { OutputQuantityFlag::VELOCITY, "velocity", "Velocities of particles, always a vector quantity." },
17  { OutputQuantityFlag::MASS, "mass", "Particle masses, always a scalar quantity." },
19  "pressure",
20  "Pressure, reduced by yielding and fracture model (multiplied by 1-damage); always a scalar "
21  "quantity." },
22  { OutputQuantityFlag::DENSITY, "density", "Density, always a scalar quantity." },
23  { OutputQuantityFlag::ENERGY, "energy", "Specific internal energy, always a scalar quantity." },
24  // { QuantityId::SOUND_SPEED, "sound_speed", "Local sound speed, always a scalar quantity." },
26  "deviatoric_stress",
27  "Deviatoric stress tensor, always a traceless tensor stored in components xx, yy, xy, xz, yz." },
28  { OutputQuantityFlag::DAMAGE, "damage", "Damage, reducing the pressure and deviatoric stress." },
29  /* { QuantityId::VELOCITY_GRADIENT, "velocity_gradient", "Velocity gradient (strain rate)." },
30  { QuantityId::VELOCITY_DIVERGENCE, "velocity_divergence", "Velocity divergence." },
31  { QuantityId::VELOCITY_ROTATION, "velocity_rotation", "Velocity rotation (rotation rate)." },*/
33  "correction_tensor",
34  "Symmetric tensor correcting kernel gradient for linear consistency." },
35  { OutputQuantityFlag::MATERIAL_ID, "material_id", "ID of material, indexed from 0 to (#bodies - 1)." },
36  { OutputQuantityFlag::INDEX, "index", "Index of particle, indexed from 0 to (#particles - 1)." },
37 });
38 
39 static RegisterEnum<KernelEnum> sKernel({
40  { KernelEnum::CUBIC_SPLINE, "cubic_spline", "M4 B-spline (piecewise cubic polynomial" },
41  { KernelEnum::FOURTH_ORDER_SPLINE, "fourth_order_spline", "M5 B-spline (piecewise 4th-order polynomial" },
42  { KernelEnum::GAUSSIAN, "gaussian", "Gaussian function with clamped support" },
44  "triangle",
45  "Triangular (piecewise linear) kernel. Derivatives are not continuous, the kernel is therefore not "
46  "suitable for SPH, but can be useful for non-SPH interpolations, etc." },
47  { KernelEnum::CORE_TRIANGLE, "core_triangle", "Core Triangle (CT) kernel by Read et al. (2010)" },
49  "thomas_couchman",
50  "Modification of the M4 B-spline kernel by Thomas & Couchman (1992), designed to prevent clustering "
51  "of particles." },
52  { KernelEnum::WENDLAND_C2, "wendland_c2", "Wendland kernel C2" },
53  { KernelEnum::WENDLAND_C4, "wendland_c4", "Wendland kernel C4" },
54  { KernelEnum::WENDLAND_C6, "wendland_c6", "Wendland kernel C6" },
55 });
56 
57 static RegisterEnum<TimesteppingEnum> sTimestepping({
58  { TimesteppingEnum::EULER_EXPLICIT, "euler_explicit", "Explicit (forward) 1st-order integration" },
59  { TimesteppingEnum::LEAP_FROG, "leap_frog", "Leap-frog 2nd-order integration" },
60  { TimesteppingEnum::RUNGE_KUTTA, "runge_kutta", "Runge-Kutta 4-th order integration" },
61  { TimesteppingEnum::PREDICTOR_CORRECTOR, "predictor_corrector", "Predictor-corrector scheme" },
63  "modified_midpoint",
64  "Modified midpoint method with constant number of substeps." },
65  { TimesteppingEnum::BULIRSCH_STOER, "bulirsch_stoer", "Bulirsch-Stoer integrator" },
66 });
67 
68 static RegisterEnum<TimeStepCriterionEnum> sTimeStepCriterion({
69  { TimeStepCriterionEnum::COURANT, "courant", "Time step determined using CFL condition" },
71  "derivatives",
72  "Time step computed by limiting value-to-derivative ratio of quantities" },
73  { TimeStepCriterionEnum::DIVERGENCE, "divergence", "Time step computed from velocity divergence." },
75  "acceleration",
76  "Time step computed from ratio of acceleration and smoothing length." },
77 });
78 
79 static RegisterEnum<FinderEnum> sFinder({
81  "brute_force",
82  "Brute-force search by going through each pair of particles (O(N^2) complexity)" },
83  { FinderEnum::KD_TREE, "kd_tree", "Using K-d tree" },
84  { FinderEnum::OCTREE, "octree", "Using octree" },
85  { FinderEnum::LINKED_LIST, "linked_list", "Using linked list" },
86  { FinderEnum::UNIFORM_GRID, "uniform_grid", "Partitioning particles into a grid uniform in space" },
87  { FinderEnum::HASH_MAP, "hash_map", "Using hash map" },
88 });
89 
90 static RegisterEnum<BoundaryEnum> sBoundary({
91  { BoundaryEnum::NONE, "none", "Do not use any boundary conditions (= vacuum conditions)" },
93  "frozen_particles",
94  "Highest derivatives of all particles close to the boundary are set to zero." },
96  "ghost_particles",
97  "Create ghosts particles located symmetricaly to the particles near the boundary, in order to keep "
98  "particles inside domain." },
100  "fixed_particles",
101  "Boundary is created by immovable particles placed along the boundary." },
103  "wind_tunnel",
104  "Simulates a wind tunnel by pushing air particles into the domain and removing them on the other "
105  "side of the domain. The air particles are kept inside the domain using Frozen Particles boundary "
106  "conditions." },
108  "periodic",
109  "Periodic boundary conditions; particles can interact accross boundaries. When particles leave the "
110  "domain, they re-enter on the other side of the domain. " },
111  { BoundaryEnum::SYMMETRIC, "symmetric", "Particles are duplicated along the z=0 plane." },
112  { BoundaryEnum::KILL_ESCAPERS, "kill_escapers", "Removes all particles outside the domain" },
114  "project_1D",
115  "Debug boundary condition, used to emulate 1D SPH solver. While the solver is still "
116  "three-dimensional under the hood, the particles are projected on a line and can move only in one "
117  "dimension. Note that this has to be supplied by correct kernel normalization, etc." },
118 });
119 
120 static RegisterEnum<DomainEnum> sDomain({ { DomainEnum::NONE, "none", "No computational domain." },
121  { DomainEnum::SPHERICAL, "spherical", "Sphere with given radius." },
122  { DomainEnum::ELLIPSOIDAL, "ellipsoidal", "Axis-aligned ellipsoidal domain." },
123  { DomainEnum::BLOCK, "block", "Axis-aligned block domain." },
124  { DomainEnum::CYLINDER, "cylinder", "Cylindrical domain aligned with z axis." } });
125 
126 static RegisterEnum<ForceEnum> sForce({
127  { ForceEnum::PRESSURE, "pressure", "Force given by pressure gradient." },
129  "solid_stress",
130  "Use force from stress divergence in the model. Must be used together with pressure gradient. Stress "
131  "tensor is evolved in time using Hooke's equation." },
133  "navier_stokes",
134  "Stress tensor for the simulation of fluids. Must be used together with pressure gradient, cannot be "
135  "used together with solid stress force." },
137  "inertial",
138  "Centrifugal force and Coriolis force given by angular frequency of the coordinate frame." },
139  { ForceEnum::SELF_GRAVITY, "gravity", "Self-gravity of particles" },
141  "surface_tension",
142  "Surface tension, proportional to the curvature of the surface." },
143 });
144 
145 static RegisterEnum<ArtificialViscosityEnum> sArtificialViscosity({
146  { ArtificialViscosityEnum::NONE, "none", "No artificial viscosity" },
148  "standard",
149  "Standard artificial viscosity term by Monaghan (1989)." },
151  "riemann",
152  "Artificial viscosity term analogous to Riemann solvers by Monaghan (1997)." },
154  "morris_monaghan",
155  "Time-dependent artificial viscosity by Morris & Monaghan (1997)." },
156 });
157 
158 static RegisterEnum<SolverEnum> sSolver({
160  "symmetric_solver",
161  "SPH solver using symmetrized evaluation of derivatives. Cannot be used together with some "
162  "parameters, for example with strain rate correction tensor!" },
164  "asymmetric_solver",
165  "SPH solver evaluating all derivatives asymmetrically." },
167  "summation_solver",
168  "Solver computing density by direct summation over nearest SPH particles." },
170  "elastic_deformation_solver",
171  "Solver used for extreme elastic deformations." },
173  "density_independent",
174  "Density independent solver by Saitoh & Makino (2013). Experimental!" },
176  "energy_conserving_solver",
177  "Solver advancing internal energy using pair-wise work done by particles, by Owen (2009). "
178  "Experimental!" },
180  "simple_solver",
181  "Simple solver with pressure gradient only, mainly used for supporting purposes (benchmarking, "
182  "teaching, etc.)" },
183 });
184 
185 static RegisterEnum<ContinuityEnum> sContinuity({
187  "standard",
188  "Normal continuity equation, using velocity divergence "
189  "computed from all neighbors." },
191  "sum_only_undamaged",
192  "Computes the velocity divergence using only undamaged neighbors. For fully damaged particle, the "
193  "standard continuity equation is used instead." },
195  "damaged_decrease_bulk_density",
196  "Adds bulk density, evolved using continuity equation like material density; however, when damaged "
197  "material expands, only the bulk density decreases, the material density is constant. The material "
198  "density can only grow when it is equal to the bulk density." },
199 });
200 
201 static RegisterEnum<DiscretizationEnum> sFormulation({
203  "standard",
204  "Standard discretization of SPH equations. Equations are obtained from Lagrangian." },
206  "benz_asphaug",
207  "Alternative formulation of SPH, used by Benz & Asphaug (1994, 1995)." },
208 });
209 
210 static RegisterEnum<YieldingEnum> sYield({
211  { YieldingEnum::NONE, "none", "No stress tensor, gass or material with no stress tensor" },
212  { YieldingEnum::ELASTIC, "elastic", "No yield, just elastic deformations following Hooke's law" },
213  { YieldingEnum::VON_MISES, "von_mises", "Stress yielding using von Mises criterion." },
214  { YieldingEnum::DRUCKER_PRAGER, "drucker_prager", "Drucker-Prager pressure dependent yielding stress." },
215 });
216 
217 static RegisterEnum<FractureEnum> sFracture({
218  { FractureEnum::NONE, "none", "No fragmentation" },
220  "scalar_grady_kipp",
221  "Grady-Kipp model of fragmentation using scalar damage" },
223  "tensor_grady_kipp",
224  "Grady-Kipp model of fragmentation using tensor damage" },
225 });
226 
227 static RegisterEnum<SmoothingLengthEnum> sSmoothingLength({
229  "continuity_equation",
230  "Smoothing length is evolved using continuity equation." },
232  "sound_speed_enforcing",
233  "Number of neighbours is kept in the specified range by adding additional derivatives of smoothing "
234  "length, scaled by local sound speed." },
235 });
236 
237 static RegisterEnum<SignalSpeedEnum> sSignalSpeed({
239  "pressure_difference",
240  "Signal speed given by the absolute value of pressure difference, as in Price (2008). Cannot be used "
241  "in simulations with gravity." },
242 
244  "velocity_difference",
245  "Signal speed given by relative velocity projected to the positive vector, as in Valdarnini "
246  "(2018)." },
247 });
248 
249 static RegisterEnum<GravityEnum> sGravity({
251  "spherical",
252  "No self-gravity, particles only move in spherically symmetric gravitational potential. Can be used "
253  "as an approximate gravity for spherically symmetric simulations." },
255  "brute_force",
256  "Brute-force summation over all particle pairs (O(N^2) complexity)" },
258  "barnes_hut",
259  "Barnes-Hut algorithm approximating gravity by multipole expansion (up to octupole order)." },
260 });
261 
262 static RegisterEnum<GravityKernelEnum> sGravityKernel({
263  { GravityKernelEnum::POINT_PARTICLES, "point_particles", "Point-like particles with zero radius." },
265  "sph_kernel",
266  "Smoothing kernel associated with selected SPH kernel. For SPH simulations." },
268  "solid_spheres",
269  "Kernel representing gravity of solid spheres. Useful for N-body simulations where overlaps are "
270  "allowed." },
271 });
272 
273 static RegisterEnum<CollisionHandlerEnum> sCollisionHandler({
274  { CollisionHandlerEnum::NONE, "none", "No handling of collisions." },
276  "perfect_merging",
277  "All collided particles merge, creating larger spherical particles. Particles are merged "
278  "unconditionally, regardless of their relative velocity or their angular frequencies." },
280  "elastic_bounce",
281  "Collided particles bounce with some energy dissipation, specified by the coefficients of "
282  "restitution. No merging, number of particles remains constant." },
284  "merge_or_bounce",
285  "If the relative speed of the collided particles is lower than the escape velocity, the particles "
286  "are merged, otherwise the particle bounce. To ensure that the particles are always merged, set the "
287  "collision.merging_limit to zero, on the other hand large values make particles more difficult to "
288  "merge." },
289 });
290 
291 static RegisterEnum<OverlapEnum> sOverlap({
292  { OverlapEnum::NONE, "none", "All overlaps are ignored." },
293  { OverlapEnum::FORCE_MERGE, "force_merge", "Overlapping particles are merged." },
294  { OverlapEnum::REPEL, "repel", "Particles are shifted until no overlap happens." },
296  "repel_or_merge",
297  "Particles are either repeled (and bounced) or merged, based on the ratio of their relative velocity "
298  "to the escape velocity (similar to merge_or_bounce collision handler)." },
300  "internal_bounce",
301  "If the center of the particles are moving towards each other, particles bounce, otherwise nothing "
302  "happens." },
304  "pass_or_merge",
305  "Overlap is allowed. If the relative velocity of particles is lower than the escape velocity, "
306  "particles are merged, otherwise they simply pass through each other." },
307 });
308 
309 static RegisterEnum<LoggerEnum> sLogger({
310  { LoggerEnum::NONE, "none", "Do not log anything." },
311  { LoggerEnum::STD_OUT, "stdout", "Print log to standard output." },
312  { LoggerEnum::FILE, "file", "Print log to a file." },
313 });
314 
315 static RegisterEnum<IoEnum> sIo({
316  { IoEnum::NONE, "none", "No output" },
317  { IoEnum::TEXT_FILE, "text_file", "Save output data into formatted human-readable text file" },
319  "gnuplot_output",
320  "Extension of text file, additionally executing given gnuplot script, generating a plot from every "
321  "dump" },
323  "binary_file",
324  "Save output data into binary file. This data dump is lossless and can be use to restart run from "
325  "saved snapshot. Stores values, all derivatives and materials of the storage." },
327  "compressed_file",
328  "Compressed binary output file, containing only few selected quantities. This is the most convenient "
329  "format for storing full simulation in high resolution in time. Cannot be used to continue "
330  "simulation." },
332  "vtk_file",
333  "File format used by Visualization Toolkit (VTK). Useful to view the results in Paraview and other "
334  "visualization tools." },
336  "hdf5_file",
337  "File format for storing scientific data. Currently tailored for files generated by the code "
338  "miluphcuda. Requires to build the code with libhdf5." },
339  { IoEnum::MPCORP_FILE, "mpcorp_file", "Export from Minor Planet Center Orbit Database" },
340  { IoEnum::PKDGRAV_INPUT, "pkdgrav_input", "Generate a pkdgrav input file." },
341 });
342 
344  switch (type) {
345  case IoEnum::NONE:
346  return NOTHING;
347  case IoEnum::TEXT_FILE:
349  return std::string("txt");
350  case IoEnum::BINARY_FILE:
351  return std::string("ssf");
353  return std::string("scf");
355  return std::string("ss");
356  case IoEnum::VTK_FILE:
357  return std::string("vtu");
358  case IoEnum::HDF5_FILE:
359  return std::string("h5");
360  case IoEnum::MPCORP_FILE:
361  return std::string("dat");
362  default:
364  }
365 }
366 
367 Optional<IoEnum> getIoEnum(const std::string& ext) {
368  if (ext == "txt") {
369  return IoEnum::TEXT_FILE;
370  } else if (ext == "ssf") {
371  return IoEnum::BINARY_FILE;
372  } else if (ext == "scf") {
374  } else if (ext == "ss") {
375  return IoEnum::PKDGRAV_INPUT;
376  } else if (ext == "vtu") {
377  return IoEnum::VTK_FILE;
378  } else if (ext == "h5") {
379  return IoEnum::HDF5_FILE;
380  } else if (ext == "dat") {
381  return IoEnum::MPCORP_FILE;
382  } else {
383  return NOTHING;
384  }
385 }
386 
387 std::string getIoDescription(const IoEnum type) {
388  switch (type) {
389  case IoEnum::NONE:
391  case IoEnum::TEXT_FILE:
392  return "Plain text file";
394  return "Gnuplot image";
395  case IoEnum::BINARY_FILE:
396  return "SPH state file";
398  return "SPH compressed file";
400  return "Pkdgrav output files";
401  case IoEnum::VTK_FILE:
402  return "VTK unstructured grid";
403  case IoEnum::HDF5_FILE:
404  return "miluphcuda output file";
405  case IoEnum::MPCORP_FILE:
406  return "mpcorp dump";
407  default:
409  }
410 }
411 
413  switch (type) {
414  case IoEnum::NONE:
415  return EMPTY_FLAGS;
416  case IoEnum::TEXT_FILE:
419  return IoCapability::OUTPUT;
420  case IoEnum::BINARY_FILE:
426  case IoEnum::VTK_FILE:
427  return IoCapability::OUTPUT;
428  case IoEnum::HDF5_FILE:
429  return IoCapability::INPUT;
430  case IoEnum::MPCORP_FILE:
431  return IoCapability::INPUT;
432  default:
434  }
435 }
436 
437 static RegisterEnum<OutputSpacing> sSpacing({
438  { OutputSpacing::LINEAR, "linear", "Constant time between consecutive output times" },
439  { OutputSpacing::LOGARITHMIC, "logarithmic", "Constant ratio between consecutive output times" },
440  { OutputSpacing::CUSTOM, "custom", "User-defined list of output times " },
441 });
442 
443 static RegisterEnum<RngEnum> sRng({
444  { RngEnum::UNIFORM, "uniform", "Mersenne Twister PRNG from Standard library." },
445  { RngEnum::HALTON, "halton", "Halton sequence for quasi-random numbers." },
446  { RngEnum::BENZ_ASPHAUG, "benz_asphaug", "RNG used in code SPH5, used for 1-1 comparison of codes." },
447 });
448 
449 static RegisterEnum<UvMapEnum> sUv({
450  { UvMapEnum::PLANAR, "planar", "Plannar mapping." },
451  { UvMapEnum::SPHERICAL, "spherical", "Spherical mapping." },
452 });
453 
454 
455 // clang-format off
456 template<>
457 AutoPtr<RunSettings> RunSettings::instance (new RunSettings {
458  { RunSettingsId::RUN_NAME, "run.name", std::string("unnamed run"),
459  "User-specified name of the run. Can be stored in the metadata of output files." },
460  { RunSettingsId::RUN_COMMENT, "run.comment", std::string(""),
461  "Auxiliary comment of the run. Can be stored in the metadata of output files." },
462  { RunSettingsId::RUN_AUTHOR, "run.author", std::string("Pavel Sevecek"),
463  "Name of the person performing this run." },
464  { RunSettingsId::RUN_EMAIL, "run.email", std::string("sevecek@sirrah.troja.mff.cuni.cz"),
465  "E-mail of the run author." },
467  "Specifies the type of the simulation. Does not have to be specified to run the simulation; this "
468  "information is saved in output files and taken into account by visualization tools, for example." },
469  { RunSettingsId::RUN_OUTPUT_TYPE, "run.output.type", IoEnum::NONE,
470  "Format of the output files generated by the run. Can be one of the following:\n" + EnumMap::getDesc<IoEnum>() },
471  { RunSettingsId::RUN_OUTPUT_INTERVAL, "run.output.interval", 0.1_f,
472  "Interval of creating output files (in simulation time)." },
474  "Type of output spacing in time. Can be one of the following:\n" + EnumMap::getDesc<OutputSpacing>() },
475  { RunSettingsId::RUN_OUTPUT_CUSTOM_TIMES, "run.output.custom_times", std::string("0, 0.5, 1, 2, 10"),
476  "List of comma-separated output times, used when the output spacing is set to 'custom'" },
477  { RunSettingsId::RUN_OUTPUT_FIRST_INDEX, "run.output.first_index", 0,
478  "Index of the first generated output file. Might not be zero if the simulation is resumed." },
479  { RunSettingsId::RUN_OUTPUT_NAME, "run.output.name", std::string("out_%d.txt"),
480  "File mask of the created files. It can contain a wildcard %d, which is replaced by the output number and "
481  "%t which is replaced by current simulation time." },
482  { RunSettingsId::RUN_OUTPUT_PATH, "run.output.path", std::string("out"),
483  "Directory where the output files are saved. Can be either absolute or relative path." },
484  { RunSettingsId::RUN_OUTPUT_QUANTITIES, "run.output.quantitites", DEFAULT_QUANTITY_IDS,
485  "List of quantities to write to output file. Applicable for text and VTK outputs, binary output always stores "
486  "all quantitites. Can be one or more values from:\n" + EnumMap::getDesc<OutputQuantityFlag>() },
487  { RunSettingsId::RUN_THREAD_CNT, "run.thread.cnt", 0,
488  "Number of threads used by the simulation. 0 means all available threads are used." },
489  { RunSettingsId::RUN_THREAD_GRANULARITY, "run.thread.granularity", 1000,
490  "Number of particles processed by one thread in a single batch. Lower number can help to distribute tasks "
491  "between threads more evenly, higher number means faster processing of particles within single thread." },
493  "Type of a log generated by the simulation. Can be one of the following:\n" + EnumMap::getDesc<LoggerEnum>() },
494  { RunSettingsId::RUN_LOGGER_FILE, "run.logger.file", std::string("log.txt"),
495  "Specifies the path where the log is saved (if applicable)" },
496  { RunSettingsId::RUN_LOGGER_VERBOSITY, "run.logger.verbosity", 2,
497  "Number specifying log verbosity. Can be between 0 and 3, going from least to most verbose." },
498  { RunSettingsId::RUN_VERBOSE_ENABLE, "run.verbose.enable", false,
499  "Enables verbose log of a simulation. The log is written into a file, specified by parameter run.verbose.name." },
500  { RunSettingsId::RUN_VERBOSE_NAME, "run.verbose.name", std::string("run.log"),
501  "Name of a file where the verbose log of the simulation is written." },
502  { RunSettingsId::RUN_START_TIME, "run.start_time", 0._f,
503  "Starting time of the simulation in seconds. This is usually 0, although it can be set to a non-zero "
504  "for simulations resumed from saved state." },
505  { RunSettingsId::RUN_END_TIME, "run.end_time", 10._f,
506  "End time of the simulation in seconds. For new simulations (not resumed from saved state), this "
507  "corresponds to the total duration of the simulation." },
508  { RunSettingsId::RUN_TIMESTEP_CNT, "run.timestep_cnt", 0,
509  "Number of timesteps performed by the integrator. If zero, the criterion is not used. " },
510  { RunSettingsId::RUN_WALLCLOCK_TIME, "run.wallclock_time", 0._f,
511  "Maximum wallclock time of the simulation. If zero, the criterion is not used. " },
513  "Random number generator used by the simulation. Can be one of the following:\n" + EnumMap::getDesc<RngEnum>() },
514  { RunSettingsId::RUN_RNG_SEED, "run.rng.seed", 1234,
515  "Seed of the random number generator (if applicable)." },
516  { RunSettingsId::RUN_DIAGNOSTICS_INTERVAL, "run.diagnostics_interval", 0.1_f,
517  "Time period (in run time) of running diagnostics of the run. 0 means the diagnostics are run every time step." },
518 
521  "Selected solver for computing derivatives of physical quantities. Can be one of the following:\n" + EnumMap::getDesc<SolverEnum>() },
523  "Forces included in the physical model of the simulation. Can be one or more values from: \n" + EnumMap::getDesc<ForceEnum>() },
525  "Specifies how smoothing length is evolved in the simulation. Can be one or more values from: \n" + EnumMap::getDesc<SmoothingLengthEnum>() },
526  { RunSettingsId::SPH_SUMMATION_DENSITY_DELTA, "sph.summation.density_delta", 1.e-3_f,
527  "Used by summation solver. Specifies the relative difference between densities in subsequenct iterations "
528  "for which the iterative algorithm is terminated. Lower value means more precise evaluation of density "
529  "at a cost of higher computation time. " },
530  { RunSettingsId::SPH_SUMMATION_MAX_ITERATIONS, "sph.summation.max_iterations", 5,
531  "Used by summation solver. Specifies the maximum number of iterations for density computation." },
532  { RunSettingsId::SPH_ASYMMETRIC_COMPUTE_RADII_HASH_MAP, "sph.asymmetric.compute_radii_hash_map", false,
533  "If true, the SPH solver computes a hash map connecting position in space with required search radius. "
534  "Otherwise, the radius is determined from the maximal smoothing length in the simulation. Used only by "
535  "the AsymmetricSolver." },
536  { RunSettingsId::SPH_USE_XSPH, "sph.xsph.enable", false,
537  "Enables the XSPH modification" },
538  { RunSettingsId::SPH_XSPH_EPSILON, "sph.xsph.epsilon", 1._f,
539  "Epsilon parameter of XSPH modification." },
540  { RunSettingsId::SPH_USE_DELTASPH, "sph.deltasph.enable", false,
541  "Enables the delta-SPH modification" },
542  { RunSettingsId::SPH_DENSITY_DIFFUSION_DELTA, "sph.deltasph.delta", 0.01_f,
543  "Delta-coefficient of the delta-SPH modification, see Marrone et al. 2011." },
544  { RunSettingsId::SPH_VELOCITY_DIFFUSION_ALPHA, "sph.deltasph.alpha", 0.01_f,
545  "Alpha-coefficient of the delta-SPH modification." },
546  { RunSettingsId::SPH_DI_ALPHA, "sph.di.alpha", 1._f,
547  "Alpha parameter of the density-independent SPH solver." },
548  { RunSettingsId::SPH_SCRIPT_ENABLE, "sph.script.enable", false,
549  "Whether to enable or disable script evaluation." },
550  { RunSettingsId::SPH_SCRIPT_FILE, "sph.script.file", std::string("script.chai"),
551  "Path to the file containing an arbitrary ChaiScript script evaluated each time step." },
552  { RunSettingsId::SPH_SCRIPT_PERIOD, "sph.script.period", 0._f,
553  "Period or time point to execute the script. Zero means the time step is executed "
554  "immediately or every time step, depending on the value of sph.script.oneshot" },
555  { RunSettingsId::SPH_SCRIPT_ONESHOT, "sph.script.oneshot", false,
556  "Whether to execute the script only once or periodically." },
557 
560  "Type of the SPH kernel. Can be one of the following:\n" + EnumMap::getDesc<KernelEnum>() },
561  { RunSettingsId::SPH_NEIGHBOUR_RANGE, "sph.neighbour.range", Interval(25._f, 100._f),
562  "Allowed numbers of particle neighbours. Applicable if neighbour enforcing is used for evolution of "
563  "smoothing length. Note that even with this parameter set, it is not guaranteed that the number of "
564  "neighbours will be within the interval for every particle, the code only tries to do so." },
565  { RunSettingsId::SPH_NEIGHBOUR_ENFORCING, "sph.neighbour.enforcing", 0.2_f,
566  "'Strength' of the neighbour enforcing. The higher number means the derivative of the smoothing "
567  "length can be higher, lower values means 'smoother' evolution of smooting length"},
568  { RunSettingsId::SPH_AV_ALPHA, "sph.av.alpha", 1.5_f,
569  "Coefficient alpha_AV of the standard artificial viscosity." },
570  { RunSettingsId::SPH_AV_BETA, "sph.av.beta", 3._f,
571  "Coefficient beta_AV of the standard artificial viscosity. "},
573  "Type of the artificial viscosity used by the SPH solver. Can be one of the following:\n" + EnumMap::getDesc<ArtificialViscosityEnum>() },
574  { RunSettingsId::SPH_AV_USE_BALSARA, "sph.av.balsara.use", false,
575  "Specifies if the Balsara switch is used when computing artificial viscosity" },
576  { RunSettingsId::SPH_AV_BALSARA_STORE, "sph.av.balsara.store", false,
577  "Debug parameter; if true, Balsara coefficient is stored as a quantity and can be saved to output file. "},
578  { RunSettingsId::SPH_AV_USE_STRESS, "sph.av.stress.use", false,
579  "Whether to use artificial stress. "},
580  { RunSettingsId::SPH_AV_STRESS_EXPONENT, "sph.av.stress.exponent", 4._f,
581  "Kernel exponent of the artificial stress. "},
582  { RunSettingsId::SPH_AV_STRESS_FACTOR, "sph.av.stress.factor", 0.04_f,
583  "Multiplicative factor of the artificial stress. "},
584  { RunSettingsId::SPH_USE_AC, "sph.ac.use", false,
585  "Enables artificial thermal conductivity term" },
586  { RunSettingsId::SPH_AC_ALPHA, "sph.ac.alpha", 1._f,
587  "Artificial conductivity alpha coefficient." },
588  { RunSettingsId::SPH_AC_BETA, "sph.ac.beta", 1.5_f,
589  "Artificial conductivity beta coefficient." },
591  "Type of the signal speed used by artificial conductivity. Can be one of the following:\n" + EnumMap::getDesc<SignalSpeedEnum>() },
592  { RunSettingsId::SPH_SMOOTHING_LENGTH_MIN, "sph.smoothing_length.min", 1e-5_f,
593  "Minimal value of the smoothing length (in meters). "},
594  { RunSettingsId::SPH_PHASE_ANGLE, "sph.phase_angle", false,
595  "If true, phase angle of each particle is saved in storage and evolved in time. "},
597  "Acceleration structure used for finding neighbours (Kn queries). Can be one of the following:\n" + EnumMap::getDesc<FinderEnum>() },
598  { RunSettingsId::SPH_STRAIN_RATE_CORRECTION_TENSOR, "sph.correction_tensor", false,
599  "If true, correction tensor is applied on gradient when computing strain rate. Essential "
600  "for correct simulation of rotating bodies." },
601  { RunSettingsId::SPH_SUM_ONLY_UNDAMAGED, "sph.sum_only_undamaged", true,
602  "If true, completely damaged particles (D=1) are excluded when computing strain rate and "
603  "stress divergence. Solver also excludes particles of different bodies; when computing "
604  "strain rate in target, particles in impactor are excluded from the sum." },
606  "Specifies how the density is evolved. Can be one of the following:\n" + EnumMap::getDesc<ContinuityEnum>() },
608  "Specifies a discretization of SPH equations. Can be one of the following:\n" + EnumMap::getDesc<DiscretizationEnum>() },
609  { RunSettingsId::SPH_STABILIZATION_DAMPING, "sph.stabilization_damping", 0.1_f,
610  "Specifies the damping coefficient of particle velocities. This is mainly intended for stabilization phase, "
611  "it should not be used in the main simulation." },
612 
614  { RunSettingsId::NBODY_INERTIA_TENSOR, "nbody.inertia_tensor", false,
615  "If true, each particle has generally non-isotropic inertia tensor. The inertia tensor is evolved using "
616  "Euler's equations. Particle geometry is still spherical though; particles always collide as two spheres "
617  "and merge into a larger sphere, the inertia tensor is summed up using parallel axis theorem." },
618  { RunSettingsId::NBODY_MAX_ROTATION_ANGLE, "nbody.max_rotation_angle", 0.5_f,
619  "Maximum angle of rotation in a single iteration. " },
620  { RunSettingsId::NBODY_AGGREGATES_ENABLE, "nbody.aggregates.enable", false,
621  "If true, colliding particles form aggregates, which then move and rotate as rigid bodies. There are no collisions "
622  "between particles belonging to the same aggregate, only collisions of different aggregates need to be handled. Note "
623  "that enabling aggregates overrides handlers of collisions and overlaps." },
625  "Specifies the initial aggregates used in the simulation. Can be one of the following:\n" + EnumMap::getDesc<AggregateEnum>() },
626 
629  "Solver for computing gravitational acceleration. Can be one of the following:\n" + EnumMap::getDesc<GravityEnum>() },
630  { RunSettingsId::GRAVITY_OPENING_ANGLE, "gravity.opening_angle", 0.5_f,
631  "Opening angle (in radians) used in Barnes-Hut algorithm. Larger values means faster gravity evaluation "
632  "at a cost of lower precision." },
633  { RunSettingsId::GRAVITY_MULTIPOLE_ORDER, "gravity.multipole_order", 3,
634  "Maximum order of gravitational moments. Use 0 for monopole, 2 for quadrupole, etc. " },
636  "Smoothing kernel of gravity. Can be one of the following:\n" + EnumMap::getDesc<GravityKernelEnum>() },
638  "todo" },
639  { RunSettingsId::GRAVITY_RECOMPUTATION_PERIOD, "gravity.recomputation_period", 0._f,
640  "Period of gravity evaluation. If zero, gravity is computed every time step, for any positive value, "
641  "gravitational acceleration is cached for each particle and used each time step until the next "
642  "recomputation." },
643 
646  "Specifies a handler used to evaluate the result of particle collisions. Can be one of the following:\n" + EnumMap::getDesc<CollisionHandlerEnum>() },
648  "Specifies a handler used to resolve particle overlaps. Can be one of the following:\n" + EnumMap::getDesc<OverlapEnum>() },
649  { RunSettingsId::COLLISION_RESTITUTION_NORMAL, "collision.restitution_normal", 0.8_f,
650  "Restitution coefficient of the normal component of velocity. 1 means perfect bounce (no dissipation), "
651  "0 means perfect sticking." },
652  { RunSettingsId::COLLISION_RESTITUTION_TANGENT, "collision.restitution_tangent", 1.0_f,
653  "Restitution coefficient of the tangential component of velocity. Should be 1 to conserve the total "
654  "angular momentum. " },
655  { RunSettingsId::COLLISION_ALLOWED_OVERLAP, "collision.allowed_overlap", 0.01_f,
656  "Maximum relative overlap of particle that is still classified as collision rather than overlap. Needed "
657  "mainly for numerical reasons (floating-point arithmetics). "},
658  { RunSettingsId::COLLISION_BOUNCE_MERGE_LIMIT, "collision.merging_limit", 1._f,
659  "Multiplier of the relative velocity and the angular velocity of the merger, used when determining "
660  "whether to merge the collided particles or reject the collision. If zero, particles are always merged, "
661  "values slightly lower than 1 can be used to simulate strength, holding together a body rotating above "
662  "the breakup limit. Larger values can be used to merge only very slowly moving particles." },
663  { RunSettingsId::COLLISION_ROTATION_MERGE_LIMIT, "collision.rotation_merging_limit", 1._f,
664  "Parameter analogous to collision.bounce_merge_limit, but used for the rotation of the merger. "
665  "Particles can only be merged if the angular frequency multiplied by this parameter is lower than the "
666  "breakup frequency. If zero, particles are always merged, values larger than 1 can be used to avoid "
667  "fast rotators in the simulation." },
668 
669 
671  { RunSettingsId::SOFT_REPEL_STRENGTH, "soft.repel_strength", 1._f,
672  "Repel strength used by the soft-body solver" },
673  { RunSettingsId::SOFT_FRICTION_STRENGTH, "soft.friction_strength", 0.01_f,
674  "Friction strength used by the soft-body solver" },
675 
678  "Integrator performing evolution in time. Can be one of the following:\n" + EnumMap::getDesc<TimesteppingEnum>() },
679  { RunSettingsId::TIMESTEPPING_COURANT_NUMBER, "timestep.courant_number", 0.2_f,
680  "Courant number limiting the time step value. Needed for numerical stability of the integrator. Always keep <= 1!" },
681  { RunSettingsId::TIMESTEPPING_MAX_TIMESTEP, "timestep.max_step", 10._f,
682  "Maximal allowed value of the time step." },
683  { RunSettingsId::TIMESTEPPING_INITIAL_TIMESTEP, "timestep.initial", 0.03_f,
684  "Initial time step of the simulation. "},
686  "Criteria limiting the value of the time step. Can be one or more values from:\n" + EnumMap::getDesc<TimeStepCriterionEnum>() },
687  { RunSettingsId::TIMESTEPPING_DERIVATIVE_FACTOR, "timestep.derivative_factor", 0.2_f,
688  "Multiplicative factor of the time step computed as a value-to-derivative ratio of time-dependent quantities."},
689  { RunSettingsId::TIMESTEPPING_DIVERGENCE_FACTOR, "timestep.divergence_factor", 0.005_f,
690  "Multiplicative factor of the time step computed using reciprocal velocity divergence."},
691  { RunSettingsId::TIMESTEPPING_MEAN_POWER, "timestep.mean_power", -INFTY,
692  "Power of the generalized mean, used to compute the final timestep from timesteps of individual "
693  "particles. Negative infinity means the minimal timestep is used. This value will also set statistics "
694  "of the restricting particle, namely the particle index and the quantity value and corresponding "
695  "derivative of the particle; these statistics are not saved for other powers." },
696  { RunSettingsId::TIMESTEPPING_MAX_INCREASE, "timestep.max_change", INFTY,
697  "Maximum relative growth of the time steps in subsequent iterations. Used to 'smooth' the integration and "
698  "to avoid rapid changes of time steps."},
699  { RunSettingsId::TIMESTEPPING_MIDPOINT_COUNT, "timestep.midpoint_count", 5,
700  "Applicable for modified midpoint method. Specified the number of sub-steps within one time step." },
701  { RunSettingsId::TIMESTEPPING_BS_ACCURACY, "timestep.bs.accuracy", 1.e-3_f,
702  "Required relative accuracy (epsilon value) of the Bulirsch-Stoer integrator." },
703 
705  { RunSettingsId::FINDER_LEAF_SIZE, "finder.leaf_size", 25,
706  "Maximal number of particles in the leaf of K-d tree." },
707  { RunSettingsId::FINDER_MAX_PARALLEL_DEPTH, "finder.max_parallel_depth", 50,
708  "Maximal tree depth to be processed in parallel. A larger value implies better distribution of work "
709  "between threads, but it also comes with performance penalty due to scheduling overhead." },
710 
712  { RunSettingsId::FRAME_ANGULAR_FREQUENCY, "frame.angular_frequency", Vector(0._f),
713  "Used to perform the simulation in rotating (non-inertial) frame. Specifies a global rotation of the coordinate "
714  "system around axis (0, 0, 1) passing through origin. If the solver includes inertial forces, rotating frame "
715  "introduces centrifugal and Coriolis force." },
716  { RunSettingsId::FRAME_CONSTANT_ACCELERATION, "frame.constant_acceleration", Vector(0._f),
717  "Used to implement homogeneous gravity field." },
718  { RunSettingsId::FRAME_TIDES_MASS, "frame.tides.mass", 0._f,
719  "." },
720  { RunSettingsId::FRAME_TIDES_POSITION, "frame.tides.position", Vector(Constants::R_earth, 0._f, 0._f),
721  "." },
722 
723 
726  "Computational domain of the simulation. Applicable only if boundary conditions are specified. "
727  "Can be one of the following:\n" + EnumMap::getDesc<DomainEnum>() },
729  "Boundary conditions of the simulation. Can be one of the following:\n" + EnumMap::getDesc<BoundaryEnum>() },
730  { RunSettingsId::DOMAIN_GHOST_MIN_DIST, "domain.ghosts.min_dist", 0.1_f,
731  "Used by GhostParticles boundary condition. Specifies the minimal distance between a particle and its ghost, "
732  "in units of smoothing length. Used to avoid an overlap of particles."},
733  { RunSettingsId::DOMAIN_FROZEN_DIST, "domain.frozen_dist", 2.5_f,
734  "Used by FrozenParticles boundary condition. Specifies the freezing distance from the boundary, "
735  "in units of smoothing length." },
736  { RunSettingsId::DOMAIN_CENTER, "domain.center", Vector(0._f),
737  "Center of the computational domain." },
738  { RunSettingsId::DOMAIN_RADIUS, "domain.radius", 1._f,
739  "Radius of the computational domain. Used by spherical and cylindrical domain." },
740  { RunSettingsId::DOMAIN_HEIGHT, "domain.height", 1._f,
741  "Height of the computational domain. Used by cylindrical domain." },
742  { RunSettingsId::DOMAIN_SIZE, "domain.size", Vector(1._f),
743  "Dimensions of the computational domain. Used by block and ellipsoidal domain." },
744 
746  { RunSettingsId::GENERATE_UVWS, "misc.generate_uvws", false,
747  "If true, the mapping coordinates will be generated and saved for all bodies in the simulation. "
748  "Useful to visualize the simulation results with surface textures." },
749  { RunSettingsId::UVW_MAPPING, "misc.uvw_mapping", UvMapEnum::SPHERICAL,
750  "Type of the UV mapping" },
751 
752 });
753 
754 static RegisterEnum<DistributionEnum> sDistribution({
755  { DistributionEnum::HEXAGONAL, "hexagonal", "Hexagonally close packing" },
756  { DistributionEnum::CUBIC, "cubic", "Cubic close packing (generally unstable, mainly for tests!)" },
757  { DistributionEnum::RANDOM, "random", "Randomly distributed particles" },
758  { DistributionEnum::DIEHL_ET_AL, "diehl_et_al", "Isotropic uniform distribution by Diehl et al. (2012)" },
759  { DistributionEnum::STRATIFIED, "stratified", "Stratified distribution" },
760  { DistributionEnum::PARAMETRIZED_SPIRALING, "parametrized_spiraling", "Parametrized spiraling scheme" },
761 });
762 
763 static RegisterEnum<EosEnum> sEos({
764  { EosEnum::NONE,
765  "none",
766  "No equation of state. Implies there is no pressure nor stress in the "
767  "body, can be used to simulate "
768  "dust interacting only by friction or gravity." },
769  { EosEnum::IDEAL_GAS, "ideal_gas", "Equation of state for ideal gas." },
770  { EosEnum::TAIT, "tait", "Tait equation of state for simulations of liquids." },
772  "mie_gruneisen",
773  "Mie-Gruneisen equation of state. Simple model for solids without any phase transitions." },
774  { EosEnum::TILLOTSON, "tillotson", "Tillotson equation of stats." },
775  { EosEnum::MURNAGHAN, "murnaghan", "Murnaghan equation of state." },
776  { EosEnum::SIMPLIFIED_TILLOTSON, "simplified_tillotson", "Simplified version of the Tillotson equation."},
777  { EosEnum::ANEOS,
778  "aneos",
779  "ANEOS equation of state, requires look-up table of values for given material." },
780 });
781 
782 
783 template<>
784 AutoPtr<BodySettings> BodySettings::instance (new BodySettings {
787  "Equation of state for this material. Can be one of the following:\n" + EnumMap::getDesc<EosEnum>() },
788  { BodySettingsId::ADIABATIC_INDEX, "eos.adiabatic_index", 1.4_f,
789  "Adiabatic index of gass, applicable for ideal gass EoS." },
790  { BodySettingsId::TAIT_GAMMA, "eos.tait.gamma", 7._f,
791  "Density exponent of Tait EoS." },
792  { BodySettingsId::TAIT_SOUND_SPEED, "eos.tait.sound_speed", 1484._f, // value for water
793  "Sound speed used by Tait EoS." },
794  { BodySettingsId::TILLOTSON_SMALL_A, "eos.tillotson.small_a", 0.5_f,
795  "Tilloson parameter a." },
796  { BodySettingsId::TILLOTSON_SMALL_B, "eos.tillotson.small_b", 1.5_f,
797  "Tillotson parameter b." },
798  { BodySettingsId::TILLOTSON_ALPHA, "eos.tillotson.alpha", 5._f,
799  "Tillotson parameter alpha." },
800  { BodySettingsId::TILLOTSON_BETA, "eos.tillotson.beta", 5._f,
801  "Tillotson parameter beta." },
802  { BodySettingsId::TILLOTSON_NONLINEAR_B, "eos.tillotson.nonlinear_b", 2.67e10_f,
803  "Tillotsont parameter B." },
804  { BodySettingsId::TILLOTSON_SUBLIMATION, "eos.tillotson.sublimation", 4.87e8_f,
805  "Specific energy of sublimation." },
806  { BodySettingsId::TILLOTSON_ENERGY_IV, "eos.tillotson.energy_iv", 4.72e6_f,
807  "Specific energy of incipient vaporization, used in Tillotson EoS." },
808  { BodySettingsId::TILLOTSON_ENERGY_CV, "eos.tillotson.energy_cv", 1.82e7_f,
809  "Specific energy of complete vaporization, used in Tillotson EoS." },
810  { BodySettingsId::GRUNEISEN_GAMMA, "eos.mie_gruneisen.gamma", 2._f, // value for copper taken from wikipedia
811  "Gruneisen gamma, used in Mie-Gruneisen EoS." },
812  { BodySettingsId::HUGONIOT_SLOPE, "eos.mie_gruneises.hugoniot_slope", 1.5_f, // value for copper taken from wikipedia
813  "Slope of the Hugoniot curve, used in Mie-Gruneisen EoS." },
814  { BodySettingsId::BULK_SOUND_SPEED, "eos.mie_gruneises.bulk_sound_speed", 3933._f, // value for copper taken from wikipedia
815  "Bulk sound speed used in Mie-Gruneisen EoS." },
816 
819  "Specifies the rheology of this material. Can be one of the following:\n" + EnumMap::getDesc<YieldingEnum>() },
821  "Fracture model of this material. Can be one of the following:\n" + EnumMap::getDesc<FractureEnum>() },
822  { BodySettingsId::ELASTICITY_LIMIT, "rheology.elasticity_limit", 3.5e9_f,
823  "Elasticity limit of the von Mises yielding criterion, specifying the stress of transition between elastic "
824  "and plastic deformation." },
825  { BodySettingsId::MELT_ENERGY, "rheology.melt_energy", 3.4e6_f,
826  "Specific melting energy, used by von Mises criterion." },
827  { BodySettingsId::COHESION, "rheology.cohesion", 9.e7_f,
828  "Cohesion, yield strength at zero pressure. Used by Drucker-Prager rheology." },
829  { BodySettingsId::INTERNAL_FRICTION, "rheology.internal_friction", 2._f,
830  "Coefficient of friction for undamaged material. Used by Drucker-Prager rheology." },
831  { BodySettingsId::DRY_FRICTION, "rheology.dry_friction", 0.8_f,
832  "Coefficient of friction for fully damaged material. Used by Drucker-Prager rheology." },
833  { BodySettingsId::USE_ACOUSTIC_FLUDIZATION, "rheology.acoustic_fludization", false,
834  "Whether to use the model of acoustic fludization." },
835  { BodySettingsId::OSCILLATION_DECAY_TIME, "rheology.oscillation_decay_time", 100._f,
836  "Characteristic decay time of the acoustic oscillations in the material." },
837  { BodySettingsId::OSCILLATION_REGENERATION, "rheology.oscillation_regeneration", 0.5_f,
838  "Regeneration efficiency of the acoustic oscillations." },
839  { BodySettingsId::FLUIDIZATION_VISCOSITY, "rheology.fludization_viscosity", 8.8e4_f, // Ivanov and Turtle, 2001
840  "Effective kinematic viscosity of acoustic fludization." },
841 
843  { BodySettingsId::DENSITY, "material.density", 2700._f,
844  "Initial density of the material." },
845  { BodySettingsId::DENSITY_RANGE, "material.density.range", Interval(50._f, INFTY),
846  "Allowed range of densities for this material." },
847  { BodySettingsId::DENSITY_MIN, "material.density.min", 100._f,
848  "Scale value for density, used to determine the time step value from derivatives of density." },
849  { BodySettingsId::ENERGY, "material.energy", 0._f,
850  "Initial specific energy of the material." },
851  { BodySettingsId::ENERGY_RANGE, "material.energy.range", Interval(0._f, INFTY),
852  "Allowed range of specific energy." },
853  { BodySettingsId::ENERGY_MIN, "material.energy.min", 1._f,
854  "Scale value for specific energy, used to determine the time step value from derivatives of energy." },
855  { BodySettingsId::DAMAGE, "material.damage", 0._f,
856  "Initial damage of the material." },
857  { BodySettingsId::DAMAGE_RANGE, "material.damage.range", Interval(0.f, 1._f),
858  "Allowed range of damage." },
859  { BodySettingsId::DAMAGE_MIN, "material.damage.min", 0.03_f,
860  "Scale value for damage, used to determine the time step value from derivatives of damage." },
861  { BodySettingsId::STRESS_TENSOR, "material.stress_tensor", TracelessTensor(0._f),
862  "Initial value of the deviatoric stress tensor (components xx, yy, xy, xz, yz)." },
863  { BodySettingsId::STRESS_TENSOR_MIN, "material.stress_tensor.min", 1.e5_f,
864  "Scale value for deviatoric stress, used to determine the time step value from derivatives of stress." },
865  { BodySettingsId::BULK_MODULUS, "material.bulk_modulus", 2.67e10_f,
866  "Bulk modulus of the material." },
867  { BodySettingsId::SHEAR_MODULUS, "material.shear_modulus", 2.27e10_f,
868  "Shear modulus of the material."},
869  { BodySettingsId::YOUNG_MODULUS, "material.young_modulus", 5.7e10_f,
870  "Young modulus of the material."},
871  { BodySettingsId::ELASTIC_MODULUS, "material.elastic_modulus", 8.e9_f,
872  "Elastic modulus of the material." },
873  { BodySettingsId::RAYLEIGH_SOUND_SPEED, "material.rayleigh_speed", 0.4_f,
874  "Speed of crack propagation, in units of local sound speed." },
875  { BodySettingsId::WEIBULL_COEFFICIENT, "material.weibull.coefficient", 4.e35_f,
876  "Coefficient k of Weibull distribution." },
877  { BodySettingsId::WEIBULL_EXPONENT, "material.weibull.exponent", 9._f,
878  "Coefficienet m of Weibull distribution." },
879  { BodySettingsId::WEIBULL_SAMPLE_DISTRIBUTIONS, "material.weibull.sample_distributions", false,
880  "If true, flaw counts and activation thresholds are samples from Poisson and exponential distribution, "
881  "respectively. Otherwise, flaws and activation thresholds are accumulated for each particle until all "
882  "particles have at least one flaw, as in Benz and Asphaug (1994). The latter is needed for reproducibility "
883  "of older results and compatibility with SPH5, otherwise the distribution sampling should be used, "
884  "especially for simulation with large (N > 1e7) number of particles." },
885  { BodySettingsId::DISTENTION, "material.palpha.distention", 1.275,
886  "Initial value of the material distention, used in the P-alpha model." },
887  { BodySettingsId::BULK_VISCOSITY, "material.bulk_viscosity", 1.e20_f,
888  "Bulk viscosity of the material. Applicable is internal friction is used." },
889  { BodySettingsId::SHEAR_VISCOSITY, "material.shear_viscosity", 1.e20_f,
890  "Shear viscosity of the material. Applicable is internal friction is used." },
891  { BodySettingsId::DIFFUSIVITY, "material.diffusivity", 2.3e-5_f, // iron
892  "Diffusivity of the material, used in heat diffusion equation." },
893  { BodySettingsId::SURFACE_TENSION, "material.surface_tension", 1._f,
894  "Surface tension of the fluid. Not applicable for solids nor gass." },
895  { BodySettingsId::BULK_POROSITY, "material.bulk_porosity", 0.4_f,
896  "Bulk (macro)porosity of the material, used when creating a rubble-pile body" },
897  { BodySettingsId::HEAT_CAPACITY, "material.heat_capacity", 700._f,
898  "Specific heat capacity at constant pressure. While it is generally a function of temperature, "
899  "this value can be used to estimate the temperature from the internal energy." },
900 
903  "Initial distribution of the particles in space. Can be one of the following:\n" + EnumMap::getDesc<DistributionEnum>() },
904  { BodySettingsId::CENTER_PARTICLES, "sph.center_particles", true,
905  "If true, generated particles will be moved so that their center of mass corresponds to the center of "
906  "selected domain. Note that this will potentially move some particles outside of the domain, which can "
907  "clash with some boundary conditions." },
908  { BodySettingsId::PARTICLE_SORTING, "sph.particle_sorting", false,
909  "If true, particles are shuffle in storage according to their Morton code, so that locality in space "
910  "implies locality in memory. Reading and writing quantities can be faster because of that." },
911  { BodySettingsId::DISTRIBUTE_MODE_SPH5, "sph.distribute_mode_sph5", false,
912  "Turns on 'SPH5 compatibility' mode when generating particle positions. This allows 1-1 comparison of "
913  "generated arrays, but results in too many generated particles (by about factor 1.4). The option also "
914  "implies center_particles = true." },
915  { BodySettingsId::SMOOTHING_LENGTH_ETA, "sph.eta", 1.3_f,
916  "Multiplier of the kernel radius. Lower values means the particles are more localized (better spatial resolution), "
917  "but they also have fewer neighbours, so the derivatives are evaluated with lower precision. Values between 1 and 2 "
918  "should be used." },
919  { BodySettingsId::DIEHL_STRENGTH, "sph.diehl.strength", 0.1_f,
920  "Magnitude of the particle displacement in a single iteration. Used by Diehl's distribution." },
921  { BodySettingsId::DIEHL_MAX_DIFFERENCE, "sph.diehl.max_difference", 10,
922  "Maximum allowed difference between the expected number of particles and the actual number of generated "
923  "particles. Higher value speed up the generation of particle positions." },
924  { BodySettingsId::DIEHL_ITERATION_COUNT, "sph.diehl.iteration_count", 50,
925  "Number of iterations used to converge particles to their final positions. Higher value means more uniform "
926  "and isotropic distribution, but also longer computation time." },
927  { BodySettingsId::PARTICLE_COUNT, "particles.count", 10000,
928  "Required number of particles in the body. Note that the actual number of particles may differ, depending "
929  "on the selected distribution. " },
930  { BodySettingsId::MIN_PARTICLE_COUNT, "particles.min_count", 100,
931  "Minimal number of particles per one body. Used when creating 'sub-bodies' withing one 'parent' body, "
932  "for example when creating rubble-pile asteroids, ice blocks inside an asteroid, etc. Parameter has no "
933  "effect for creation of a single monolithic body; the number of particles from PARTICLE_COUNT is used "
934  "in any case." },
935  { BodySettingsId::AV_ALPHA, "av.alpha", 1.5_f,
936  "Initial coefficient alpha of the Morris-Monaghan artificial viscosity. Beta coefficient of the viscosity "
937  "is derived as 2*alpha." },
938  { BodySettingsId::AV_ALPHA_RANGE, "av.alpha.range", Interval(0.05_f, 1.5_f),
939  "Allowed range of the alpha coefficient. Used by Morris-Monaghan artificial viscosity."},
940  { BodySettingsId::BODY_CENTER, "body.center", Vector(0._f),
941  "Center of the body." },
943  "Can be one of the following:\n" + EnumMap::getDesc<DomainEnum>() },
944  { BodySettingsId::BODY_RADIUS, "body.radius", 5.e3_f,
945  "Radius of a spherical body" },
946  { BodySettingsId::BODY_DIMENSIONS, "body.dimensions", Vector(10.e3_f),
947  "Dimensions of a body." },
948  { BodySettingsId::BODY_HEIGHT, "body.height", 10.e3_f,
949  "Height of a body." },
950  { BodySettingsId::BODY_SPIN_RATE, "body.spin_rate", 0._f,
951  "Spin rate of the body along z-axis in units rev/day." },
952 
954  { BodySettingsId::VISUALIZATION_TEXTURE, "visualization.texture", std::string(),
955  "Path to the texture used by a renderer. May be empty." },
956 
958  { BodySettingsId::IDENTIFIER, "identifier", std::string("basalt"),
959  "Arbitrary string identifying this material" },
960 });
961 
962 // clang-format on
963 
964 
965 // Explicit instantiation
966 template class Settings<BodySettingsId>;
967 template class SettingsIterator<BodySettingsId>;
968 
969 template class Settings<RunSettingsId>;
970 template class SettingsIterator<RunSettingsId>;
971 
#define NOT_IMPLEMENTED
Helper macro marking missing implementation.
Definition: Assert.h:100
NAMESPACE_SPH_BEGIN
Definition: BarnesHut.cpp:13
const EmptyFlags EMPTY_FLAGS
Definition: Flags.h:16
constexpr Float INFTY
Definition: MathUtils.h:38
#define NAMESPACE_SPH_END
Definition: Object.h:12
const NothingType NOTHING
Definition: Optional.h:16
Saving and loading particle data.
@ STRAIN_RATE_CORRECTION_TENSOR
Symmetric tensor correcting kernel gradient for linear consistency.
@ DEVIATORIC_STRESS
Deviatoric stress tensor, always a traceless tensor stored in components xx, yy, xy,...
@ PRESSURE
Pressure, reduced by yielding and fracture model (multiplied by 1-damage); always a scalar quantity.
@ VELOCITY
Current velocities of particles, always a vector quantity.
@ DAMAGE
Damage, reducing the pressure and deviatoric stress.
@ POSITION
Positions of particles, always a vector quantity.
@ ENERGY
Specific internal energy, always a scalar quantity.
@ SMOOTHING_LENGTH
Smoothing lenghts of particles.
@ DENSITY
Density, always a scalar quantity.
@ INDEX
Index of particle.
@ MASS
Particle masses, always a scalar quantity.
@ MATERIAL_ID
ID of material, indexed from 0 to (#bodies - 1).
@ SPH
Main SPH simulation.
BasicVector< Float > Vector
Definition: Vector.h:539
Wrapper of pointer that deletes the resource from destructor.
Definition: AutoPtr.h:15
Wrapper of an integral value providing functions for reading and modifying individual bits.
Definition: Flags.h:20
Object representing a 1D interval of real numbers.
Definition: Interval.h:17
Iterator useful for iterating over all entries in the settings.
Definition: Settings.h:486
Symmetric traceless 2nd order tensor.
Optional< std::string > getIoExtension(const IoEnum type)
Returns the file extension associated with given IO type.
Definition: Settings.cpp:343
std::string getIoDescription(const IoEnum type)
Returns a short description of the file format.
Definition: Settings.cpp:387
Flags< IoCapability > getIoCapabilities(const IoEnum type)
Returns the capabilities of given file format.
Definition: Settings.cpp:412
Optional< IoEnum > getIoEnum(const std::string &ext)
Returns the file type from file extension.
Definition: Settings.cpp:367
@ NONE
No collision handling.
@ INERTIAL
Use centrifugal force and Coriolis forces given by angular frequency of the coordinate frame.
@ PRESSURE
Use force from pressure gradient in the solver.
@ SELF_GRAVITY
Use gravitational force in the model.
@ SURFACE_TENSION
Surface force proportional to surface curvature.
@ STD_OUT
Print log to standard output.
@ FILE
Print log to file.
@ NONE
Do not log anything.
@ ELASTIC
No yielding, just elastic deformations following Hooke's law.
@ NONE
Gass or material with no stress tensor.
@ VON_MISES
Von Mises criterion.
@ DRUCKER_PRAGER
Drucker-Prager pressure dependent yielding stress.
@ UNIFORM_GRID
Partitioning particles into a grid uniform in space.
@ LINKED_LIST
Using linked list.
@ BRUTE_FORCE
Brute-force search by going through each pair of particles (O(N^2) complexity)
@ KD_TREE
Using K-d tree.
@ OCTREE
Using octree.
@ HASH_MAP
Using hash map.
@ HALTON
Halton QRNG.
@ UNIFORM
Mersenne Twister PRNG from Standard library.
@ BENZ_ASPHAUG
Same RNG as used in SPH5, used for 1-1 comparison.
@ DIVERGENCE
Time step computed from velocity divergence.
@ DERIVATIVES
Time step computed by limiting value-to-derivative ratio of quantiites.
@ ALL
Value for using all criteria.
@ COURANT
Time step determined using CFL condition.
@ ACCELERATION
Time step computed from ratio of acceleration and smoothing length.
@ BRUTE_FORCE
Brute-force summation over all particle pairs (O(N^2) complexity)
@ SPHERICAL
Approximated gravity, assuming the matter is a simple homogeneous sphere.
@ BARNES_HUT
Use Barnes-Hut algorithm, approximating gravity by multipole expansion (up to octupole order)
@ PRESSURE_DIFFERENCE
Signal speed given by the absolute value of pressure difference, as in Price (2008)
@ VELOCITY_DIFFERENCE
Signal speed given by relative velocity projected to the positive vector, as in Valdarnini (2018),...
@ CUSTOM
User-defined list of output times.
@ LINEAR
Constant time between consecutive output times.
@ LOGARITHMIC
Constant ratio between consecutive output times.
IoEnum
Definition: Settings.h:859
@ TEXT_FILE
Formatted human-readable text file.
@ BINARY_FILE
@ PKDGRAV_INPUT
Pkdgrav input file.
@ MPCORP_FILE
Export from Minor Planet Center Orbit Database.
@ GNUPLOT_OUTPUT
@ NONE
No input/output.
@ COMPRESSED_FILE
@ LEAP_FROG
Leap-frog 2nd-order integration.
@ MODIFIED_MIDPOINT
Modified midpoint method with constant number of substeps.
@ BULIRSCH_STOER
Bulirsch-Stoer integrator.
@ RUNGE_KUTTA
Runge-Kutta 4-th order integration.
@ PREDICTOR_CORRECTOR
Predictor-corrector scheme.
@ EULER_EXPLICIT
Explicit (forward) 1st-order integration.
@ STANDARD
P_i / rho_i^2 + P_j / rho_j^2.
@ BENZ_ASPHAUG
(P_i + P_j) / (rho_i rho_j)
@ DAMAGED_DECREASE_BULK_DENSITY
@ STANDARD
Normal continuity equation, using velocity divergence computed from all neighbors.
@ PLANAR
Planar mapping.
@ SPHERICAL
Spherical mapping.
@ OUTPUT
The format can be used as file output.
@ INPUT
The format can be used as file input.
@ SPH_KERNEL
Use gravity smoothing kernel corresponding to selected SPH kernel.
@ POINT_PARTICLES
Point-like particles with zero radius.
@ INTERNAL_BOUNCE
Particles are allowed to overlap and they bounce if moving towards each other.
@ REPEL
Particles are shifted until no overlap happens.
@ NONE
All overlaps are ignored.
@ FORCE_MERGE
Overlapping particles are merged.
@ SUMMATION_SOLVER
Density is obtained by direct summation over nearest SPH particles.
@ ENERGY_CONSERVING_SOLVER
Solver advancing internal energy using pair-wise work done by particles, by Owen (2009).
@ ELASTIC_DEFORMATION_SOLVER
Special solver used to simulate deformations of perfectly elastic bodies.
@ SYMMETRIC_SOLVER
SPH formulation using symmetrized evaluation of derivatives.
@ DENSITY_INDEPENDENT
Density independent solver by Saitoh & Makino (2013).
@ ASYMMETRIC_SOLVER
Generic solver evaluating all derivatives asymmetrically.
@ RIEMANN
Artificial viscosity term analogous to Riemann solvers by Monaghan (1997)
@ MORRIS_MONAGHAN
Time-dependent artificial viscosity by Morris & Monaghan (1997).
@ STANDARD
Standard artificial viscosity term by Monaghan (1989).
@ NONE
No artificial viscosity.
@ STRATIFIED
Stratified distribution to reduce clustering.
@ RANDOM
Random distribution of particles.
@ PARAMETRIZED_SPIRALING
Parametrized spiraling scheme by Saff & Kuijlaars (1997)
@ HEXAGONAL
Hexagonally close packing.
@ DIEHL_ET_AL
Isotropic uniform distribution by Diehl et al. (2012)
@ CUBIC
Cubic close packing.
@ THOMAS_COUCHMAN
Modification of the standard M4 B-spline kernel, used to avoid particle clustering.
@ GAUSSIAN
Gaussian function.
@ FOURTH_ORDER_SPLINE
M5 B-spline (piecewise 4th-order polynomial)
@ CORE_TRIANGLE
Core Triangle (CT) kernel by Read et al. (2010)
@ WENDLAND_C2
Wendland kernel C2.
@ TRIANGLE
Simple triangle (piecewise linear) kernel.
@ WENDLAND_C6
Wendland kernel C6.
@ WENDLAND_C4
Wendland kernel C4.
@ CUBIC_SPLINE
M4 B-spline (piecewise cubic polynomial)
@ SCALAR_GRADY_KIPP
Grady-Kipp model of fragmentation using scalar damage.
@ NONE
No fragmentation.
@ TENSOR_GRADY_KIPP
Grady-Kipp model of fragmentation using tensor damage.
@ ANEOS
ANEOS given by look-up table.
@ MIE_GRUNEISEN
Mie-Gruneisen equation of state.
@ TAIT
Tait equation of state for simulations of liquids.
@ IDEAL_GAS
Equation of state for ideal gas.
@ NONE
No equation of state.
@ TILLOTSON
Tillotson (1962) equation of state.
@ MURNAGHAN
Murnaghan equation of state.
@ SIMPLIFIED_TILLOTSON
Simplified version of the Tillotson equation of state.
@ INTERNAL_FRICTION
Coefficient of friction for undamaged material.
@ TILLOTSON_NONLINEAR_B
Coefficient B of the nonlinear compressive term in Tillotson equation.
@ ELASTICITY_LIMIT
Elasticity limit of the von Mises yielding criterion.
@ TILLOTSON_ALPHA
Alpha coefficient in expanded phase of Tillotson equation.
@ FLUIDIZATION_VISCOSITY
Effective viscosity of acoustic fludizations.
@ DRY_FRICTION
Coefficient of friction for fully damaged material.
@ WEIBULL_EXPONENT
Exponent of the Weibull distribution of flaws.
@ BODY_CENTER
Center point of the body. Currently used only by StabilizationSolver.
@ BULK_POROSITY
Bulk (macro)porosity of the body.
@ TILLOTSON_ENERGY_CV
Specific energy of complete vaporization.
@ TILLOTSON_SMALL_B
"Small b" coefficient in Tillotson equation
@ OSCILLATION_REGENERATION
Regeneration efficiency of acoustric oscillations.
@ DIEHL_STRENGTH
Strength parameter of the Diehl's distribution.
@ MELT_ENERGY
Melting energy, used for temperature-dependence of the stress tensor.
@ STRESS_TENSOR
Initial values of the deviatoric stress tensor.
@ ENERGY_MIN
Estimated minimal value of energy used to determine timestepping error.
@ PARTICLE_SORTING
If true, particles are sorted using Morton code, preserving locality in memory.
@ BULK_SOUND_SPEED
Used in Mie-Gruneisen equations of state.
@ USE_ACOUSTIC_FLUDIZATION
Whether to use the acoustic fludization model.
@ DAMAGE_MIN
Estimate minimal value of damage used to determine timestepping error.
@ ELASTIC_MODULUS
Elastic modulus lambda (a.k.a Lame's first parameter) of the material.
@ RHEOLOGY_DAMAGE
Model of fragmentation used within the rheological model.
@ IDENTIFIER
Arbitrary string identifying this material.
@ COHESION
Cohesion, yield strength at zero pressure.
@ TAIT_GAMMA
Exponent of density, representing a compressibility of a fluid. Used in Tait equation of state.
@ INITIAL_DISTRIBUTION
Initial distribution of SPH particles within the domain, see DistributionEnum for options.
@ DIEHL_ITERATION_COUNT
Number of iterations of particle repelling.
@ TILLOTSON_BETA
Beta coefficient in expanded phase of Tillotson equation.
@ DENSITY_RANGE
Allowed range of density. Densities of all particles all clamped to fit in the range.
@ DAMAGE
Initial damage of the body.
@ ENERGY
Initial specific internal energy.
@ SHEAR_MODULUS
Shear modulus mu (a.k.a Lame's second parameter) of the material.
@ YOUNG_MODULUS
Young modulus of the material.
@ ADIABATIC_INDEX
Adiabatic index used by some equations of state (such as ideal gas)
@ TAIT_SOUND_SPEED
Sound speed used in Tait equation of state.
@ BULK_MODULUS
Bulk modulus of the material.
@ PARTICLE_COUNT
Number of SPH particles in the body.
@ DENSITY
Density at zero pressure.
@ SMOOTHING_LENGTH_ETA
Eta-factor between smoothing length and particle concentration (h = eta * n^(-1/d) )
@ AV_ALPHA_RANGE
Lower and upper bound of the alpha coefficient, used only for time-dependent artificial viscosity.
@ WEIBULL_COEFFICIENT
Coefficient (multiplier) of the Weibull distribution of flaws.
@ HEAT_CAPACITY
Heat capacity at constant pressure,.
@ OSCILLATION_DECAY_TIME
Characteristic decay time of acoustic oscillations in the material.
@ TILLOTSON_ENERGY_IV
Specific energy of incipient vaporization.
@ STRESS_TENSOR_MIN
Estimated minial value of stress tensor components used to determined timestepping error.
@ RAYLEIGH_SOUND_SPEED
Speed of crack growth, in units of local sound speed.
@ EOS
Equation of state for this material, see EosEnum for options.
@ ENERGY_RANGE
Allowed range of specific internal energy.
@ RHEOLOGY_YIELDING
Model of stress reducing used within the rheological model.
@ DISTENTION
Initial value of the material distention, used in the P-alpha model.
@ GRUNEISEN_GAMMA
Gruneisen's gamma paraemter used in Mie-Gruneisen equation of state.
@ TILLOTSON_SMALL_A
"Small a" coefficient in Tillotson equation
@ HUGONIOT_SLOPE
Linear Hugoniot slope coefficient used in Mie-Gruneisen equation of state.
@ DAMAGE_RANGE
Allowed range of damage.
@ SURFACE_TENSION
Coefficient of surface tension.
@ TILLOTSON_SUBLIMATION
Specific sublimation energy.
@ WEIBULL_SAMPLE_DISTRIBUTIONS
@ FIXED_PARTICLES
Creates dummy particles along the boundary.
@ SYMMETRIC
Particles are duplicated along the z=0 plane.
@ PROJECT_1D
Project all movement onto a line, effectivelly reducing the simulation to 1D.
@ KILL_ESCAPERS
Removes particles outside the domain.
@ GHOST_PARTICLES
Create ghosts to keep particles inside domain.
@ NONE
Do not use any boundary conditions (= vacuum conditions)
@ FROZEN_PARTICLES
Highest derivatives of all particles close to the boundary are set to zero.
@ PERIODIC
Periodic boundary conditions.
@ WIND_TUNNEL
Extension of Frozen Particles, pushing particles inside the domain and removing them on the other end...
@ CONTINUITY_EQUATION
Smoothing length is evolved using continuity equation.
@ RUN_OUTPUT_QUANTITIES
List of quantities to write to text output. Binary output always stores all quantitites.
@ DOMAIN_CENTER
Center point of the domain.
@ SPH_SCRIPT_FILE
Path of an arbitrary ChaiScript script executed each timestep.
@ SPH_SUMMATION_MAX_ITERATIONS
Maximum number of iterations for self-consistent density computation of summation solver.
@ RUN_AUTHOR
Name of the person running the simulation.
@ SPH_STRAIN_RATE_CORRECTION_TENSOR
@ RUN_OUTPUT_INTERVAL
Time interval of dumping data to disk.
@ SPH_CONTINUITY_MODE
Specifies how the density is evolved, see ContinuityEnum.
@ TIMESTEPPING_MAX_TIMESTEP
@ DOMAIN_HEIGHT
Height of a cylindrical domain.
@ SPH_AV_STRESS_FACTOR
Multiplicative factor of the artificial stress term (= strength of the viscosity)
@ DOMAIN_GHOST_MIN_DIST
Minimal distance between a particle and its ghost, in units of smoothing length.
@ RUN_LOGGER
Selected logger of a run, see LoggerEnum.
@ RUN_EMAIL
E-mail of the person running the simulation.
@ SPH_AV_BALSARA_STORE
If true, Balsara factors will be saved as quantity AV_BALSARA. Mainly for debugging purposes.
@ RUN_VERBOSE_NAME
Path of a file where the verbose log is printed.
@ SPH_AV_STRESS_EXPONENT
Weighting function exponent n in artificial stress term.
@ SPH_USE_AC
Enables the artificial thermal conductivity term.
@ FINDER_LEAF_SIZE
Maximum number of particles in a leaf node.
@ SOFT_REPEL_STRENGTH
Magnitude of the repel force for the soft-body solver.
@ SPH_KERNEL
Index of SPH Kernel, see KernelEnum.
@ RUN_OUTPUT_SPACING
Type of output spacing in time, see enum OutputSpacing.
@ GENERATE_UVWS
If true, the mapping coordinates will be computed and saved for all bodies in the simulation.
@ COLLISION_HANDLER
Specifies how the collisions of particles should be handler; see CollisionHandlerEnum.
@ SPH_SOLVER_FORCES
List of forces to compute by the solver.
@ RUN_THREAD_CNT
Number of threads used by the code. If 0, all available threads are used.
@ SPH_AV_TYPE
Type of used artificial viscosity.
@ RUN_LOGGER_FILE
Path of a file where the log is printed, used only when selected logger is LoggerEnum::FILE.
@ SPH_AV_BETA
Artificial viscosity beta coefficient.
@ SPH_AV_ALPHA
Artificial viscosity alpha coefficient.
@ RUN_OUTPUT_PATH
Path where all output files (dumps, logs, ...) will be written.
@ DOMAIN_FROZEN_DIST
Distance to the boundary in units of smoothing length under which the particles are frozen.
@ SPH_SOLVER_TYPE
Selected solver for computing derivatives of physical variables.
@ NBODY_MAX_ROTATION_ANGLE
@ RUN_DIAGNOSTICS_INTERVAL
@ TIMESTEPPING_INITIAL_TIMESTEP
@ COLLISION_BOUNCE_MERGE_LIMIT
@ SPH_ADAPTIVE_SMOOTHING_LENGTH
Solution for evolutions of the smoothing length.
@ SPH_AV_USE_STRESS
Whether to use artificial stress.
@ GRAVITY_SOLVER
Algorithm to compute gravitational acceleration.
@ RUN_OUTPUT_CUSTOM_TIMES
List of comma-separated output times, used when RUN_OUTPUT_SPACING is set to CUSTOM.
@ TIMESTEPPING_DERIVATIVE_FACTOR
Multiplicative factor k for the derivative criterion; dt = k * v / dv.
@ SPH_SMOOTHING_LENGTH_MIN
Minimal value of smoothing length.
@ RUN_COMMENT
User-specified comment.
@ SPH_USE_XSPH
Turn on the XSPH correction.
@ SPH_SUMMATION_DENSITY_DELTA
@ SPH_DI_ALPHA
Alpha parameter of the density-independent solver.
@ COLLISION_ALLOWED_OVERLAP
@ SPH_DISCRETIZATION
Specifies a discretization of SPH equations; see DiscretizationEnum.
@ SPH_AC_ALPHA
Artificial conductivity alpha coefficient.
@ RUN_OUTPUT_TYPE
Selected format of the output file, see IoEnum.
@ SPH_VELOCITY_DIFFUSION_ALPHA
Alpha-coefficient of the delta-SPH modification.
@ UVW_MAPPING
Type of the UV mapping.
@ RUN_RNG
Selected random-number generator used within the run.
@ RUN_OUTPUT_FIRST_INDEX
Index of the first generated output file. Might not be zero if the simulation is resumed.
@ NBODY_AGGREGATES_SOURCE
Specifies the initial aggregates used in the simulation. See AggregateEnum.
@ TIMESTEPPING_INTEGRATOR
Selected timestepping integrator.
@ TIMESTEPPING_MAX_INCREASE
@ TIMESTEPPING_MIDPOINT_COUNT
Number of sub-steps in the modified midpoint method.
@ COLLISION_RESTITUTION_TANGENT
@ GRAVITY_MULTIPOLE_ORDER
Order of multipole expansion.
@ TIMESTEPPING_COURANT_NUMBER
Courant number.
@ SPH_FINDER
Structure for searching nearest neighbours of particles.
@ COLLISION_ROTATION_MERGE_LIMIT
@ SOFT_FRICTION_STRENGTH
Magnitude of the friction force for the soft-body solver.
@ COLLISION_OVERLAP
Specifies how particle overlaps should be handled.
@ DOMAIN_TYPE
Computational domain, enforced by boundary conditions.
@ SPH_AC_BETA
Artificial conductivity beta coefficient.
@ SPH_DENSITY_DIFFUSION_DELTA
Delta-coefficient of the delta-SPH modification, see Marrone et al. 2011.
@ RUN_LOGGER_VERBOSITY
Number specifying log verbosity. Can be between 0 and 3, going from least to most verbose.
@ SPH_SCRIPT_ENABLE
Enables or disables scripted term.
@ TIMESTEPPING_DIVERGENCE_FACTOR
Multiplicative factor for the divergence criterion.
@ RUN_NAME
User-specified name of the run, used in some output files.
@ RUN_VERBOSE_ENABLE
Enables verbose log of a simulation.
@ TIMESTEPPING_BS_ACCURACY
Required relative accuracy of the Bulirsch-Stoer integrator.
@ GRAVITY_RECOMPUTATION_PERIOD
@ GRAVITY_OPENING_ANGLE
Opening angle Theta for multipole approximation of gravity.
@ SPH_USE_DELTASPH
Turn on the delta-SPH correction.
@ DOMAIN_SIZE
(Vector) size of a block domain
@ SPH_PHASE_ANGLE
Evolve particle phase angle.
@ DOMAIN_BOUNDARY
Type of boundary conditions.
@ GRAVITY_CONSTANT
Gravitational constant. To be generalized.
@ SPH_SCRIPT_ONESHOT
Whether to execute the script only once or periodically.
@ SPH_STABILIZATION_DAMPING
@ GRAVITY_KERNEL
Gravity smoothing kernel.
@ DOMAIN_RADIUS
Radius of a spherical and cylindrical domain.
@ RUN_RNG_SEED
Seed for the random-number generator.
@ FINDER_MAX_PARALLEL_DEPTH
@ SPH_ASYMMETRIC_COMPUTE_RADII_HASH_MAP
@ SPH_AC_SIGNAL_SPEED
Type of the signal speed used by artificial conductivity.
@ FRAME_CONSTANT_ACCELERATION
@ COLLISION_RESTITUTION_NORMAL
@ RUN_OUTPUT_NAME
File name of the output file (including extension), where d is a placeholder for output number.
@ BLOCK
Block with edge sizes given by vector.
@ SPHERICAL
Sphere with given radius.
@ NONE
No computational domain (can only be used with BoundaryEnum::NONE)
@ ELLIPSOIDAL
Axis-aligned ellipsoid.
@ CYLINDER
Cylindrical domain aligned with z axis.
constexpr Float gravity
Gravitational constant (CODATA 2014)
Definition: Constants.h:29
constexpr Float R_earth
Earth radius.
Definition: Constants.h:60
Helper class for adding individual enums to the enum map.
Definition: EnumMap.h:175