MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
FvZonal< nDim, SysEqn > Class Template Reference

#include <fvzonal.h>

Inheritance diagram for FvZonal< nDim, SysEqn >:
[legend]
Collaboration diagram for FvZonal< nDim, SysEqn >:
[legend]

Public Types

using RANS = FvCartesianSolverXD< nDim, SysEqn >
 
using LES = FvCartesianSolverXD< nDim, FvSysEqnNS< nDim > >
 
- Public Types inherited from CouplingFv< nDim, SysEqn >
using solverType = FvCartesianSolverXD< nDim, SysEqn >
 
- Public Types inherited from CouplingFv< nDim, FvSysEqnNS< nDim > >
using solverType = FvCartesianSolverXD< nDim, FvSysEqnNS< nDim > >
 

Public Member Functions

 FvZonal (const MInt couplingId, RANS *R, LES *L)
 
virtual ~FvZonal ()=default
 
void init () override
 
void finalizeSubCoupleInit (MInt)
 
void postCouple (MInt) override
 
void cleanUp ()
 
void checkProperties () override
 
- Public Member Functions inherited from CouplingFv< nDim, SysEqn >
 CouplingFv (const MInt couplingId, std::vector< FvCartesianSolverXD< nDim, SysEqn > * > fvSolvers, const MInt noSolvers)
 
 CouplingFv (const MInt couplingId, Solver *solvers)
 
 ~CouplingFv () override=default
 
 CouplingFv (const CouplingFv &)=delete
 
CouplingFvoperator= (const CouplingFv &)=delete
 
- Public Member Functions inherited from Coupling
 Coupling (const MInt couplingId)
 
virtual ~Coupling ()=default
 
 Coupling (const Coupling &)=delete
 
Couplingoperator= (const Coupling &)=delete
 
MInt couplerId () const
 
virtual void init ()=0
 
virtual void finalizeSubCoupleInit (MInt solverId)=0
 
virtual void finalizeCouplerInit ()=0
 
virtual void preCouple (MInt recipeStep)=0
 
virtual void subCouple (MInt recipeStep, MInt solverId, std::vector< MBool > &solverCompleted)=0
 
virtual void postCouple (MInt recipeStep)=0
 
virtual void cleanUp ()=0
 
virtual void balancePre ()
 Load balancing. More...
 
virtual void balancePost ()
 
virtual void reinitAfterBalance ()
 
virtual void prepareAdaptation ()
 
virtual void postAdaptation ()
 
virtual void finalizeAdaptation (const MInt)
 
virtual void writeRestartFile (const MInt)
 
virtual MInt noCellDataDlb () const
 Methods to inquire coupler data during balancing. More...
 
virtual MInt cellDataTypeDlb (const MInt NotUsed(dataId)) const
 
virtual MInt cellDataSizeDlb (const MInt NotUsed(dataId), const MInt NotUsed(cellId))
 
virtual void getCellDataDlb (const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MInt *const NotUsed(data))
 
virtual void getCellDataDlb (const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MLong *const NotUsed(data))
 
virtual void getCellDataDlb (const MInt NotUsed(dataId), const MInt NotUsed(oldNoCells), const MInt *const NotUsed(bufferIdToCellId), MFloat *const NotUsed(data))
 
virtual void setCellDataDlb (const MInt NotUsed(dataId), const MInt *const NotUsed(data))
 
virtual void setCellDataDlb (const MInt NotUsed(dataId), const MLong *const NotUsed(data))
 
virtual void setCellDataDlb (const MInt NotUsed(dataId), const MFloat *const NotUsed(data))
 
virtual void finalizeBalance (const MInt)
 
virtual MInt noCouplingTimers (const MBool NotUsed(allTimings)) const
 Number of coupling timers. More...
 
virtual void getCouplingTimings (std::vector< std::pair< MString, MFloat > > &NotUsed(timings), const MBool NotUsed(allTimings))
 Return coupling timings. More...
 
virtual void getDomainDecompositionInformation (std::vector< std::pair< MString, MInt > > &NotUsed(domainInfo))
 Return information on current domain decomposition (e.g. number of coupled cells/elements/...) More...
 
void setDlbTimer (const MInt timerId)
 
void startLoadTimer (const MString &name) const
 Start the load timer of the coupler. More...
 
void stopLoadTimer (const MString &name) const
 Stop the load timer of the coupler. More...
 
- Public Member Functions inherited from CouplingFv< nDim, FvSysEqnNS< nDim > >
 CouplingFv (const MInt couplingId, std::vector< FvCartesianSolverXD< nDim, FvSysEqnNS< nDim > > * > fvSolvers, const MInt noSolvers)
 
 CouplingFv (const MInt couplingId, Solver *solvers)
 
 CouplingFv (const CouplingFv &)=delete
 
 ~CouplingFv () override=default
 
