OpenLB 1.7
Loading...
Searching...
No Matches
adsorptionCoupling3D.h
Go to the documentation of this file.
1/* Lattice Boltzmann sample, written in C++, using the OpenLB
2 * library
3 *
4 * Copyright (C) 2022 Florian Raichle
5 * E-mail contact: info@openlb.net
6 * The most recent release of OpenLB can be downloaded at
7 * <http://www.openlb.net/>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public
20 * License along with this program; if not, write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23 */
24
25#ifndef ADSORPTION_COUPLING_POST_PROCESSOR_3D_H
26#define ADSORPTION_COUPLING_POST_PROCESSOR_3D_H
27
28#include "core/blockStructure.h"
29#include "core/postProcessing.h"
30#include "core/util.h"
32#include "utilities/omath.h"
35
36#include "adsorptionReaction.h"
37
38namespace olb {
39
46 template<typename T, typename NSDESCRIPTOR, typename ADEDESCRIPTOR>
48 public:
59 int x0_, int x1_, int y0_, int y1_, int z0_, int z1_,
60 std::vector<BlockStructureD<3> *> partners_,
61 AdsorptionReaction<T, ADEDESCRIPTOR> *adsorptionReaction_);
62
63 int extent() const override {
64 return 0;
65 }
66
67 int extent(int whichDirection) const override {
68 return 0;
69 }
70
71 void process(BlockLattice<T, NSDESCRIPTOR> &blockLattice) override;
72
73 void processSubDomain(BlockLattice<T, NSDESCRIPTOR> &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_);
74
75 private:
76 int x0, x1, y0, y1, z0, z1;
77 BlockLattice<T, ADEDESCRIPTOR> *particleLattice;
78 BlockLattice<T, ADEDESCRIPTOR> *soluteLattice;
79 BlockLattice<T, ADEDESCRIPTOR> *loadingLattice;
80 AdsorptionReaction<T, ADEDESCRIPTOR> *adsorptionReaction;
81 };
82
92 template<typename T, typename NSDESCRIPTOR, typename ADEDESCRIPTOR>
94 : public LatticeCouplingGenerator3D<T, NSDESCRIPTOR> {
95 public:
101 int x0=0, int x1=0, int y0=0, int y1=0, int z0=0, int z1=0);
102
104
106
107 private:
109 };
110
116template<typename T, typename NSDESCRIPTOR, typename CADDESCRIPTOR>
118private:
119 bool tick = true;
120
121public:
123 int x0_, int x1_, int y0_, int y1_, int z0_, int z1_,
124 std::vector<BlockStructureD<3> *> partners_);
125
126 int extent() const override {
127 return 0;
128 }
129
130 int extent(int whichDirection) const override {
131 return 0;
132 }
133
134 void process(BlockLattice<T, NSDESCRIPTOR> &blockLattice) override;
135
136 void processSubDomain(BlockLattice<T, NSDESCRIPTOR> &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_);
137
138private:
139 int x0, x1, y0, y1, z0, z1;
141};
142
143template<typename T, typename NSDESCRIPTOR, typename CADDESCRIPTOR>
145 : public LatticeCouplingGenerator3D<T, NSDESCRIPTOR> {
146public:
147 PassiveSoluteCouplingPostProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_);
148
149 PostProcessor3D<T, NSDESCRIPTOR> *generate(std::vector<BlockStructureD<3> *> partners) const override;
150
152
153private:
154 T k;
155};
156
157
158template<typename T, typename NSDESCRIPTOR, typename ADEDESCRIPTOR>
160public:
162 int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int iC,
163 std::vector<BlockStructureD<3> *> partners_,
164 AdsorptionReaction<T, ADEDESCRIPTOR> *adsorptionReaction_,
165 std::vector<std::reference_wrapper<AdvectionDiffusionForce3D<T, NSDESCRIPTOR,ADEDESCRIPTOR> > > forces_);
166
167 int extent() const override {
168 return 0;
169 }
170
171 int extent(int whichDirection) const override {
172 return 0;
173 }
174 void process(BlockLattice<T, NSDESCRIPTOR> &blockLattice) override;
175 void processSubDomain(BlockLattice<T, NSDESCRIPTOR> &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_);
176
177protected:
178 std::vector<std::reference_wrapper<AdvectionDiffusionForce3D<T, NSDESCRIPTOR, ADEDESCRIPTOR> > > forces;
179
180private:
181 int x0, x1, y0, y1, z0, z1, iC;
182 BlockLattice<T, ADEDESCRIPTOR> *particleLattice;
183 BlockLattice<T, ADEDESCRIPTOR> *soluteLattice;
184 BlockLattice<T, ADEDESCRIPTOR> *loadingLattice;
185 AdsorptionReaction<T, ADEDESCRIPTOR> *adsorptionReaction;
186 };
187
188template<typename T, typename NSDESCRIPTOR, typename ADEDESCRIPTOR>
190 : public LatticeCouplingGenerator3D<T, NSDESCRIPTOR> {
191public:
193 int x0=0, int x1=0, int y0=0, int y1=0, int z0=0, int z1=0);
194
195 PostProcessor3D<T, NSDESCRIPTOR> *generate(std::vector<BlockStructureD<3> *> partners) const;
196
199
200private:
202
203protected:
204 std::vector<std::reference_wrapper<AdvectionDiffusionForce3D<T, NSDESCRIPTOR, ADEDESCRIPTOR> > > ADforces;
205 };
206}
207#endif //OLB_ADSORPTIONCOUPLING3D_H
Coupling post processor for adsorption on moving particles.
AdsorptionCouplingPostProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, std::vector< BlockStructureD< 3 > * > partners_, AdsorptionReaction< T, ADEDESCRIPTOR > *adsorptionReaction_)
Coupling post processor for adsorption on moving particles.
int extent() const override
Extent of application area (0 for purely local operations)
int extent(int whichDirection) const override
Extent of application area along a direction (0 or 1)
void process(BlockLattice< T, NSDESCRIPTOR > &blockLattice) override
void processSubDomain(BlockLattice< T, NSDESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
Generates post processor AdsorptionCouplingPostProcessor3D.
LatticeCouplingGenerator3D< T, NSDESCRIPTOR > * clone() const override
AdsorptionCouplingPostProcessorGenerator3D(AdsorptionReaction< T, ADEDESCRIPTOR > *reaction, int x0=0, int x1=0, int y0=0, int y1=0, int z0=0, int z1=0)
Generate adsorption reaction post processor.
PostProcessor3D< T, NSDESCRIPTOR > * generate(std::vector< BlockStructureD< 3 > * > partners) const
void process(BlockLattice< T, NSDESCRIPTOR > &blockLattice) override
std::vector< std::reference_wrapper< AdvectionDiffusionForce3D< T, NSDESCRIPTOR, ADEDESCRIPTOR > > > forces
AdsorptionFullCouplingPostProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, int iC, std::vector< BlockStructureD< 3 > * > partners_, AdsorptionReaction< T, ADEDESCRIPTOR > *adsorptionReaction_, std::vector< std::reference_wrapper< AdvectionDiffusionForce3D< T, NSDESCRIPTOR, ADEDESCRIPTOR > > > forces_)
All in one adsorption coupling.
void processSubDomain(BlockLattice< T, NSDESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
int extent() const override
Extent of application area (0 for purely local operations)
int extent(int whichDirection) const override
Extent of application area along a direction (0 or 1)
AdsorptionFullCouplingPostProcessorGenerator3D(AdsorptionReaction< T, ADEDESCRIPTOR > *reaction, int x0=0, int x1=0, int y0=0, int y1=0, int z0=0, int z1=0)
std::vector< std::reference_wrapper< AdvectionDiffusionForce3D< T, NSDESCRIPTOR, ADEDESCRIPTOR > > > ADforces
LatticeCouplingGenerator3D< T, NSDESCRIPTOR > * clone() const override
PostProcessor3D< T, NSDESCRIPTOR > * generate(std::vector< BlockStructureD< 3 > * > partners) const
void addForce(AdvectionDiffusionForce3D< T, NSDESCRIPTOR, ADEDESCRIPTOR > &force)
Describes adsorption reactions in conjunction with a Isotherm class.
Platform-abstracted block lattice for external access and inter-block interaction.
Base of a regular block.
Coupler for solute that is only coupled to the fluid velocity.
int extent() const override
Extent of application area (0 for purely local operations)
void process(BlockLattice< T, NSDESCRIPTOR > &blockLattice) override
PassiveSoluteCouplingPostProcessor3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, std::vector< BlockStructureD< 3 > * > partners_)
void processSubDomain(BlockLattice< T, NSDESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
int extent(int whichDirection) const override
Extent of application area along a direction (0 or 1)
PostProcessor3D< T, NSDESCRIPTOR > * generate(std::vector< BlockStructureD< 3 > * > partners) const override
LatticeCouplingGenerator3D< T, NSDESCRIPTOR > * clone() const override
PassiveSoluteCouplingPostProcessorGenerator3D(int x0_, int x1_, int y0_, int y1_, int z0_, int z1_)
Descriptor for all types of 2D and 3D lattices.
Top level namespace for all of OpenLB.
Interface for post-processing steps – header file.
Set of functions commonly used in LB computations – header file.