PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
|
Immersed-boundary method proposed by Li et. al. (2016). More...
#include <decoupledibpm.h>
Public Member Functions | |
DecoupledIBPMSolver ()=default | |
Default constructor. More... | |
DecoupledIBPMSolver (const MPI_Comm &world, const YAML::Node &node) | |
Constructor; Initialize the decoupled IBPM solver. More... | |
~DecoupledIBPMSolver () | |
Default destructor. More... | |
PetscErrorCode | destroy () |
Manually destroy data. More... | |
PetscErrorCode | init (const MPI_Comm &world, const YAML::Node &node) |
Initialize the decoupled IBPM solver. More... | |
PetscErrorCode | advance () |
Advance the solution by one time step. More... | |
PetscErrorCode | write () |
Write solution and solver info to files. More... | |
PetscErrorCode | ioInitialData () |
Read or write initial data. More... | |
bool | finished () |
Evaluate if the simulation is finished. More... | |
Protected Member Functions | |
virtual PetscErrorCode | assembleRHSVelocity () |
Assemble the RHS vector of the velocity system. More... | |
virtual PetscErrorCode | assembleRHSForces () |
Assemble the RHS vector of the system for the Lagrangian forces. More... | |
virtual PetscErrorCode | solveForces () |
Solve the system for the boundary forces. More... | |
virtual PetscErrorCode | applyNoSlip () |
Update the velocity to satisfy the no-slip condition. More... | |
virtual PetscErrorCode | updateForces () |
Update the Lagrangian forces. More... | |
virtual PetscErrorCode | createExtraOperators () |
Assemble additional operators. More... | |
virtual PetscErrorCode | createExtraVectors () |
Create additional vectors. More... | |
virtual PetscErrorCode | writeRestartDataHDF5 (const std::string &filePath) |
Write data required to restart a simulation into a HDF5 file. More... | |
virtual PetscErrorCode | readRestartDataHDF5 (const std::string &filePath) |
Read data required to restart a simulation from a HDF5 file. More... | |
virtual PetscErrorCode | writeLinSolversInfo () |
Write numbers of iterations and residuals of solvers to file. More... | |
virtual PetscErrorCode | writeForcesASCII () |
Write the forces acting on the bodies into an ASCII file. More... | |
virtual PetscErrorCode | solveVelocity () |
Solve the velocity system. More... | |
virtual PetscErrorCode | assembleRHSPoisson () |
Assemble the RHS vector of the Poisson system. More... | |
virtual PetscErrorCode | solvePoisson () |
Solve the Poisson system. More... | |
virtual PetscErrorCode | applyDivergenceFreeVelocity () |
virtual PetscErrorCode | updatePressure () |
virtual PetscErrorCode | createOperators () |
Create operators. More... | |
virtual PetscErrorCode | createVectors () |
Create vectors. More... | |
virtual PetscErrorCode | setNullSpace () |
Set Poisson nullspace or pin pressure at a reference point. More... | |
virtual PetscErrorCode | createPetscViewerASCII (const std::string &filePath, const PetscFileMode &mode, PetscViewer &viewer) |
Create an ASCII PetscViewer. More... | |
virtual PetscErrorCode | writeSolutionHDF5 (const std::string &filePath) |
Write the solution fields into a HDF5 file. More... | |
virtual PetscErrorCode | writeTimeHDF5 (const PetscReal &t, const std::string &filePath) |
Write the time value into a HDF5 file. More... | |
virtual PetscErrorCode | readTimeHDF5 (const std::string &filePath, PetscReal &t) |
Read the time value from a HDF5 file. More... | |
virtual PetscErrorCode | monitorProbes () |
Monitor the solution at probes. More... | |
Protected Attributes | |
petibm::type::BodyPack | bodies |
Pack of immersed bodies. More... | |
petibm::type::LinSolver | fSolver |
Linear solver for the Lagrangian forces. More... | |
Mat | H |
Spreading operator. More... | |
Mat | E |
Regularization operator. More... | |
Mat | EBNH |
Left-hand side operator of the system for the forces. More... | |
Mat | BNH |
Projection operator for the forces. More... | |
Vec | f |
Vector to hold the forces at time step n. More... | |
Vec | df |
Force-increment vector. More... | |
Vec | rhsf |
Right-hand side of the forces system. More... | |
PetscLogStage | stageRHSForces |
Log stage for assembling the RHS of the forces system. More... | |
PetscLogStage | stageSolveForces |
Log stage for solving the forces system. More... | |
PetscLogStage | stageIntegrateForces |
Log stage for integrating the Lagrangian forces. More... | |
PetscViewer | forcesViewer |
ASCII PetscViewer object to output the forces. More... | |
MPI_Comm | comm |
MPI communicator. More... | |
PetscMPIInt | commSize |
Size of the MPI communicator. More... | |
PetscMPIInt | commRank |
Rank of the process in the MPI communicator. More... | |
YAML::Node | config |
YAML configuration settings. More... | |
petibm::type::Mesh | mesh |
Structured Cartesian mesh object. More... | |
petibm::type::Boundary | bc |
Information about the domain boundaries. More... | |
petibm::type::Solution | solution |
Data object holding the velocity and pressure fields. More... | |
petibm::type::TimeIntegration | convCoeffs |
Time scheme for the convective terms. More... | |
petibm::type::TimeIntegration | diffCoeffs |
Time scheme for the diffusion terms. More... | |
petibm::type::LinSolver | vSolver |
Velocity linear solver. More... | |
petibm::type::LinSolver | pSolver |
Poisson linear solver. More... | |
std::vector< petibm::type::Probe > | probes |
Probes to monitor the solution. More... | |
PetscReal | dt |
Time-step size. More... | |
PetscInt | ite |
Time-step index. More... | |
PetscReal | t |
Time value. More... | |
PetscInt | nstart |
Starting time-step index. More... | |
PetscInt | nt |
Number of time steps to compute. More... | |
PetscInt | nsave |
Frequency at which the solution fields are written to files. More... | |
PetscInt | nrestart |
Frequency at which data to restart are written to files. More... | |
PetscReal | nu |
Viscous diffusion coefficient. More... | |
Mat | L |
Laplacian operator. More... | |
Mat | LCorrection |
Laplacian correction operator for boundary conditions. More... | |
Mat | G |
Gradient operator. More... | |
Mat | D |
Divergence operator. More... | |
Mat | DCorrection |
Divergence correction for boundary conditions. More... | |
Mat | N |
Convective operator (matrix-free). More... | |
Mat | A |
Implicit operator for the velocity solver. More... | |
Mat | BNG |
Projection operator. More... | |
Mat | DBNG |
Poisson operator. More... | |
Vec | dP |
Pressure-correction vector. More... | |
Vec | bc1 |
Inhomogeneous boundary terms for the velocity system. More... | |
Vec | rhs1 |
Right-hand side vector of the velocity system. More... | |
Vec | rhs2 |
Right-hand side vector of the Poisson system. More... | |
std::vector< Vec > | conv |
Explicit convective terms. More... | |
std::vector< Vec > | diff |
Explicit diffusion terms. More... | |
PetscBool | isRefP |
True if we pin the pressure at a reference point. More... | |
PetscLogStage | stageInitialize |
Log stage for the initialization phase. More... | |
PetscLogStage | stageRHSVelocity |
Log stage for assembling the RHS of the velocity system. More... | |
PetscLogStage | stageSolveVelocity |
Log stage for solving the velocity system. More... | |
PetscLogStage | stageRHSPoisson |
Log stage for assembling the RHS of the Poisson system. More... | |
PetscLogStage | stageSolvePoisson |
Log stage for solving the Poisson system. More... | |
PetscLogStage | stageUpdate |
Log stage for updating field variables. More... | |
PetscLogStage | stageWrite |
Log stage when write the solution fields. More... | |
PetscLogStage | stageMonitor |
Log stage for monitoring user-defined regions of the domain. More... | |
PetscViewer | solversViewer |
ASCII PetscViewer object to output solvers info. More... | |
Immersed-boundary method proposed by Li et. al. (2016).
Definition at line 22 of file decoupledibpm.h.
|
default |
Default constructor.
DecoupledIBPMSolver::DecoupledIBPMSolver | ( | const MPI_Comm & | world, |
const YAML::Node & | node | ||
) |
Constructor; Initialize the decoupled IBPM solver.
world | [in] MPI communicator |
node | [in] YAML configuration settings |
Definition at line 16 of file decoupledibpm.cpp.
DecoupledIBPMSolver::~DecoupledIBPMSolver | ( | ) |
Default destructor.
Definition at line 22 of file decoupledibpm.cpp.
PetscErrorCode DecoupledIBPMSolver::advance | ( | ) |
Advance the solution by one time step.
Definition at line 105 of file decoupledibpm.cpp.
|
protectedvirtualinherited |
Definition at line 583 of file navierstokes.cpp.
|
protectedvirtual |
Update the velocity to satisfy the no-slip condition.
Definition at line 288 of file decoupledibpm.cpp.
|
protectedvirtual |
Assemble the RHS vector of the system for the Lagrangian forces.
Reimplemented in RigidKinematicsSolver.
Definition at line 253 of file decoupledibpm.cpp.
|
protectedvirtualinherited |
Assemble the RHS vector of the Poisson system.
Reimplemented in IBPMSolver.
Definition at line 540 of file navierstokes.cpp.
|
protectedvirtual |
Assemble the RHS vector of the velocity system.
Reimplemented from NavierStokesSolver.
Definition at line 233 of file decoupledibpm.cpp.
|
protectedvirtual |
Assemble additional operators.
Definition at line 149 of file decoupledibpm.cpp.
|
protectedvirtual |
Create additional vectors.
Definition at line 219 of file decoupledibpm.cpp.
|
protectedvirtualinherited |
|
protectedvirtualinherited |
Create an ASCII PetscViewer.
filePath | [in] Path of the file to write in |
mode | [in] File mode |
viewer | [out] PetscViewer object |
Definition at line 749 of file navierstokes.cpp.
|
protectedvirtualinherited |
PetscErrorCode DecoupledIBPMSolver::destroy | ( | ) |
Manually destroy data.
Definition at line 36 of file decoupledibpm.cpp.
bool NavierStokesSolver::finished | ( | ) |
Evaluate if the simulation is finished.
Definition at line 73 of file navierstokes.cpp.
PetscErrorCode DecoupledIBPMSolver::init | ( | const MPI_Comm & | world, |
const YAML::Node & | node | ||
) |
Initialize the decoupled IBPM solver.
world | [in] MPI communicator |
node | [in] YAML configuration settings |
Definition at line 57 of file decoupledibpm.cpp.
PetscErrorCode NavierStokesSolver::ioInitialData | ( | ) |
Read or write initial data.
Definition at line 64 of file navierstokes.cpp.
|
protectedvirtualinherited |
Monitor the solution at probes.
Definition at line 840 of file navierstokes.cpp.
|
protectedvirtual |
Read data required to restart a simulation from a HDF5 file.
filePath | [in] Path of the file to read from |
Reimplemented from NavierStokesSolver.
Definition at line 353 of file decoupledibpm.cpp.
|
protectedvirtualinherited |
Read the time value from a HDF5 file.
filePath | [in] Path of the file to read from |
t | [out] Time |
Definition at line 818 of file navierstokes.cpp.
|
protectedvirtualinherited |
Set Poisson nullspace or pin pressure at a reference point.
Reimplemented in IBPMSolver.
Definition at line 395 of file navierstokes.cpp.
|
protectedvirtual |
Solve the system for the boundary forces.
Definition at line 271 of file decoupledibpm.cpp.
|
protectedvirtualinherited |
Solve the Poisson system.
Definition at line 566 of file navierstokes.cpp.
|
protectedvirtualinherited |
Solve the velocity system.
Definition at line 524 of file navierstokes.cpp.
|
protectedvirtual |
Update the Lagrangian forces.
Definition at line 302 of file decoupledibpm.cpp.
|
protectedvirtualinherited |
Definition at line 601 of file navierstokes.cpp.
PetscErrorCode DecoupledIBPMSolver::write | ( | ) |
Write solution and solver info to files.
Definition at line 134 of file decoupledibpm.cpp.
|
protectedvirtual |
Write the forces acting on the bodies into an ASCII file.
Definition at line 420 of file decoupledibpm.cpp.
|
protectedvirtual |
Write numbers of iterations and residuals of solvers to file.
Reimplemented from NavierStokesSolver.
Definition at line 383 of file decoupledibpm.cpp.
|
protectedvirtual |
Write data required to restart a simulation into a HDF5 file.
filePath | [in] Path of the file to write in |
Reimplemented from NavierStokesSolver.
Definition at line 319 of file decoupledibpm.cpp.
|
protectedvirtualinherited |
Write the solution fields into a HDF5 file.
filePath | [in] Path of the file to write in |
Reimplemented in IBPMSolver.
Definition at line 618 of file navierstokes.cpp.
|
protectedvirtualinherited |
Write the time value into a HDF5 file.
t | [in] Time |
filePath | [in] Path of the file to write in |
Definition at line 797 of file navierstokes.cpp.
|
protectedinherited |
Implicit operator for the velocity solver.
Definition at line 155 of file navierstokes.h.
|
protectedinherited |
Information about the domain boundaries.
Definition at line 92 of file navierstokes.h.
|
protectedinherited |
Inhomogeneous boundary terms for the velocity system.
Definition at line 167 of file navierstokes.h.
|
protectedinherited |
Projection operator.
Definition at line 158 of file navierstokes.h.
|
protected |
Projection operator for the forces.
Definition at line 75 of file decoupledibpm.h.
|
protected |
Pack of immersed bodies.
Definition at line 60 of file decoupledibpm.h.
|
protectedinherited |
MPI communicator.
Definition at line 77 of file navierstokes.h.
|
protectedinherited |
Rank of the process in the MPI communicator.
Definition at line 83 of file navierstokes.h.
|
protectedinherited |
Size of the MPI communicator.
Definition at line 80 of file navierstokes.h.
|
protectedinherited |
YAML configuration settings.
Definition at line 86 of file navierstokes.h.
|
protectedinherited |
Explicit convective terms.
Definition at line 176 of file navierstokes.h.
|
protectedinherited |
Time scheme for the convective terms.
Definition at line 98 of file navierstokes.h.
|
protectedinherited |
Divergence operator.
Definition at line 146 of file navierstokes.h.
|
protectedinherited |
Poisson operator.
Definition at line 161 of file navierstokes.h.
|
protectedinherited |
Divergence correction for boundary conditions.
Definition at line 149 of file navierstokes.h.
|
protected |
Force-increment vector.
Definition at line 81 of file decoupledibpm.h.
|
protectedinherited |
Explicit diffusion terms.
Definition at line 179 of file navierstokes.h.
|
protectedinherited |
Time scheme for the diffusion terms.
Definition at line 101 of file navierstokes.h.
|
protectedinherited |
Pressure-correction vector.
Definition at line 164 of file navierstokes.h.
|
protectedinherited |
Time-step size.
Definition at line 113 of file navierstokes.h.
|
protected |
Regularization operator.
Definition at line 69 of file decoupledibpm.h.
|
protected |
Left-hand side operator of the system for the forces.
Definition at line 72 of file decoupledibpm.h.
|
protected |
Vector to hold the forces at time step n.
Definition at line 78 of file decoupledibpm.h.
|
protected |
ASCII PetscViewer object to output the forces.
Definition at line 96 of file decoupledibpm.h.
|
protected |
Linear solver for the Lagrangian forces.
Definition at line 63 of file decoupledibpm.h.
|
protectedinherited |
Gradient operator.
Definition at line 143 of file navierstokes.h.
|
protected |
Spreading operator.
Definition at line 66 of file decoupledibpm.h.
|
protectedinherited |
True if we pin the pressure at a reference point.
Definition at line 182 of file navierstokes.h.
|
protectedinherited |
Time-step index.
Definition at line 116 of file navierstokes.h.
|
protectedinherited |
Laplacian operator.
Definition at line 137 of file navierstokes.h.
|
protectedinherited |
Laplacian correction operator for boundary conditions.
Definition at line 140 of file navierstokes.h.
|
protectedinherited |
Structured Cartesian mesh object.
Definition at line 89 of file navierstokes.h.
|
protectedinherited |
Convective operator (matrix-free).
Definition at line 152 of file navierstokes.h.
|
protectedinherited |
Frequency at which data to restart are written to files.
Definition at line 131 of file navierstokes.h.
|
protectedinherited |
Frequency at which the solution fields are written to files.
Definition at line 128 of file navierstokes.h.
|
protectedinherited |
Starting time-step index.
Definition at line 122 of file navierstokes.h.
|
protectedinherited |
Number of time steps to compute.
Definition at line 125 of file navierstokes.h.
|
protectedinherited |
Viscous diffusion coefficient.
Definition at line 134 of file navierstokes.h.
|
protectedinherited |
Probes to monitor the solution.
Definition at line 110 of file navierstokes.h.
|
protectedinherited |
Poisson linear solver.
Definition at line 107 of file navierstokes.h.
|
protectedinherited |
Right-hand side vector of the velocity system.
Definition at line 170 of file navierstokes.h.
|
protectedinherited |
Right-hand side vector of the Poisson system.
Definition at line 173 of file navierstokes.h.
|
protected |
Right-hand side of the forces system.
Definition at line 84 of file decoupledibpm.h.
|
protectedinherited |
Data object holding the velocity and pressure fields.
Definition at line 95 of file navierstokes.h.
|
protectedinherited |
ASCII PetscViewer object to output solvers info.
Definition at line 209 of file navierstokes.h.
|
protectedinherited |
Log stage for the initialization phase.
Definition at line 185 of file navierstokes.h.
|
protected |
Log stage for integrating the Lagrangian forces.
Definition at line 93 of file decoupledibpm.h.
|
protectedinherited |
Log stage for monitoring user-defined regions of the domain.
Definition at line 206 of file navierstokes.h.
|
protected |
Log stage for assembling the RHS of the forces system.
Definition at line 87 of file decoupledibpm.h.
|
protectedinherited |
Log stage for assembling the RHS of the Poisson system.
Definition at line 194 of file navierstokes.h.
|
protectedinherited |
Log stage for assembling the RHS of the velocity system.
Definition at line 188 of file navierstokes.h.
|
protected |
Log stage for solving the forces system.
Definition at line 90 of file decoupledibpm.h.
|
protectedinherited |
Log stage for solving the Poisson system.
Definition at line 197 of file navierstokes.h.
|
protectedinherited |
Log stage for solving the velocity system.
Definition at line 191 of file navierstokes.h.
|
protectedinherited |
Log stage for updating field variables.
Definition at line 200 of file navierstokes.h.
|
protectedinherited |
Log stage when write the solution fields.
Definition at line 203 of file navierstokes.h.
|
protectedinherited |
Time value.
Definition at line 119 of file navierstokes.h.
|
protectedinherited |
Velocity linear solver.
Definition at line 104 of file navierstokes.h.