46#include <blitz/array.h>
90 real hx2, hz2, hz2hx2;
91 real hx2hy2, hy2hz2, hx2hy2hz2;
104 boundary *vLft, *vRgt, *vFrn, *vBak, *vTop, *vBot;
105 boundary *wLft, *wRgt, *wFrn, *wBak, *wTop, *wBot;
196 real visc_time, nlin_time, intr_time, impl_time, prhs_time, pois_time;
Class declaration of boundary.
Contains all the global variables related to the imposing of boundary conditions, and functions to im...
Definition: boundary.h:51
Contains all the global variables related to the imposing of forcing, and associated functions.
Definition: force.h:52
Contains all the global variables related to the grid, its slices, limits, and grid derivatives used ...
Definition: grid.h:53
The derived class from the hydro base class to solve the incompressible NSE in 2D.
Definition: hydro.h:154
hydro_d2(const grid &mesh, const parser &solParam, parallel &mpiParam)
Constructor of the hydro_d2 class derived from the base hydro class.
Definition: hydro_d2.cc:60
void solvePDE()
The core publicly accessible function of the hydro class to solve the Navier-Stokes equations.
Definition: hydro_d2.cc:117
real testPeriodic()
Function to test whether periodic BC is being implemented properly.
Definition: hydro_d2.cc:386
The derived class from the hydro base class to solve the incompressible NSE in 3D.
Definition: hydro.h:183
hydro_d3(const grid &mesh, const parser &solParam, parallel &mpiParam)
Constructor of the hydro_d3 class derived from the base hydro class.
Definition: hydro_d3.cc:63
void solvePDE()
The core publicly accessible function of the hydro class to solve the Navier-Stokes equations.
Definition: hydro_d3.cc:122
real testPeriodic()
Function to test whether periodic BC is being implemented properly.
Definition: hydro_d3.cc:536
The base class hydro to solve the incompressible Navier-Stokes equations.
Definition: hydro.h:62
probes * dataProbe
Instance of the probe class to collect data from probes in the domain.
Definition: hydro.h:99
plainvf nseRHS
Plain vector field into which the RHS of the Navier-Stokes equation is written and stored.
Definition: hydro.h:117
void imposeWBCs()
Function to impose the boundary conditions for the Z-component of velocity.
Definition: hydro.cc:446
force * vForcing
Instance of force class to handle velocity field forcing.
Definition: hydro.h:71
plainsf Pp
Plain scalar field into which the pressure correction is calculated and written by the Poisson solver...
Definition: hydro.h:112
boundary * uLft
Instances of the boundary class to impose boundary conditions on all the 6 walls for the 3 components...
Definition: hydro.h:103
virtual void timeAdvance()
The subroutine to solve the NS equations using the implicit Crank-Nicholson method.
Definition: hydro.cc:100
parallel & mpiData
Instance of the parallel class that holds the MPI-related data like rank, xRank, etc.
Definition: hydro.h:109
hydro(const grid &mesh, const parser &solParam, parallel &mpiParam)
Constructor of the base hydro class.
Definition: hydro.cc:60
void initVBC()
Function to initialize the boundary conditions for velocity.
Definition: hydro.cc:287
plainsf mgRHS
Plain scalar field into which the RHS for pressure Poisson equation is written and passed to the Pois...
Definition: hydro.h:114
virtual void solvePDE()
The core publicly accessible function of the hydro class to solve the Navier-Stokes equations.
Definition: hydro.cc:88
sfield P
The scalar field that stores the pressure field.
Definition: hydro.h:68
void imposeVBCs()
Function to impose the boundary conditions for the Y-component of velocity.
Definition: hydro.cc:416
virtual void solveVx()
Function to solve the implicit equation for x-velocity.
Definition: hydro.cc:120
virtual void solveVz()
Function to solve the implicit equation for z-velocity.
Definition: hydro.cc:160
int maxIterations
Maximum number of iterations for the iterative solvers hydro::solveVx, hydro::solveVy and hydro::solv...
Definition: hydro.h:85
vfield V
The vector field that stores the velocity field.
Definition: hydro.h:65
void checkPeriodic()
Function to enable/disable periodic data transfer as per the problem.
Definition: hydro.cc:174
plainvf guessedVelocity
Plain vector field which serves as a temporary array during iterative solution procedure for velocity...
Definition: hydro.h:123
virtual real testPeriodic()
Function to test whether periodic BC is being implemented properly.
Definition: hydro.cc:472
virtual void solveVy()
Function to solve the implicit equation for y-velocity.
Definition: hydro.cc:140
plainvf pressureGradient
Plain vector field which stores the pressure gradient term.
Definition: hydro.h:121
int timeStepCount
Integer value for the number of time-steps elapsed - it is incremented by 1 in each time-step.
Definition: hydro.h:78
void initVForcing()
Function to initialize the forcing terms for velocity.
Definition: hydro.cc:253
void setCoefficients()
Function to set the coefficients used for solving the implicit equations of U, V and W.
Definition: hydro.cc:223
plainvf velocityLaplacian
Plain vector field into which the RHS of the implicit equation for velocities are calculated during i...
Definition: hydro.h:119
void imposeUBCs()
Function to impose the boundary conditions for the X-component of velocity.
Definition: hydro.cc:386
The derived class from poisson to perform multi-grid operations on a 2D grid.
Definition: poisson.h:156
The derived class from poisson to perform multi-grid operations on a 3D grid.
Definition: poisson.h:193
Class for all the global variables and functions related to parallelization.
Definition: parallel.h:51
Contains all the global variables set by the user through the yaml file.
Definition: parser.h:63
Plain scalar field class to store simple scalar fields with no differentiation or interpolation.
Definition: plainsf.h:51
Plain vector field class to store simple vector fields with no additional operators like differentiat...
Definition: plainvf.h:49
Handles the writing of data from probes placed in the domain.
Definition: probes.h:77
Scalar field class to store and operate on scalar fields.
Definition: sfield.h:54
Vector field class to store and operate on vector fields.
Definition: vfield.h:54
Class declaration of force.
Class declaration of grid.
Class declaration of parallel.
Class declaration of parser.
Class declaration of plainvf - plain vector field.
Class declaration of poisson.
Class declaration of probes.
Class declaration of reader.
Class declaration of sfield - scalar field.
Class declaration of tseries.
Class declaration of vfield - vector field.
Class declaration of writer.