MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
lslbsurface.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 LSLBSURFACE_H_
8#define LSLBSURFACE_H_
9
10#include "UTIL/pointbox.h"
11#include "UTIL/timer.h"
12#include "cartesiansolver.h"
13#include "enums.h"
14
15#include "coupling.h"
16#include "surfacecoupling.h"
17
18#include <algorithm>
19
20template <MInt nDim>
21class CouplingLS;
22
23template <MInt nDim, MInt nDist, class SysEqn>
24class CouplingLB;
25
26template <MInt nDim, MInt nDist, class SysEqn>
27class LsLbSurface : public CouplingLS<nDim>, public CouplingLB<nDim, nDist, SysEqn> {
28 public:
29 // Simplifications
34
35 // Constructor
38
41
42 static constexpr MInt m_noCorners = (nDim == 2) ? 4 : 8;
43
45
60
67 using CouplingLb::a_Ma;
77 using CouplingLb::a_Re;
84
85 private:
86 // Properties
88
89 // Conversion-Factors
97 };
98
101
108
109 struct Timers {
110 enum {
113
115
123
128
129 _count
130 };
131 };
132
133 std::array<MInt, Timers::_count> m_timers;
134
135 // Data
138
139 //--------------------------------- functions
140 private:
141 void initData();
142 void initTimers();
143 void checkProperties();
144 void readProperties();
145
146 void updateGeometry();
147
148 public:
149 void init() override;
150 void finalizeSubCoupleInit(MInt /*solverId*/) override{};
151 void finalizeCouplerInit() override{};
152
153 void preCouple(MInt /*recipeStep = 0*/) override;
154 void subCouple(MInt /*recipeStep = 0*/, MInt /*solverId*/, std::vector<MBool>& /*solverCompleted*/) override{};
155 void postCouple(MInt recipeStep = 0) override;
156
157 void cleanUp() override{};
159
164
166
167 // LB stuff
168 void refillEmergedCells();
169
171 void interpolateNormal();
172 void evaluateContour();
173
174 // Body stuff
175
177
179
180 // LS stuff
184};
185
186#endif // ifndef LSLBSURFACE_H_
MInt a_noDistributions(const MInt id=0) const
Definition: coupling.h:481
MBool a_isActive(const MInt cellId, const MInt id=0) const
Definition: coupling.h:522
MFloat a_Re(const MInt id=0) const
Definition: coupling.h:473
MFloat a_cellLengthAtLevel(MInt level, const MInt id=0)
Definition: coupling.h:518
MFloat & a_oldVariable(const MInt cellId, const MInt varId, const MInt id=0)
Definition: coupling.h:533
solverType & lbSolver(const MInt solverId=0) const
Definition: coupling.h:454
MInt a_childId(const MInt cellId, const MInt child, const MInt id=0)
Definition: coupling.h:508
MInt & a_associatedBodyIdsMb(const MInt cellId, const MInt set, const MInt id=0)
Definition: coupling.h:498
MInt a_noLevelSetsMb(const MInt id=0) const
Definition: coupling.h:471
MBool a_wasActive(const MInt cellId, const MInt id=0) const
Definition: coupling.h:524
MInt a_boundaryCellMb(const MInt cellId, const MInt id=0)
Definition: coupling.h:487
MInt a_noCells(const MInt id=0) const
Definition: coupling.h:516
MFloat a_Ma(const MInt id=0) const
Definition: coupling.h:472
MFloat & a_variable(const MInt cellId, const MInt varId, const MInt id=0)
Definition: coupling.h:528
LbBndCnd & lbBndCnd(const MInt id=0)
Definition: coupling.h:461
MInt a_noEmbeddedBodiesLB(const MInt id=0) const
Definition: coupling.h:520
MInt noMinCells(const MInt id=0) const
Definition: coupling.h:514
MInt a_noVariables(const MInt id=0) const
Definition: coupling.h:526
MbCellCollector & a_mbCell(const MInt id=0)
Definition: coupling.h:486
MInt a_noLbCells(const MInt id=0) const
Definition: coupling.h:470
MInt a_parentId(const MInt cellId, const MInt id=0)
Definition: coupling.h:506
MInt minCell(const MInt index, const MInt id=0) const
Definition: coupling.h:512
MFloat & a_levelSetFunctionMb(const MInt cellId, const MInt set, const MInt id=0)
Definition: coupling.h:490
MInt a_noG0Cells(MInt set) const
Definition: coupling.h:194
solverType & lsSolver() const
Definition: coupling.h:188
MInt a_bodyIdG(const MInt cellId, const MInt set) const
Definition: coupling.h:203
MInt a_noLsCells() const
Definition: coupling.h:191
MFloat a_normalVectorG(const MInt gCellId, const MInt dim, const MInt set) const
Definition: coupling.h:211
MInt a_noSets() const
Definition: coupling.h:222
MInt a_bodyToSet(const MInt bodyId) const
Definition: coupling.h:220
MInt a_noEmbeddedBodies() const
Definition: coupling.h:221
MFloat a_curvatureG(const MInt gCellId, const MInt set) const
Definition: coupling.h:215
MFloat & a_extensionVelocityG(const MInt cellId, const MInt dim, const MInt setId)
Definition: coupling.h:226
MFloat a_coordinateG(const MInt gCellId, const MInt dim) const
Definition: coupling.h:207
MInt a_G0CellId(const MInt id, const MInt set) const
Definition: coupling.h:209
MFloat a_outsideGValue() const
Definition: coupling.h:192
MFloat & a_levelSetFunctionG(const MInt cellId, const MInt setId)
Definition: coupling.h:199
This class represents all LB models.
Definition: lbsolverdxqy.h:29
MInt m_lbSolverId
Definition: lslbsurface.h:39
MFloat m_gravity
Definition: lslbsurface.h:103
void postCouple(MInt recipeStep=0) override
void setExtensionVelocity()
ConversionFactors conversionLsLb
Definition: lslbsurface.h:99
maia::coupling::Mapping bndryToVolumeMap
Definition: lslbsurface.h:136
MFloat m_initCurvature
Definition: lslbsurface.h:106
void initTimers()
Definition: lslbsurface.cpp:50
MBool m_static_updateLevelSetFlowSolver_firstRun
Definition: lslbsurface.h:44
void finalizeCouplerInit() override
Definition: lslbsurface.h:151
void initData()
Initialize coupling-class-specific Data.
Definition: lslbsurface.cpp:87
void bc3060(MInt)
void setExtensionVelocityB()
MInt ls2lbIdParent(MInt)
ConversionFactors conversionLbLs
Definition: lslbsurface.h:100
void readProperties()
reads lsfvmb-coupling-specific data
void cleanUp() override
Definition: lslbsurface.h:157
MFloat m_initHeight
Definition: lslbsurface.h:107
void interpolateCurvature(MFloatScratchSpace &curvature)
MInt lb2lsId(MInt)
void subCouple(MInt, MInt, std::vector< MBool > &) override
Definition: lslbsurface.h:154
std::array< MInt, Timers::_count > m_timers
Definition: lslbsurface.h:133
void reinitAfterBalance()
Definition: lslbsurface.h:158
void interpolateNormal()
void evaluateContour()
void computeGCellTimeStep()
MFloat m_Ga
Definition: lslbsurface.h:104
void updateBoundaryCellsFromGField()
MInt lb2lsIdParent(MInt)
MInt ls2lbId(MInt)
void checkProperties()
Checks property-data which is read in by both ls-and Lb-Solver.
static constexpr MInt m_noCorners
Definition: lslbsurface.h:42
void updateGeometry()
Updates the member-variables in the geometry-intersection class.
MInt m_lsSolverId
Definition: lslbsurface.h:40
MFloat m_Eo
Definition: lslbsurface.h:105
MFloat m_surfaceTension
Definition: lslbsurface.h:102
void finalizeSubCoupleInit(MInt) override
Definition: lslbsurface.h:150
void init() override
void refillEmergedCells()
MBool m_calcWallForces
Definition: lslbsurface.h:87
void preCouple(MInt) override
maia::coupling::Mapping volumeToBndryMap
Definition: lslbsurface.h:137
void transferLevelSetFieldValues(MBool)
This class is a ScratchSpace.
Definition: scratch.h:758
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52
bool MBool
Definition: maiatypes.h:58
Multi-to-multi mapping class.