is a virtual base class for the interface for a numerical fluid solver for the Couette scenario
More...
|
| NumericalSolver (const double channelheight, const double dx, const double dt, const double kinVisc, const int plotEveryTimestep, const std::string filestem, const tarch::la::Vector< 3, unsigned int > processes, const Scenario *scen=nullptr) |
| a simple constructor
|
|
virtual | ~NumericalSolver () |
| a simple destructor
|
|
void | setMDBoundary (tarch::la::Vector< 3, double > mdDomainOffset, tarch::la::Vector< 3, double > mdDomainSize, unsigned int overlapStrip) |
| flags the domain boundary cells.
|
|
virtual void | setMDBoundaryValues (coupling::datastructures::FlexibleCellContainer< 3 > &md2macroBuffer)=0 |
| applies the values received from the MD-solver within the conntinuum solver
|
|
tarch::la::Vector< 3, unsigned int > | getNumberProcesses () const |
| returns the number of process, regards parallel runs
|
|
tarch::la::Vector< 3, unsigned int > | getAvgNumberLBCells () const |
| returns the average number of cells on each process
|
|
virtual double | getDensity (tarch::la::Vector< 3, double > pos) const =0 |
| returns the density for a given position
|
|
virtual void | setWallVelocity (const tarch::la::Vector< 3, double > wallVelocity)=0 |
| changes the velocity at the moving wall (z=0)
|
|
virtual | ~AbstractCouetteSolver () |
| a dummy destructor
|
|
virtual void | advance (double dt)=0 |
| advances the solver in time
|
|
virtual tarch::la::Vector< dim, double > | getVelocity (tarch::la::Vector< dim, double > pos) const=0 |
| returns the current velocity at the given position
|
|
virtual void | setWallVelocity (const tarch::la::Vector< dim, double > wallVelocity)=0 |
| changes the velocity at the moving for, refers to Couette scenario
|
|
|
int | get (int i) const |
| returns i and performs checks in debug mode
|
|
int | get (int x, int y, int z) const |
| returns linearized index and performs checks in debug mode
|
|
int | getParBuf (int x, int y, int lengthx, int lengthy) const |
| returns index in 2D parallel buffer with buffer dimensions lengthx+2,lengthy+2. Performs checks in debug mode
|
|
void | plot () const |
|
void | plot (std::string filename) const |
| create vtk plot if required
|
|
bool | skipRank () const |
| returns true, if this rank is not of relevance for the LB simulation
|
|
|
const double | _channelheight |
| the height and width of the channel in z and y direction
|
|
const double | _dx |
| mesh size, dx=dy=dz
|
|
const double | _dt |
| time step
|
|
const double | _kinVisc |
| kinematic viscosity of the fluid
|
|
tarch::la::Vector< 3, unsigned int > | _processes |
| domain decomposition on MPI rank basis; total number is given by multipling all entries
|
|
const int | _plotEveryTimestep |
| number of time steps between vtk plots
|
|
const std::string | _filestem |
| file stem for vtk plot
|
|
const int | _domainSizeX {getDomainSize(_channelheight, _dx, _processes, 0)} |
| domain size in x-direction
|
|
const int | _domainSizeY {getDomainSize(_channelheight, _dx, _processes, 1)} |
| domain size in y-direction
|
|
const int | _domainSizeZ {getDomainSize(_channelheight, _dx, _processes, 2)} |
| domain size in z-direction
|
|
const int | _avgDomainSizeX {getAvgDomainSize(_channelheight, _dx, _processes, 0)} |
| avg. domain size in MPI-parallel simulation in x-direction
|
|
const int | _avgDomainSizeY {getAvgDomainSize(_channelheight, _dx, _processes, 1)} |
| avg. domain size in MPI-parallel simulation in y-direction
|
|
const int | _avgDomainSizeZ {getAvgDomainSize(_channelheight, _dx, _processes, 2)} |
| avg. domain size in MPI-parallel simulation in z-direction
|
|
const tarch::la::Vector< 3, unsigned int > | _coords {getProcessCoordinates()} |
| coordinates of this process (=1,1,1, unless parallel run of the solver )
|
|
int | _counter {0} |
| time step counter
|
|
double * | _vel {NULL} |
| velocity field
|
|
double * | _density {NULL} |
| density field
|
|
Flag * | _flag {NULL} |
| flag field
|
|
double * | _sendBufferX {NULL} |
| buffer to send data from left/right to right/left neighbour
|
|
double * | _recvBufferX {NULL} |
| buffer to receive data from from left/right neighbour
|
|
double * | _sendBufferY {NULL} |
| buffer to send data from front/back to front/back neighbour
|
|
double * | _recvBufferY {NULL} |
| buffer to receive data from from front/back neighbour
|
|
double * | _sendBufferZ {NULL} |
| buffer to send data from top/buttom to top/buttom neighbour
|
|
double * | _recvBufferZ {NULL} |
| buffer to receive data from from top/buttom neighbour
|
|
const int | _xO {_domainSizeX + 2} |
| offset for y-direction (lexicographic grid ordering)
|
|
const int | _yO {(_domainSizeX + 2) * (_domainSizeY + 2)} |
| offset for z-direction
|
|
tarch::la::Vector< 6, int > | _parallelNeighbours {(-1)} |
| neighbour ranks
|
|
tarch::la::Vector< 3, int > | _offset {(-1)} |
| offset of the md domain
|
|
tarch::la::Vector< 3, int > | _globalNumberCouplingCells {(-1)} |
| the total number of coupling cells of the coupled simulation
|
|
const Scenario * | _scen |
|
|
tarch::la::Vector< 3, unsigned int > | getProcessCoordinates () const |
| determines the process coordinates
|
|
void | determineParallelNeighbours () |
| determines the neighbour relation between the processes
|
|
void | setParallelBoundaryFlags () |
| sets parallel boundary flags according to Couette scenario
|
|
int | getDomainSize (double channelheight, double dx, tarch::la::Vector< 3, unsigned int > processes, int d) const |
| determines the local domain size on this rank where channelheight is the domain length in direction d.
|
|
is a virtual base class for the interface for a numerical fluid solver for the Couette scenario
The setup is, a 3d solver. A channel flow for the Couette scenario, where the moving wall is located at the lower wall (z=0)
- Author
- Philipp Neumann & Helene Wittenberg