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

#include <tracer_diffusivity_model.h>

Inheritance diagram for TanhLevelsetTracerDiffusivity:
[legend]

Public Member Functions

 TanhLevelsetTracerDiffusivity (const double p_tracer_diffusivity_outside, const double p_tracer_diffusivity_inside, const double p_thickness)
double value (const std::map< field, double > &field_values) 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_diffusivity_outside
const double tracer_diffusivity_inside
const double thickness
const double delta_diffusivity

Additional Inherited Members

Public Types inherited from PhysicalPropertyModel
enum class  ComplexComponent : std::int8_t { real , imag }
Static Public Member Functions inherited from TracerDiffusivityModel
static std::shared_ptr< TracerDiffusivityModel > 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

Diffusivity that depends on the tanh of the level set.

Definition at line 103 of file tracer_diffusivity_model.h.

Constructor & Destructor Documentation

◆ TanhLevelsetTracerDiffusivity()

TanhLevelsetTracerDiffusivity::TanhLevelsetTracerDiffusivity ( const double p_tracer_diffusivity_outside,
const double p_tracer_diffusivity_inside,
const double p_thickness )
inline

Constructor of the level set-dependent diffusivity model.

Parameters
[in]p_tracer_diffusivity_outsideDiffusivity outside the solid
[in]p_tracer_diffusivity_insideDiffusivity inside the solid
[in]p_thicknessThickness of the tanh function used to smooth the property jump

Definition at line 114 of file tracer_diffusivity_model.h.

References delta_diffusivity, levelset, PhysicalPropertyModel::model_depends_on, thickness, tracer_diffusivity_inside, and tracer_diffusivity_outside.

Member Function Documentation

◆ jacobian()

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

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

Parameters
[in]field_valuesValues of the various fields on which the specific heat may depend. The map stores a single value per field.
[in]idIndicator of the field with respect to which the jacobian should be computed.
Returns
Value of the derivative of the diffusivity with respect to the specified field.

Implements PhysicalPropertyModel.

Definition at line 193 of file tracer_diffusivity_model.h.

References levelset, and PhysicalPropertyModel::numerical_jacobian().

◆ value()

double TanhLevelsetTracerDiffusivity::value ( const std::map< field, double > & field_values)
inlineoverridevirtual

Compute the diffusivity.

Parameters
[in]field_valuesValues of the various fields on which the property may depend. In this case, the diffusivity depends on the level set. The map stores a single value per field.
Returns
Value of the diffusivity computed with the field_values.

Implements PhysicalPropertyModel.

Definition at line 135 of file tracer_diffusivity_model.h.

References delta_diffusivity, levelset, thickness, and tracer_diffusivity_inside.

◆ vector_jacobian()

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

Compute the derivative of the diffusivity with respect to a field.

Parameters
[in]field_vectorsVector of values of the fields used to evaluate the diffusivity. The map stores a vector of values per field.
[in]idIdentifier of the field with respect to which a derivative should be computed.
[out]jacobianVector of computed derivative values of the diffusivity with respect to the field of the specified id.

Implements PhysicalPropertyModel.

Definition at line 219 of file tracer_diffusivity_model.h.

References levelset, and PhysicalPropertyModel::vector_numerical_jacobian().

◆ vector_value()

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

Compute a vector of diffusivity.

Parameters
[in]field_vectorsVectors of the fields on which the diffusivity may depend. In this case, the diffusivity depends on the level set. The map stores a vector of values per field.
[out]property_vectorVectors of computed diffusivities.

Implements PhysicalPropertyModel.

Definition at line 156 of file tracer_diffusivity_model.h.

References delta_diffusivity, levelset, thickness, and tracer_diffusivity_inside.

Member Data Documentation

◆ delta_diffusivity

const double TanhLevelsetTracerDiffusivity::delta_diffusivity
private

Definition at line 239 of file tracer_diffusivity_model.h.

◆ thickness

const double TanhLevelsetTracerDiffusivity::thickness
private

Definition at line 238 of file tracer_diffusivity_model.h.

◆ tracer_diffusivity_inside

const double TanhLevelsetTracerDiffusivity::tracer_diffusivity_inside
private

Definition at line 237 of file tracer_diffusivity_model.h.

◆ tracer_diffusivity_outside

const double TanhLevelsetTracerDiffusivity::tracer_diffusivity_outside
private

Definition at line 236 of file tracer_diffusivity_model.h.


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