IBAMR  IBAMR version 0.19.
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
IBAMR::EnthalpyHierarchyIntegrator Class Reference

Class EnthalpyHierarchyIntegrator is a concrete class that manages the time integration of energy and phase change equations using the enthalpy approach.

#include <ibamr/EnthalpyHierarchyIntegrator.h>

Inheritance diagram for IBAMR::EnthalpyHierarchyIntegrator:
Inheritance graph
[legend]

Public Member Functions

 EnthalpyHierarchyIntegrator (const std::string &object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, bool register_for_restart=true)
 
 ~EnthalpyHierarchyIntegrator ()=default
 
void initializeHierarchyIntegrator (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > hierarchy, SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > > gridding_alg) override
 
void preprocessIntegrateHierarchy (double current_time, double new_time, int num_cycles=1) override
 
void postprocessIntegrateHierarchy (double current_time, double new_time, bool skip_synchronize_new_state_data, int num_cycles=1) override
 
void addTemporalAndLinearTermstoRHSOfEnergyEquation (int F_scratch_idx, const double dt) override
 
void computeDivergenceVelocitySourceTerm (int Div_U_F_idx, const double new_time) override
 
void setEnthalpyBcCoef (SAMRAI::solv::RobinBcCoefStrategy< NDIM > *h_bc_coef)
 
void putToDatabaseSpecialized (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db) override
 

Protected Member Functions

void integrateHierarchySpecialized (double current_time, double new_time, int cycle_num=0) override
 

Private Member Functions

 EnthalpyHierarchyIntegrator ()=delete
 Default constructor. More...
 
 EnthalpyHierarchyIntegrator (const EnthalpyHierarchyIntegrator &from)=delete
 Copy constructor. More...
 
EnthalpyHierarchyIntegratoroperator= (const EnthalpyHierarchyIntegrator &that)=delete
 Assignment operator. More...
 
void getFromInput (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, bool is_from_restart)
 
void getFromRestart ()
 Read object state from the restart file and initialize class data members. More...
 
void computeEnthalpyBasedOnTemperature (int h_idx, const int T_idx, const int rho_idx, const int lf_idx, const int H_idx)
 Compute enthalpy based on (nonlinear) h-T relation. More...
 
void computeTemperatureBasedOnEnthalpy (int T_idx, const int h_idx, const int H_idx)
 Compute temperature based on (nonlinear) h-T relation. More...
 
void updateEnthalpy (int h_idx, const int T_new_idx, const int T_pre_idx)
 Update enthalpy using Taylor series \( h_{\rm new} = h_{\rm old} + dh/dt (\Delta T) \). More...
 
void computeEnthalpyDerivative (int dh_dT_data, const int T_idx, const int H_idx)
 compute dh/dT based on temperature. More...
 
void computeLiquidFraction (int lf_idx, const int h_idx, const int H_idx)
 Compute liquid fraction. More...
 

Private Attributes

SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > d_h_var
 
SAMRAI::tbox::Pointer< SAMRAI::pdat::SideVariable< NDIM, double > > d_grad_T_var
 
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > d_T_pre_var
 
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > d_dh_dT_var
 
SAMRAI::solv::RobinBcCoefStrategy< NDIM > * d_h_bc_coef = nullptr
 
int d_h_scratch_idx = IBTK::invalid_index
 
int d_h_current_idx = IBTK::invalid_index
 
int d_h_new_idx = IBTK::invalid_index
 
int d_grad_T_idx = IBTK::invalid_index
 
int d_T_pre_idx = IBTK::invalid_index
 
int d_dh_dT_scratch_idx = IBTK::invalid_index
 
double d_liquidus_temperature
 
double d_solidus_temperature
 
double d_reference_temperature
 
double d_specific_heat_liquid
 
double d_specific_heat_solid
 
double d_specific_heat_gas
 
double d_specific_heat_mushy
 
double d_gas_liquid_fraction = 0.0
 
int d_max_inner_iterations = 5
 
double d_lf_iteration_error_tolerance = 1e-8
 

Constructor & Destructor Documentation

◆ EnthalpyHierarchyIntegrator() [1/3]

IBAMR::EnthalpyHierarchyIntegrator::EnthalpyHierarchyIntegrator ( const std::string &  object_name,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
bool  register_for_restart = true 
)

