MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
fvstructuredbndrycnd.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 STRUCTUREDBNDRYCND
8#define STRUCTUREDBNDRYCND
9
10#include "GRID/structuredgrid.h"
11#include "fvstructuredcell.h"
13#include "fvstructuredsolver.h"
16#include "globals.h"
17
18
19// Forward declarations
20template <MInt nDim>
22
26template <MInt nDim>
28 template <MInt nDim_>
29 friend class FvStructuredSolver;
31 template <MInt nDim_>
33
34 public:
35 // functions
37 virtual ~StructuredBndryCnd();
39 void assignBndryCnds();
41 virtual void correctBndryCndIndices();
42 // virtual void periodicExchange(){};
43
44 // MPI Communicator
46
47 // variables
48 MInt* m_nCells = nullptr;
49 MInt* m_nPoints = nullptr;
53 std::unique_ptr<MConservativeVariables<nDim>>& CV;
54 std::unique_ptr<MPrimitiveVariables<nDim>>& PV;
55 std::unique_ptr<StructuredFQVariables>& FQ;
57 // stores the number of boundary conditions;
59
61 // for Boundary conditions
62 std::vector<std::unique_ptr<StructuredWindowMap<nDim>>>& m_physicalBCMap;
63 std::vector<std::unique_ptr<StructuredWindowMap<nDim>>>& m_auxDataMap;
64 std::vector<std::unique_ptr<StructuredWindowMap<nDim>>>& m_globalStructuredBndryMaps;
65
68 // MInt m_useSponge;
72 MFloat* m_betaSponge = nullptr;
75
76 void saveAuxData();
77
78 virtual void bc0(MInt){}; // nothing to do bc
79 virtual void bc1000(MInt){}; // wall no slip
80 virtual void bc1001(MInt){}; // euler wall
81 virtual void bc1003(MInt){}; // isothermal no slip wall
82 virtual void bc1004(MInt){}; // moving adiabatic wall
83 virtual void bc1006(MInt){}; // moving isothermal wall
84 virtual void bc1007(MInt){}; // oscillating wall
85 virtual void bc2001(MInt){}; // subsonic inflow
86 virtual void bc2002(MInt){}; // supersonic inflow
87 virtual void bc2003(MInt){}; // simple subsonic in/outflow
88 virtual void bc2004(MInt){}; // subsonic outflow
89 virtual void bc2024(MInt){}; // subsonic outflow
90 virtual void bc2005(MInt){}; // supersonic outflow
91 virtual void bc2006(MInt){}; // subsonic in/outflow with zero velocity
92 virtual void bc2007(MInt){}; // supersonic outflow
93 virtual void bc2009(MInt){}; // supersonic outflow after shock
94 virtual void bc2020(MInt){}; // poiseulle flow inflow
95 virtual void bc2021(MInt){}; // shear flow inflow
96 virtual void bc2097(MInt){}; // plenum inflow
97 virtual void bc2099(MInt){}; // subsonic inflow (u=(y/d)^(1/7))
98
99 virtual void bc2221(MInt){}; // zonal with STG
100 virtual void bc2222(MInt){}; // zonal without STG
101
102 virtual void bc2199(MInt){}; // subsonic inflow compressible bernoulli (tfs2099)x
103 virtual void bc2402(MInt){}; // channel flow
104 virtual void bc3000(MInt){}; // symmetry
105 virtual void bc3001(MInt){}; // streamline symmetry
106 virtual void bc6000(MInt){}; // communication
107 virtual void bc6002(MInt){}; // Fluid-porous interface
108 virtual void bc2012(MInt){}; // characteristic inflow
109 virtual void bc2014(MInt){}; // subsonic rotational inflow
110 virtual void bc2015(MInt){}; // non reflecting outflow poinsot lele
111 virtual void bc7909(MInt){}; // synthetic turbulence generation
112 virtual void bc2013(MInt){}; // characteristic outflow
113 virtual void bc2500(MInt){}; // Rescaling: recycle station
114 virtual void bc2511(MInt){}; // Rescaling: inlet station RANS
115 virtual void bc2510(MInt){}; // Rescaling: recycle station RANS
116 virtual void bc2501(MInt){}; // Rescaling: inlet station
117 virtual void bc2600(MInt){}; // Prescribing profile
118 virtual void bc2601(MInt){}; // Prescribing profile
119 virtual void bc2700(MInt){}; // mode inflow
120 virtual void bc2730(MInt){}; // fsc outflow
121 virtual void bc2888(MInt){}; // fsc inflow
122 virtual void bc2999(MInt){}; // blasius inflow
123 virtual void bc2900(MInt){}; // Jet Freund inlet
124 virtual void initBc0(MInt){}; // wall no slip
125 virtual void initBc1000(MInt){}; // wall no slip
126 virtual void initBc1001(MInt){}; // euler wall
127 virtual void initBc1003(MInt){}; // isothermal wall no slip
128 virtual void initBc1004(MInt){}; // moving adiabatic wall
129 virtual void initBc1006(MInt){}; // moving isothermal wall
130 virtual void initBc1007(MInt){}; // oscillating wall
131 virtual void initBc2001(MInt){}; // subsonic inflow
132 virtual void initBc2003(MInt){}; // simple in/outflow
133 virtual void initBc2004(MInt){}; // subsonic outflow
134 virtual void initBc2024(MInt){}; // subsonic outflow
135 virtual void initBc2002(MInt){}; // supersonic inflow
136 virtual void initBc2005(MInt){}; // supersonic outflow
137 virtual void initBc2006(MInt){};
138 virtual void initBc2007(MInt){}; // supersonic outflow
139 virtual void initBc2009(MInt){}; // supersonic outflow after shock
140 virtual void initBc2020(MInt){}; // poiseulle flow inflow
141 virtual void initBc2021(MInt){}; // shear flow inflow
142 virtual void initBc2097(MInt){}; // plenum inflow
143 virtual void initBc2099(MInt){}; // subsonic inflow (u=(y/d)^(1/7))
144
145 virtual void initBc2221(MInt){}; // zonal with STG
146 virtual void initBc2222(MInt){}; // zonal without STG
147
148 virtual void initBc2199(MInt){}; // subsonic inflow compressible bernoulli
149 virtual void initBc2402(MInt){}; // channel flow
150 virtual void initBc3000(MInt){}; // symmetry
151 virtual void initBc3001(MInt){}; // streamline symmetry
152 virtual void initBc6000(MInt){}; // communication
153 virtual void initBc6002(MInt){}; // Fluid-porous interface
154 virtual void initBc2012(MInt){}; // characteristic inflow
155 virtual void initBc7909(MInt){}; // synthetic turbulence generation
156 virtual void initBc2013(MInt){}; // characteristic outflow
157 virtual void initBc2014(MInt){}; // subsonic rotational inflow
158 virtual void initBc2015(MInt){}; // non reflecting outflow poinsot lele
159 virtual void initBc2500(MInt){}; // Rescaling: recycle station
160 virtual void initBc2501(MInt){}; // Rescaling: inlet station
161 virtual void initBc2510(MInt){}; // Rescaling: inlet station
162 virtual void initBc2600(MInt){}; // Prescribing profile
163 virtual void initBc2601(MInt){}; // Prescribing profile
164 virtual void initBc2700(MInt){}; // mode inflow
165 virtual void initBc2730(MInt){}; // fsc outflow
166 virtual void initBc2888(MInt){}; // fsc inflow
167 virtual void initBc2999(MInt){}; // blasius inflow
168 virtual void initBc2900(MInt){}; // Jet Freund inlet
169 virtual void bc9999(MInt){};
170 virtual void initBc9999(MInt){};
171
172 /* virtual void exchangePointsPeriodic(){}; */
173 /* virtual void exchangePointsPeriodicS(){}; */
174
175
176 virtual void computeWallDistances(){};
178 virtual void computeLocalExtendedDistancesAndSetComm() { TERMM(1, "For your nDim it is not implemented yet!"); };
179 virtual void updateSpongeLayer(){};
180 virtual void computeFrictionCoef() { mTerm(-1, "Method does not exist"); };
181 virtual void computeFrictionPressureCoef(MBool /*computePower*/) = 0;
183
184
185 // function pointer to the boundary method used;
187
188 // Dirichlet Conditions
192 // compute cf
194
195 protected:
196 // For communication of nearest wall cell properties
197 std::vector<MInt> m_wallSendCells;
198 std::vector<MInt> m_wallSendcounts;
199 std::map<MInt, std::tuple<MInt, MInt, MFloat>> m_wallCellId2recvCell;
200 // For communication of nearest fluid-porous interface properties
201 std::vector<MInt> m_FPSendCells;
202 std::vector<MInt> m_FPSendcounts;
203 std::map<MInt, std::tuple<MInt, MInt, MFloat>> m_FPCellId2recvCell;
204 // std::map<MInt, MInt> m_FPCellId2recvCell;
205 std::vector<MInt> m_FPSendCells_porous;
206 std::vector<MInt> m_FPSendcounts_porous;
207 std::map<MInt, std::tuple<MInt, MInt, MFloat>> m_FPCellId2recvCell_porous;
208
209 // for the channel flow we need the surfaces:
210 // sorted for in and out if one partition contains both parts of the channel
211
212
217
218 // plenum boundary condition
221
224
225 // infintiy Values!!!!
241};
242
243#endif
3D structured solver class
Base class of the structured solver.
Base class of the structured boundary conditions.
std::unique_ptr< MPrimitiveVariables< nDim > > & PV
virtual void bc2601(MInt)
virtual void bc0(MInt)
virtual void initBc2004(MInt)
std::vector< MInt > m_FPSendcounts_porous
virtual void bc2015(MInt)
virtual void initBc2888(MInt)
std::map< MInt, std::tuple< MInt, MInt, MFloat > > m_wallCellId2recvCell
virtual void bc2501(MInt)
virtual void bc3000(MInt)
virtual void initBc2999(MInt)
virtual void initBc2002(MInt)
virtual void initBc3000(MInt)
virtual void bc3001(MInt)
virtual void initBc3001(MInt)
virtual void bc2600(MInt)
virtual void bc2222(MInt)
std::vector< MInt > m_wallSendcounts
virtual void bc2020(MInt)
virtual void initBc2099(MInt)
virtual void initBc2700(MInt)
virtual void bc2900(MInt)
std::unique_ptr< MConservativeVariables< nDim > > & CV
virtual void computeLocalExtendedDistancesAndSetComm()
virtual void bc2014(MInt)
virtual void initBc2600(MInt)
virtual void initBc2402(MInt)
virtual void initBc2012(MInt)
virtual void bc2402(MInt)
virtual void initBc2097(MInt)
virtual void bc2511(MInt)
virtual void initBc2501(MInt)
virtual void bc1003(MInt)
virtual void bc2007(MInt)
virtual void initBc2199(MInt)
virtual void bc1007(MInt)
virtual void initBc2510(MInt)
virtual void initBc2024(MInt)
virtual void bc2005(MInt)
virtual void initBc2014(MInt)
virtual void initBc9999(MInt)
virtual void computeFrictionCoef()
virtual void initBc2601(MInt)
std::map< MInt, std::tuple< MInt, MInt, MFloat > > m_FPCellId2recvCell_porous
virtual void initBc2900(MInt)
virtual void updateSpongeLayer()
StructuredGrid< nDim > * m_grid
virtual void bc2700(MInt)
virtual void bc2199(MInt)
virtual void initBc2730(MInt)
virtual void initBc2003(MInt)
virtual void initBc2007(MInt)
virtual void initBc2005(MInt)
virtual void bc2006(MInt)
virtual void initBc2001(MInt)
virtual void bc2003(MInt)
virtual void bc2001(MInt)
std::vector< std::unique_ptr< StructuredWindowMap< nDim > > > & m_globalStructuredBndryMaps
virtual void bc1001(MInt)
std::vector< MInt > m_FPSendCells
std::vector< MInt > m_wallSendCells
virtual void bc2004(MInt)
virtual void distributeWallAndFPProperties()
std::vector< MInt > m_FPSendcounts
virtual void bc2097(MInt)
virtual void bc6002(MInt)
virtual void initBc2500(MInt)
virtual void initBc1001(MInt)
virtual void bc2730(MInt)
BndryCndHandler * initBndryCndHandler
virtual void bc2888(MInt)
virtual void initBc1000(MInt)
virtual void bc6000(MInt)
virtual void initBc2009(MInt)
virtual void bc2013(MInt)
virtual void bc1004(MInt)
virtual void computeLocalWallDistances()
virtual void initBc1006(MInt)
std::vector< std::unique_ptr< StructuredWindowMap< nDim > > > & m_auxDataMap
virtual void initBc1007(MInt)
void(StructuredBndryCnd::* BndryCndHandler)(MInt)
virtual void initBc2020(MInt)
virtual void computeFrictionPressureCoef(MBool)=0
virtual void bc2500(MInt)
virtual void bc2999(MInt)
virtual void initBc2222(MInt)
virtual void initBc1004(MInt)
BndryCndHandler * nonReflectingBoundaryCondition
std::vector< std::unique_ptr< StructuredWindowMap< nDim > > > & m_physicalBCMap
virtual void initBc0(MInt)
std::map< MInt, std::tuple< MInt, MInt, MFloat > > m_FPCellId2recvCell
virtual void bc2510(MInt)
virtual void bc2012(MInt)
virtual void initBc1003(MInt)
std::unique_ptr< StructuredFQVariables > & FQ
virtual void bc1006(MInt)
virtual void initBc2221(MInt)
virtual void initBc7909(MInt)
virtual void initBc2015(MInt)
virtual void initBc2021(MInt)
std::vector< MInt > m_FPSendCells_porous
virtual void computeWallDistances()
BndryCndHandler * bndryCndHandler
virtual void bc2099(MInt)
virtual void initBc6000(MInt)
virtual void bc1000(MInt)
StructuredCell * m_cells
virtual void initBc2006(MInt)
virtual void bc2024(MInt)
BndryCndHandler * skinFrictionHandler
virtual void bc2221(MInt)
virtual void bc7909(MInt)
virtual void bc2009(MInt)
virtual void initBc6002(MInt)
virtual void bc2002(MInt)
virtual void bc2021(MInt)
virtual void initBc2013(MInt)
virtual void bc9999(MInt)
FvStructuredSolver< nDim > * m_solver
virtual void correctBndryCndIndices()
Structured grid class.
void mTerm(const MInt errorCode, const MString &location, const MString &message)
Definition: functions.cpp:29
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52
bool MBool
Definition: maiatypes.h:58