OpenLB 1.7
Loading...
Searching...
No Matches
freeEnergyPostProcessor2D.hh
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2018 Robin Trunk, Sam Avis
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
24#ifndef FREE_ENERGY_POST_PROCESSOR_2D_HH
25#define FREE_ENERGY_POST_PROCESSOR_2D_HH
26
28
29namespace olb {
30
32
33template<typename T, typename DESCRIPTOR>
35 int x0_, int x1_, int y0_, int y1_, T alpha_, T kappa1_, T kappa2_, T kappa3_,
36 std::vector<BlockStructureD<2>*> partners_)
37 : x0(x0_), x1(x1_), y0(y0_), y1(y1_), alpha(alpha_), kappa1(kappa1_),
38 kappa2(kappa2_), kappa3(kappa3_), partners(partners_)
39{
40 this->getName() = "FreeEnergyChemicalPotentialCoupling2D";
41}
42
43template<typename T, typename DESCRIPTOR>
45 T alpha_, T kappa1_, T kappa2_, T kappa3_, std::vector<BlockStructureD<2>*> partners_)
46 : x0(0), x1(0), y0(0), y1(0), alpha(alpha_), kappa1(kappa1_), kappa2(kappa2_),
47 kappa3(kappa3_), partners(partners_)
48{
49 this->getName() = "FreeEnergyChemicalPotentialCoupling2D";
50}
51
52template<typename T, typename DESCRIPTOR>
54 BlockLattice<T,DESCRIPTOR>& blockLattice, int x0_, int x1_, int y0_, int y1_ )
55{
56 // If partners.size() == 1: two fluid components
57 // If partners.size() == 2: three fluid components
58 BlockLattice<T,DESCRIPTOR> *partnerLattice1 = static_cast<BlockLattice<T,DESCRIPTOR> *>(partners[0]);
59 BlockLattice<T,DESCRIPTOR> *partnerLattice2 = 0;
60 if (partners.size() > 1) {
61 partnerLattice2 = static_cast<BlockLattice<T,DESCRIPTOR> *>(partners[1]);
62 }
63
64 int newX0, newX1, newY0, newY1;
65 if ( util::intersect ( x0, x1, y0, y1,
66 x0_, x1_, y0_, y1_,
67 newX0, newX1, newY0, newY1 ) ) {
68
69 auto& rhoField = blockLattice.template getField<RHO_CACHE>();
70
71 for (int iX=newX0-1; iX<=newX1+1; ++iX)
72 for (int iY=newY0-1; iY<=newY1+1; ++iY) {
73 rhoField[0][blockLattice.getCellId(iX, iY)] = blockLattice.get(iX,iY).computeRho();
74 //std::cout << "iX: " << iX << " - iY: " << iY << " - blockLattice.getCellID: " << blockLattice.getCellId(iX, iY) << std::endl;
75 //std::cout << "rhoField[0][" << blockLattice.getCellId(iX, iY) << "] = " << blockLattice.get(iX,iY).computeRho() << std::endl;
76 }
77
78 //std::cout << "---------------" << std::endl;
79
80 for (int iX=newX0-1; iX<=newX1+1; ++iX)
81 for (int iY=newY0-1; iY<=newY1+1; ++iY) {
82 rhoField[1][blockLattice.getCellId(iX, iY)] = partnerLattice1->get(iX,iY).computeRho();
83 //std::cout << "rhoField[1][" << blockLattice.getCellId(iX, iY) << "] = " << blockLattice.get(iX,iY).computeRho() << std::endl;
84 }
85 if (partners.size() > 1) {
86 for (int iX=newX0-1; iX<=newX1+1; ++iX)
87 for (int iY=newY0-1; iY<=newY1+1; ++iY) {
88 rhoField[2][blockLattice.getCellId(iX, iY)] = partnerLattice2->get(iX,iY).computeRho();
89 }
90 }
91
92 // calculate chemical potential
93 for (int iX=newX0; iX<=newX1; ++iX) {
94 for (int iY=newY0; iY<=newY1; ++iY) {
95 T densitySum = rhoField[0][blockLattice.getCellId(iX, iY)]
96 + rhoField[1][blockLattice.getCellId(iX, iY)];
97 T densityDifference = rhoField[0][blockLattice.getCellId(iX, iY)]
98 - rhoField[1][blockLattice.getCellId(iX, iY)];
99
100 if (partners.size() > 1) {
101 densitySum -= rhoField[2][blockLattice.getCellId(iX, iY)];
102 densityDifference -= rhoField[2][blockLattice.getCellId(iX, iY)];
103 }
104 T term1 = 0.125 * kappa1 * (densitySum)
105 * (densitySum-1.) * (densitySum-2.);
106 T term2 = 0.125 * kappa2 * (densityDifference)
107 * (densityDifference-1.) * (densityDifference-2.);
108 T term3 = 0.;
109 if (partners.size() > 1) {
110 T rho3 = rhoField[2][blockLattice.getCellId(iX, iY)];
111 term3 = kappa3 * rho3 * (rho3 - 1.) * (2.*rho3 - 1.);
112 }
113
114 T laplaceRho1 = 0.25 * (
115 rhoField[0][blockLattice.getCellId(iX-1, iY-1)]
116 + 2. * rhoField[0][blockLattice.getCellId(iX, iY-1)]
117 + rhoField[0][blockLattice.getCellId(iX+1, iY-1)]
118 + 2. * rhoField[0][blockLattice.getCellId(iX-1, iY)]
119 -12. * rhoField[0][blockLattice.getCellId(iX, iY)]
120 + 2. * rhoField[0][blockLattice.getCellId(iX+1, iY)]
121 + rhoField[0][blockLattice.getCellId(iX-1, iY+1)]
122 + 2. * rhoField[0][blockLattice.getCellId(iX, iY+1)]
123 + rhoField[0][blockLattice.getCellId(iX+1, iY+1)]
124 );
125 T laplaceRho2 = 0.25 * (
126 rhoField[1][blockLattice.getCellId(iX-1, iY-1)]
127 + 2. * rhoField[1][blockLattice.getCellId(iX, iY-1)]
128 + rhoField[1][blockLattice.getCellId(iX+1, iY-1)]
129 + 2. * rhoField[1][blockLattice.getCellId(iX-1, iY)]
130 -12. * rhoField[1][blockLattice.getCellId(iX, iY)]
131 + 2. * rhoField[1][blockLattice.getCellId(iX+1, iY)]
132 + rhoField[1][blockLattice.getCellId(iX-1, iY+1)]
133 + 2. * rhoField[1][blockLattice.getCellId(iX, iY+1)]
134 + rhoField[1][blockLattice.getCellId(iX+1, iY+1)]
135 );
136 T laplaceRho3 = 0.;
137 if (partners.size() > 1) {
138 laplaceRho3 = 0.25 * (
139 rhoField[2][blockLattice.getCellId(iX-1, iY-1)]
140 + 2. * rhoField[2][blockLattice.getCellId(iX, iY-1)]
141 + rhoField[2][blockLattice.getCellId(iX+1, iY-1)]
142 + 2. * rhoField[2][blockLattice.getCellId(iX-1, iY)]
143 -12. * rhoField[2][blockLattice.getCellId(iX, iY)]
144 + 2. * rhoField[2][blockLattice.getCellId(iX+1, iY)]
145 + rhoField[2][blockLattice.getCellId(iX-1, iY+1)]
146 + 2. * rhoField[2][blockLattice.getCellId(iX, iY+1)]
147 + rhoField[2][blockLattice.getCellId(iX+1, iY+1)]
148 );
149 }
150
151 // setting chemical potential to the respective lattices
152 blockLattice.get(iX, iY).template setField<descriptors::CHEM_POTENTIAL>(term1 + term2
153 + 0.25*alpha*alpha*( (kappa2 - kappa1) * laplaceRho2
154 +(kappa2 + kappa1) * (laplaceRho3 - laplaceRho1) ));
155 partnerLattice1->get(iX, iY).template setField<descriptors::CHEM_POTENTIAL>(term1 - term2
156 + 0.25*alpha*alpha*( (kappa2 - kappa1) * (laplaceRho1 - laplaceRho3)
157 -(kappa2 + kappa1) * laplaceRho2 ));
158 if (partners.size() > 1) {
159 partnerLattice2->get(iX, iY).template setField<descriptors::CHEM_POTENTIAL>(- term1 - term2 + term3
160 + 0.25*alpha*alpha*( (kappa2 + kappa1) * laplaceRho1
161 -(kappa2 - kappa1) * laplaceRho2
162 -(kappa2 + kappa1 + 4.*kappa3) * laplaceRho3 ));
163 }
164 }
165 }
166
167 }
168}
169
170template<typename T, typename DESCRIPTOR>
172 BlockLattice<T,DESCRIPTOR>& blockLattice)
173{
174 processSubDomain(blockLattice, x0, x1, y0, y1);
175}
176
177
179
180template<typename T, typename DESCRIPTOR>
182 int x0_, int x1_, int y0_, int y1_,
183 std::vector<BlockStructureD<2>*> partners_)
184 : x0(x0_), x1(x1_), y0(y0_), y1(y1_), partners(partners_)
185{
186 this->getName() = "FreeEnergyForceCoupling2D";
187}
188
189template<typename T, typename DESCRIPTOR>
191 std::vector<BlockStructureD<2>*> partners_)
192 : x0(0), x1(0), y0(0), y1(0), partners(partners_)
193{
194 this->getName() = "FreeEnergyForceCoupling2D";
195}
196
197template<typename T, typename DESCRIPTOR>
199 BlockLattice<T,DESCRIPTOR>& blockLattice, int x0_, int x1_, int y0_, int y1_ )
200{
201 // If partners.size() == 1: two fluid components
202 // If partners.size() == 2: three fluid components
203 BlockLattice<T,DESCRIPTOR> *partnerLattice1 = static_cast<BlockLattice<T,DESCRIPTOR> *>(partners[0]);
204 BlockLattice<T,DESCRIPTOR> *partnerLattice2 = nullptr;
205 if (partners.size() > 1) {
206 partnerLattice2 = static_cast<BlockLattice<T,DESCRIPTOR> *>(partners[1]);
207 }
208
209 int newX0, newX1, newY0, newY1;
210 if ( util::intersect(x0, x1, y0, y1,
211 x0_, x1_, y0_, y1_,
212 newX0, newX1, newY0, newY1) ) {
213
214 for (int iX=newX0; iX<=newX1; ++iX) {
215 for (int iY=newY0; iY<=newY1; ++iY) {
216 T phi = blockLattice.get(iX,iY).computeRho();
217 T rho = partnerLattice1->get(iX,iY).computeRho();
218 T gradMuPhiX = 1./12. * ( -blockLattice.get(iX-1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
219 - 4.* blockLattice.get(iX-1,iY ).template getField<descriptors::CHEM_POTENTIAL>()
220 - blockLattice.get(iX-1,iY+1).template getField<descriptors::CHEM_POTENTIAL>()
221 + blockLattice.get(iX+1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
222 + 4.* blockLattice.get(iX+1,iY ).template getField<descriptors::CHEM_POTENTIAL>()
223 + blockLattice.get(iX+1,iY+1).template getField<descriptors::CHEM_POTENTIAL>() );
224 T gradMuPhiY = 1./12. * ( -blockLattice.get(iX-1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
225 - 4.* blockLattice.get(iX,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
226 - blockLattice.get(iX+1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
227 + blockLattice.get(iX-1,iY+1).template getField<descriptors::CHEM_POTENTIAL>()
228 + 4.* blockLattice.get(iX,iY+1).template getField<descriptors::CHEM_POTENTIAL>()
229 + blockLattice.get(iX+1,iY+1).template getField<descriptors::CHEM_POTENTIAL>() );
230 T gradMuRhoX = 1./12. * ( -partnerLattice1->get(iX-1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
231 - 4.* partnerLattice1->get(iX-1,iY ).template getField<descriptors::CHEM_POTENTIAL>()
232 - partnerLattice1->get(iX-1,iY+1).template getField<descriptors::CHEM_POTENTIAL>()
233 + partnerLattice1->get(iX+1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
234 + 4.* partnerLattice1->get(iX+1,iY ).template getField<descriptors::CHEM_POTENTIAL>()
235 + partnerLattice1->get(iX+1,iY+1).template getField<descriptors::CHEM_POTENTIAL>() );
236 T gradMuRhoY = 1./12. * ( -partnerLattice1->get(iX-1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
237 - 4.* partnerLattice1->get(iX,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
238 - partnerLattice1->get(iX+1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
239 + partnerLattice1->get(iX-1,iY+1).template getField<descriptors::CHEM_POTENTIAL>()
240 + 4.* partnerLattice1->get(iX,iY+1).template getField<descriptors::CHEM_POTENTIAL>()
241 + partnerLattice1->get(iX+1,iY+1).template getField<descriptors::CHEM_POTENTIAL>() );
242 T psi = 0.;
243 T gradMuPsiX = 0.;
244 T gradMuPsiY = 0.;
245 if (partners.size() > 1) {
246 psi = partnerLattice2->get(iX,iY).computeRho();
247 gradMuPsiX = 1./12. * ( -partnerLattice2->get(iX-1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
248 - 4.* partnerLattice2->get(iX-1,iY ).template getField<descriptors::CHEM_POTENTIAL>()
249 - partnerLattice2->get(iX-1,iY+1).template getField<descriptors::CHEM_POTENTIAL>()
250 + partnerLattice2->get(iX+1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
251 + 4.* partnerLattice2->get(iX+1,iY ).template getField<descriptors::CHEM_POTENTIAL>()
252 + partnerLattice2->get(iX+1,iY+1).template getField<descriptors::CHEM_POTENTIAL>() );
253 gradMuPsiY = 1./12. * ( -partnerLattice2->get(iX-1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
254 - 4.* partnerLattice2->get(iX,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
255 - partnerLattice2->get(iX+1,iY-1).template getField<descriptors::CHEM_POTENTIAL>()
256 + partnerLattice2->get(iX-1,iY+1).template getField<descriptors::CHEM_POTENTIAL>()
257 + 4.* partnerLattice2->get(iX,iY+1).template getField<descriptors::CHEM_POTENTIAL>()
258 + partnerLattice2->get(iX+1,iY+1).template getField<descriptors::CHEM_POTENTIAL>() );
259 }
260
261 auto partnerCell = partnerLattice1->get(iX, iY);
262 partnerCell.template setField<descriptors::FORCE>({
263 -rho*gradMuRhoX - phi*gradMuPhiX - psi*gradMuPsiX,
264 -rho*gradMuRhoY - phi*gradMuPhiY - psi*gradMuPsiY
265 });
266 T u[2] { };
267 partnerCell.computeU(u);
268 blockLattice.get(iX, iY).template setField<descriptors::FORCE>(u);
269 if (partners.size() > 1) {
270 partnerLattice2->get(iX, iY).template setField<descriptors::FORCE>(u);
271 }
272 }
273 }
274 }
275}
276
277template<typename T, typename DESCRIPTOR>
279 BlockLattice<T,DESCRIPTOR>& blockLattice)
280{
281 processSubDomain(blockLattice, x0, x1, y0, y1);
282}
283
284
286
287template<typename T, typename DESCRIPTOR>
289 int x0_, int x1_, int y0_, int y1_, std::vector<BlockStructureD<2>*> partners_)
290 : x0(x0_), x1(x1_), y0(y0_), y1(y1_), partners(partners_)
291{
292 this->getName() = "FreeEnergyInletOutletCoupling2D";
293}
294
295template<typename T, typename DESCRIPTOR>
297 std::vector<BlockStructureD<2>*> partners_)
298 : x0(0), x1(0), y0(0), y1(0), partners(partners_)
299{
300 this->getName() = "FreeEnergyInletOutletCoupling2D";
301}
302
303template<typename T, typename DESCRIPTOR>
305 BlockLattice<T,DESCRIPTOR>& blockLattice, int x0_, int x1_, int y0_, int y1_ )
306{
307 // If partners.size() == 1: two fluid components
308 // If partners.size() == 2: three fluid components
309 BlockLattice<T,DESCRIPTOR> *partnerLattice1 = static_cast<BlockLattice<T,DESCRIPTOR> *>(partners[0]);
310 BlockLattice<T,DESCRIPTOR> *partnerLattice2 = 0;
311 if (partners.size() > 1) {
312 partnerLattice2 = static_cast<BlockLattice<T,DESCRIPTOR> *>(partners[1]);
313 }
314
315 int newX0, newX1, newY0, newY1;
316 if ( util::intersect ( x0, x1, y0, y1,
317 x0_, x1_, y0_, y1_,
318 newX0, newX1, newY0, newY1 ) ) {
319 for (int iX=newX0; iX<=newX1; ++iX) {
320 for (int iY=newY0; iY<=newY1; ++iY) {
321 T u[DESCRIPTOR::d];
322 partnerLattice1->get(iX,iY).computeU(u);
323 blockLattice.get(iX,iY).defineU(u);
324 if (partners.size() > 1) {
325 partnerLattice2->get(iX,iY).defineU(u);
326 }
327 }
328 }
329 }
330}
331
332template<typename T, typename DESCRIPTOR>
334 BlockLattice<T,DESCRIPTOR>& blockLattice)
335{
336 processSubDomain(blockLattice, x0, x1, y0, y1);
337}
338
339
341
342template<typename T, typename DESCRIPTOR>
344 int x0_, int x1_, int y0_, int y1_, T rho_,
345 std::vector<BlockStructureD<2>*> partners_)
346 : x0(x0_), x1(x1_), y0(y0_), y1(y1_), rho(rho_), partners(partners_)
347{
348 this->getName() = "FreeEnergyDensityOutletCoupling2D";
349}
350
351template<typename T, typename DESCRIPTOR>
353 T rho_, std::vector<BlockStructureD<2>*> partners_)
354 : x0(0), x1(0), y0(0), y1(0), rho(rho_), partners(partners_)
355{
356 this->getName() = "FreeEnergyDensityOutletCoupling2D";
357}
358
359template<typename T, typename DESCRIPTOR>
361 BlockLattice<T,DESCRIPTOR>& blockLattice, int x0_, int x1_, int y0_, int y1_ )
362{
363 // If partners.size() == 1: two fluid components
364 // If partners.size() == 2: three fluid components
365 BlockLattice<T,DESCRIPTOR> *partnerLattice1 = static_cast<BlockLattice<T,DESCRIPTOR> *>(partners[0]);
366 BlockLattice<T,DESCRIPTOR> *partnerLattice2 = nullptr;
367 if (partners.size() > 1) {
368 partnerLattice2 = static_cast<BlockLattice<T,DESCRIPTOR> *>(partners[1]);
369 }
370
371 int newX0, newX1, newY0, newY1;
372 if ( util::intersect ( x0, x1, y0, y1,
373 x0_, x1_, y0_, y1_,
374 newX0, newX1, newY0, newY1 ) ) {
375 for (int iX=newX0; iX<=newX1; ++iX) {
376 for (int iY=newY0; iY<=newY1; ++iY) {
377 T rho0, phi, psi;
378 rho0 = blockLattice.get(iX,iY).computeRho();
379 phi = partnerLattice1->get(iX,iY).computeRho();
380 blockLattice.get(iX,iY).defineRho(rho);
381 partnerLattice1->get(iX,iY).defineRho(phi * rho / rho0);
382 if (partners.size() > 1) {
383 psi = partnerLattice2->get(iX,iY).computeRho();
384 partnerLattice2->get(iX,iY).defineRho(psi * rho / rho0);
385 }
386 }
387 }
388 }
389}
390
391template<typename T, typename DESCRIPTOR>
393 BlockLattice<T,DESCRIPTOR>& blockLattice)
394{
395 processSubDomain(blockLattice, x0, x1, y0, y1);
396}
397
398
400
401template<typename T, typename DESCRIPTOR>
403 int x0_, int x1_, int y0_, int y1_, T alpha_, T kappa1_, T kappa2_)
404 : LatticeCouplingGenerator2D<T,DESCRIPTOR>(x0_, x1_, y0_, y1_), alpha(alpha_),
405 kappa1(kappa1_), kappa2(kappa2_), kappa3(0)
406{ }
407
408template<typename T, typename DESCRIPTOR>
410 T alpha_, T kappa1_, T kappa2_ )
411 : LatticeCouplingGenerator2D<T,DESCRIPTOR>(0, 0, 0, 0), alpha(alpha_),
412 kappa1(kappa1_), kappa2(kappa2_), kappa3(0)
413{ }
414
415template<typename T, typename DESCRIPTOR>
417 int x0_, int x1_, int y0_, int y1_, T alpha_, T kappa1_, T kappa2_, T kappa3_)
418 : LatticeCouplingGenerator2D<T,DESCRIPTOR>(x0_, x1_, y0_, y1_), alpha(alpha_),
419 kappa1(kappa1_), kappa2(kappa2_), kappa3(kappa3_)
420{ }
421
422template<typename T, typename DESCRIPTOR>
424 T alpha_, T kappa1_, T kappa2_, T kappa3_ )
425 : LatticeCouplingGenerator2D<T,DESCRIPTOR>(0, 0, 0, 0), alpha(alpha_),
426 kappa1(kappa1_), kappa2(kappa2_), kappa3(kappa3_)
427{ }
428
429template<typename T, typename DESCRIPTOR>
431 std::vector<BlockStructureD<2>*> partners) const
432{
434 this->x0,this->x1,this->y0,this->y1, alpha, kappa1, kappa2, kappa3, partners);
435}
436
437template<typename T, typename DESCRIPTOR>
443
445
446template<typename T, typename DESCRIPTOR>
448 int x0_, int x1_, int y0_, int y1_)
449 : LatticeCouplingGenerator2D<T,DESCRIPTOR>(x0_, x1_, y0_, y1_)
450{ }
451
452template<typename T, typename DESCRIPTOR>
456
457template<typename T, typename DESCRIPTOR>
459 std::vector<BlockStructureD<2>*> partners) const
460{
462 this->x0,this->x1,this->y0,this->y1, partners);
463}
464
465template<typename T, typename DESCRIPTOR>
470
472
473template<typename T, typename DESCRIPTOR>
475 int x0_, int x1_, int y0_, int y1_)
476 : LatticeCouplingGenerator2D<T,DESCRIPTOR>(x0_, x1_, y0_, y1_)
477{ }
478
479template<typename T, typename DESCRIPTOR>
483
484template<typename T, typename DESCRIPTOR>
486 std::vector<BlockStructureD<2>*> partners) const
487{
489 this->x0,this->x1,this->y0,this->y1, partners);
490}
491
492template<typename T, typename DESCRIPTOR>
497
499
500template<typename T, typename DESCRIPTOR>
502 int x0_, int x1_, int y0_, int y1_, T rho_)
503 : LatticeCouplingGenerator2D<T,DESCRIPTOR>(x0_, x1_, y0_, y1_), rho(rho_)
504{ }
505
506template<typename T, typename DESCRIPTOR>
511
512template<typename T, typename DESCRIPTOR>
514 std::vector<BlockStructureD<2>*> partners) const
515{
517 this->x0,this->x1,this->y0,this->y1, rho, partners);
518}
519
520template<typename T, typename DESCRIPTOR>
525
526
527} // namespace olb
528
529#endif
Platform-abstracted block lattice for external access and inter-block interaction.
Cell< T, DESCRIPTOR > get(CellID iCell)
Get Cell interface for index iCell.
Base of a regular block.
CellID getCellId(LatticeR< D > latticeR) const
Get 1D cell ID.
This class calculates the chemical potential and stores it in the external field of the respective la...
FreeEnergyChemicalPotentialCoupling2D(int x0_, int x1_, int y0_, int y1_, T alpha_, T kappa1_, T kappa2_, T kappa3_, std::vector< BlockStructureD< 2 > * > partners_)
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_) override
Execute post-processing step on a sublattice.
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
Generator class for the PostProcessors calculating the chemical potential.
FreeEnergyChemicalPotentialGenerator2D(int x0_, int x1_, int y0_, int y1_, T alpha_, T kappa1_, T kappa2_)
Two component free energy model.
LatticeCouplingGenerator2D< T, DESCRIPTOR > * clone() const override
PostProcessor2D< T, DESCRIPTOR > * generate(std::vector< BlockStructureD< 2 > * > partners) const override
PostProcessor for setting a constant density outlet.
FreeEnergyDensityOutletCoupling2D(int x0_, int x1_, int y0_, int y1_, T rho_, std::vector< BlockStructureD< 2 > * > partners_)
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_) override
Execute post-processing step on a sublattice.
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
Generator class for the PostProcessors assigning the density boundary condition at the outlet.
FreeEnergyDensityOutletGenerator2D(int x0_, int x1_, int y0_, int y1_, T rho_)
LatticeCouplingGenerator2D< T, DESCRIPTOR > * clone() const override
PostProcessor2D< T, DESCRIPTOR > * generate(std::vector< BlockStructureD< 2 > * > partners) const override
PostProcessor calculating the interfacial force in the free energy model.
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
FreeEnergyForceCoupling2D(int x0_, int x1_, int y0_, int y1_, std::vector< BlockStructureD< 2 > * > partners_)
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_) override
Execute post-processing step on a sublattice.
Generator class for the PostProcessors calculating the interfacial force.
LatticeCouplingGenerator2D< T, DESCRIPTOR > * clone() const override
PostProcessor2D< T, DESCRIPTOR > * generate(std::vector< BlockStructureD< 2 > * > partners) const override
PostProcessor for assigning the velocity at inlet and outlets to lattice two and three.
void process(BlockLattice< T, DESCRIPTOR > &blockLattice) override
Execute post-processing step.
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_) override
Execute post-processing step on a sublattice.
FreeEnergyInletOutletCoupling2D(int x0_, int x1_, int y0_, int y1_, std::vector< BlockStructureD< 2 > * > partners_)
Generator class for the PostProcessors assigning the velocity at the outlet to lattice two and three.
LatticeCouplingGenerator2D< T, DESCRIPTOR > * clone() const override
PostProcessor2D< T, DESCRIPTOR > * generate(std::vector< BlockStructureD< 2 > * > partners) const override
Interface of 2D post-processing steps.
std::string & getName()
read and write access to name
bool intersect(int x0, int x1, int y0, int y1, int x0_, int x1_, int y0_, int y1_, int &newX0, int &newX1, int &newY0, int &newY1)
Definition util.h:89
Top level namespace for all of OpenLB.