|
LinearViscoelasticNormalSpecies contains the parameters used to describe a linear elastic-dissipative normal force. More...
#include <LinearViscoelasticNormalSpecies.h>
Public Types | |
typedef LinearViscoelasticInteraction | InteractionType |
The correct Interaction type for this FrictionForceSpecies. More... | |
Public Member Functions | |
LinearViscoelasticNormalSpecies () | |
The default constructor. More... | |
LinearViscoelasticNormalSpecies (const LinearViscoelasticNormalSpecies &p) | |
The default copy constructor. More... | |
~LinearViscoelasticNormalSpecies () | |
The default destructor. More... | |
void | read (std::istream &is) |
Reads the species properties from an input stream. More... | |
void | write (std::ostream &os) const |
Writes the species properties to an output stream. More... | |
std::string | getBaseName () const |
Used in Species::getName to obtain a unique name for each Species. More... | |
Mdouble | getMaximumVelocity (Mdouble radius, Mdouble mass) const |
Calculates the maximum velocity allowed for a collision of two copies of P (for higher velocities particles could pass through each other) More... | |
void | setStiffnessAndRestitutionCoefficient (Mdouble k_, Mdouble eps, Mdouble mass) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P. More... | |
void | setRestitutionCoefficient (double eps, Mdouble mass) |
Sets disp to obtain a restitution coefficient eps for a collision of two particles of mass m. More... | |
void | setCollisionTimeAndRestitutionCoefficient (Mdouble tc, Mdouble eps, BaseParticle *p) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of particle p. More... | |
void | setCollisionTimeAndRestitutionCoefficient (Mdouble tc, Mdouble eps, Mdouble mass) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of equal mass m. More... | |
void | setCollisionTimeAndRestitutionCoefficient (Mdouble collisionTime, Mdouble restitutionCoefficient, Mdouble mass1, Mdouble mass2) |
Mdouble | getCollisionTime (Mdouble mass) const |
Calculates collision time for two copies of a particle of given disp, k, mass. More... | |
Mdouble | getRestitutionCoefficient (Mdouble mass) const |
Calculates restitution coefficient for two copies of given disp, k, mass. More... | |
void | mix (LinearViscoelasticNormalSpecies *SBase, LinearViscoelasticNormalSpecies *TBase) |
creates default values for mixed species More... | |
void | setStiffness (Mdouble new_k) |
Allows the spring constant to be changed. More... | |
Mdouble | getStiffness () const |
Allows the spring constant to be accessed. More... | |
void | setDissipation (Mdouble dissipation) |
Allows the normal dissipation to be changed. More... | |
Mdouble | getDissipation () const |
Allows the normal dissipation to be accessed. More... | |
MERCURYDPM_DEPRECATED void | setStiffnessAndDissipation (helpers::KAndDisp new_) |
Allows the spring and dissipation constants to be changed simultaneously. More... | |
Mdouble | computeTimeStep (Mdouble mass) |
Public Member Functions inherited from BaseNormalForce | |
BaseNormalForce () | |
BaseNormalForce (const BaseNormalForce &p) | |
bool | getConstantRestitution () const |
void | setConstantRestitution (bool constantRestitution) |
virtual void | actionsAfterTimeStep (BaseParticle *particle) const |
Public Member Functions inherited from BaseForce | |
BaseSpecies * | getBaseSpecies () const |
void | setBaseSpecies (BaseSpecies *baseSpecies) |
Private Attributes | |
Mdouble | stiffness_ |
(normal) spring constant More... | |
Mdouble | dissipation_ |
(normal) viscosity More... | |
LinearViscoelasticNormalSpecies contains the parameters used to describe a linear elastic-dissipative normal force.
See LinearViscoelasticNormalInteraction::computeForce for a description of the force law.
The correct Interaction type for this FrictionForceSpecies.
LinearViscoelasticNormalSpecies::LinearViscoelasticNormalSpecies | ( | ) |
The default constructor.
References dissipation_, and stiffness_.
LinearViscoelasticNormalSpecies::LinearViscoelasticNormalSpecies | ( | const LinearViscoelasticNormalSpecies & | p | ) |
The default copy constructor.
[in] | the | species that is copied |
References dissipation_, and stiffness_.
LinearViscoelasticNormalSpecies::~LinearViscoelasticNormalSpecies | ( | ) |
References dissipation_, constants::pi, mathsFunc::square(), and stiffness_.
std::string LinearViscoelasticNormalSpecies::getBaseName | ( | ) | const |
Calculates collision time for two copies of a particle of given disp, k, mass.
Calculates collision time for two copies of a particle of given disp, k, mass
[in] | mass | mass of a typical particle |
References dissipation_, ERROR, BaseNormalForce::getConstantRestitution(), logger, constants::pi, mathsFunc::square(), and stiffness_.
Referenced by getRestitutionCoefficient(), main(), MaserRepeatedOutInMPI2Test::MaserRepeatedOutInMPI2Test(), ParticleCreation::ParticleCreation(), ParticleInclusion::ParticleInclusion(), ShiftingConstantMassFlowMaserBoundarySelfTest::setupInitialConditions(), ShiftingMaserBoundarySelfTest::setupInitialConditions(), ConstantMassFlowMaserBoundaryMixedSpeciesSelfTest::setupInitialConditions(), ConstantMassFlowMaserSelfTest::setupInitialConditions(), SubcriticalMaserBoundarySelfTest::setupInitialConditions(), Wall::setupInitialConditions(), EllipsoidsBouncingOnWallDemo::setupInitialConditions(), EllipticalSuperQuadricCollision::setupInitialConditions(), SphericalSuperQuadricCollision::setupInitialConditions(), VisualisationTest::setupInitialConditions(), Packing::setupInitialConditions(), SubcriticalMaserBoundaryTESTMPI2Test::SubcriticalMaserBoundaryTESTMPI2Test(), and viscoElasticUnitTest::viscoElasticUnitTest().
Mdouble LinearViscoelasticNormalSpecies::getDissipation | ( | ) | const |
Allows the normal dissipation to be accessed.
References dissipation_.
Referenced by LinearViscoelasticInteraction::computeNormalForce(), main(), mix(), SilbertPeriodic::readNextArgument(), SilbertPeriodic::set_study(), setCollisionTimeAndRestitutionCoefficient(), and SilbertPeriodic::SilbertPeriodic().
Calculates the maximum velocity allowed for a collision of two copies of P (for higher velocities particles could pass through each other)
References stiffness_.
Referenced by main().
Calculates restitution coefficient for two copies of given disp, k, mass.
References dissipation_, mathsFunc::exp(), getCollisionTime(), and BaseNormalForce::getConstantRestitution().
Referenced by main(), CubicCell::setupInitialConditions(), and SubcriticalMaserBoundaryTESTMPI2Test::SubcriticalMaserBoundaryTESTMPI2Test().
Mdouble LinearViscoelasticNormalSpecies::getStiffness | ( | ) | const |
Allows the spring constant to be accessed.
References stiffness_.
Referenced by LinearViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::getElasticEnergy(), LinearViscoelasticInteraction::getElasticEnergyAtEquilibrium(), main(), mix(), SilbertPeriodic::set_study(), SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(), SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficientNoDispt(), setCollisionTimeAndRestitutionCoefficient(), setRestitutionCoefficient(), Wall::setupInitialConditions(), and SilbertPeriodic::SilbertPeriodic().
void LinearViscoelasticNormalSpecies::mix | ( | LinearViscoelasticNormalSpecies * | SBase, |
LinearViscoelasticNormalSpecies * | TBase | ||
) |
creates default values for mixed species
For all parameters we assume that the harmonic mean of the parameters of the original two species is a sensible default.
[in] | S,T | the two species whose properties are mixed to create the new species |
References BaseSpecies::average(), dissipation_, getDissipation(), getStiffness(), and stiffness_.
void LinearViscoelasticNormalSpecies::read | ( | std::istream & | is | ) |
Reads the species properties from an input stream.
[in] | input | stream (typically the restart file) |
References dissipation_, and stiffness_.
void LinearViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient | ( | Mdouble | collisionTime, |
Mdouble | restitutionCoefficient, | ||
Mdouble | mass1, | ||
Mdouble | mass2 | ||
) |
Set k, disp such that is matches a given tc and eps for a collision of two different masses. Recall the resitution constant is a function of k, disp and the mass of each particle in the collision See also setCollisionTimeAndRestitutionCoefficient(Mdouble tc, Mdouble eps, Mdouble mass)
Set k, disp such that is matches a given tc and eps for a collision of two different masses. Recall the resitution constant is a function of k, disp and the mass of each particle in the collision See also setCollisionTimeAndRestitutionCoefficient(Mdouble tc, Mdouble eps, Mdouble mass)
[in] | collision | time |
References setCollisionTimeAndRestitutionCoefficient().
void LinearViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient | ( | Mdouble | tc, |
Mdouble | eps, | ||
BaseParticle * | p | ||
) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of particle p.
References ParticleSpecies::getDensity(), BaseInteractable::getSpecies(), and BaseParticle::getVolume().
Referenced by BouncingSuperQuadric::BouncingSuperQuadric(), main(), MaserRepeatedOutInMPI2Test::MaserRepeatedOutInMPI2Test(), SilbertPeriodic::set_study(), SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(), SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficientNoDispt(), setCollisionTimeAndRestitutionCoefficient(), AxisymmetricWallSelfTest::setSpeciesAndTimeStep(), ShiftingConstantMassFlowMaserBoundarySelfTest::setupInitialConditions(), ShiftingMaserBoundarySelfTest::setupInitialConditions(), PolydisperseInsertionBoundarySelfTest::setupInitialConditions(), Packing::setupInitialConditions(), MovingIntersectionOfWallsUnitTest_Basic::setupInitialConditions(), WallSpecies::setupInitialConditions(), and SubcriticalMaserBoundaryTESTMPI2Test::SubcriticalMaserBoundaryTESTMPI2Test().
void LinearViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient | ( | Mdouble | tc, |
Mdouble | eps, | ||
Mdouble | mass | ||
) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of equal mass m.
Sets k, disp such that it matches a given tc and eps for a collision of two copies of equal mass m
[in] | tc | collision time |
[in] | eps | restitution coefficient |
[in] | mass | harmonic average particle mass, \(\frac{2}{1/m1+1/m2}\) |
References dissipation_, BaseNormalForce::getConstantRestitution(), getDissipation(), getStiffness(), INFO, mathsFunc::log(), logger, constants::pi, mathsFunc::square(), and stiffness_.
void LinearViscoelasticNormalSpecies::setDissipation | ( | Mdouble | dissipation | ) |
Allows the normal dissipation to be changed.
References dissipation_, ERROR, and logger.
Referenced by FreeCooling2DinWallsDemo::actionsAfterTimeStep(), FreeCooling3DDemoProblem::actionsAfterTimeStep(), FreeCooling3DinWallsDemo::actionsAfterTimeStep(), FreeCoolingDemoProblem::actionsAfterTimeStep(), InsertionBoundaryMPI2Test::InsertionBoundaryMPI2Test(), main(), ParticleInclusion::ParticleInclusion(), protectiveWall::protectiveWall(), SpeciesHandler::readOldObject(), setStiffnessAndDissipation(), CubicCell::setupInitialConditions(), ConstantMassFlowMaserBoundaryMixedSpeciesSelfTest::setupInitialConditions(), ConstantMassFlowMaserSelfTest::setupInitialConditions(), SubcriticalMaserBoundarySelfTest::setupInitialConditions(), EllipsoidsBouncingOnWallDemo::setupInitialConditions(), EllipticalSuperQuadricCollision::setupInitialConditions(), SphericalSuperQuadricCollision::setupInitialConditions(), VisualisationTest::setupInitialConditions(), FreeFall::setupInitialConditions(), ContactDetectionWithWallTester::setupParticleAndWall(), ContactDetectionTester::setupParticles(), SilbertPeriodic::SilbertPeriodic(), and T_protectiveWall::T_protectiveWall().
Sets disp to obtain a restitution coefficient eps for a collision of two particles of mass m.
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P
[in] | stiffness | stiffness |
[in] | eps | restitution coefficient |
[in] | mass | effective particle mass, \(\frac{2}{1/m1+1/m2}\) |
References dissipation_, BaseNormalForce::getConstantRestitution(), getStiffness(), mathsFunc::log(), constants::sqr_pi, and mathsFunc::square().
Referenced by setStiffnessAndRestitutionCoefficient().
void LinearViscoelasticNormalSpecies::setStiffness | ( | Mdouble | new_k | ) |
Allows the spring constant to be changed.
References ERROR, logger, and stiffness_.
Referenced by Contact::Contact(), InsertionBoundaryMPI2Test::InsertionBoundaryMPI2Test(), InsertionBoundarySelfTest::InsertionBoundarySelfTest(), main(), ParticleInclusion::ParticleInclusion(), protectiveWall::protectiveWall(), SpeciesHandler::readOldObject(), setStiffnessAndDissipation(), CubicCell::setupInitialConditions(), ConstantMassFlowMaserBoundaryMixedSpeciesSelfTest::setupInitialConditions(), ConstantMassFlowMaserSelfTest::setupInitialConditions(), CubeDeletionBoundarySelfTest::setupInitialConditions(), DeletionBoundarySelfTest::setupInitialConditions(), DistributionSelfTest::setupInitialConditions(), DistributionToPSDSelfTest::setupInitialConditions(), InsertionBoundarySelfTest::setupInitialConditions(), MultiplePSDSelfTest::setupInitialConditions(), PSDManualInsertionSelfTest::setupInitialConditions(), PSDSelfTest::setupInitialConditions(), SubcriticalMaserBoundarySelfTest::setupInitialConditions(), EllipsoidsBouncingOnWallDemo::setupInitialConditions(), EllipticalSuperQuadricCollision::setupInitialConditions(), SphericalSuperQuadricCollision::setupInitialConditions(), VisualisationTest::setupInitialConditions(), ParticleParticleInteraction::setupInitialConditions(), ParticleWallInteraction::setupInitialConditions(), FreeFall::setupInitialConditions(), SeparateFilesSelfTest::setupInitialConditions(), ContactDetectionWithWallTester::setupParticleAndWall(), ContactDetectionTester::setupParticles(), SilbertPeriodic::SilbertPeriodic(), T_protectiveWall::T_protectiveWall(), and Wall::Wall().
void LinearViscoelasticNormalSpecies::setStiffnessAndDissipation | ( | helpers::KAndDisp | new_ | ) |
Allows the spring and dissipation constants to be changed simultaneously.
References helpers::KAndDisp::disp, helpers::KAndDisp::k, setDissipation(), and setStiffness().
void LinearViscoelasticNormalSpecies::setStiffnessAndRestitutionCoefficient | ( | Mdouble | stiffness, |
Mdouble | eps, | ||
Mdouble | mass | ||
) |
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P.
Sets k, disp such that it matches a given tc and eps for a collision of two copies of P
[in] | stiffness | stiffness |
[in] | eps | restitution coefficient |
[in] | harmonic | mean of particle masses, \(\frac{2}{1/m1+1/m2}\) |
References BaseNormalForce::getConstantRestitution(), setRestitutionCoefficient(), and stiffness_.
Referenced by main(), ParticleCreation::ParticleCreation(), SilbertPeriodic::set_study(), Packing::setupInitialConditions(), StressStrainControl::StressStrainControl(), and viscoElasticUnitTest::viscoElasticUnitTest().
void LinearViscoelasticNormalSpecies::write | ( | std::ostream & | os | ) | const |
Writes the species properties to an output stream.
[out] | output | stream (typically the restart file) |
References dissipation_, and stiffness_.
|
private |
(normal) viscosity
Referenced by computeTimeStep(), getCollisionTime(), getDissipation(), getRestitutionCoefficient(), LinearViscoelasticNormalSpecies(), mix(), read(), setCollisionTimeAndRestitutionCoefficient(), setDissipation(), setRestitutionCoefficient(), and write().
|
private |
(normal) spring constant
Referenced by computeTimeStep(), getCollisionTime(), getMaximumVelocity(), getStiffness(), LinearViscoelasticNormalSpecies(), mix(), read(), setCollisionTimeAndRestitutionCoefficient(), setStiffness(), setStiffnessAndRestitutionCoefficient(), and write().