|
lbm_reference
|
Lattice Boltzmann Method fluid solver. More...
#include <lbm/LBM.h>
Inheritance diagram for lbm::LBM< T >:
Collaboration diagram for lbm::LBM< T >:Public Member Functions | |
| Vec3< T > | getVelocity (T x, T y, T z) |
| Get tri-linearly interpolated velocity at given position. More... | |
| Vec3< T > | getVelocity (const Vec3< T > &v) |
| Get tri-linearly interpolated velocity at given position. More... | |
| LBM () | |
| Default constructor. More... | |
| LBM (const std::string configFileName) | |
| Constructor. More... | |
| LBM (ConfBlock &base) | |
| Constructor. More... | |
| void | run () |
| Run the solver. More... | |
| double | runStep () |
| Perform a single LBM step. More... | |
| void | setup (ConfBlock &base) |
| Setup the solver by processing configuration file. More... | |
| virtual | ~LBM () |
| Destructor. More... | |
Protected Member Functions | |
| std::string | calcMLUP (T time, int cells) |
| void | collideStream (int x, int y, int z) |
| Perform a collide-stream step without turbulence correction. More... | |
| void | collideStreamSmagorinsky (int x, int y, int z) |
| Perform a collide-stream step with turbulence correction. More... | |
| T | getTime (timeval &start, timeval &end) |
| Get the time difference between two measurements. More... | |
| void | moveSphere () |
| void | setupBoundary (ConfBlock &block, int x, int y, int z) |
| Process a boundary block. More... | |
| void | treatCurved () |
| Treat the curved boundary cells. More... | |
| void | treatInflow () |
| Treat the inflow boundary cells. More... | |
| void | treatNoslip () |
| Treat the no-slip boundary cells. More... | |
| void | treatOutflow () |
| Treat the outflow boundary cells. More... | |
| void | treatPressure () |
| Treat the outflow boundary cells with fixed athmospheric pressure. More... | |
| void | treatStaircase () |
| void | treatVelocity () |
| Treat the boundary cells with fixed velocity. More... | |
| void | writePerformanceSummary () |
| void | writeVtkFile () |
| Write out the VTK file for a given timestep. More... | |
| template<> | |
| void | writeVtkFile () |
| template<> | |
| void | writeVtkFile () |
| template<> | |
| void | writeVtkFile () |
| template<> | |
| void | writeVtkFile () |
Protected Attributes | |
| T | cSmagoSqr_ |
| Squared Smagorinsky turbulence constant. More... | |
| int | curStep_ |
| Current time step. More... | |
| std::vector< Vec3< int > > | curvedCells_ |
| List with coordinates of all curved boundary cells. More... | |
| std::vector< std::vector< T > > | curvedDeltas_ |
| List with fluid fractions for all lattice links of curved boundary cells. More... | |
| Grid< Flag, 1 > | flag_ |
| Flag field. More... | |
| Grid< T, Dim > * | grid0_ |
| Distribution function field (switched with grid1_ after each time step) More... | |
| Grid< T, Dim > * | grid1_ |
| Distribution function field (switched with grid0_ after each time step) More... | |
| std::vector< Vec3< int > > | inflowCells_ |
| List with coordinates of all inflow cells. More... | |
| std::vector< Vec3< T > > | inflowVels_ |
| List with velocities for all inflow cells. More... | |
| int | maxSteps_ |
| Number of collide-stream steps to perform. More... | |
| std::vector< Vec3< int > > | noslipCells_ |
| List with coordinates of all noslip cells. More... | |
| T | nu_ |
| Lattice viscosity. More... | |
| T | omega_ |
| Inverse lattice velocity. More... | |
| std::vector< Vec3< int > > | outflowCells_ |
| List with coordinates of all outflow cells. More... | |
| std::vector< int > | outflowDFs_ |
| List with outflow directions for all outflow cells. More... | |
| std::vector< Vec3< int > > | pressureCells_ |
| List with coordinates of all pressure cells. More... | |
| std::vector< int > | pressureDFs_ |
| List with outflow directions for all pressure cells. More... | |
| PerformanceData< T > | prof_ |
| Grid< T, 1 > | rho_ |
| Density field. More... | |
| std::vector< Sphere< T > > | sphereObstacles_ |
| Vector holding all sphere obstacles. More... | |
| std::vector< Vec3< int > > | staircaseCells_ |
| Grid< T, 3 > | u_ |
| Velocity field. More... | |
| std::vector< Vec3< int > > | velocityCells_ |
| List with coordinates of all velocity cells. More... | |
| std::vector< Vec3< T > > | velocityVels_ |
| List with velocities for all velocity cells. More... | |
| std::string | vtkFileName_ |
| Path and base name of VTK files to write out. More... | |
| int | vtkStep_ |
| VTK files will be written out at multiples of this step size. More... | |
Lattice Boltzmann Method fluid solver.
Uses the BGK collision model and Smagorinsky turbulence correction. The coordinate system used is left-handed, i.e. screen coordinates
The following boundary conditions are implemented:
The constructor requires a configuration file in a ConfParser compatible format to be given, which must specify the following hierarchy of blocks:
Example configuration file:
Constructor.
Initializes the geometry of the domain and the boundaries according to the configuration file given.
| [in] | configFileName | Path to configuration file |
Definition at line 32 of file LBM_def.h.
References lbm::LBM< T >::setup().
Constructor.
Initializes the geometry of the domain and the boundaries according to the configuration block given.
| [in] | base | Root configuration block |
Definition at line 46 of file LBM_def.h.
References lbm::LBM< T >::setup().
Get tri-linearly interpolated velocity at given position.
| [in] | x | x-coordinate of position to get velocity |
| [in] | y | y-coordinate of position to get velocity |
| [in] | z | z-coordinate of position to get velocity |
Definition at line 226 of file LBM_def.h.
References lbm::T.
Referenced by particles::ParticleSystem::updateParticles().
Perform a single LBM step.
The output will be written to a VTK file if appropriate (legacy format)
Definition at line 91 of file LBM_def.h.
References lbm::T.
Referenced by particles::ParticleSystem::run().
Setup the solver by processing configuration file.
Initializes the geometry of the domain and the boundaries according to the configuration given.
| [in] | base | Root block of parsed configuration file |
Definition at line 265 of file LBM_def.h.
References lbm::Dim, lbm::ex, lbm::exn, lbm::ey, lbm::eyn, lbm::ez, lbm::ezn, lbm::FLUID, Grid< T, Cellsize >::init(), lbm::le, lbm::NOSLIP, lbm::T, lbm::UNDEFINED, and lbm::w.
Referenced by lbm::LBM< T >::LBM(), and particles::ParticleSystem::ParticleSystem().
|
inlineprotected |
Process a boundary block.
| [in] | block | Boundary block to process (either bottom, top, back, front, right, left) |
| [in] | x | Either fixed value for x-coordinate or -1 to read range from configuration |
| [in] | y | Either fixed value for y-coordinate or -1 to read range from configuration |
| [in] | z | Either fixed value for z-coordinate or -1 to read range from configuration |
Definition at line 712 of file LBM_def.h.
References lbm::Dim, lbm::ex, lbm::ey, lbm::ez, lbm::INFLOW, lbm::NOSLIP, lbm::OUTFLOW, lbm::PRESSURE, lbm::T, lbm::UNDEFINED, and lbm::VELOCITY.
Write out the VTK file for a given timestep.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.3.1