Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,26 @@ class MarmotElement {
double dT,
double& pNewdT ) = 0;

/**
* @brief Perform element computations for explicit time integration.
* @param[in] QTotal Total dof vector.
* @param[in] dQ Incremental dof vector.
* @param[out] Pint Internal force vector.
* @param[in] time Current time.
* @param[in] dT Time step size.
* @param[out] pNewdT Suggested new time step size.
*
* @note Default implementation throws an exception.
*/
virtual void computeYourselfExplicit( const double* QTotal,
const double* dQ,
double* Pint,
const double* time,
double dT,
double& pNewdT )
{
throw std::invalid_argument( MakeString() << __PRETTY_FUNCTION__ << " not yet implemented" );
};
/**
* @brief Compute contribution from distributed surface loads.
* @param[in] loadType Type of load.
Expand Down Expand Up @@ -194,6 +214,16 @@ class MarmotElement {
throw std::invalid_argument( MakeString() << __PRETTY_FUNCTION__ << " not yet implemented" );
};

/**
* @brief Compute lumped damping matrix.
* @param[out] C damping as diagonal matrix.
* @note Default implementation throws an exception.
*/
virtual void computeLumpedDamping( double* C )
{
throw std::invalid_argument( MakeString() << __PRETTY_FUNCTION__ << " not yet implemented" );
};

/**
* @brief Compute consistent inertia matrix.
* @param[out] I Inertia matrix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,26 @@ class MarmotMaterialFiniteStrain {
* */
virtual void computeStress( ConstitutiveResponse< 3 >& response,
AlgorithmicModuli< 3 >& tangents,
const Deformation< 3 >&,
const TimeIncrement& ) const = 0;
const Deformation< 3 >& deformation,
const TimeIncrement& timeIncrement ) const = 0;

/**
* @brief Explicit version of computeStress for use in explicit time integration schemes.
* @param[inout] response ConstitutiveResponse instance
* @param[in] deformation Deformation instance
* @param[in] timeIncrement TimeIncrement instance
*
* @note The default implementation calls computeStress and ignores the algorithmic tangent.
* @note Derived classes may override this method for efficiency reasons.
*/
virtual void computeStressExplicit( ConstitutiveResponse< 3 >& response,
const Deformation< 3 >& deformation,
const TimeIncrement& timeIncrement ) const
{
AlgorithmicModuli< 3 > tangents;
computeStress( response, tangents, deformation, timeIncrement );
}

/**
* @brief Computes the Kirchhoff stress given the deformation, time increment, and eigen deformation.
* @param[inout] response ConstitutiveResponse instance
Expand Down Expand Up @@ -154,6 +172,19 @@ class MarmotMaterialFiniteStrain {
AlgorithmicModuli< 3 >& algorithmicModuli,
const Deformation< 3 >& deformation,
const TimeIncrement& timeIncrement ) const;

/**
* @brief Explicit version of computePlaneStrain for use in explicit time integration schemes.
* @note The default implementation calls computePlaneStrain and ignores the algorithmic tangent.
*/
virtual void computePlaneStrainExplicit( ConstitutiveResponse< 3 >& response,
const Deformation< 3 >& deformation,
const TimeIncrement& timeIncrement ) const
{
AlgorithmicModuli< 3 > algorithmicModuli;
computePlaneStrain( response, algorithmicModuli, deformation, timeIncrement );
}

/**
* @brief Compute stress under plane strain conditions with eigen deformation.
* @param[inout] response ConstitutiveResponse instance
Expand All @@ -170,6 +201,20 @@ class MarmotMaterialFiniteStrain {
const Deformation< 3 >& deformation,
const TimeIncrement& timeIncrement,
const std::tuple< double, double, double >& eigenDeformation ) const;

/**
* @brief Explicit version of computePlaneStrain with eigen deformation for use in explicit time integration schemes.
* @note The default implementation calls computePlaneStrain and ignores the algorithmic tangent.
*/
virtual void computePlaneStrainExplicit( ConstitutiveResponse< 3 >& response,
const Deformation< 3 >& deformation,
const TimeIncrement& timeIncrement,
const std::tuple< double, double, double >& eigenDeformation ) const
{
AlgorithmicModuli< 3 > algorithmicModuli;
computePlaneStrain( response, algorithmicModuli, deformation, timeIncrement, eigenDeformation );
}

/**
* @brief Compute stress under plane stress conditions.
* @param[inout] response ConstitutiveResponse instance
Expand All @@ -185,6 +230,18 @@ class MarmotMaterialFiniteStrain {
const Deformation< 2 >& deformation,
const TimeIncrement& timeIncrement ) const;

/**
* @brief Explicit version of computePlaneStress for use in explicit time integration schemes.
* @note The default implementation calls computePlaneStress and ignores the algorithmic tangent.
*/
virtual void computePlaneStressExplicit( ConstitutiveResponse< 2 >& response,
const Deformation< 2 >& deformation,
const TimeIncrement& timeIncrement ) const
{
AlgorithmicModuli< 2 > algorithmicModuli;
computePlaneStress( response, algorithmicModuli, deformation, timeIncrement );
}

/**
* @brief Find the eigen deformation that corresponds to a given eigen stress.
* @param initialGuess Initial guess for the eigen deformation.
Expand Down Expand Up @@ -236,4 +293,23 @@ class MarmotMaterialFiniteStrain {
stateVars[i] = 0.0;
}
}

/**
* @brief Get the mass density of the material.
* @return Mass density
*
* @note The default implementation throws a std::runtime_error.
*/
virtual double getDensity() const { throw std::runtime_error( "getDensity() not implemented for this material" ); }

/**
* @brief Get the damping coefficient of the material.
* @return Damping coefficient
*
* @note The default implementation throws a std::runtime_error.
*/
virtual double getDampingCoefficient() const
{
throw std::runtime_error( "getDampingCoefficient() not implemented for this material" );
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,22 @@ class MarmotMaterialHypoElastic {
const double* dStrain,
const timeInfo& timeInfo ) const = 0;

/**
* Explicit version of @ref computeStress for use in explicit time integration schemes.
* The algorithmic tangent is not needed in explicit schemes and will therefore not be computed.
* @param[in,out] state A state3D instance carrying stress, strain energy, and state variables
* @param[in] dStrain linearized strain increment
* @param[in] timeInfo Structure carrying time information
*
* @note The default implementation calls @ref computeStress and ignores the algorithmic tangent.
* @note Derived classes may override this method for efficiency reasons.
*/
virtual void computeStressExplicit( state3D& state, const double* dStrain, const timeInfo& timeInfo ) const
{
double dStress_dStrain[36];
computeStress( state, dStress_dStrain, dStrain, timeInfo );
}

/**
* Plane stress implementation of @ref computeStress.
*/
Expand Down Expand Up @@ -182,5 +198,10 @@ class MarmotMaterialHypoElastic {
}
}

virtual double getDensity() { return -1; }
virtual double getDensity() { throw std::runtime_error( "getDensity() not implemented for this material." ); }

virtual double getDampingCoefficient()
{
throw std::runtime_error( "getDampingCoefficient() not implemented for this material." );
}
};
Loading
Loading