SPH
Classes | Enumerations | Functions
QuantityIds.h File Reference

Quantity identifiers. More...

#include "physics/Units.h"
#include "quantities/QuantityHelpers.h"
#include <string>

Go to the source code of this file.

Classes

struct  QuantityMetadata
 Auxiliary information about quantity that aren't stored directly in Quantity. More...
 

Enumerations

enum class  QuantityId {
  Common quantities , POSITION = 0 , MASS = 1 , PRESSURE = 2 ,
  DENSITY = 3 , ENERGY = 4 , SOUND_SPEED = 5 , DEVIATORIC_STRESS = 6 ,
  SPECIFIC_ENTROPY = 7 , TEMPERATURE = 46 , Density-independent SPH formulation , GENERALIZED_ENERGY = 8 ,
  GENERALIZED_PRESSURE = 9 , Damage and fragmentation model(see Benz &Asphaug, 1994) , DAMAGE = 10 , EPS_MIN = 11 ,
  M_ZERO = 12 , EXPLICIT_GROWTH = 13 , N_FLAWS = 14 , STRESS_REDUCING = 16 ,
  DISTENTION = 17 , VIBRATIONAL_VELOCITY = 47 , BULK_DENSITY = 48 , N-body &Solid sphere physics ,
  AGGREGATE_ID = 19 , ANGULAR_FREQUENCY = 20 , ANGULAR_MOMENTUM = 21 , PHASE_ANGLE = 22 ,
  MOMENT_OF_INERTIA = 23 , LOCAL_FRAME = 24 , Stress-strain analysis , DISPLACEMENT = 25 ,
  Intermediate quantities , VELOCITY_GRADIENT = 26 , VELOCITY_DIVERGENCE = 27 , VELOCITY_ROTATION = 28 ,
  STRAIN_RATE_CORRECTION_TENSOR = 29 , ENERGY_LAPLACIAN = 30 , Artificial velocity , AV_ALPHA = 31 ,
  AV_BALSARA = 33 , AV_STRESS = 34 , INTERPARTICLE_SPACING_KERNEL = 35 , SPH modifications &corrections ,
  GRAD_H = 36 , XSPH_VELOCITIES = 37 , DELTASPH_DENSITY_GRADIENT = 45 , SPH statistics &auxiliary data ,
  NEIGHBOUR_CNT = 38 , SURFACE_NORMAL = 39 , INITIAL_POSITION = 40 , SMOOTHING_LENGTH = 41 ,
  Particle flags &Materials , FLAG = 42 , MATERIAL_ID = 43 , PERSISTENT_INDEX = 44 ,
  Miscellaneous , UVW = 1000 , VELOCITY_LAPLACIAN = 100 , VELOCITY_GRADIENT_OF_DIVERGENCE = 101 ,
  FRICTION = 102
}
 Unique IDs of basic quantities of SPH particles. More...
 

Functions

QuantityMetadata getMetadata (const QuantityId key)
 Returns the quantity information using quantity ID. More...
 
INLINE std::ostream & operator<< (std::ostream &stream, const QuantityId key)
 Print full quantity name into the stream. More...
 

Detailed Description

Quantity identifiers.

Author
Pavel Sevecek (sevecek at sirrah.troja.mff.cuni.cz)
Date
2016-2021

Definition in file QuantityIds.h.

Enumeration Type Documentation

◆ QuantityId

enum QuantityId
strong

Unique IDs of basic quantities of SPH particles.

Values of quantity IDs cannot be changed in order to allow opening older binary files (using BinaryOutput)! New quantities can be added if they get a unique ID, quantities that are no longer used can be removed; removed IDs can then be reused again.

Enumerator
Common quantities 
POSITION 

Positions (velocities, accelerations) of particles, always a vector quantity,.

MASS 

Paricles masses, always a scalar quantity.

PRESSURE 

Pressure, affected by yielding and fragmentation model, always a scalar quantity.

DENSITY 

Density, always a scalar quantity.

ENERGY 

Specific internal energy, always a scalar quantity.

SOUND_SPEED 

Sound speed, always a scalar quantity.

DEVIATORIC_STRESS 

Deviatoric stress tensor, always a traceless tensor.

SPECIFIC_ENTROPY 

Specific entropy, always a scalar quantity.

TEMPERATURE 

Temperature, always a scalar quantity.

Density-independent SPH formulation 
GENERALIZED_ENERGY 

The "Y" quantity defined by [Hosono_2016], used to compute equation of motion and energy in DISPH.

