MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
couplerlbfveemultiphase.h
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#ifndef CouplerLbFvEEMultiphase_H_
8#define CouplerLbFvEEMultiphase_H_
9
10#include <algorithm>
12#include "LB/lbbndcnd.h"
13#include "LB/lbbndcnddxqy.h"
14#include "LB/lbcellcollector.h"
15#include "LB/lbcellproperties.h"
17#include "LB/lbsolver.h"
18#include "LB/lbsolverdxqy.h"
19#include "UTIL/pointbox.h"
20#include "enums.h"
21#include "solver.h"
22
23#include "couplerlbfv.h"
24#include "coupling.h"
25
26template <MInt nDim, MInt nDist, class SysEqn>
27class LbSolverDxQy;
28template <MInt nDim, MInt nDist, class SysEqn>
29class LbBndCndDxQy;
30
31template <MInt nDim, MInt nDist, class SysEqn>
32class CouplingLB;
33
34template <MInt nDim, MInt nDist, class SysEqnLb, class SysEqnFv>
35class CouplerLbFv;
36
37template <MInt nDim, MInt nDist, class SysEqnLb, class SysEqnFv>
38class CouplerLbFvEEMultiphase : public CouplerLbFv<nDim, nDist, SysEqnLb, SysEqnFv> {
39 private:
40 void initData();
41 void initAlpha();
43 void cleanUp() override{};
44
45 void revertLbVariables();
48 void revertFvVariables();
50
52
58 using Base::fv2lbId;
59 using Base::fvSolver;
60 using Base::lb2fvId;
61 using Base::lbBndCnd;
62 using Base::lbSolver;
63
64 using CouplingFv<nDim, SysEqnFv>::a_noFvCells;
65
66 public:
70
72
75 std::vector<MInt> findRedistCells(const MInt cellId, const MBool searchUp, const MFloat limit);
76 void transferPressureLb2Fv(const MFloat rkAlpha, const MBool update);
77 template <MBool updateGradients>
78 void transferULb2Fv(const MFloat rkAlpha);
79 void transferUFv2Lb();
80 void transferNuLb2Fv(const MFloat rkAlpha);
81 void transferAlphaFv2Lb();
82
83 void preCouple(MInt) override;
85 void subCouple(MInt, MInt, std::vector<MBool>& solverCompleted) override;
86 void finalizeCouplerInit() override;
87 void finalizeSubCoupleInit(MInt) override;
88 void init() override;
89 void balancePre() override;
90 void balancePost() override{};
91
92 void revertLb();
93 void revertFv();
94
103 std::array<MFloat, nDim> m_gravityRefCoords{};
105 std::array<MFloat, nDim> m_depthCorrectionCoefficients{};
111};
112
113#endif
GridCell
Grid cell Property Labels.
void subCouple(MInt, MInt, std::vector< MBool > &solverCompleted) override
typename maia::grid::tree::Tree< nDim >::Cell Cell
void transferNuLb2Fv(const MFloat rkAlpha)
std::array< MFloat, nDim > m_depthCorrectionCoefficients
std::vector< MInt > findRedistCells(const MInt cellId, const MBool searchUp, const MFloat limit)
find neighbor Cells to cellId, that are candidates for alpha corrections
std::array< MFloat, nDim > m_gravityRefCoords
void correctInvalidAlpha()
find cells with invalid alpha values and redistribute mass from/to neighboring cells to raise/lower a...
void transferULb2Fv(const MFloat rkAlpha)
void transferPressureLb2Fv(const MFloat rkAlpha, const MBool update)
void finalizeSubCoupleInit(MInt) override
void balancePre() override
Load balancing.
MInt a_lbSolverId() const
Definition: couplerlbfv.h:121
MInt lb2fvId(const MInt lbId) const
Definition: couplerlbfv.h:116
ConversionFactors conversionLbFv
Definition: couplerlbfv.h:103
ConversionFactors conversionFvLb
Definition: couplerlbfv.h:104
MInt a_fvSolverId() const
Definition: couplerlbfv.h:120
MInt fv2lbId(const MInt fvId) const
Definition: couplerlbfv.h:115
solverType & fvSolver(const MInt solverId=0) const
Definition: coupling.h:386
MInt couplerId() const
Definition: coupling.h:67
solverType & lbSolver(const MInt solverId=0) const
Definition: coupling.h:454
LbBndCnd & lbBndCnd(const MInt id=0)
Definition: coupling.h:461
MInt a_noLbCells(const MInt id=0) const
Definition: coupling.h:470
This class represents all LB models.
Definition: lbsolverdxqy.h:29
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52
bool MBool
Definition: maiatypes.h:58