IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Classes | Public Member Functions | List of all members
IBAMR::IBHydrodynamicForceEvaluator Class Reference

Class IBHydrodynamicForceEvaluator computes hydrodynamic force and torque on immersed bodies. The class uses Reynolds transport theorem to integrate momentum over a Cartesian box region that moves with an arbitrary rigid body translation velocity. More...

#include </home/runner/work/IBAMR/IBAMR/include/ibamr/IBHydrodynamicForceEvaluator.h>

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

Classes

struct  IBHydrodynamicForceObject
 

Public Member Functions

 IBHydrodynamicForceEvaluator (std::string object_name, double rho, double mu, double current_time, bool register_for_restart=true)
 Default constructor. More...
 
virtual ~IBHydrodynamicForceEvaluator ()
 Virtual destructor.
 
void registerStructure (IBTK::Vector3d &box_X_lower, IBTK::Vector3d &box_X_upper, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, const IBTK::Vector3d &box_vel=IBTK::Vector3d::Zero(), int strct_id=0)
 Register structure ID, level number, and integration domain with the class. More...
 
void updateStructureDomain (const IBTK::Vector3d &box_vel_new, double dt, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, int strct_id=0)
 Update the domain of integration as a result of structure motion. This should be called before computeLaggedMomentumIntegral to insure that the correct box is being used. More...
 
void setTorqueOrigin (const IBTK::Vector3d &X0, int strct_id=0)
 Set the origin of the position vector used to compute torques. More...
 
virtual void preprocessIntegrateData (double current_time, double new_time)
 Preprocess data for the current timestep.
 
const IBHydrodynamicForceObjectgetHydrodynamicForceObject (int strct_id)
 Get access to hydrodynamic data of the given structure id.
 
void computeLaggedMomentumIntegral (int u_old_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &u_src_bc_coef=std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * >())
 Compute the momentum integral for the velocity variable at the previous time step over the new control volume. This should be called before advancing the hierarchy but after updateStructureDomain. More...
 
void updateStructureMomentum (const IBTK::Vector3d &P_strct_new, const IBTK::Vector3d &L_strct_new, int strct_id=0)
 Update the new momenta of the bodies within the structure. This should be called after advancing the hierarchy. More...
 
virtual void computeHydrodynamicForce (int u_idx, int p_idx, int f_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, double dt, const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &u_src_bc_coef=std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * >(), SAMRAI::solv::RobinBcCoefStrategy< NDIM > *p_src_bc_coef=NULL)
 Compute hydrodynamic force. This should be called after advancing the hierarchy. More...
 
virtual void postprocessIntegrateData (double current_time, double new_time)
 Postprocess data for the next timestep.
 
void putToDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db) override
 Override the putToDatabase method of the base Serializable class.
 
void registerStructurePlotData (SAMRAI::tbox::Pointer< SAMRAI::appu::VisItDataWriter< NDIM > > visit_data_writer, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, int strct_id=0)
 Create the control volume plot data and register it with the VisIt data writer. More...
 
void updateStructurePlotData (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, int strct_id=0)
 Update the plot variable for the new location of the control volume box. More...
 

Detailed Description

Class IBHydrodynamicForceEvaluator computes hydrodynamic force and torque on immersed bodies. The class uses Reynolds transport theorem to integrate momentum over a Cartesian box region that moves with an arbitrary rigid body translation velocity.

References Flavio Noca, On the evaluation of time-dependent fluid-dynamic forces on bluff bodies.

Nangia et al., A moving control volume approach to computing hydrodynamic forces and torques on immersed bodies. \note The Cartesian box should enclose the body entirely. \note Various IB methods need to provide linear and angular momentum of the enclosed body to the class.

Constructor & Destructor Documentation

◆ IBHydrodynamicForceEvaluator()

IBAMR::IBHydrodynamicForceEvaluator::IBHydrodynamicForceEvaluator ( std::string  object_name,
double  rho,
double  mu,
double  current_time,
bool  register_for_restart = true 
)

Default constructor.

Parameters
rhoFluid/structure density.
muFluid Viscosity.
current_timeCurrent integration time.

Member Function Documentation

◆ computeHydrodynamicForce()

void IBAMR::IBHydrodynamicForceEvaluator::computeHydrodynamicForce ( int  u_idx,
int  p_idx,
int  f_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  patch_hierarchy,
double  dt,
const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &  u_src_bc_coef = std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*>(),
SAMRAI::solv::RobinBcCoefStrategy< NDIM > *  p_src_bc_coef = NULL 
)
virtual

Compute hydrodynamic force. This should be called after advancing the hierarchy.

Parameters
u_idxPatch index of velocity variable (after advancing the hierarchy) with appropriate ghost cell width.
p_idxPatch index of pressure variable with appropriate ghost cell width.
f_idxPatch index of body force variable with appropriate ghost cell width.
dtTime step from the integrator. Pass IBHierarchyIntegrator::getMaximumTimeStepSize() instead of new_time - old_time to avoid floating point errors from subtraction
u_src_bc_coefVelocity boundary condition object maintained by the integrator.
p_src_bc_coefPressure boundary condition object maintained by the integrator.

◆ computeLaggedMomentumIntegral()

void IBAMR::IBHydrodynamicForceEvaluator::computeLaggedMomentumIntegral ( int  u_old_idx,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  patch_hierarchy,
const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &  u_src_bc_coef = std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*>() 
)

Compute the momentum integral for the velocity variable at the previous time step over the new control volume. This should be called before advancing the hierarchy but after updateStructureDomain.

Parameters
u_old_idxPatch index of velocity variable (before advancing the hierarchy) with appropriate ghost cell width.
wgt_sc_idxPatch index of volume weights associated with faces.
u_src_bc_coefVelocity boundary condition object maintained by the integrator.
p_src_bc_coefPressure boundary condition object maintained by the integrator.

◆ registerStructure()

void IBAMR::IBHydrodynamicForceEvaluator::registerStructure ( IBTK::Vector3d &  box_X_lower,
IBTK::Vector3d &  box_X_upper,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  patch_hierarchy,
const IBTK::Vector3d &  box_vel = IBTK::Vector3d::Zero(),
int  strct_id = 0 
)

Register structure ID, level number, and integration domain with the class.

Parameters
box_X_lowerInitial (typically at time = 0) position of lower left corner of the integration domain.
box_X_upperInitial (typically at time = 0) position of upper right corner of the integration domain.
box_velInitial (typically at time = 0) velocity of the integration domain in three Cartesian directions.
strct_idA unique integer id to associate with an integration domain.

◆ registerStructurePlotData()

void IBAMR::IBHydrodynamicForceEvaluator::registerStructurePlotData ( SAMRAI::tbox::Pointer< SAMRAI::appu::VisItDataWriter< NDIM > >  visit_data_writer,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  patch_hierarchy,
int  strct_id = 0 
)

Create the control volume plot data and register it with the VisIt data writer.

Parameters
strct_idA unique integer id to associate with an integration domain.

◆ setTorqueOrigin()

void IBAMR::IBHydrodynamicForceEvaluator::setTorqueOrigin ( const IBTK::Vector3d &  X0,
int  strct_id = 0 
)

Set the origin of the position vector used to compute torques.

Parameters
X0A 3D vector corresponding to the origin of the position vector used to compute torques
strct_idA unique integer id to associate with an integration domain.

◆ updateStructureDomain()

void IBAMR::IBHydrodynamicForceEvaluator::updateStructureDomain ( const IBTK::Vector3d &  box_vel_new,
double  dt,
SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  patch_hierarchy,
int  strct_id = 0 
)

Update the domain of integration as a result of structure motion. This should be called before computeLaggedMomentumIntegral to insure that the correct box is being used.

Parameters
box_vel_newVelocity of the integration domain in three Cartesian directions during the time step.
dtTime step from the integrator. Pass IBHierarchyIntegrator::getMaximumTimeStepSize() instead of new_time - old_time to avoid floating point errors from subtraction
strct_idA unique integer id to associate with an integration domain.

◆ updateStructureMomentum()

void IBAMR::IBHydrodynamicForceEvaluator::updateStructureMomentum ( const IBTK::Vector3d &  P_strct_new,
const IBTK::Vector3d &  L_strct_new,
int  strct_id = 0 
)

Update the new momenta of the bodies within the structure. This should be called after advancing the hierarchy.

Parameters
P_strct_newLinear momentum of the structure after the integration.
L_strct_newAngular momentum of the structure after the integration.
strct_idA unique integer id to associate with an integration domain.

◆ updateStructurePlotData()

void IBAMR::IBHydrodynamicForceEvaluator::updateStructurePlotData ( SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > >  patch_hierarchy,
int  strct_id = 0 
)

Update the plot variable for the new location of the control volume box.

Parameters
strct_idA unique integer id to associate with an integration domain

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