FormulaHelpers.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef MERCURYDPM_FORMULA_HELPERS_H
6 #define MERCURYDPM_FORMULA_HELPERS_H
7 
8 #include "GeneralDefine.h"
9 #include "Math/ExtendedMath.h"
10 
11 namespace helpers
12 {
16  struct KAndDisp
17  {
20  };
21 
26  {
31  };
32 
42  Mdouble tc, Mdouble r, Mdouble beta, Mdouble mass);
43 
51 
56 
61 
65  unsigned int getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(unsigned int numberOfSaves, Mdouble timeMax, Mdouble timeStep);
66 
70  Mdouble getShearModulus(Mdouble youngsModulus, Mdouble poisson);
71 }
72 
73 #endif // MERCURYDPM_FORMULA_HELPERS_H
#define MERCURYDPM_DEPRECATED
Definition: GeneralDefine.h:16
Scalar beta
Definition: level2_cplx_impl.h:36
char char char int int * k
Definition: level2_impl.h:374
density
Definition: UniformPSDSelfTest.py:19
r
Definition: UniformPSDSelfTest.py:20
radius
Definition: UniformPSDSelfTest.py:15
Definition: CommandLineHelpers.h:11
unsigned int getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(unsigned int numberOfSaves, Mdouble timeMax, Mdouble timeStep)
Returns the correct saveCount if the total number of saves, the final time and the time step is known...
Definition: FormulaHelpers.cc:75
MERCURYDPM_DEPRECATED KAndDispAndKtAndDispt computeDisptFromCollisionTimeAndRestitutionCoefficientAndTangentialRestitutionCoefficientAndEffectiveMass(Mdouble tc, Mdouble r, Mdouble beta, Mdouble mass)
Set disp, k, dispt and kt such that is matches a given collision time tc and a normal and tangential ...
Definition: FormulaHelpers.cc:31
Mdouble getRayleighTime(Mdouble radius, Mdouble shearModulus, Mdouble poisson, Mdouble density)
Returns the Rayleigh time step for a Hertz contact law.
Definition: FormulaHelpers.cc:25
Mdouble getShearModulus(Mdouble youngsModulus, Mdouble poisson)
Returns the shear modulus calculated from Young's modulus and Poisson's ratio.
Definition: FormulaHelpers.cc:98
MERCURYDPM_DEPRECATED Mdouble getMaximumVelocity(Mdouble k, Mdouble disp, Mdouble radius, Mdouble mass)
Calculates the maximum relative velocity allowed for a normal collision of two particles of radius r ...
Definition: FormulaHelpers.cc:47
Mdouble getEffectiveMass(Mdouble mass0, Mdouble mass1)
Calculates the effective mass of a particle pair, i.e. half the harmonic mean of two particle masses.
Definition: FormulaHelpers.cc:15
return type specifically for fuctions returning k, disp, kt, dispt at once
Definition: FormulaHelpers.h:26
Mdouble disp
Definition: FormulaHelpers.h:28
Mdouble dispt
Definition: FormulaHelpers.h:30
Mdouble k
Definition: FormulaHelpers.h:27
Mdouble kt
Definition: FormulaHelpers.h:29
return type specifically for fuctions returning k and disp at once
Definition: FormulaHelpers.h:17
Mdouble k
Definition: FormulaHelpers.h:18
Mdouble disp
Definition: FormulaHelpers.h:19