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

CarmanKozenyDragForce provides an implementation of Carman-Kozeny drag force to impose zero velocity inside the solid \( \bm{u}=\bm{u}_b = 0\). More...

#include <ibamr/CarmanKozenyDragForce.h>

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

Public Member Functions

 CarmanKozenyDragForce (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > H_var, SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > lf_var, SAMRAI::tbox::Pointer< IBAMR::AdvDiffHierarchyIntegrator > adv_diff_solver, SAMRAI::tbox::Pointer< IBAMR::INSVCStaggeredHierarchyIntegrator > fluid_solver, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, bool register_for_restart=true)
 
 ~CarmanKozenyDragForce ()=default
 
void preprocessComputeBrinkmanPenalization (double current_time, double new_time, int num_cycles) override
 Preprocess routine before computing Carman-Kozeny term. More...
 
void computeBrinkmanVelocity (int u_idx, double time, int cycle_num) override
 
void demarcateBrinkmanZone (int u_idx, double time, int cycle_num) override
 Demarcate the Brinkman zone (solid) with Carman-Kozeny term term. More...
 
void postprocessComputeBrinkmanPenalization (double current_time, double new_time, int num_cycles) override
 Postprocess routine after computing Brinkman penalization terms. More...
 
void putToDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db) override
 Write out object state to the given database. More...
 
virtual void setTimeInterval (double current_time, double new_time)
 Set the time interval in which Brinkman velocity is computed. More...
 
virtual void setBrinkmanCoefficient (double chi)
 Set the Brinkman penalization coefficient. More...
 
virtual void setBrinkmanPenaltyFactor (double penalty_factor)
 Set Brinkman penalization penalty factor. More...
 
const std::string & getName () const
 
double getBrinkmanCoefficient () const
 
double getBrinkmanPenaltyFactor () const
 
std::pair< double, doublegetCurrentTimeInterval () const
 

Protected Attributes

SAMRAI::tbox::Pointer< IBAMR::AdvDiffHierarchyIntegratord_adv_diff_solver
 Pointers to solvers. More...
 
SAMRAI::tbox::Pointer< IBAMR::INSVCStaggeredHierarchyIntegratord_fluid_solver
 
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > d_H_var
 Heaviside variable defining the gas-pcm interface. More...
 
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > d_lf_var
 Liquid fraction variable. More...
 
std::string d_object_name
 
bool d_registered_for_restart
 
double d_current_time = std::numeric_limits<double>::quiet_NaN()
 
double d_new_time = std::numeric_limits<double>::quiet_NaN()
 
double d_penalty_factor = 1.0
 
bool d_use_rho_scale = true
 
bool d_use_mu_scale = false
 

Private Member Functions

 CarmanKozenyDragForce (const CarmanKozenyDragForce &from)=delete
 Copy constructor. More...
 
CarmanKozenyDragForceoperator= (const CarmanKozenyDragForce &that)=delete
 Assignment operator. More...
 
void getFromInput (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db, bool is_from_restart)
 Get options from input database. More...
 
void getFromRestart ()
 

Private Attributes

double d_avoid_division_by_zero_factor = 1e-3
 

Detailed Description

The penalization force is taken to be \( A_d(\bm{u}_b - \bm{u}^{n+1}) \). The class computes the coefficient \(A_d \) of the fluid velocity \( \bm{u}^{n+1} \) for the variable-coefficient INS solvers of INSVCStaggeredHierarchyIntegrator. This is done in the CarmanKozenyDragForce::demarcateBrinkmanZone method. Here \( A_d = C_d\frac{\alpha_S}{(1-alpha_S)^3+e_d}\), \( \alpha_S \) is the volume fraction of the solid, \( C_d\) and \( e_d\) are the model parameters. The rigid body velocity \(\bm{u}_b\) is taken to be zero. The penalty parameter C_d is taken to be \(C_d = ( \rho / \Delta t + \mu / h^2)\). The user can choose the density or the inertia scale or both for \(C_d\) through input.

Constructor & Destructor Documentation

◆ CarmanKozenyDragForce() [1/2]

IBAMR::CarmanKozenyDragForce::CarmanKozenyDragForce ( std::string  object_name,
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > >  H_var,
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > >  lf_var,
SAMRAI::tbox::Pointer< IBAMR::AdvDiffHierarchyIntegrator adv_diff_solver,
SAMRAI::tbox::Pointer< IBAMR::INSVCStaggeredHierarchyIntegrator fluid_solver,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database input_db,
bool  register_for_restart = true 
)

◆ ~CarmanKozenyDragForce()

IBAMR::CarmanKozenyDragForce::~CarmanKozenyDragForce ( )
default

◆ CarmanKozenyDragForce() [2/2]

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

Member Function Documentation

◆ preprocessComputeBrinkmanPenalization()

void IBAMR::CarmanKozenyDragForce::preprocessComputeBrinkmanPenalization ( double  current_time,
double  new_time,
int  num_cycles 
)
overridevirtual