CouplingFvoperator= (const CouplingFv &)=delete
 

Protected Member Functions

RANSRANSSolver () const
 
LESLESSolver () const
 
MInt noExchangeVariables ()
 
MInt noLESVariables ()
 
MInt noRANSVariables ()
 
MFloat getAveragingFactor ()
 
MInt a_noFvCellsLES () const
 
MInt a_noFvGridCellsLES () const
 
MInt a_noFvCellsRANS () const
 
MInt a_noFvGridCellsRANS () const
 
void initRANSValues ()
 Initialize RANSValues for LES Solver. More...
 
void initLESValues ()
 Initialize LESValues for RANS Solver. More...
 
- Protected Member Functions inherited from CouplingFv< nDim, SysEqn >
MInt noSolvers () const
 
solverTypefvSolver (const MInt solverId=0) const
 
MInt a_noFvCells () const
 
MInt a_noFvGridCells () const
 
- Protected Member Functions inherited from Coupling
MFloat returnLoadRecord () const
 
MFloat returnIdleRecord () const
 
- Protected Member Functions inherited from CouplingFv< nDim, FvSysEqnNS< nDim > >
MInt noSolvers () const
 
solverTypefvSolver (const MInt solverId=0) const
 
MInt a_noFvCells () const
 
MInt a_noFvGridCells () const
 

Protected Attributes

MInt m_RANSSolverId
 
MInt m_LESSolverId
 
const MInt m_noReconstructNutVars = 6
 
MInt m_zonalAveragingTimeStep
 
MInt m_zonalTransferInterval
 
MInt m_averageTimeSteps
 
MBool m_restartLESAverage
 
MInt m_LESNoVarAverage
 
MBool m_cylindricCommunication
 
MFloat m_azimuthalAngle
 
MBool m_STGSponge = false
 
- Protected Attributes inherited from CouplingFv< nDim, SysEqn >
std::vector< solverType * > m_fvSolvers {}
 
- Protected Attributes inherited from CouplingFv< nDim, FvSysEqnNS< nDim > >
std::vector< solverType * > m_fvSolvers
 

Friends

class CouplingFv< nDim, FvSysEqnNS< nDim > >
 
class CouplingFv< nDim, SysEqn >
 

Detailed Description

template<MInt nDim, class SysEqn>
class FvZonal< nDim, SysEqn >

Definition at line 22 of file fvzonal.h.

Member Typedef Documentation

◆ LES

template<MInt nDim, class SysEqn >
using FvZonal< nDim, SysEqn >::LES = FvCartesianSolverXD<nDim, FvSysEqnNS<nDim> >

Definition at line 29 of file fvzonal.h.

◆ RANS

template<MInt nDim, class SysEqn >
using FvZonal< nDim, SysEqn >::RANS = FvCartesianSolverXD<nDim, SysEqn>

Definition at line 28 of file fvzonal.h.

Constructor & Destructor Documentation

◆ FvZonal()

template<MInt nDim, class SysEqn >
FvZonal< nDim, SysEqn >::FvZonal ( const MInt  couplingId,
RANS R,
LES L 
)

◆ ~FvZonal()

template<MInt nDim, class SysEqn >
virtual FvZonal< nDim, SysEqn >::~FvZonal ( )
virtualdefault

Member Function Documentation

◆ a_noFvCellsLES()

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::a_noFvCellsLES ( ) const
inlineprotected

Definition at line 54 of file fvzonal.h.

54{ return LESSolver().a_noCells(); }
MInt a_noCells() const
Returns the number of cells.
LES & LESSolver() const
Definition: fvzonal.h:45

◆ a_noFvCellsRANS()

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::a_noFvCellsRANS ( ) const
inlineprotected

Definition at line 56 of file fvzonal.h.

56{ return RANSSolver().a_noCells(); }
RANS & RANSSolver() const
Definition: fvzonal.h:44

◆ a_noFvGridCellsLES()

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::a_noFvGridCellsLES ( ) const
inlineprotected

Definition at line 55 of file fvzonal.h.

55{ return LESSolver().c_noCells(); }

◆ a_noFvGridCellsRANS()

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::a_noFvGridCellsRANS ( ) const
inlineprotected

Definition at line 57 of file fvzonal.h.

57{ return RANSSolver().c_noCells(); }

◆ checkProperties()

template<MInt nDim, class SysEqn >
void FvZonal< nDim, SysEqn >::checkProperties ( )
inlineoverridevirtual

Implements Coupling.

Reimplemented in FvZonalRTV< nDim, SysEqn >, and FvZonalSTG< nDim, SysEqn >.

Definition at line 41 of file fvzonal.h.

41{};

◆ cleanUp()

template<MInt nDim, class SysEqn >
void FvZonal< nDim, SysEqn >::cleanUp ( )
inlinevirtual

Implements Coupling.

Reimplemented in FvZonalRTV< nDim, SysEqn >, and FvZonalSTG< nDim, SysEqn >.

Definition at line 40 of file fvzonal.h.

40{};

◆ finalizeSubCoupleInit()

template<MInt nDim, class SysEqn >
void FvZonal< nDim, SysEqn >::finalizeSubCoupleInit ( MInt  )
inlinevirtual

Implements Coupling.

Reimplemented in FvZonalRTV< nDim, SysEqn >, and FvZonalSTG< nDim, SysEqn >.

Definition at line 38 of file fvzonal.h.

38{};

◆ getAveragingFactor()

template<MInt nDim, class SysEqn >
MFloat FvZonal< nDim, SysEqn >::getAveragingFactor ( )
inlineprotected

Definition at line 50 of file fvzonal.h.

50 {
51 return F1B8 * LESSolver().m_Ma * sqrt(LESSolver().m_TInfinity) * LESSolver().timeStep();
52 };
MFloat timeStep(MBool canSolver=false) noexcept
MFloat m_Ma
the Mach number
Definition: solver.h:71

◆ init()

template<MInt nDim, class SysEqn >
void FvZonal< nDim, SysEqn >::init ( )
inlineoverridevirtual

Implements Coupling.

Reimplemented in FvZonalRTV< nDim, SysEqn >, and FvZonalSTG< nDim, SysEqn >.

Definition at line 37 of file fvzonal.h.

37{};

◆ initLESValues()

template<MInt nDim, class SysEqn >
void FvZonal< nDim, SysEqn >::initLESValues
protected
Author
Jannik Borgelt

Definition at line 135 of file fvzonal.cpp.

135 {
136 TRACE();
137
138 // write RANS data to LES Solver
139 if(RANSSolver().grid().isActive()) {
140 for(MInt var = 0; var < noRANSVariables(); var++) {
141 for(MInt cellId = 0; cellId < a_noFvGridCellsRANS(); cellId++) {
142 MInt LESId = convertIdParent(RANSSolver(), LESSolver(), cellId);
143
144 ASSERT(cellId < (MInt)RANSSolver().m_LESValues[var].size(),
145 "Trying to access data [" + to_string(var) + "][" + to_string(cellId) + "] in m_RANSValues with length "
146 + to_string(RANSSolver().m_LESValues[var].size())
147 + ", domainId: " + to_string(RANSSolver().domainId()));
148
149 if(LESId != -1) {
150 RANSSolver().m_LESValues[var][cellId] = LESSolver().a_pvariable(LESId, var);
151 // init nu_t
152 if(var == RANSSolver().sysEqn().PV->N) {
153 RANSSolver().m_LESValues[var][cellId] = RANSSolver().a_pvariable(cellId, var);
154 }
155 }
156 }
157 }
158 }
159}
std::vector< MFloat > * m_LESValues
MFloat & a_pvariable(const MInt cellId, const MInt varId)
Returns primitive variable v of the cell cellId for variables varId.
MInt noRANSVariables()
Definition: fvzonal.h:49
MInt a_noFvGridCellsRANS() const
Definition: fvzonal.h:57
MInt convertIdParent(SolverA &solverA, SolverB &solverB, const MInt solverAId)
Conversion from solverA id to the solverB id If no cell on the same level is found,...
Definition: couplingutils.h:46
int32_t MInt
Definition: maiatypes.h:62
void const MInt cellId
Definition: collector.h:239

◆ initRANSValues()

template<MInt nDim, class SysEqn >
void FvZonal< nDim, SysEqn >::initRANSValues
protected
Author
Jannik Borgelt

Definition at line 96 of file fvzonal.cpp.

96 {
97 TRACE();
98
99 // write RANS data to LES Solver
100 if(LESSolver().grid().isActive()) {
101 for(MInt cellId = 0; cellId < a_noFvGridCellsLES(); cellId++) {
102 MInt RANSId = convertIdParent(LESSolver(), RANSSolver(), cellId);
103 if(RANSId > -1) {
104 for(MInt var = 0; var < noRANSVariables(); var++) {
105 ASSERT(cellId < (MInt)LESSolver().m_RANSValues[var].size(),
106 "Trying to access data [" + to_string(var) + "][" + to_string(cellId)
107 + "] in m_RANSValues with length " + to_string(LESSolver().m_RANSValues[var].size())
108 + ", domainId: " + to_string(LESSolver().domainId()));
109
110 LESSolver().m_RANSValues[var][cellId] = RANSSolver().a_pvariable(RANSId, var);
111 }
112 } else {
113 for(MInt var = 0; var < noRANSVariables(); var++) {
115 if(var < noLESVariables()) {
116 LESSolver().m_RANSValues[var][cellId] = LESSolver().a_pvariable(cellId, var);
117 } else {
118 LESSolver().m_RANSValues[var][cellId] = F0;
119 }
120 }
121 }
122 }
123 if(m_STGSponge) {
125 }
126 }
127 }
128}
std::vector< MFloat > * m_RANSValues
MBool m_STGSponge
Definition: fvzonal.h:77
MInt noLESVariables()
Definition: fvzonal.h:48
MBool m_cylindricCommunication
Definition: fvzonal.h:74
MInt a_noFvGridCellsLES() const
Definition: fvzonal.h:55

