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

Container for a thermal system with configurable time integration. More...

#include <thermal_system.hpp>

Collaboration diagram for smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, parameter_space >:
Collaboration graph
[legend]

Public Types

using ThermalWeakFormType = TimeDiscretizedWeakForm< dim, H1< temp_order >, TimeRuleParams< TemperatureTimeRule, H1< temp_order >, parameter_space... > >
 using for ThermalWeakFormType
 

Public Member Functions

std::vector< FieldStategetStateFields () const
 Get the list of all state fields (temperature_solve_state, temperature). 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 thermal material model for a domain. More...
 
template<int... active_parameters, typename HeatSourceType >
void addHeatSource (DependsOn< active_parameters... > depends_on, const std::string &domain_name, HeatSourceType source_function)
 Add a body heat source to the thermal system (with DependsOn). More...
 
template<typename HeatSourceType >
void addHeatSource (const std::string &domain_name, HeatSourceType source_function)
 Add a body heat source that depends on all state and parameter fields. More...
 
template<int... active_parameters, typename HeatFluxType >
void addHeatFlux (DependsOn< active_parameters... > depends_on, const std::string &boundary_name, HeatFluxType flux_function)
 Add a boundary heat flux to the thermal system (with DependsOn). More...
 
template<typename HeatFluxType >
void addHeatFlux (const std::string &boundary_name, HeatFluxType flux_function)
 Add a boundary heat flux that depends on all state and parameter fields. 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< ThermalWeakFormTypethermal_weak_form
 Thermal weak form.
 
std::shared_ptr< DirichletBoundaryConditionstemperature_bc
 Temperature boundary conditions.
 
std::shared_ptr< TemperatureTimeRule > temperature_time_rule
 Time integration for temperature.
 
- 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 temp_order, typename TemperatureTimeRule = QuasiStaticFirstOrderTimeIntegrationRule, typename... parameter_space>
struct smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, parameter_space >

Container for a thermal system with configurable time integration.

Always uses a 2-state field layout (temperature_solve_state, temperature). Use QuasiStaticFirstOrderTimeIntegrationRule for steady-state problems, or BackwardEulerFirstOrderTimeIntegrationRule for transient problems.

Template Parameters
dimSpatial dimension.
temp_orderOrder of the temperature basis.
TemperatureTimeRuleTime integration rule type (must have num_states == 2).
parameter_spaceFinite element spaces for optional parameters.

Definition at line 40 of file thermal_system.hpp.

Member Function Documentation

◆ addHeatFlux() [1/2]

template<int dim, int temp_order, typename TemperatureTimeRule = QuasiStaticFirstOrderTimeIntegrationRule, typename... parameter_space>
template<typename HeatFluxType >
void smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, parameter_space >::addHeatFlux ( const std::string &  boundary_name,
HeatFluxType  flux_function 
)
inline

Add a boundary heat flux that depends on all state and parameter fields.

Parameters
boundary_nameThe name of the boundary where the heat flux is applied.
flux_function(t, X, n, T, params...) -> heat_flux.

Definition at line 170 of file thermal_system.hpp.

◆ addHeatFlux() [2/2]

template<int dim, int temp_order, typename TemperatureTimeRule = QuasiStaticFirstOrderTimeIntegrationRule, typename... parameter_space>
template<int... active_parameters, typename HeatFluxType >
void smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, parameter_space >::addHeatFlux ( DependsOn< active_parameters... >  depends_on,
const std::string &  boundary_name,
HeatFluxType  flux_function 
)
inline

Add a boundary heat flux to the thermal system (with DependsOn).

Parameters
depends_onSelects which primal and parameter fields the contribution depends on.
boundary_nameThe name of the boundary where the heat flux is applied.
flux_function(t, X, n, T, params...) -> heat_flux.

Definition at line 151 of file thermal_system.hpp.

◆ addHeatSource() [1/2]

template<int dim, int temp_order, typename TemperatureTimeRule = QuasiStaticFirstOrderTimeIntegrationRule, typename... parameter_space>
template<typename HeatSourceType >
void smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, parameter_space >::addHeatSource ( const std::string &  domain_name,
HeatSourceType  source_function 
)
inline

Add a body heat source that depends on all state and parameter fields.

Parameters
domain_nameThe name of the domain where the heat source is applied.
source_function(t, X, T, params...) -> heat_source.

Definition at line 139 of file thermal_system.hpp.

◆ addHeatSource() [2/2]

template<int dim, int temp_order, typename TemperatureTimeRule = QuasiStaticFirstOrderTimeIntegrationRule, typename... parameter_space>
template<int... active_parameters, typename HeatSourceType >
void smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, parameter_space >::addHeatSource ( DependsOn< active_parameters... >  depends_on,
const std::string &  domain_name,
HeatSourceType  source_function 
)
inline

Add a body heat source to the thermal system (with DependsOn).

Parameters
depends_onSelects which primal and parameter fields the contribution depends on.
domain_nameThe name of the domain where the heat source is applied.
source_function(t, X, T, params...) -> heat_source.

Definition at line 121 of file thermal_system.hpp.

◆ createDifferentiablePhysics()

template<int dim, int temp_order, typename TemperatureTimeRule = QuasiStaticFirstOrderTimeIntegrationRule, typename... parameter_space>
std::unique_ptr<DifferentiablePhysics> smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, 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 81 of file thermal_system.hpp.

◆ getOutputFieldStates()

template<int dim, int temp_order, typename TemperatureTimeRule = QuasiStaticFirstOrderTimeIntegrationRule, typename... parameter_space>
std::vector<FieldState> smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, 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 65 of file thermal_system.hpp.

◆ getReactionInfos()

template<int dim, int temp_order, typename TemperatureTimeRule = QuasiStaticFirstOrderTimeIntegrationRule, typename... parameter_space>
std::vector<ReactionInfo> smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, parameter_space >::getReactionInfos ( ) const
inline

Get information about reaction fields for this system.

Returns
List of ReactionInfo structures.

Definition at line 71 of file thermal_system.hpp.

◆ getStateFields()

template<int dim, int temp_order, typename TemperatureTimeRule = QuasiStaticFirstOrderTimeIntegrationRule, typename... parameter_space>
std::vector<FieldState> smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, parameter_space >::getStateFields ( ) const
inline

Get the list of all state fields (temperature_solve_state, temperature).

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

Definition at line 56 of file thermal_system.hpp.

◆ setMaterial()

template<int dim, int temp_order, typename TemperatureTimeRule = QuasiStaticFirstOrderTimeIntegrationRule, typename... parameter_space>
template<typename MaterialType >
void smith::ThermalSystem< dim, temp_order, TemperatureTimeRule, parameter_space >::setMaterial ( const MaterialType &  material,
const std::string &  domain_name 
)
inline

Set the thermal material model for a domain.

Material is called as material(x, temperature, grad_temperature, params...) and must return smith::tuple{heat_capacity, heat_flux}. Consistent with heat_transfer.hpp convention.

The system forms the residual as: heat_capacity * dT/dt for the source term, and -heat_flux for the flux term.

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

Definition at line 102 of file thermal_system.hpp.


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