◆ computeBrinkmanVelocity()

void IBAMR::CarmanKozenyDragForce::computeBrinkmanVelocity ( int  u_idx,
double  time,
int  cycle_num 
)
overridevirtual
   \brief Compute the desired rigid body velocity in the Brinkman penalized (solid) zone. The present
  • * implementation sets rigid body velocity to be zero.

Implements IBAMR::BrinkmanPenalizationStrategy.

◆ demarcateBrinkmanZone()

void IBAMR::CarmanKozenyDragForce::demarcateBrinkmanZone ( int  u_idx,
double  time,
int  cycle_num 
)
overridevirtual

◆ postprocessComputeBrinkmanPenalization()

void IBAMR::CarmanKozenyDragForce::postprocessComputeBrinkmanPenalization ( double  current_time,
double  new_time,
int  num_cycles 
)
overridevirtual

◆ putToDatabase()

void IBAMR::CarmanKozenyDragForce::putToDatabase ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database db)
overridevirtual

◆ operator=()

CarmanKozenyDragForce& IBAMR::CarmanKozenyDragForce::operator= ( const CarmanKozenyDragForce 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::CarmanKozenyDragForce::getFromInput ( SAMRAI::tbox::Pointer< SAMRAI::tbox::Database db,
bool  is_from_restart 
)
private

Read input values from a given database.

◆ getFromRestart()

void IBAMR::CarmanKozenyDragForce::getFromRestart ( )
private

Read object state from the restart file and initialize class data members.

◆ setTimeInterval()

virtual void IBAMR::BrinkmanPenalizationStrategy::setTimeInterval ( double  current_time,
double  new_time 
)
virtualinherited

◆ setBrinkmanCoefficient()

virtual void IBAMR::BrinkmanPenalizationStrategy::setBrinkmanCoefficient ( double  chi)
virtualinherited

◆ setBrinkmanPenaltyFactor()

virtual void IBAMR::BrinkmanPenalizationStrategy::setBrinkmanPenaltyFactor ( double  penalty_factor)
virtualinherited

◆ getName()

const std::string& IBAMR::BrinkmanPenalizationStrategy::getName ( ) const
inlineinherited

◆ getBrinkmanCoefficient()

double IBAMR::BrinkmanPenalizationStrategy::getBrinkmanCoefficient ( ) const
inlineinherited

◆ getBrinkmanPenaltyFactor()

double IBAMR::BrinkmanPenalizationStrategy::getBrinkmanPenaltyFactor ( ) const
inlineinherited

◆ getCurrentTimeInterval()

std::pair<double, double> IBAMR::BrinkmanPenalizationStrategy::getCurrentTimeInterval ( ) const
inlineinherited

Member Data Documentation

◆ d_adv_diff_solver

SAMRAI::tbox::Pointer<IBAMR::AdvDiffHierarchyIntegrator> IBAMR::CarmanKozenyDragForce::d_adv_diff_solver
protected

◆ d_fluid_solver

SAMRAI::tbox::Pointer<IBAMR::INSVCStaggeredHierarchyIntegrator> IBAMR::CarmanKozenyDragForce::d_fluid_solver
protected

◆ d_H_var

SAMRAI::tbox::Pointer<SAMRAI::pdat::CellVariable<NDIM, double> > IBAMR::CarmanKozenyDragForce::d_H_var
protected

◆ d_lf_var

SAMRAI::tbox::Pointer<SAMRAI::pdat::CellVariable<NDIM, double> > IBAMR::CarmanKozenyDragForce::d_lf_var
protected

◆ d_avoid_division_by_zero_factor

double IBAMR::CarmanKozenyDragForce::d_avoid_division_by_zero_factor = 1e-3
private

Constant needed to avoid division by zero. This constant also controls the strength of the penalty factor.

◆ d_object_name

std::string IBAMR::BrinkmanPenalizationStrategy::d_object_name
protectedinherited

Book-keeping.

◆ d_registered_for_restart

bool IBAMR::BrinkmanPenalizationStrategy::d_registered_for_restart
protectedinherited

◆ d_current_time

double IBAMR::BrinkmanPenalizationStrategy::d_current_time = std::numeric_limits<double>::quiet_NaN()
protectedinherited

◆ d_new_time

double IBAMR::BrinkmanPenalizationStrategy::d_new_time = std::numeric_limits<double>::quiet_NaN()
protectedinherited

◆ d_penalty_factor

double IBAMR::BrinkmanPenalizationStrategy::d_penalty_factor = 1.0
protectedinherited

◆ d_use_rho_scale

bool IBAMR::BrinkmanPenalizationStrategy::d_use_rho_scale = true
protectedinherited

◆ d_use_mu_scale

bool IBAMR::BrinkmanPenalizationStrategy::d_use_mu_scale = false
protectedinherited

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