|
| LBCouetteSolver (const double channelheight, tarch::la::Vector< 3, double > wallVelocity, const double kinVisc, const double dx, const double dt, const int plotEveryTimestep, const std::string filestem, const tarch::la::Vector< 3, unsigned int > processes, const unsigned int numThreads=1, const Scenario *scen=nullptr) |
| a simple constructor
|
|
virtual | ~LBCouetteSolver () |
| a simple destructor
|
|
void | advance (double dt) override |
| advances one time step dt in time and triggers vtk plot if required
|
|
void | setMDBoundaryValues (coupling::datastructures::FlexibleCellContainer< 3 > &md2macroBuffer) override |
| applies the values received from the MD-solver within the conntinuum solver
|
|
tarch::la::Vector< 3, double > | getVelocity (tarch::la::Vector< 3, double > pos) const override |
| returns velocity at a certain position
|
|
double | getDensity (tarch::la::Vector< 3, double > pos) const override |
| returns density at a certain position
|
|
virtual void | setWallVelocity (const tarch::la::Vector< 3, double > wallVelocity) override |
| changes the velocity at the moving wall (z=0)
|
|
std::unique_ptr< State > | getState () override |
|
void | setState (const std::unique_ptr< State > &input, int cycle) override |
|
std::unique_ptr< State > | operator() (const std::unique_ptr< State > &input, int cycle) override |
|
Mode | getMode () const override |
|
std::unique_ptr< PintableMacroSolver > | getSupervisor (int num_cycles, double visc_multiplier) const override |
|
void | print (std::ostream &os) const override |
|
double | get_avg_vel (const std::unique_ptr< State > &state) const override |
|
| 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.
|
|
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 | ~AbstractCouetteSolver () |
| a dummy destructor
|
|
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
|
|
|
void | computeDensityAndVelocityEverywhere () |
|
void | collidestream () |
| collide-stream algorithm for the Lattice-Boltzmann method
|
|
void | stream (int index) |
| the stream part of the LB algorithm (from pdf1 to pdf2)
|
|
void | collide (int index, int x, int y, int z) |
|
void | boundary (double *const pdf, int index, int x, int y, int z, int q, const Flag &flag, int nbIndex) |
| takes care of the correct boundary treatment for the LB method
|
|
void | communicatePart (double *pdf, double *sendBuffer, double *recvBuffer, NbFlag nbFlagTo, NbFlag nbFlagFrom, tarch::la::Vector< 3, int > startSend, tarch::la::Vector< 3, int > endSend, tarch::la::Vector< 3, int > startRecv, tarch::la::Vector< 3, int > endRecv) |
|
void | communicate () |
| comunicates the boundary field data between the different processes
|
|
|
enum class | Mode { supervising
, coupling
} |
|
using | State = PintableMacroSolverState |
|
static int | getAvgDomainSize (double channelheight, double dx, tarch::la::Vector< 3, unsigned int > processes, int d) |
|
enum | Flag {
FLUID = 0
, NO_SLIP = 1
, MOVING_WALL = 2
, PERIODIC = 3
,
MD_BOUNDARY = 4
, PARALLEL_BOUNDARY = 5
} |
| for every cell exists a flag entry, upon this is defined how the cell is handled More...
|
|
enum | NbFlag {
LEFT = 0
, RIGHT = 1
, BACK = 2
, FRONT = 3
,
BOTTOM = 4
, TOP = 5
} |
| The flags are used on parallel boundaries to define in which direction the boundary goes. More...
|
|
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 |
|
implements a three-dimensional Lattice-Boltzmann Couette flow solver.
In our scenario, the lower wall is accelerated and the upper wall stands still. The lower wall is located at zero height.
- Author
- Philipp Neumann