Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
ConstantTracerReactionPrefactor Class Reference

#include <tracer_reaction_model.h>

Inheritance diagram for ConstantTracerReactionPrefactor:
[legend]

Public Member Functions

 ConstantTracerReactionPrefactor (const double p_tracer_reaction_constant, const double p_tracer_reaction_order, const double p_tracer_reaction_threshold)
double value (const std::map< field, double > &fields_value) override
void vector_value (const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
double jacobian (const std::map< field, double > &field_values, field id) override
void vector_jacobian (const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector) override
Public Member Functions inherited from PhysicalPropertyModel
 PhysicalPropertyModel ()
virtual ~PhysicalPropertyModel ()=default
bool depends_on (const field &id)
void provide_simulation_control (std::shared_ptr< SimulationControl > &p_simulation_control)
double numerical_jacobian (const std::map< field, double > &field_values, const field id)
void vector_numerical_jacobian (const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector)

Private Attributes

const double tracer_reaction_constant
const double tracer_reaction_order
const double tracer_reaction_threshold

Additional Inherited Members

Public Types inherited from PhysicalPropertyModel
enum class  ComplexComponent : std::int8_t { real , imag }
Static Public Member Functions inherited from TracerReactionPrefactorModel
static std::shared_ptr< TracerReactionPrefactorModel > model_cast (const Parameters::Material &material_properties)
Protected Member Functions inherited from PhysicalPropertyModel
std::shared_ptr< SimulationControl > & get_simulation_control ()
Protected Attributes inherited from PhysicalPropertyModel
std::map< field, bool > model_depends_on

Detailed Description

Constant tracer reaction prefactor.

This model computes the prefactor as

\[ k = \alpha C_\text{eff}^{n-1}, \]

with a smooth floor

\[C_\text{eff} = \sqrt{C^2 + \epsilon^2} \]

where \( \alpha \) (the reaction constant) and the reaction order \( n \) are provided.

Definition at line 130 of file tracer_reaction_model.h.

Constructor & Destructor Documentation

◆ ConstantTracerReactionPrefactor()

ConstantTracerReactionPrefactor::ConstantTracerReactionPrefactor ( const double p_tracer_reaction_constant,
const double p_tracer_reaction_order,
const double p_tracer_reaction_threshold )
inline

Constructor.

Parameters
[in]p_tracer_reaction_constantThe base reaction constant \( \alpha \).
[in]p_tracer_reaction_orderThe reaction order \( n \).
[in]p_tracer_reaction_thresholdThe threshold value used to smoothly floor the concentration.

Definition at line 142 of file tracer_reaction_model.h.

References PhysicalPropertyModel::model_depends_on, tracer_concentration, tracer_reaction_constant, tracer_reaction_order, and tracer_reaction_threshold.

Member Function Documentation

◆ jacobian()

double ConstantTracerReactionPrefactor::jacobian ( const std::map< field, double > & field_values,
field id )
inlineoverridevirtual

Compute the jacobian (partial derivative) of the prefactor with respect to a field.

Parameters
[in]field_valuesMap of field values.
[in]idThe field identifier with respect to which the derivative is computed.
Returns
The computed derivative value.

Implements PhysicalPropertyModel.

Definition at line 206 of file tracer_reaction_model.h.

References calculate_d_effective_concentration_dC(), calculate_effective_concentration(), tracer_concentration, tracer_reaction_constant, tracer_reaction_order, and tracer_reaction_threshold.

◆ value()

double ConstantTracerReactionPrefactor::value ( const std::map< field, double > & fields_value)
inlineoverridevirtual

Compute the tracer reaction prefactor.

Parameters
[in]fields_valueMap of field values.
Returns
The computed prefactor value.

Implements PhysicalPropertyModel.

Definition at line 159 of file tracer_reaction_model.h.

References calculate_effective_concentration(), tracer_concentration, tracer_reaction_constant, tracer_reaction_order, and tracer_reaction_threshold.

◆ vector_jacobian()

void ConstantTracerReactionPrefactor::vector_jacobian ( const std::map< field, std::vector< double > > & field_vectors,
const field id,
std::vector< double > & jacobian_vector )
inlineoverridevirtual

Compute the vector jacobian (partial derivatives) of the prefactor with respect to a field.

Parameters
[in]field_vectorsMap of field vectors.
[in]idThe field identifier with respect to which the derivative is computed.
[out]jacobian_vectorVector to be filled with computed derivative values.

Implements PhysicalPropertyModel.

Definition at line 235 of file tracer_reaction_model.h.

References calculate_d_effective_concentration_dC(), calculate_effective_concentration(), tracer_concentration, tracer_reaction_constant, tracer_reaction_order, and tracer_reaction_threshold.

◆ vector_value()

void ConstantTracerReactionPrefactor::vector_value ( const std::map< field, std::vector< double > > & field_vectors,
std::vector< double > & property_vector )
inlineoverridevirtual

Compute the vector of tracer reaction prefactor values.

Parameters
[in]field_vectorsMap of field vectors.
property_vectorVector to be filled with computed prefactor values.

Implements PhysicalPropertyModel.

Definition at line 178 of file tracer_reaction_model.h.

References calculate_effective_concentration(), tracer_concentration, tracer_reaction_constant, tracer_reaction_order, and tracer_reaction_threshold.

Member Data Documentation

◆ tracer_reaction_constant

const double ConstantTracerReactionPrefactor::tracer_reaction_constant
private

Definition at line 265 of file tracer_reaction_model.h.

◆ tracer_reaction_order

const double ConstantTracerReactionPrefactor::tracer_reaction_order
private

Definition at line 266 of file tracer_reaction_model.h.

◆ tracer_reaction_threshold

const double ConstantTracerReactionPrefactor::tracer_reaction_threshold
private

Definition at line 267 of file tracer_reaction_model.h.


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