25 auto enablerDp = [
this, enabler] {
29 auto enablerAf = [
this, enabler] {
34 auto enablerRheo = [
this, enabler] {
38 auto enablerFrag = [
this, enablerRheo] {
49 .setEnabler([
this, enabler] {
52 return (!enabler || enabler()) &&
56 .setEnabler(enablerRheo);
58 .setEnabler(enablerRheo);
60 .setEnabler([
this, enabler] {
62 return (!enabler || enabler()) &&
66 .setEnabler(enablerRheo);
68 .setEnabler(enablerDp);
72 .setEnabler(enablerDp);
74 .setEnabler(enablerAf);
76 .setEnabler(enablerAf);
78 .setEnabler(enablerAf);
80 .setEnabler(enablerRheo);
82 .setEnabler(enablerFrag);
84 .setEnabler(enablerFrag);
86 .setEnabler(enablerFrag);
108 .setEnabler(tillotsonEnabler);
110 .setEnabler(tillotsonEnabler);
112 .setEnabler(tillotsonEnabler);
114 .setEnabler(tillotsonEnabler);
116 .setEnabler(tillotsonEnabler);
118 .setEnabler(tillotsonEnabler);
120 .setEnabler(tillotsonEnabler);
122 .setEnabler(tillotsonEnabler);
141 [](
const std::string& name) {
return makeAuto<MaterialJob>(name); },
148 [](
const std::string& name) {
155 [](
const std::string& name) {
162 [](
const std::string& name) {
169 [](
const std::string& name) {
196 "optimize timestepping",
199 [](
const std::string& name) {
return makeAuto<DisableDerivativeCriterionJob>(name); },
200 "Helper material modifier that turns off the time step limitation for damage and stress "
201 "tensor. Useful to avoid very low time steps due to particles that are deemed not important to "
202 "the solution (such as impactor particles). If the time step is not limited by the derivative "
203 "criterion, this material modifier simply forwards the material parameters unchanged.");
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
VirtualSettings::Category & addGenericCategory(VirtualSettings &connector, std::string &instanceName)
Adds a common settings category, used by all jobs.
AutoPtr< IMaterial > getMaterial(const MaterialEnum type)
SPH-specific implementation of particle materials.
#define NAMESPACE_SPH_END
virtual void evaluate(const RunSettings &global, IRunCallbacks &UNUSED(callbacks)) override
virtual VirtualSettings getSettings() override
Returns a settings object which allows to query and modify the state of the job.
Base class for jobs providing a material.
SharedPtr< IMaterial > result
Data filled by the job when it finishes.
INLINE const BodySettings & getParams() const
Returns settings containing material parameters.
INLINE IMaterial & setParam(const BodySettingsId paramIdx, TValue &&value)
Callbacks executed by the simulation to provide feedback to the user.
Object representing a 1D interval of real numbers.
virtual VirtualSettings getSettings() override
Returns a settings object which allows to query and modify the state of the job.
virtual void evaluate(const RunSettings &global, IRunCallbacks &UNUSED(callbacks)) override
MaterialJob(const std::string &name, const BodySettings &overrides=EMPTY_SETTINGS)
void addMaterialEntries(VirtualSettings::Category &category, Function< bool()> enabler)
MaterialProvider(const BodySettings &overrides=EMPTY_SETTINGS)
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.
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.
void addEntries(const Settings &settings)
Adds entries from different Settings object into this one, overriding current entries.
EntryControl & connect(const std::string &name, const std::string &key, TValue &value)
Connects to given reference.
Holds a map of virtual entries, associated with a unique name.
Category & addCategory(const std::string &name)
Creates a new category of entries.
Creating code components based on values from settings.
@ NONE
Gass or material with no stress tensor.
@ VON_MISES
Von Mises criterion.
@ DRUCKER_PRAGER
Drucker-Prager pressure dependent yielding stress.
@ SCALAR_GRADY_KIPP
Grady-Kipp model of fragmentation using scalar damage.
@ IDEAL_GAS
Equation of state for ideal gas.
@ NONE
No equation of state.
@ TILLOTSON
Tillotson (1962) 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.
@ TILLOTSON_ENERGY_CV
Specific energy of complete vaporization.
@ TILLOTSON_SMALL_B
"Small b" coefficient in Tillotson equation
@ OSCILLATION_REGENERATION
Regeneration efficiency of acoustric oscillations.
@ MELT_ENERGY
Melting energy, used for temperature-dependence of the stress tensor.
@ ENERGY_MIN
Estimated minimal value of energy used to determine timestepping error.
@ 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.
@ COHESION
Cohesion, yield strength at zero pressure.
@ TILLOTSON_BETA
Beta coefficient in expanded phase of Tillotson equation.
@ 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.
@ BULK_MODULUS
Bulk modulus of the material.
@ DENSITY
Density at zero pressure.
@ WEIBULL_COEFFICIENT
Coefficient (multiplier) of the Weibull distribution of flaws.
@ 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.
@ 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.
@ TILLOTSON_SMALL_A
"Small a" coefficient in Tillotson equation
@ TILLOTSON_SUBLIMATION
Specific sublimation energy.
@ WEIBULL_SAMPLE_DISTRIBUTIONS
AutoPtr< IMaterial > getMaterial(const BodySettings &settings)
Helper class, allowing to register job into the global list of jobs.