19 equations += makeTerm<XSph>();
25 equations += makeTerm<PressureForce>();
28 equations += makeTerm<NavierStokesForce>();
30 equations += makeTerm<SolidStressForce>(settings);
38 equations += makeTerm<ViscousStress>();
42 equations += makeTerm<CohesionTerm>();
47 equations += makeTerm<InertialForce>(omega);
68 equations += makeTerm<ChaiScriptTerm>(scriptPath, period, oneshot);
71 equations += makeTerm<ContinuityEquation>(settings);
74 equations += makeTerm<DeltaSph::DensityDiffusion>();
75 equations += makeTerm<DeltaSph::VelocityDiffusion>();
82 equations += makeTerm<StressAV>(settings);
86 equations += makeTerm<ArtificialConductivity>(settings);
97 equations += makeTerm<AdaptiveSmoothingLength>(settings);
100 equations += makeTerm<ConstSmoothingLength>();
Artificial thermal conductivity.
Delta-SPH modification of the standard SPH formulation.
Equations for simulations of water and other fluids.
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
Additional equation terms computing SPH statistics rather than physical quantities.
constexpr INLINE Float pow< 3 >(const Float v)
#define NAMESPACE_SPH_END
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.
Standard SPH formulation that uses continuity equation for solution of density.
Form of tensor artificial viscosity for SPH with stress tensor.
INLINE Float getLength(const Vector &v)
Returns the length of the vector. Enabled only for vectors of floating-point precision.
BasicVector< Float > Vector
INLINE float dot(const BasicVector< float > &v1, const BasicVector< float > &v2)
Make sure the vector is trivially constructible and destructible, needed for fast initialization of a...
INLINE Vector getNormalized(const Vector &v)
XSPH correction to the integration of particle positions.
Container holding equation terms.
Wrapper of an integral value providing functions for reading and modifying individual bits.
constexpr INLINE bool has(const TEnum flag) const
Checks if the object has a given flag.
Object representing a path on a filesystem.
TValue get(const TEnum idx, std::enable_if_t<!std::is_enum< std::decay_t< TValue >>::value, int >=0) const
Returns a value of given type from the settings.
Flags< TValue > getFlags(const TEnum idx) const
Returns Flags from underlying value stored in settings.
Creating code components based on values from settings.
@ INTERNAL_FRICTION
Use internal friction given by the viscosity in the material.
@ INERTIAL
Use centrifugal force and Coriolis forces given by angular frequency of the coordinate frame.
@ PRESSURE
Use force from pressure gradient in the solver.
@ SURFACE_TENSION
Surface force proportional to surface curvature.
@ CONTINUITY_EQUATION
Smoothing length is evolved using continuity equation.
@ SPH_SCRIPT_FILE
Path of an arbitrary ChaiScript script executed each timestep.
@ SPH_USE_AC
Enables the artificial thermal conductivity term.
@ SPH_SOLVER_FORCES
List of forces to compute by the solver.
@ SPH_ADAPTIVE_SMOOTHING_LENGTH
Solution for evolutions of the smoothing length.
@ SPH_AV_USE_STRESS
Whether to use artificial stress.
@ SPH_USE_XSPH
Turn on the XSPH correction.
@ FRAME_ANGULAR_FREQUENCY
@ SPH_SCRIPT_ENABLE
Enables or disables scripted term.
@ SPH_USE_DELTASPH
Turn on the delta-SPH correction.
@ SPH_SCRIPT_ONESHOT
Whether to execute the script only once or periodically.
@ FRAME_CONSTANT_ACCELERATION
constexpr Float gravity
Gravitational constant (CODATA 2014)
AutoPtr< IEquationTerm > getArtificialViscosity(const RunSettings &settings)