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

Class IBHydrodynamicSurfaceForceEvaluator computes hydrodynamic force on immersed bodies. The class uses a level set indicator for the solid body to add up surface forces in the cells adjacent to the immersed structure. More...

#include <ibamr/IBHydrodynamicSurfaceForceEvaluator.h>

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

Public Member Functions

 IBHydrodynamicSurfaceForceEvaluator (std::string object_name, SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > ls_solid_var, SAMRAI::tbox::Pointer< IBAMR::AdvDiffHierarchyIntegrator > adv_diff_solver, SAMRAI::tbox::Pointer< IBAMR::INSHierarchyIntegrator > fluid_solver, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db=nullptr)
 Default constructor. More...
 
virtual ~IBHydrodynamicSurfaceForceEvaluator ()
 Virtual destructor. More...
 
virtual void computeHydrodynamicForceTorque (IBTK::Vector3d &pressure_force, IBTK::Vector3d &viscous_force, IBTK::Vector3d &pressure_torque, IBTK::Vector3d &viscous_torque, const IBTK::Vector3d &X0)
 Compute the hydrodynamic force via surface integration after all the hierarchy variables have been integrated. More...
 
virtual void computeHydrodynamicForceTorque (IBTK::Vector3d &pressure_force, IBTK::Vector3d &viscous_force, IBTK::Vector3d &pressure_torque, IBTK::Vector3d &viscous_torque, const IBTK::Vector3d &X0, double time, double current_time, double new_time)
 Compute the hydrodynamic force via surface integration while the integration of variables is happening during a given timestep. More...
 
virtual void setSurfaceContourLevel (double s=0)
 Set the surface contour value s < > of the level set field, such that \( \phi(s) = \partial \Omega \). More...
 
void writeToFile (bool write_to_file=true)
 Indicate if the force and torque results need to be written on a file. More...
 

Private Member Functions

 IBHydrodynamicSurfaceForceEvaluator (const IBHydrodynamicSurfaceForceEvaluator &from)=delete
 Copy constructor. More...
 
IBHydrodynamicSurfaceForceEvaluatoroperator= (const IBHydrodynamicSurfaceForceEvaluator &that)=delete
 Assignment operator. More...
 
void getFromInput (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db)
 
void fillPatchData (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, double fill_time, bool use_current_ctx, bool use_new_ctx)
 

Private Attributes

std::string d_object_name
 Object name. More...
 
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > d_ls_solid_var
 Level set variable for the immersed body. More...
 
SAMRAI::tbox::Pointer< IBAMR::AdvDiffHierarchyIntegratord_adv_diff_solver
 Pointer to advection-diffusion solver. More...
 
SAMRAI::tbox::Pointer< IBAMR::INSHierarchyIntegratord_fluid_solver
 Pointer to incompressible Navier-Stokes solver. More...
 
int d_ls_solid_idx = IBTK::invalid_index
 Level set patch data index. More...
 
int d_u_idx = IBTK::invalid_index
 Fluid velocity and pressure patch data indices. More...
 
int d_p_idx = IBTK::invalid_index
 
int d_mu_idx = IBTK::invalid_index
 Viscosity patch data index. More...
 
double d_mu = std::numeric_limits<double>::quiet_NaN()
 Viscosity for the constant mu case. More...
 
bool d_mu_is_const
 Whether or not viscosity is constant. More...
 
double d_surface_contour_value = 0.0
 The contour level that describes the surface of the solid object. More...
 
bool d_write_to_file = false
 Whether to write results on a text file. More...
 
std::unique_ptr< std::ofstream > d_hydro_force_stream = nullptr
 File streams associated for the output of hydrodynamic force. More...
 
std::unique_ptr< std::ofstream > d_hydro_torque_stream = nullptr
 File streams associated for the output of hydrodynamic torque. More...
 

Detailed Description

References Patel, J,K. and Natarajan, G., Diffuse interface immersed boundary method for multi-fluid flows with arbitrarily moving rigid bodies.

Note
This class will work with both the constant and variable viscosity

Constructor & Destructor Documentation

◆ IBHydrodynamicSurfaceForceEvaluator() [1/2]

IBAMR::IBHydrodynamicSurfaceForceEvaluator::IBHydrodynamicSurfaceForceEvaluator ( std::string  object_name,
SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > >  ls_solid_var,
SAMRAI::tbox::Pointer< IBAMR::AdvDiffHierarchyIntegrator adv_diff_solver,
SAMRAI::tbox::Pointer< IBAMR::INSHierarchyIntegrator fluid_solver,
SAMRAI::tbox::Pointer< SAMRAI::tbox::Database db = nullptr 
)

◆ ~IBHydrodynamicSurfaceForceEvaluator()

virtual IBAMR::IBHydrodynamicSurfaceForceEvaluator::~IBHydrodynamicSurfaceForceEvaluator ( )
virtual

◆ IBHydrodynamicSurfaceForceEvaluator() [2/2]

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

Member Function Documentation

◆ computeHydrodynamicForceTorque() [1/2]

virtual void IBAMR::IBHydrodynamicSurfaceForceEvaluator::computeHydrodynamicForceTorque ( IBTK::Vector3d pressure_force,
IBTK::Vector3d viscous_force,
IBTK::Vector3d pressure_torque,
IBTK::Vector3d viscous_torque,
const IBTK::Vector3d X0 
)
virtual
Note
The users should call this routine if the hydrodynamic forces need to be computed just as a postprocessing step.
This function uses 3D vectors even in 2D so that the torque makes sense.

◆ computeHydrodynamicForceTorque() [2/2]

virtual void IBAMR::IBHydrodynamicSurfaceForceEvaluator::computeHydrodynamicForceTorque ( IBTK::Vector3d pressure_force,
IBTK::Vector3d viscous_force,
IBTK::Vector3d pressure_torque,
IBTK::Vector3d viscous_torque,
const IBTK::Vector3d X0,
double  time,
double  current_time,
double  new_time 
)
virtual
Note
This function uses 3D vectors even in 2D so that the torque makes sense.

◆ setSurfaceContourLevel()

virtual void IBAMR::IBHydrodynamicSurfaceForceEvaluator::setSurfaceContourLevel ( double  s = 0)
virtual

◆ writeToFile()

void IBAMR::IBHydrodynamicSurfaceForceEvaluator::writeToFile ( bool  write_to_file = true)

◆ operator=()

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

Read input values from a given database.

◆ fillPatchData()

void IBAMR::IBHydrodynamicSurfaceForceEvaluator::fillPatchData ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  patch_hierarchy,
double  fill_time,
bool  use_current_ctx,
bool  use_new_ctx 
)
private

Fill required patch data and ghost cells.

Member Data Documentation

◆ d_object_name

std::string IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_object_name
private

◆ d_ls_solid_var

SAMRAI::tbox::Pointer<SAMRAI::pdat::CellVariable<NDIM, double> > IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_ls_solid_var
private

◆ d_adv_diff_solver

SAMRAI::tbox::Pointer<IBAMR::AdvDiffHierarchyIntegrator> IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_adv_diff_solver
private

◆ d_fluid_solver

SAMRAI::tbox::Pointer<IBAMR::INSHierarchyIntegrator> IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_fluid_solver
private

◆ d_ls_solid_idx

int IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_ls_solid_idx = IBTK::invalid_index
private

◆ d_u_idx

int IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_u_idx = IBTK::invalid_index
private

◆ d_p_idx

int IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_p_idx = IBTK::invalid_index
private

◆ d_mu_idx

int IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_mu_idx = IBTK::invalid_index
private

◆ d_mu

double IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_mu = std::numeric_limits<double>::quiet_NaN()
private

◆ d_mu_is_const

bool IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_mu_is_const
private

◆ d_surface_contour_value

double IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_surface_contour_value = 0.0
private

◆ d_write_to_file

bool IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_write_to_file = false
private

◆ d_hydro_force_stream

std::unique_ptr<std::ofstream> IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_hydro_force_stream = nullptr
private
Note
Columns 1-3 represent sum of -p.n dA. Columns 4-6 represent sum of n.(grad U + grad U^T) dA.

◆ d_hydro_torque_stream

std::unique_ptr<std::ofstream> IBAMR::IBHydrodynamicSurfaceForceEvaluator::d_hydro_torque_stream = nullptr
private
Note
Columns 1-3 represent sum of r X -p.n dA. Columns 4-6 represent sum of r x n.(grad U + grad U^T) dA.

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