MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
fvstructuredsolver2d.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 FVSTRUCTUREDSOLVER2D_H
8#define FVSTRUCTUREDSOLVER2D_H
9
11#include "fvstructuredsolver.h"
13
14extern MInt globalTimeStep;
15
17
22 template <MBool isRans>
25
26 public:
27 FvStructuredSolver2D(MInt, StructuredGrid<2>*, MBool*, const MPI_Comm comm);
29
30
31 virtual void initialCondition();
32 virtual void initSolutionStep(MInt mode);
33
37
38
39 void initMovingGrid();
40 void moveGrid(const MBool isRestart, const MBool zeroPos) override;
41
42 void initFluxMethod();
43 void assignBndryCells();
44 void initBndryCnds();
47 void loadRestartBC2600();
48 void computePrimitiveVariables() override;
49 template <MFloat (FvStructuredSolver::*)(MInt) const = &FvStructuredSolver::dummy>
51 void convertSA2KEPS();
52
53 void gather(const MBool, std::vector<std::unique_ptr<StructuredComm<2>>>&) override;
54 void scatter(const MBool, std::vector<std::unique_ptr<StructuredComm<2>>>&) override;
55
56 void computeCellLength();
57
58 virtual void computeTimeStep();
61 void updateSpongeLayer();
62 void viscousFlux();
63 void viscousFluxRANS();
64 template <MBool twoEqRans = false>
65 void viscousFluxLES();
66 template <MBool twoEqRans = false>
69
70 // save the skin-friction etc ...
71 virtual void computeFrictionPressureCoef(MBool computePower) override {
73 }
74
75 inline MInt getPointIdFromCell(MInt i, MInt j);
76 inline MInt cellIndex(MInt i, MInt j);
77 inline MInt pointIndex(MInt i, MInt j);
78 inline MInt getPointIdFromPoint(MInt origin, MInt incI, MInt incJ);
79 inline MInt getCellIdFromCell(MInt origin, MInt incI, MInt incJ);
80 inline MFloat crossProduct(MFloat vec1[2], MFloat vec2[2]);
81 MFloat pressure(MInt cellId);
82 inline MFloat getPSI(MInt, MInt);
83
84 void Ausm();
85 inline void AusmLES(MFloat* QLeft, MFloat* QRight, const MInt dim, const MInt cellId);
86 inline void AusmLES_PTHRC(MFloat* QLeft, MFloat* QRight, MInt dim, MInt cellId);
87 inline void AusmDV(MFloat* QLeft, MFloat* QRight, const MInt dim, const MInt cellId);
88 inline void AusmLES_MovingGrid(MFloatScratchSpace& QLeft, MFloatScratchSpace& QRight, MInt dim, MInt cellId);
89
91 template <fluxmethod ausm, MInt noVars>
92 void Muscl_();
93 template <fluxmethod ausm, MInt noVars>
94 void MusclStretched_();
95
96 // function pointer for the Muscl_scheme
97 void MusclRANS();
99
100 // different Muscl schemes
101 void Muscl(MInt timerId = -1) override;
102 void MusclAlbada();
104
106
107 template <MBool twoEqRans = false>
109 template <MBool twoEqRans = false>
111
112 // Porous
113 virtual void computePorousRHS(MBool /*isRans*/) override;
115 void exchange6002();
116
118
119 protected:
121 static constexpr const MInt nDim = 2;
122};
123
124#endif
2D structured solver class
void AusmDV(MFloat *QLeft, MFloat *QRight, const MInt dim, const MInt cellId)
void AusmLES_PTHRC(MFloat *QLeft, MFloat *QRight, MInt dim, MInt cellId)
Same AUSM scheme as AusmLES with additional damping controlled by the 4th order pressure derivative....
virtual void computeFrictionPressureCoef(MBool computePower) override
void gather(const MBool, std::vector< std::unique_ptr< StructuredComm< 2 > > > &) override
void moveGrid(const MBool isRestart, const MBool zeroPos) override
MInt getPointIdFromPoint(MInt origin, MInt incI, MInt incJ)
MInt cellIndex(MInt i, MInt j)
void AusmLES(MFloat *QLeft, MFloat *QRight, const MInt dim, const MInt cellId)
AUSM Central.
virtual void initialCondition()
Computation of infinity values for the conservative and primitive variables Initialization ot the ent...
void scatter(const MBool, std::vector< std::unique_ptr< StructuredComm< 2 > > > &) override
MFloat pressure(MInt cellId)
StructuredBndryCnd< 2 > * m_structuredBndryCnd
virtual void initSolutionStep(MInt mode)
initalize the solution step
void AusmLES_MovingGrid(MFloatScratchSpace &QLeft, MFloatScratchSpace &QRight, MInt dim, MInt cellId)
MInt pointIndex(MInt i, MInt j)
virtual void computePorousRHS(MBool) override
void(FvStructuredSolver2D::* fluxmethod)(MFloat *, MFloat *, MInt, MInt)
static constexpr const MInt nDim
FvStructuredSolver2DRans * m_ransSolver
MInt getPointIdFromCell(MInt i, MInt j)
MInt getCellIdFromCell(MInt origin, MInt incI, MInt incJ)
void computePrimitiveVariables() override
void(FvStructuredSolver2D::* viscFluxMethod)()
MFloat crossProduct(MFloat vec1[2], MFloat vec2[2])
void Muscl(MInt timerId=-1) override
void(FvStructuredSolver2D::* reconstructSurfaceData)()
Base class of the structured solver.
This class is a ScratchSpace.
Definition: scratch.h:758
Class for the 2D stuctured boundary conditions.
Base class of the structured boundary conditions.
virtual void computeFrictionPressureCoef(MBool)=0
Structured grid class.
MInt globalTimeStep
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52
bool MBool
Definition: maiatypes.h:58