⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 boundarypostprocessors3d.h

📁 open lattice boltzmann project www.openlb.org
💻 H
字号:
/*  This file is part of the OpenLB library * *  Copyright (C) 2006, 2007 Jonas Latt *  Address: Rue General Dufour 24,  1211 Geneva 4, Switzerland  *  E-mail: jonas.latt@gmail.com * *  Generic collision, which modifies the particle distribution *  functions, implemented by Orestis Malaspinas, 2007 * *  This program is free software; you can redistribute it and/or *  modify it under the terms of the GNU General Public License *  as published by the Free Software Foundation; either version 2 *  of the License, or (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public  *  License along with this program; if not, write to the Free  *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *  Boston, MA  02110-1301, USA.*/#ifndef BOUNDARY_POST_PROCESSORS_3D_H#define BOUNDARY_POST_PROCESSORS_3D_H#include "postProcessing.h"#include "momentaOnBoundaries.h"#include "blockLattice3D.h"namespace olb {/*** This class computes the skordos BC* on a plane wall in 3D but with a limited number of terms added to the* equilibrium distributions (i.e. only the Q_i : Pi term)*/template<typename T, template<typename U> class Lattice, int direction, int orientation>class PlaneFdBoundaryProcessor3D : public LocalPostProcessor3D<T,Lattice>{public:    PlaneFdBoundaryProcessor3D (int x0_, int x1_, int y0_, int y1_, int z0_, int z1_);    virtual int extent() const { return 1; }    virtual int extent(int whichDirection) const { return 1; }    virtual void process(BlockLattice3D<T,Lattice>& blockLattice);    virtual void processSubDomain(BlockLattice3D<T,Lattice>& blockLattice,                                  int x0_, int x1_, int y0_, int y1_, int z0_, int z1_ );private:    template<int deriveDirection>    void interpolateGradients (            BlockLattice3D<T,Lattice> const& blockLattice,            T velDeriv[Lattice<T>::d], int iX, int iY, int iZ ) const;private:    int x0, x1, y0, y1, z0, z1;};template<typename T, template<typename U> class Lattice, int direction, int orientation>class PlaneFdBoundaryProcessorGenerator3D : public PostProcessorGenerator3D<T,Lattice>{public:    PlaneFdBoundaryProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_);    virtual PostProcessor3D<T,Lattice>* generate() const;    virtual PostProcessorGenerator3D<T,Lattice>*  clone() const;};/*** This class computes the skordos BC* on a convex edge wall in 3D but with a limited number of terms added to the* equilibrium distributions (i.e. only the Q_i : Pi term)*/template<typename T, template<typename U> class Lattice,         int plane, int normal1, int normal2>class OuterVelocityEdgeProcessor3D : public LocalPostProcessor3D<T,Lattice> {public:    enum { direction1 = (plane+1)%3, direction2 = (plane+2)%3 };public:    OuterVelocityEdgeProcessor3D (        int x0_, int x1_, int y0_, int y1_, int z0_, int z1_ );    virtual int extent() const { return 2; }    virtual int extent(int whichDirection) const { return 2; }    virtual void process(BlockLattice3D<T,Lattice>& blockLattice);    virtual void processSubDomain(BlockLattice3D<T,Lattice>& blockLattice,                                  int x0_, int x1_, int y0_, int y1_,                                  int z0_, int z1_ );private:    T getNeighborRho(int x, int y, int z, int step1, int step2,                     BlockLattice3D<T,Lattice> const& blockLattice);    template<int deriveDirection, int orientation>    void interpolateGradients (            BlockLattice3D<T,Lattice> const& blockLattice,            T velDeriv[Lattice<T>::d], int iX, int iY, int iZ ) const;private:    int x0, x1, y0, y1, z0, z1;};template<typename T, template<typename U> class Lattice,         int plane, int normal1, int normal2>class OuterVelocityEdgeProcessorGenerator3D    : public PostProcessorGenerator3D<T,Lattice>{public:    OuterVelocityEdgeProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_,                                           int z0_, int z1_);    virtual PostProcessor3D<T,Lattice>* generate() const;    virtual PostProcessorGenerator3D<T,Lattice>*  clone() const;};template<typename T, template<typename U> class Lattice,         int xNormal, int yNormal, int zNormal>class OuterVelocityCornerProcessor3D : public LocalPostProcessor3D<T,Lattice> {public:    OuterVelocityCornerProcessor3D(int x_, int y_, int z_);    virtual int extent() const { return 2; }    virtual int extent(int whichDirection) const { return 2; }    virtual void process(BlockLattice3D<T,Lattice>& blockLattice);    virtual void processSubDomain(BlockLattice3D<T,Lattice>& blockLattice,                                  int x0_, int x1_, int y0_, int y1_,                                  int z0_, int z1_ );private:    int x,y,z;};template<typename T, template<typename U> class Lattice,         int xNormal, int yNormal, int zNormal>class OuterVelocityCornerProcessorGenerator3D    : public PostProcessorGenerator3D<T,Lattice>{public:    OuterVelocityCornerProcessorGenerator3D(int x_, int y_, int z_);    virtual PostProcessor3D<T,Lattice>* generate() const;    virtual PostProcessorGenerator3D<T,Lattice>*  clone() const;};}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -