24template <MInt nDim,
class SysEqn>
34 m_zonalAveragingTimeStep = Context::getBasicProperty<MInt>(
"zonalAveragingTimeStep", AT_, &m_zonalAveragingTimeStep);
43 m_zonalTransferInterval = 50;
45 m_zonalTransferInterval = Context::getBasicProperty<MInt>(
"zonalTransferInterval", AT_, &m_zonalTransferInterval);
55 m_restartLESAverage =
false;
57 m_restartLESAverage = Context::getBasicProperty<MBool>(
"restartLESAverage", AT_, &m_restartLESAverage);
67 m_cylindricCommunication =
false;
69 m_cylindricCommunication =
70 Context::getBasicProperty<MBool>(
"cylindricCommunication", AT_, &m_cylindricCommunication);
71 m_azimuthalAngle = Context::getBasicProperty<MFloat>(
"azimuthalAngle", AT_, &m_azimuthalAngle);
75 m_STGSponge = Context::getBasicProperty<MBool>(
"STGSponge", AT_, &m_STGSponge);
78 mAlloc(LESSolver().m_RANSValues, noRANSVariables() + (
MInt)m_STGSponge,
"LESSolver().m_RANSValues", AT_);
79 LESSolver().m_noRANSVariables = noRANSVariables() + (
MInt)m_STGSponge;
80 for(
MInt i = 0; i < noRANSVariables() + (
MInt)m_STGSponge; i++) {
81 LESSolver().m_RANSValues[i].clear();
84 mAlloc(RANSSolver().m_LESValues, noRANSVariables(),
"RANSSolver().m_LESValues", AT_);
85 RANSSolver().m_noLESVariables = noRANSVariables();
86 for(
MInt i = 0; i < noRANSVariables(); i++) {
87 RANSSolver().m_LESValues[i].clear();
95template <MInt nDim,
class SysEqn>
100 if(LESSolver().grid().isActive()) {
101 for(
MInt cellId = 0; cellId < a_noFvGridCellsLES(); cellId++) {
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()));
110 LESSolver().m_RANSValues[var][cellId] = RANSSolver().a_pvariable(RANSId, var);
113 for(
MInt var = 0; var < noRANSVariables(); var++) {
114 if(m_cylindricCommunication) {
115 if(var < noLESVariables()) {
116 LESSolver().m_RANSValues[var][cellId] = LESSolver().a_pvariable(cellId, var);
118 LESSolver().m_RANSValues[var][cellId] = F0;
124 LESSolver().m_RANSValues[noRANSVariables()][cellId] = F0;
134template <MInt nDim,
class SysEqn>
139 if(RANSSolver().grid().isActive()) {
140 for(
MInt var = 0; var < noRANSVariables(); var++) {
141 for(
MInt cellId = 0; cellId < a_noFvGridCellsRANS(); cellId++) {
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()));
150 RANSSolver().m_LESValues[var][cellId] = LESSolver().a_pvariable(LESId, var);
152 if(var == RANSSolver().sysEqn().PV->N) {
153 RANSSolver().m_LESValues[var][cellId] = RANSSolver().a_pvariable(cellId, var);
void mAlloc(T *&a, const MLong N, const MString &objectName, MString function)
allocates memory for one-dimensional array 'a' of size N
static MBool propertyExists(const MString &name, MInt solver=m_noSolvers)
This function checks if a property exists in general.
void initRANSValues()
Initialize RANSValues for LES Solver.
FvZonal(const MInt couplingId, RANS *R, LES *L)
void initLESValues()
Initialize LESValues for RANS Solver.
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,...