15 static constexpr
Float SCALE = 1.e3_f;
74 return Vector(0._f, -9.81_f, 0._f);
87 solver = makeAuto<AsymmetricSolver>(*scheduler, settings, eqs, std::move(bc));
89 const Vector dimension =
Vector(1._f, 3.2_f, 3._f) * SCALE;
95 logWriter = makeAuto<NullLogWriter>();
98 triggers.pushBack(makeAuto<ProgressLog>(10._f));
103 output->dump(storage, stats);
109 Path(
"cliff_collapse/cliff_0001.ssf") };
111 for (
Path file : filesToCheck) {
121 for (
Path file : filesToCheck) {
TEST_CASE("Cliff Collapse", "[rheology]")
void measureRun(const Path &file, Function< void()> run)
Outcome areFilesApproxEqual(const Path &path1, const Path &path2)
Checks if two .ssf files are almost equal (may have eps-differences in quantities).
const EmptyFlags EMPTY_FLAGS
uint32_t Size
Integral type used to index arrays (by default).
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
const NothingType NOTHING
const SuccessTag SUCCESS
Global constant for successful outcome.
Additional forces that do not depend on spatial derivatives.
EquationHolder makeExternalForce(TFunctor &&functor)
NAMESPACE_SPH_BEGIN EquationHolder getStandardEquations(const RunSettings &settings, const EquationHolder &other)
Standard SPH equation set, using density and specific energy as independent variables.
BasicVector< Float > Vector
Generic dynamically allocated resizable storage.
Block aligned with coordinate axes, defined by its center and length of each side.
virtual void setUp(SharedPtr< Storage > storage) override
Prepares the run, creates logger, output, ...
virtual void tearDown(const Storage &storage, const Statistics &stats) override
Called after the run.
Container holding equation terms.
Defines the interface for a run.
Statistics run(Storage &storage)
Runs the simulation.
Object for adding one or more bodies with given material into a Storage.
BodyView addMonolithicBody(Storage &storage, const BodySettings &body)
Creates a monolithic body by filling given domain with particles.
Object representing a 1D interval of real numbers.
Wrapper of type value of which may or may not be present.
Object representing a path on a filesystem.
Settings & set(const TEnum idx, TValue &&value, std::enable_if_t<!std::is_enum< std::decay_t< TValue >>::value, int >=0)
Saves a value into the settings.
Object holding various statistics about current run.
Container storing all quantities used within the simulations.
MaterialView getMaterial(const Size matIdx) const
Returns an object containing a reference to given material.
@ PRESSURE
Use force from pressure gradient in the solver.
@ DRUCKER_PRAGER
Drucker-Prager pressure dependent yielding stress.
@ PREDICTOR_CORRECTOR
Predictor-corrector scheme.
@ STANDARD
P_i / rho_i^2 + P_j / rho_j^2.
@ ASYMMETRIC_SOLVER
Generic solver evaluating all derivatives asymmetrically.
@ STANDARD
Standard artificial viscosity term by Monaghan (1989).
@ HEXAGONAL
Hexagonally close packing.
@ CUBIC_SPLINE
M4 B-spline (piecewise cubic polynomial)
@ SCALAR_GRADY_KIPP
Grady-Kipp model of fragmentation using scalar damage.
@ TILLOTSON
Tillotson (1962) equation of state.
@ DRY_FRICTION
Coefficient of friction for fully damaged material.
@ MELT_ENERGY
Melting energy, used for temperature-dependence of the stress tensor.
@ ENERGY_MIN
Estimated minimal value of energy used to determine timestepping error.
@ DAMAGE_MIN
Estimate minimal value of damage used to determine timestepping error.
@ RHEOLOGY_DAMAGE
Model of fragmentation used within the rheological model.
@ INITIAL_DISTRIBUTION
Initial distribution of SPH particles within the domain, see DistributionEnum for options.
@ 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.
@ PARTICLE_COUNT
Number of SPH particles in the body.
@ STRESS_TENSOR_MIN
Estimated minial value of stress tensor components used to determined timestepping error.
@ 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.
@ GHOST_PARTICLES
Create ghosts to keep particles inside domain.
@ DOMAIN_CENTER
Center point of the domain.
@ SPH_STRAIN_RATE_CORRECTION_TENSOR
@ RUN_OUTPUT_INTERVAL
Time interval of dumping data to disk.
@ TIMESTEPPING_MAX_TIMESTEP
@ DOMAIN_GHOST_MIN_DIST
Minimal distance between a particle and its ghost, in units of smoothing length.
@ SPH_KERNEL
Index of SPH Kernel, see KernelEnum.
@ SPH_SOLVER_FORCES
List of forces to compute by the solver.
@ SPH_AV_TYPE
Type of used artificial viscosity.
@ 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.
@ SPH_SOLVER_TYPE
Selected solver for computing derivatives of physical variables.
@ TIMESTEPPING_INITIAL_TIMESTEP
@ SPH_ADAPTIVE_SMOOTHING_LENGTH
Solution for evolutions of the smoothing length.
@ SPH_AV_USE_STRESS
Whether to use artificial stress.
@ TIMESTEPPING_DERIVATIVE_FACTOR
Multiplicative factor k for the derivative criterion; dt = k * v / dv.
@ SPH_DISCRETIZATION
Specifies a discretization of SPH equations; see DiscretizationEnum.
@ RUN_OUTPUT_TYPE
Selected format of the output file, see IoEnum.
@ TIMESTEPPING_INTEGRATOR
Selected timestepping integrator.
@ TIMESTEPPING_COURANT_NUMBER
Courant number.
@ SPH_FINDER
Structure for searching nearest neighbours of particles.
@ DOMAIN_TYPE
Computational domain, enforced by boundary conditions.
@ RUN_NAME
User-specified name of the run, used in some output files.
@ DOMAIN_SIZE
(Vector) size of a block domain
@ DOMAIN_BOUNDARY
Type of boundary conditions.
@ 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.
AutoPtr< IDomain > getDomain(const RunSettings &settings)
SharedPtr< IScheduler > getScheduler(const RunSettings &settings=RunSettings::getDefaults())
Outcome removePath(const Path &path, const Flags< RemovePathFlag > flags=EMPTY_FLAGS)