GENERALIZED_PRESSURE 
Todo:
Damage and fragmentation model(see Benz &Asphaug, 1994) 
DAMAGE 

Damage.

EPS_MIN 

Activation strait rate.

M_ZERO 

Coefficient M_0 of the stretched Weibull distribution.

EXPLICIT_GROWTH 

Explicit growth of fractures.

N_FLAWS 

Number of explicit flaws per particle.

STRESS_REDUCING 

Total stress reduction factor due to damage and yielding. Is always scalar.

DISTENTION 

Ratio of the solid and bulk density (parameter alpha in P-alpha and eps-alpha models).

VIBRATIONAL_VELOCITY 

Vibrational particle velocity, used by the block model of acoustic fluidization.

BULK_DENSITY 

Bulk density, may be lower than the material density.

N-body &Solid sphere physics 
AGGREGATE_ID 

Index of the aggregate containing this particle.

ANGULAR_FREQUENCY 

Angular frequency of particles. Note that SPH particles in standard formulation have no angular frequency, this quantity is used by solid sphere solvers or by SPH modifications that include particle rotation.

ANGULAR_MOMENTUM 

Angular momentum of particles. Useful replacement of angular velocity quantity as angular momentum is always conserved.

PHASE_ANGLE 

Current rotation state of the particles. This is only needed for testing purposes, as SPH particles are spherically symmetric.

MOMENT_OF_INERTIA 

Moment of inertia of particles, analogy of particle masses for rotation.

LOCAL_FRAME 

Local coordinates of a particle; moment of inertia is typically expressed in these coordinates.

Stress-strain analysis 
DISPLACEMENT 

Displacement vector, a solution of the stress analysis.

Intermediate quantities 
VELOCITY_GRADIENT 

Velocity gradient.

VELOCITY_DIVERGENCE 

Velocity divergence.

VELOCITY_ROTATION 

Velocity rotation.

STRAIN_RATE_CORRECTION_TENSOR 

Correction tensor used to improve conservation of total angular momentum.

ENERGY_LAPLACIAN 

Laplacian of internal energy, used in heat diffusion equation.

Artificial velocity 
AV_ALPHA 

Coefficient alpha of the artificial viscosity. Coefficient beta is always 2*alpha.

AV_BALSARA 

Balsara factor.

AV_STRESS 

Artificial stress by Monaghan [Monaghan_1999].

INTERPARTICLE_SPACING_KERNEL 

Auxiliary quantity needed for evaluating artificial stress.

SPH modifications &corrections 
GRAD_H 

Grad-h terms, appear in self-consistent derivation of SPH equatios due to non-uniform smoothing lenghts.

XSPH_VELOCITIES 

XSPH corrections to velocity. Only modifies evolution equation for particle position, velocity (as an input for velocity divergence, ...) is NOT affected.

DELTASPH_DENSITY_GRADIENT 
SPH statistics &auxiliary data 
NEIGHBOUR_CNT 

Number of neighbouring particles (in radius h * kernel.radius)

SURFACE_NORMAL 

Vector approximating surface normal.

INITIAL_POSITION 

Initial position of particles, kept constant during the run.

SMOOTHING_LENGTH 

Smoothing lengths of particles. Note that ordinarily the smoothing lenghts are stored as 4th component of position vectors, so this ID cannot be used to obtain smoothing lenghts from Storage object. It can be useful for other uses of quantities, like data output, visualization etc.

Particle flags &Materials 
FLAG 

ID of original body, used to implement discontinuities between bodies in SPH.

MATERIAL_ID 

Index of material of the particle. Can be generally different than the flag value.

PERSISTENT_INDEX 

Persistent index of the particle that does not change when adding or removing particles in the storage. Useful when we need to track particle with given index; particle index in storage may change when some particles from the middle of the storage are removed. Indices of removed particles are made available again and can be reused by newly created particles.

Miscellaneous 
UVW 

Texture mapping coordinates,.

VELOCITY_LAPLACIAN 
VELOCITY_GRADIENT_OF_DIVERGENCE 
FRICTION 

Definition at line 19 of file QuantityIds.h.

Function Documentation

◆ getMetadata()

QuantityMetadata getMetadata ( const QuantityId  key)

Returns the quantity information using quantity ID.

Definition at line 27 of file QuantityIds.cpp.

◆ operator<<()

INLINE std::ostream& operator<< ( std::ostream &  stream,
const QuantityId  key 
)

Print full quantity name into the stream.

Definition at line 281 of file QuantityIds.h.