Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
Public Types | Public Member Functions | Public Attributes | List of all members
smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space > Struct Template Reference

System struct for solid dynamics with configurable time integration. More...

#include <solid_mechanics_system.hpp>

Collaboration diagram for smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >:
Collaboration graph
[legend]

Public Types

using SolidWeakFormType = TimeDiscretizedWeakForm< dim, H1< order, dim >, TimeRuleParams< DisplacementTimeRule, H1< order, dim >, parameter_space... > >
 using
 
using CycleZeroSolidWeakFormType = TimeDiscretizedWeakForm< dim, H1< order, dim >, Parameters< H1< order, dim >, H1< order, dim >, H1< order, dim >, parameter_space... > >
 using – 3-state form: u, v, a (no u_old needed; at cycle 0 u and v are given, solve for a)
 

Public Member Functions

std::vector< FieldStategetStateFields () const
 Get the list of all state fields (displacement_solve_state, displacement, velocity, acceleration). More...
 
std::vector< FieldStategetOutputFieldStates () const
 Get the list of physical, non-solve state fields. More...
 
std::vector< ReactionInfogetReactionInfos () const
 Get information about reaction fields for this system. More...
 
std::unique_ptr< DifferentiablePhysicscreateDifferentiablePhysics (std::string physics_name)
 Create a DifferentiablePhysics object for this system. More...
 
template<typename MaterialType >
void setMaterial (const MaterialType &material, const std::string &domain_name)
 Set the material model for a domain, defining integrals for the solid weak form. More...
 
template<int... active_parameters, typename BodyForceType >
void addBodyForce (DependsOn< active_parameters... > depends_on, const std::string &domain_name, BodyForceType force_function)
 Add a body force to the system (with DependsOn). More...
 
template<typename BodyForceType >
void addBodyForce (const std::string &domain_name, BodyForceType force_function)
 Add a body force to the system. More...
 
template<int... active_parameters, typename TractionType >
void addTraction (DependsOn< active_parameters... > depends_on, const std::string &domain_name, TractionType traction_function)
 Add a surface traction (flux) to the system (with DependsOn). More...
 
template<typename TractionType >
void addTraction (const std::string &domain_name, TractionType traction_function)
 Add a surface traction (flux) to the system. More...
 
template<int... active_parameters, typename PressureType >
void addPressure (DependsOn< active_parameters... > depends_on, const std::string &domain_name, PressureType pressure_function)
 Add a pressure boundary condition (follower force) (with DependsOn). More...
 
template<typename PressureType >
void addPressure (const std::string &domain_name, PressureType pressure_function)
 Add a pressure boundary condition (follower force). More...
 
- Public Member Functions inherited from smith::SystemBase
const std::vector< FieldState > & getParameterFields () const
 Get the list of all parameter fields. More...
 
std::string prefix (const std::string &name) const
 Helper function to prepend the physics name to a string. More...
 
std::vector< ReactionInfogetReactionInfos () const
 Metadata for dual outputs exported by this system.
 

Public Attributes

std::shared_ptr< SolidWeakFormTypesolid_weak_form
 Solid mechanics weak form.
 
std::shared_ptr< CycleZeroSolidWeakFormTypecycle_zero_solid_weak_form
 Cycle-zero weak form for initial acceleration solve.
 
std::shared_ptr< DirichletBoundaryConditionsdisp_bc
 Displacement boundary conditions.
 
std::shared_ptr< DisplacementTimeRule > disp_time_rule
 Time integration rule.
 
- Public Attributes inherited from smith::SystemBase
std::shared_ptr< FieldStorefield_store
 Field store managing the system's fields.
 
std::shared_ptr< CoupledSystemSolversolver
 The solver for the system.
 
std::shared_ptr< StateAdvanceradvancer
 The state advancer.
 
std::vector< FieldStateparameter_fields
 Optional parameter fields.
 
std::string prepend_name
 Optional prepended name for all fields.
 

Detailed Description

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
struct smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >

System struct for solid dynamics with configurable time integration.

Always uses a 4-state field layout (displacement_solve_state, displacement, velocity, acceleration). Use ImplicitNewmarkSecondOrderTimeIntegrationRule for transient dynamics, or QuasiStaticSecondOrderTimeIntegrationRule for quasi-static problems.

Template Parameters
dimSpatial dimension.
orderPolynomial order for displacement field.
DisplacementTimeRuleTime integration rule type (must have num_states == 4).
parameter_spaceParameter spaces for material properties.

Definition at line 41 of file solid_mechanics_system.hpp.

Member Function Documentation

◆ addBodyForce() [1/2]

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
template<typename BodyForceType >
void smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::addBodyForce ( const std::string &  domain_name,
BodyForceType  force_function 
)
inline

Add a body force to the system.

Template Parameters
BodyForceTypeThe body force function type.
Parameters
domain_nameThe name of the domain to apply the force to.
force_functionThe force function (t, X, u, v, a, params...).

