svZeroDSolver
Loading...
Searching...
No Matches
ActiveStress Class Referenceabstract

Base class for chamber active stress models. More...

#include <ActiveStress.h>

Inheritance diagram for ActiveStress:
[legend]

Public Member Functions

 ActiveStress (const std::vector< std::pair< std::string, InputParameter > > &props)
 Construct an ActiveStress model.
virtual int num_extra_vars () const
 Number of internal variables this model owns beyond ChamberSphere's fixed 5 (radius, velo, stress, tau, volume).
virtual std::list< std::string > extra_var_names () const
 Names of this model's extra internal variables, in registration order (appended immediately after "volume").
virtual int num_extra_equations () const =0
 Number of equations this model owns beyond ChamberSphere's fixed 6 core equations. Every ActiveStress supplies at least the equation defining $\tau$.
virtual void update_constant (SparseSystem &system, const std::vector< int > &global_eqn_ids, const std::vector< int > &global_var_ids)
 Constant (time- and solution-independent) contributions.
virtual void update_time (SparseSystem &system, const std::vector< int > &global_eqn_ids, const std::vector< int > &global_var_ids, double activation_signal)
 Time-dependent contributions.
virtual void update_solution (SparseSystem &system, const std::vector< int > &global_eqn_ids, const std::vector< int > &global_var_ids, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &dy, double radius0, double activation_signal)=0
 Solution-dependent contributions.
virtual ActivationSignalType required_signal_type () const =0
 Type of activation signal this active stress model needs.
Public Member Functions inherited from ParameterHolder
 ParameterHolder (const std::vector< std::pair< std::string, InputParameter > > &props)
 Construct a ParameterHolder.
void set_param (const std::string &name, double value)
 Set a scalar parameter value by name.
void set_param_vector (const std::string &name, const std::vector< double > &value)
 Set a vector-valued parameter value by name.
virtual void finalize ()
 Called once after all parameters have been read from the input file (e.g. by the loader).

Static Public Member Functions

static std::unique_ptr< ActiveStress > create (const std::string &type_str)
 Factory: create an active stress model from a type string.

Static Public Attributes

Fixed layout of ChamberSphere's always-present ("core") state

Indices into the full Block::global_var_ids / Block::global_eqn_ids arrays that ChamberSphere passes down unchanged.

static constexpr int RADIUS_VAR
 Radius position within ChamberSphere's own global_var_ids array.
static constexpr int VELO_VAR
static constexpr int STRESS_VAR
static constexpr int TAU_VAR
static constexpr int VOLUME_VAR
 Volume position within ChamberSphere's own global_var_ids array.
static constexpr int NUM_CORE_VARS
static constexpr int NUM_CORE_EQNS

Additional Inherited Members

Public Attributes inherited from ParameterHolder
const std::vector< std::pair< std::string, InputParameter > > input_param_properties
 Properties of the input parameters for this component [(name, InputParameter), ...].
Protected Attributes inherited from ParameterHolder
std::map< std::string, double > params_
 Map of scalar parameter names to their values.
std::map< std::string, std::vector< double > > params_vec_
 Map of vector-valued parameter names to their values.

Detailed Description

Base class for chamber active stress models.

An ActiveStress owns the dynamics of a chamber's active stress $\tau$. Subclasses may introduce additional internal variables and equations beyond ChamberSphere's fixed core state, and write directly into the same global SparseSystem that ChamberSphere writes into, using indices that are a fixed offset into ChamberSphere's own Block::global_var_ids and Block::global_eqn_ids arrays (which are passed down unchanged).

ChamberSphere::setup_dofs() always registers, in this order: internal variables radius, velo, stress, tau, volume, <extra_var_names()...> and equations momentum, spherical_stress, volume_change, acceleration, mass_conservation, pressure_equality, <this model's equations...>, so the offsets below are invariant across ActiveStress subclasses.

Constructor & Destructor Documentation

◆ ActiveStress()

ActiveStress::ActiveStress ( const std::vector< std::pair< std::string, InputParameter > > & props)
explicit

Construct an ActiveStress model.

Parameters
propsParameter name/spec pairs for this active stress type

Member Function Documentation

◆ create()

std::unique_ptr< ActiveStress > ActiveStress::create ( const std::string & type_str)
static

Factory: create an active stress model from a type string.

Parameters
type_strOne of: "strain_independent", "strain_dependent"
Returns
Unique pointer to the created active stress model

◆ extra_var_names()

virtual std::list< std::string > ActiveStress::extra_var_names ( ) const
inlinevirtual