◆ LESSolver()

template<MInt nDim, class SysEqn >
LES & FvZonal< nDim, SysEqn >::LESSolver ( ) const
inlineprotected

Definition at line 45 of file fvzonal.h.

std::vector< solverType * > m_fvSolvers
Definition: coupling.h:395

◆ noExchangeVariables()

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::noExchangeVariables ( )
inlineprotected

Definition at line 47 of file fvzonal.h.

47{ return nDim + 2; };

◆ noLESVariables()

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::noLESVariables ( )
inlineprotected

Definition at line 48 of file fvzonal.h.

48{ return LESSolver().noVariables(); };
MInt noVariables() const override
Return the number of primitive variables.

◆ noRANSVariables()

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::noRANSVariables ( )
inlineprotected

Definition at line 49 of file fvzonal.h.

49{ return RANSSolver().noVariables(); };

◆ postCouple()

template<MInt nDim, class SysEqn >
void FvZonal< nDim, SysEqn >::postCouple ( MInt  )
inlineoverridevirtual

Implements Coupling.

Reimplemented in FvZonalRTV< nDim, SysEqn >, and FvZonalSTG< nDim, SysEqn >.

Definition at line 39 of file fvzonal.h.

39{};

◆ RANSSolver()

template<MInt nDim, class SysEqn >
RANS & FvZonal< nDim, SysEqn >::RANSSolver ( ) const
inlineprotected

Definition at line 44 of file fvzonal.h.

Friends And Related Function Documentation

◆ CouplingFv< nDim, FvSysEqnNS< nDim > >

template<MInt nDim, class SysEqn >
friend class CouplingFv< nDim, FvSysEqnNS< nDim > >
friend

Definition at line 1 of file fvzonal.h.

◆ CouplingFv< nDim, SysEqn >

template<MInt nDim, class SysEqn >
friend class CouplingFv< nDim, SysEqn >
friend

Definition at line 1 of file fvzonal.h.

Member Data Documentation

◆ m_averageTimeSteps

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::m_averageTimeSteps
protected

Definition at line 69 of file fvzonal.h.

◆ m_azimuthalAngle

template<MInt nDim, class SysEqn >
MFloat FvZonal< nDim, SysEqn >::m_azimuthalAngle
protected

Definition at line 75 of file fvzonal.h.

◆ m_cylindricCommunication

template<MInt nDim, class SysEqn >
MBool FvZonal< nDim, SysEqn >::m_cylindricCommunication
protected

Definition at line 74 of file fvzonal.h.

◆ m_LESNoVarAverage

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::m_LESNoVarAverage
protected

Definition at line 72 of file fvzonal.h.

◆ m_LESSolverId

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::m_LESSolverId
protected

Definition at line 63 of file fvzonal.h.

◆ m_noReconstructNutVars

template<MInt nDim, class SysEqn >
const MInt FvZonal< nDim, SysEqn >::m_noReconstructNutVars = 6
protected

Definition at line 65 of file fvzonal.h.

◆ m_RANSSolverId

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::m_RANSSolverId
protected

Definition at line 62 of file fvzonal.h.

◆ m_restartLESAverage

template<MInt nDim, class SysEqn >
MBool FvZonal< nDim, SysEqn >::m_restartLESAverage
protected

Definition at line 70 of file fvzonal.h.

◆ m_STGSponge

template<MInt nDim, class SysEqn >
MBool FvZonal< nDim, SysEqn >::m_STGSponge = false
protected

Definition at line 77 of file fvzonal.h.

◆ m_zonalAveragingTimeStep

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::m_zonalAveragingTimeStep
protected

Definition at line 67 of file fvzonal.h.

◆ m_zonalTransferInterval

template<MInt nDim, class SysEqn >
MInt FvZonal< nDim, SysEqn >::m_zonalTransferInterval
protected

Definition at line 68 of file fvzonal.h.


The documentation for this class was generated from the following files: