OpenLB 1.7
Loading...
Searching...
No Matches
porousAdvectionDiffusionDynamics.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2008 Orestis Malaspinas, Andrea Parmigiani
4 * E-mail contact: info@openlb.net
5 * The most recent release of OpenLB can be downloaded at
6 * <http://www.openlb.net/>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22*/
23
28#ifndef POROUS_ADVECTION_DIFFUSION_DYNAMICS_H
29#define POROUS_ADVECTION_DIFFUSION_DYNAMICS_H
30
31#include "dynamics/dynamics.h"
32#include "core/cell.h"
33
34namespace olb {
35
36
37// ===== the porous BGK advection diffusion dynamics =====//
39template<typename T, typename DESCRIPTOR, typename MOMENTA=momenta::AdvectionDiffusionBulkTuple>
40class PorousAdvectionDiffusionBGKdynamics : public legacy::BasicDynamics<T, DESCRIPTOR, MOMENTA> {
41public:
42 template<typename M>
44
46 PorousAdvectionDiffusionBGKdynamics( T omega, T tSolid );
49 T computeEquilibrium( int iPop, T rho, const T u[DESCRIPTOR::d] ) const override;
53 T getOmega() const;
55 void setOmega( T omega );
56private:
57 using MomentaF = typename MOMENTA::template type<DESCRIPTOR>;
58
59 T scaleTemp(const T rho, const T porosity) const; // scales temperature relative to porosity
60 T _omega;
61 T _tSolid; // temperature in lattice units of material with porosity 0;
62};
63
64} // namespace olb
65
66#endif
Definition of a LB cell – header file.
Highest-level interface to Cell data.
Definition cell.h:148
This approach contains a slight error in the diffusion term.
T computeEquilibrium(int iPop, T rho, const T u[DESCRIPTOR::d]) const override
Compute equilibrium distribution function.
T getOmega() const
Get local relaxation parameter of the dynamics.
PorousAdvectionDiffusionBGKdynamics(T omega, T tSolid)
Constructor.
void setOmega(T omega)
Set local relaxation parameter of the dynamics.
CellStatistic< T > collide(Cell< T, DESCRIPTOR > &cell) override
Collision step.
Conversion between physical and lattice units, as well as discretization.
Top level namespace for all of OpenLB.
Return value of any collision.
Definition interface.h:43