|
IBAMR
IBAMR version 0.19.
|
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 <ibamr/IBHydrodynamicForceEvaluator.h>

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. More... | |
| 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. More... | |
| const IBHydrodynamicForceObject & | getHydrodynamicForceObject (int strct_id) |
| Get access to hydrodynamic data of the given structure id. More... | |
| 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=nullptr) |
| 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. More... | |
| void | putToDatabase (SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > db) override |
| Override the putToDatabase method of the base Serializable class. More... | |
| 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... | |
Private Member Functions | |
| IBHydrodynamicForceEvaluator (const IBHydrodynamicForceEvaluator &from)=delete | |
| Copy constructor. More... | |
| IBHydrodynamicForceEvaluator & | operator= (const IBHydrodynamicForceEvaluator &that)=delete |
| Assignment operator. More... | |
| void | resetFaceAreaWeight (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy) |
| Reset weight of the cell face to face area. More... | |
| void | resetFaceVolWeight (SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy) |
| Reset weight of the cell face to cell volume. More... | |
| void | fillPatchData (const int u_src_idx, const int p_src_idx, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > patch_hierarchy, const std::vector< SAMRAI::solv::RobinBcCoefStrategy< NDIM > * > &u_src_bc_coef, SAMRAI::solv::RobinBcCoefStrategy< NDIM > *p_src_bc_coef, const double fill_time) |
| Allocate and fill velocity and pressure patch data. More... | |
| void | getPhysicalCoordinateFromSideIndex (IBTK::Vector3d &side_coord, SAMRAI::tbox::Pointer< SAMRAI::hier::PatchLevel< NDIM > > patch_level, SAMRAI::tbox::Pointer< SAMRAI::hier::Patch< NDIM > > patch, const SAMRAI::pdat::SideIndex< NDIM > side_idx, const int axis) |
| Compute the physical coordinate of a given side index. More... | |
Private Attributes | |
| std::string | d_object_name |
| Object name. More... | |
| double | d_rho |
| Fluid density and viscosity. More... | |
| double | d_mu |
| double | d_current_time |
| Current integrator time. More... | |
| SAMRAI::tbox::Pointer< SAMRAI::pdat::SideVariable< NDIM, double > > | d_u_var |
| Fluid velocity and pressure with appropriate ghost width. More... | |
| SAMRAI::tbox::Pointer< SAMRAI::pdat::CellVariable< NDIM, double > > | d_p_var |
| int | d_u_idx |
| int | d_p_idx |
| int | d_face_wgt_sc_idx |
| Patch data index for face weights. More... | |
| int | d_vol_wgt_sc_idx |
| std::map< int, IBHydrodynamicForceObject > | d_hydro_objs |
| Data structure encapsulating hydrodynamic force on an object. More... | |
References Flavio Noca, On the evaluation of time-dependent fluid-dynamic forces on bluff bodies.
| IBAMR::IBHydrodynamicForceEvaluator::IBHydrodynamicForceEvaluator | ( | std::string | object_name, |
| double | rho, | ||
| double | mu, | ||
| double | current_time, | ||
| bool | register_for_restart = true |
||
| ) |
| rho | Fluid/structure density. |
| mu | Fluid Viscosity. |
| current_time | Current integration time. |
|
virtual |
|
privatedelete |
| from | The value to copy to this object. |
| 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 |
||
| ) |
| box_X_lower | Initial (typically at time = 0) position of lower left corner of the integration domain. |
| box_X_upper | Initial (typically at time = 0) position of upper right corner of the integration domain. |
| box_vel | Initial (typically at time = 0) velocity of the integration domain in three Cartesian directions. |
| strct_id | A unique integer id to associate with an integration domain. |
| 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 |
||
| ) |
| box_vel_new | Velocity of the integration domain in three Cartesian directions during the time step. |
| dt | Time step from the integrator. Pass IBHierarchyIntegrator::getMaximumTimeStepSize() instead of new_time - old_time to avoid floating point errors from subtraction |
| strct_id | A unique integer id to associate with an integration domain. |
| void IBAMR::IBHydrodynamicForceEvaluator::setTorqueOrigin | ( | const IBTK::Vector3d & | X0, |
| int | strct_id = 0 |
||
| ) |
| X0 | A 3D vector corresponding to the origin of the position vector used to compute torques |
| strct_id | A unique integer id to associate with an integration domain. |
|
virtual |
| const IBHydrodynamicForceObject& IBAMR::IBHydrodynamicForceEvaluator::getHydrodynamicForceObject | ( | int | strct_id | ) |
| 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 > * >() |
||
| ) |
| u_old_idx | Patch index of velocity variable (before advancing the hierarchy) with appropriate ghost cell width. |
| wgt_sc_idx | Patch index of volume weights associated with faces. |
| u_src_bc_coef | Velocity boundary condition object maintained by the integrator. |
| p_src_bc_coef | Pressure boundary condition object maintained by the integrator. |
| void IBAMR::IBHydrodynamicForceEvaluator::updateStructureMomentum | ( | const IBTK::Vector3d & | P_strct_new, |
| const IBTK::Vector3d & | L_strct_new, | ||
| int | strct_id = 0 |
||
| ) |
| P_strct_new | Linear momentum of the structure after the integration. |
| L_strct_new | Angular momentum of the structure after the integration. |
| strct_id | A unique integer id to associate with an integration domain. |
|
virtual |
| u_idx | Patch index of velocity variable (after advancing the hierarchy) with appropriate ghost cell width. |
| p_idx | Patch index of pressure variable with appropriate ghost cell width. |
| f_idx | Patch index of body force variable with appropriate ghost cell width. |
| dt | Time step from the integrator. Pass IBHierarchyIntegrator::getMaximumTimeStepSize() instead of new_time - old_time to avoid floating point errors from subtraction |
| u_src_bc_coef | Velocity boundary condition object maintained by the integrator. |
| p_src_bc_coef | Pressure boundary condition object maintained by the integrator. |
|
virtual |
|
overridevirtual |
Implements SAMRAI::tbox::Serializable.
| 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 |
||
| ) |
| strct_id | A unique integer id to associate with an integration domain. |
| void IBAMR::IBHydrodynamicForceEvaluator::updateStructurePlotData | ( | SAMRAI::tbox::Pointer< SAMRAI::hier::PatchHierarchy< NDIM > > | patch_hierarchy, |
| int | strct_id = 0 |
||
| ) |
| strct_id | A unique integer id to associate with an integration domain |
|
privatedelete |
| that | The value to assign to this object. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.17