The constructor of EnthalpyHierarchyIntegrator class sets some default values, reads in configuration information from input and restart databases, and registers the integrator object with the restart manager when requested.

◆ ~EnthalpyHierarchyIntegrator()

IBAMR::EnthalpyHierarchyIntegrator::~EnthalpyHierarchyIntegrator ( )
default

The destructor of EnthalpyHierarchyIntegrator class unregisters the integrator object with the restart manager when the object is so registered.

◆ EnthalpyHierarchyIntegrator() [2/3]

IBAMR::EnthalpyHierarchyIntegrator::EnthalpyHierarchyIntegrator ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ EnthalpyHierarchyIntegrator() [3/3]

IBAMR::EnthalpyHierarchyIntegrator::EnthalpyHierarchyIntegrator ( const EnthalpyHierarchyIntegrator from)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ initializeHierarchyIntegrator()

void IBAMR::EnthalpyHierarchyIntegrator::initializeHierarchyIntegrator ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  hierarchy,
SAMRAI::tbox::Pointer< SAMRAI::mesh::GriddingAlgorithm< NDIM > >  gridding_alg 
)
override

Initialize the variables, basic communications algorithms, solvers, and other data structures used by this time integrator object.

This method is called automatically by initializePatchHierarchy() prior to the construction of the patch hierarchy. It is also possible for users to make an explicit call to initializeHierarchyIntegrator() prior to calling initializePatchHierarchy().

◆ preprocessIntegrateHierarchy()

void IBAMR::EnthalpyHierarchyIntegrator::preprocessIntegrateHierarchy ( double  current_time,
double  new_time,
int  num_cycles = 1 
)
override

Prepare to advance the data from current_time to new_time.

◆ postprocessIntegrateHierarchy()

void IBAMR::EnthalpyHierarchyIntegrator::postprocessIntegrateHierarchy ( double  current_time,
double  new_time,
bool  skip_synchronize_new_state_data,
int  num_cycles = 1 
)
override

Clean up data following call(s) to integrateHierarchy().

◆ addTemporalAndLinearTermstoRHSOfEnergyEquation()

void IBAMR::EnthalpyHierarchyIntegrator::addTemporalAndLinearTermstoRHSOfEnergyEquation ( int  F_scratch_idx,
const double  dt 
)
override

Add the temporal and linear terms to the RHS of the energy equation.

◆ computeDivergenceVelocitySourceTerm()

void IBAMR::EnthalpyHierarchyIntegrator::computeDivergenceVelocitySourceTerm ( int  Div_U_F_idx,
const double  new_time 
)
override

Compute the source term for the Div U equation.

◆ setEnthalpyBcCoef()

void IBAMR::EnthalpyHierarchyIntegrator::setEnthalpyBcCoef ( SAMRAI::solv::RobinBcCoefStrategy< NDIM > *  h_bc_coef)

Set boundary conditions for \( h \) variable.

◆ putToDatabaseSpecialized()

void IBAMR::EnthalpyHierarchyIntegrator::putToDatabaseSpecialized ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database db)
override

Write out specialized object state to the given database.

◆ integrateHierarchySpecialized()

void IBAMR::EnthalpyHierarchyIntegrator::integrateHierarchySpecialized ( double  current_time,
double  new_time,
int  cycle_num = 0 
)
overrideprotected

Synchronously advance each level in the hierarchy over the given time increment.

◆ operator=()

EnthalpyHierarchyIntegrator& IBAMR::EnthalpyHierarchyIntegrator::operator= ( const EnthalpyHierarchyIntegrator that)
privatedelete
Note
This operator is not implemented and should not be used.
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ getFromInput()

void IBAMR::EnthalpyHierarchyIntegrator::getFromInput ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
bool  is_from_restart 
)
private

Read input values from a given database.

◆ getFromRestart()

void IBAMR::EnthalpyHierarchyIntegrator::getFromRestart ( )
private

◆ computeEnthalpyBasedOnTemperature()

void IBAMR::EnthalpyHierarchyIntegrator::computeEnthalpyBasedOnTemperature ( int  h_idx,
const int  T_idx,
const int  rho_idx,
const int  lf_idx,
const int  H_idx 
)
private

◆ computeTemperatureBasedOnEnthalpy()

void IBAMR::EnthalpyHierarchyIntegrator::computeTemperatureBasedOnEnthalpy ( int  T_idx,
const int  h_idx,
const int  H_idx 
)
private