Names of this model's extra internal variables, in registration order (appended immediately after "volume").

Returns
List of extra internal variable names

Reimplemented in StrainDependentActiveStress.

◆ num_extra_equations()

virtual int ActiveStress::num_extra_equations ( ) const
pure virtual

Number of equations this model owns beyond ChamberSphere's fixed 6 core equations. Every ActiveStress supplies at least the equation defining $\tau$.

Returns
Number of extra equations

Implemented in StrainDependentActiveStress, and StrainIndependentActiveStress.

◆ num_extra_vars()

virtual int ActiveStress::num_extra_vars ( ) const
inlinevirtual

Number of internal variables this model owns beyond ChamberSphere's fixed 5 (radius, velo, stress, tau, volume).

Returns
Number of extra internal variables

Reimplemented in StrainDependentActiveStress.

◆ required_signal_type()

virtual ActivationSignalType ActiveStress::required_signal_type ( ) const
pure virtual

Type of activation signal this active stress model needs.

Checked against the chamber's ActivationFunction::signal_type in ChamberSphere::setup_dofs to catch mismatched pairings (e.g. strain_dependent active stress with a normalized activation function).

Returns
The required ActivationSignalType

Implemented in StrainDependentActiveStress, and StrainIndependentActiveStress.

◆ update_constant()

virtual void ActiveStress::update_constant ( SparseSystem & system,
const std::vector< int > & global_eqn_ids,
const std::vector< int > & global_var_ids )
inlinevirtual

Constant (time- and solution-independent) contributions.

Parameters
systemSystem to update contributions at
global_eqn_idsChamberSphere's global equation indices
global_var_idsChamberSphere's global variable indices

Reimplemented in StrainDependentActiveStress, and StrainIndependentActiveStress.

◆ update_solution()

virtual void ActiveStress::update_solution ( SparseSystem & system,
const std::vector< int > & global_eqn_ids,
const std::vector< int > & global_var_ids,
const Eigen::Matrix< double, Eigen::Dynamic, 1 > & y,
const Eigen::Matrix< double, Eigen::Dynamic, 1 > & dy,
double radius0,
double activation_signal )
pure virtual

Solution-dependent contributions.

Parameters
systemSystem to update contributions at
global_eqn_idsChamberSphere's global equation indices
global_var_idsChamberSphere's global variable indices
yCurrent solution
dyCurrent derivative of the solution
radius0Reference radius $r_0$ of the chamber
activation_signalThe chamber's ActivationFunction evaluated at the current time

Implemented in StrainDependentActiveStress, and StrainIndependentActiveStress.

◆ update_time()

virtual void ActiveStress::update_time ( SparseSystem & system,
const std::vector< int > & global_eqn_ids,
const std::vector< int > & global_var_ids,
double activation_signal )
inlinevirtual

Time-dependent contributions.

Parameters
systemSystem to update contributions at
global_eqn_idsChamberSphere's global equation indices
global_var_idsChamberSphere's global variable indices
activation_signalThe chamber's ActivationFunction evaluated at the current time

Reimplemented in StrainDependentActiveStress, and StrainIndependentActiveStress.

Member Data Documentation

◆ NUM_CORE_EQNS

int ActiveStress::NUM_CORE_EQNS
staticconstexpr
Initial value:
=
6

A subclass's own extra equations start at global_eqn_ids[NUM_CORE_EQNS + i]

◆ NUM_CORE_VARS

int ActiveStress::NUM_CORE_VARS
staticconstexpr
Initial value:
=
9

A subclass's own extra variables start at global_var_ids[NUM_CORE_VARS + i]

◆ RADIUS_VAR

int ActiveStress::RADIUS_VAR
staticconstexpr
Initial value:
=
4

Radius position within ChamberSphere's own global_var_ids array.

◆ STRESS_VAR

int ActiveStress::STRESS_VAR
staticconstexpr
Initial value:
=
6

Total wall stress position within ChamberSphere's own global_var_ids array

◆ TAU_VAR

int ActiveStress::TAU_VAR
staticconstexpr
Initial value:
=
7

Active stress $\tau$ position within ChamberSphere's own global_var_ids array

◆ VELO_VAR

int ActiveStress::VELO_VAR
staticconstexpr
Initial value:
=
5

Radial velocity position within ChamberSphere's own global_var_ids array

◆ VOLUME_VAR

int ActiveStress::VOLUME_VAR
staticconstexpr
Initial value:
=
8

Volume position within ChamberSphere's own global_var_ids array.


The documentation for this class was generated from the following files: