SPH
QuantityIds.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 #include "physics/Units.h"
10 #include <string>
11 
13 
19 enum class QuantityId {
22 
24  POSITION = 0,
25 
27  MASS = 1,
28 
30  PRESSURE = 2,
31 
33  DENSITY = 3,
34 
36  ENERGY = 4,
37 
39  SOUND_SPEED = 5,
40 
43 
45  SPECIFIC_ENTROPY = 7,
46 
48  TEMPERATURE = 46,
49 
51 
54 
57 
60 
62 
65 
67  DAMAGE = 10,
68 
70  EPS_MIN = 11,
71 
73  M_ZERO = 12,
74 
76  EXPLICIT_GROWTH = 13,
77 
79  N_FLAWS = 14,
80 
82  STRESS_REDUCING = 16,
83 
85  DISTENTION = 17,
86 
89 
91  BULK_DENSITY = 48,
92 
94 
97 
99  AGGREGATE_ID = 19,
100 
104  ANGULAR_FREQUENCY = 20,
105 
108  ANGULAR_MOMENTUM = 21,
109 
112  PHASE_ANGLE = 22,
113 
115  MOMENT_OF_INERTIA = 23,
116 
118  LOCAL_FRAME = 24,
119 
120 
122 
125 
127  DISPLACEMENT = 25,
128 
130 
133 
135  VELOCITY_GRADIENT = 26,
136 
138  VELOCITY_DIVERGENCE = 27,
139 
141  VELOCITY_ROTATION = 28,
142 
145 
147  ENERGY_LAPLACIAN = 30,
148 
150 
153 
155  AV_ALPHA = 31,
156 
158  AV_BALSARA = 33,
159 
161  AV_STRESS = 34,
162 
165 
167 
170 
173  GRAD_H = 36,
174 
177  XSPH_VELOCITIES = 37,
178 
180 
182 
185 
187  NEIGHBOUR_CNT = 38,
188 
190  SURFACE_NORMAL = 39,
191 
193  INITIAL_POSITION = 40,
194 
198  SMOOTHING_LENGTH = 41,
199 
201 
204 
206  FLAG = 42,
207 
209  MATERIAL_ID = 43,
210 
215  PERSISTENT_INDEX = 44,
216 
218 
221 
223  UVW = 1000,
224 
226 
227  // TEMPORARY QUANTITIES, TO BE REMOVED
228 
229  VELOCITY_LAPLACIAN = 100,
230 
232 
233  FRICTION = 102,
234 
235 
236 };
237 
240 
242  std::string quantityName;
243 
248  std::string derivativeName;
249 
253  std::string secondDerivativeName;
254 
256  std::wstring label;
257 
259 
267 
269 
270  QuantityMetadata(const std::string& fullName,
271  const std::wstring& label,
272  const ValueEnum type,
273  const std::string& derivativeName = "",
274  const std::string& secondDerivativeName = "");
275 };
276 
279 
281 INLINE std::ostream& operator<<(std::ostream& stream, const QuantityId key) {
282  stream << getMetadata(key).quantityName;
283  return stream;
284 }
285 
NAMESPACE_SPH_BEGIN
Definition: BarnesHut.cpp:13
#define INLINE
Macros for conditional compilation based on selected compiler.
Definition: Object.h:31
#define NAMESPACE_SPH_END
Definition: Object.h:12
@ 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.
@ DAMAGE
Damage, reducing the pressure and deviatoric stress.
@ POSITION
Positions of particles, always a vector quantity.
@ ENERGY
Specific internal energy, always a scalar quantity.
@ ANGULAR_FREQUENCY
Angular frequency of particles, used in N-body simulations.
@ DENSITY
Density, always a scalar quantity.
@ MASS
Particle masses, always a scalar quantity.
@ MATERIAL_ID
ID of material, indexed from 0 to (#bodies - 1).
Conversions for quantity enums.
ValueEnum
QuantityId
Unique IDs of basic quantities of SPH particles.
Definition: QuantityIds.h:19
@ BULK_DENSITY
Bulk density, may be lower than the material density.
@ AV_ALPHA
Coefficient alpha of the artificial viscosity. Coefficient beta is always 2*alpha.
@ M_ZERO
Coefficient M_0 of the stretched Weibull distribution.
@ FLAG
ID of original body, used to implement discontinuities between bodies in SPH.
@ VELOCITY_DIVERGENCE
Velocity divergence.
@ LOCAL_FRAME
Local coordinates of a particle; moment of inertia is typically expressed in these coordinates.
@ INITIAL_POSITION
Initial position of particles, kept constant during the run.
@ DISPLACEMENT
Displacement vector, a solution of the stress analysis.
@ EXPLICIT_GROWTH
Explicit growth of fractures.
@ INTERPARTICLE_SPACING_KERNEL
Auxiliary quantity needed for evaluating artificial stress.
@ AV_BALSARA
Balsara factor.
@ MOMENT_OF_INERTIA
Moment of inertia of particles, analogy of particle masses for rotation.
@ VELOCITY_GRADIENT
Velocity gradient.
@ ENERGY_LAPLACIAN
Laplacian of internal energy, used in heat diffusion equation.
@ N_FLAWS
Number of explicit flaws per particle.
@ VELOCITY_LAPLACIAN
@ AGGREGATE_ID
Index of the aggregate containing this particle.
@ VELOCITY_ROTATION
Velocity rotation.
@ GENERALIZED_PRESSURE
@ TEMPERATURE
Temperature, always a scalar quantity.
@ DELTASPH_DENSITY_GRADIENT
@ SURFACE_NORMAL
Vector approximating surface normal.
@ NEIGHBOUR_CNT
Number of neighbouring particles (in radius h * kernel.radius)
@ SPECIFIC_ENTROPY
Specific entropy, always a scalar quantity.
@ SOUND_SPEED
Sound speed, always a scalar quantity.
@ DISTENTION
Ratio of the solid and bulk density (parameter alpha in P-alpha and eps-alpha models).
@ GENERALIZED_ENERGY
The "Y" quantity defined by , used to compute equation of motion and energy in DISPH.
@ AV_STRESS
Artificial stress by Monaghan .
@ STRESS_REDUCING
Total stress reduction factor due to damage and yielding. Is always scalar.
@ VIBRATIONAL_VELOCITY
Vibrational particle velocity, used by the block model of acoustic fluidization.
@ EPS_MIN
Activation strait rate.
@ UVW
Texture mapping coordinates,.
@ VELOCITY_GRADIENT_OF_DIVERGENCE
INLINE std::ostream & operator<<(std::ostream &stream, const QuantityId key)
Print full quantity name into the stream.
Definition: QuantityIds.h:281
QuantityMetadata getMetadata(const QuantityId key)
Returns the quantity information using quantity ID.
Definition: QuantityIds.cpp:27
Auxiliary information about quantity that aren't stored directly in Quantity.
Definition: QuantityIds.h:239
ValueEnum expectedType
Variable expectedType contains a type the quantity will most likely have.
Definition: QuantityIds.h:266
UnitDimensions expectedUnit
Definition: QuantityIds.h:268
std::string derivativeName
Name of the 1st derivative.
Definition: QuantityIds.h:248
std::string quantityName
Full name of the quantity (i.e. 'Density', 'Deviatoric stress', ...)
Definition: QuantityIds.h:242
std::string secondDerivativeName
Name of the second derivative.
Definition: QuantityIds.h:253
QuantityMetadata(const std::string &fullName, const std::wstring &label, const ValueEnum type, const std::string &derivativeName="", const std::string &secondDerivativeName="")
Definition: QuantityIds.cpp:6
std::wstring label
Short designation of the quantity (i.e. 'rho', 's', ...).
Definition: QuantityIds.h:256