◆ updateEnthalpy()

void IBAMR::EnthalpyHierarchyIntegrator::updateEnthalpy ( int  h_idx,
const int  T_new_idx,
const int  T_pre_idx 
)
private

◆ computeEnthalpyDerivative()

void IBAMR::EnthalpyHierarchyIntegrator::computeEnthalpyDerivative ( int  dh_dT_data,
const int  T_idx,
const int  H_idx 
)
private

◆ computeLiquidFraction()

void IBAMR::EnthalpyHierarchyIntegrator::computeLiquidFraction ( int  lf_idx,
const int  h_idx,
const int  H_idx 
)
private

Member Data Documentation

◆ d_h_var

SAMRAI::tbox::Pointer<SAMRAI::pdat::CellVariable<NDIM, double> > IBAMR::EnthalpyHierarchyIntegrator::d_h_var
private

Solver variables.

◆ d_grad_T_var

SAMRAI::tbox::Pointer<SAMRAI::pdat::SideVariable<NDIM, double> > IBAMR::EnthalpyHierarchyIntegrator::d_grad_T_var
private

◆ d_T_pre_var

SAMRAI::tbox::Pointer<SAMRAI::pdat::CellVariable<NDIM, double> > IBAMR::EnthalpyHierarchyIntegrator::d_T_pre_var
private

◆ d_dh_dT_var

SAMRAI::tbox::Pointer<SAMRAI::pdat::CellVariable<NDIM, double> > IBAMR::EnthalpyHierarchyIntegrator::d_dh_dT_var
private

◆ d_h_bc_coef

SAMRAI::solv::RobinBcCoefStrategy<NDIM>* IBAMR::EnthalpyHierarchyIntegrator::d_h_bc_coef = nullptr
private

◆ d_h_scratch_idx

int IBAMR::EnthalpyHierarchyIntegrator::d_h_scratch_idx = IBTK::invalid_index
private

Patch data descriptor indices for all "state" variables managed by the integrator.

State variables have three contexts: current, scratch, and new.

◆ d_h_current_idx

int IBAMR::EnthalpyHierarchyIntegrator::d_h_current_idx = IBTK::invalid_index
private

◆ d_h_new_idx

int IBAMR::EnthalpyHierarchyIntegrator::d_h_new_idx = IBTK::invalid_index
private

◆ d_grad_T_idx

int IBAMR::EnthalpyHierarchyIntegrator::d_grad_T_idx = IBTK::invalid_index
private

Patch data descriptor indices for all "scratch" variables managed by the integrator.

Scratch variables have only one context: scratch.

◆ d_T_pre_idx

int IBAMR::EnthalpyHierarchyIntegrator::d_T_pre_idx = IBTK::invalid_index
private

◆ d_dh_dT_scratch_idx

int IBAMR::EnthalpyHierarchyIntegrator::d_dh_dT_scratch_idx = IBTK::invalid_index
private

◆ d_liquidus_temperature

double IBAMR::EnthalpyHierarchyIntegrator::d_liquidus_temperature
private

Energy equation parameters.

◆ d_solidus_temperature

double IBAMR::EnthalpyHierarchyIntegrator::d_solidus_temperature
private

◆ d_reference_temperature

double IBAMR::EnthalpyHierarchyIntegrator::d_reference_temperature
private

◆ d_specific_heat_liquid

double IBAMR::EnthalpyHierarchyIntegrator::d_specific_heat_liquid
private

◆ d_specific_heat_solid

double IBAMR::EnthalpyHierarchyIntegrator::d_specific_heat_solid
private

◆ d_specific_heat_gas

double IBAMR::EnthalpyHierarchyIntegrator::d_specific_heat_gas
private

◆ d_specific_heat_mushy

double IBAMR::EnthalpyHierarchyIntegrator::d_specific_heat_mushy
private

◆ d_gas_liquid_fraction

double IBAMR::EnthalpyHierarchyIntegrator::d_gas_liquid_fraction = 0.0
private

Liquid fraction value in the gas. Default is set to be zero.

◆ d_max_inner_iterations

int IBAMR::EnthalpyHierarchyIntegrator::d_max_inner_iterations = 5
private

Inner iteration parameters.

◆ d_lf_iteration_error_tolerance

double IBAMR::EnthalpyHierarchyIntegrator::d_lf_iteration_error_tolerance = 1e-8
private

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