Definition at line 165 of file solid_mechanics_system.hpp.

◆ addBodyForce() [2/2]

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
template<int... active_parameters, typename BodyForceType >
void smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::addBodyForce ( DependsOn< active_parameters... >  depends_on,
const std::string &  domain_name,
BodyForceType  force_function 
)
inline

Add a body force to the system (with DependsOn).

Template Parameters
active_parametersIndices of fields this force depends on.
BodyForceTypeThe body force function type.
Parameters
depends_onDependency specification for which input fields to pass.
domain_nameThe name of the domain to apply the force to.
force_functionThe force function (t, X, u, v, a, params...).

Definition at line 140 of file solid_mechanics_system.hpp.

◆ addPressure() [1/2]

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
template<typename PressureType >
void smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::addPressure ( const std::string &  domain_name,
PressureType  pressure_function 
)
inline

Add a pressure boundary condition (follower force).

Template Parameters
PressureTypeThe pressure function type.
Parameters
domain_nameThe name of the boundary domain.
pressure_functionThe pressure function (t, X, params...).

Definition at line 259 of file solid_mechanics_system.hpp.

◆ addPressure() [2/2]

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
template<int... active_parameters, typename PressureType >
void smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::addPressure ( DependsOn< active_parameters... >  depends_on,
const std::string &  domain_name,
PressureType  pressure_function 
)
inline

Add a pressure boundary condition (follower force) (with DependsOn).

Template Parameters
active_parametersIndices of fields this pressure depends on.
PressureTypeThe pressure function type.
Parameters
depends_onDependency specification for which input fields to pass.
domain_nameThe name of the boundary domain.
pressure_functionThe pressure function (t, X, params...).

Definition at line 219 of file solid_mechanics_system.hpp.

◆ addTraction() [1/2]

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
template<typename TractionType >
void smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::addTraction ( const std::string &  domain_name,
TractionType  traction_function 
)
inline

Add a surface traction (flux) to the system.

Template Parameters
TractionTypeThe traction function type.
Parameters
domain_nameThe name of the boundary domain to apply the traction to.
traction_functionThe traction function (t, X, n, u, v, a, params...).

Definition at line 205 of file solid_mechanics_system.hpp.

◆ addTraction() [2/2]

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
template<int... active_parameters, typename TractionType >
void smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::addTraction ( DependsOn< active_parameters... >  depends_on,
const std::string &  domain_name,
TractionType  traction_function 
)
inline

Add a surface traction (flux) to the system (with DependsOn).

Template Parameters
active_parametersIndices of fields this traction depends on.
TractionTypeThe traction function type.
Parameters
depends_onDependency specification for which input fields to pass.
domain_nameThe name of the boundary domain to apply the traction to.
traction_functionThe traction function (t, X, n, u, v, a, params...).

Definition at line 179 of file solid_mechanics_system.hpp.

◆ createDifferentiablePhysics()

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
std::unique_ptr<DifferentiablePhysics> smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::createDifferentiablePhysics ( std::string  physics_name)
inline

Create a DifferentiablePhysics object for this system.

Parameters
physics_nameThe name of the physics.
Returns
std::unique_ptr<DifferentiablePhysics> The differentiable physics object.

Definition at line 94 of file solid_mechanics_system.hpp.

◆ getOutputFieldStates()

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
std::vector<FieldState> smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::getOutputFieldStates ( ) const
inline

Get the list of physical, non-solve state fields.

Returns
std::vector<FieldState> List of physical fields suitable for output.

Definition at line 74 of file solid_mechanics_system.hpp.

◆ getReactionInfos()

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
std::vector<ReactionInfo> smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::getReactionInfos ( ) const
inline

Get information about reaction fields for this system.

Returns
List of ReactionInfo structures.

Definition at line 84 of file solid_mechanics_system.hpp.

◆ getStateFields()

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
std::vector<FieldState> smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::getStateFields ( ) const
inline

Get the list of all state fields (displacement_solve_state, displacement, velocity, acceleration).

Returns
std::vector<FieldState> List of state fields.

Definition at line 64 of file solid_mechanics_system.hpp.

◆ setMaterial()

template<int dim, int order, typename DisplacementTimeRule = ImplicitNewmarkSecondOrderTimeIntegrationRule, typename... parameter_space>
template<typename MaterialType >
void smith::SolidMechanicsSystem< dim, order, DisplacementTimeRule, parameter_space >::setMaterial ( const MaterialType &  material,
const std::string &  domain_name 
)
inline

Set the material model for a domain, defining integrals for the solid weak form.

Template Parameters
MaterialTypeThe material model type.
Parameters
materialThe material model instance.
domain_nameThe name of the domain to apply the material to.

Definition at line 108 of file solid_mechanics_system.hpp.


The documentation for this struct was generated from the following file: