44 _args = autoPtr<argList>
46 new argList(argc, argv)
49 if (!
_args->checkRootCase())
51 Foam::FatalError.exit();
54 argList& args =
_args();
57 _pimple = autoPtr<pimpleControl>
82 ITHACAdict->lookupOrDefault<word>(
"timeDerivativeSchemeOrder",
"second");
84 "The BC method must be set to lift or penalty in ITHACAdict");
87 "The time derivative approximation must be set to either first or second order scheme in ITHACAdict");
113 surfaceScalarField&
phi =
_phi();
115#include "initContinuityErrs.H"
118 volScalarField&
p =
_p();
119 volVectorField&
U =
_U();
121 IOMRFZoneList& MRF =
_MRF();
123 instantList Times =
runTime.times();
127 mesh.setFluxRequired(
p.name());
134 label nsnapshots = 0;
139 #include "readTimeControls.H"
140 #include "CourantNo.H"
141 #include "setDeltaT.H"
145 Info <<
"Time = " <<
runTime.timeName() << nl << endl;
165 Info <<
"ExecutionTime = " <<
runTime.elapsedCpuTime() <<
" s"
166 <<
" ClockTime = " <<
runTime.elapsedClockTime() <<
" s"
179 std::ofstream of(offlinepath + name(
counter) +
"/" +
181 Ufield.append(tmp<volVectorField>(
U));
182 Pfield.append(tmp<volScalarField>(
p));
191 for (label
i = 0;
i < mu_now.size();
i++)
212 label NSUPmodes, label nNutModes)
218 for (label
i = 0;
i < cSize;
i++)
222 for (label k = 0; k < cSize; k++)
243 label samplesNumber =
nutAve.size();
246 for (label
i = 0;
i < cSize;
i++)
248 for (label j = 0; j < samplesNumber; j++)
250 for (label k = 0; k < cSize; k++)
266 label NSUPmodes, label NPmodes, label nNutModes)
276 for (label k = 0; k < cSize; k++)
298 label NSUPmodes, label NPmodes)
302 label samplesNumber =
nutAve.size();
307 for (label j = 0; j < samplesNumber; j++)
309 for (label k = 0; k < cSize; k++)
331 label NSUPmodes, label nNutModes)
337 for (label
i = 0;
i < cSize;
i++)
341 for (label k = 0; k < cSize; k++)
361 label samplesNumber =
nutAve.size();
364 for (label
i = 0;
i < cSize;
i++)
366 for (label j = 0; j < samplesNumber; j++)
368 for (label k = 0; k < cSize; k++)
384 label NSUPmodes, label NPmodes, label nNutModes)
394 for (label k = 0; k < cSize; k++)
415 label NSUPmodes, label NPmodes)
419 label samplesNumber =
nutAve.size();
424 for (label j = 0; j < samplesNumber; j++)
426 for (label k = 0; k < cSize; k++)
451 Eigen::MatrixXd
btMatrix(btSize, btSize);
455 for (label
i = 0;
i < btSize;
i++)
457 for (label j = 0; j < btSize; j++)
472 label Nnut,
bool rbfInterp)
482 for (label k = 0; k <
liftfield.size(); k++)
490 for (label k = 0; k <
NUmodes; k++)
506 word bStr =
"B_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
518 word btStr =
"bt_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
530 word kStr =
"K_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
542 word pStr =
"P_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
554 word mStr =
"M_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
566 word C_str =
"C_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
578 word ct1Str =
"ct1_" + name(
liftfield.size()) +
"_" + name(
591 word ct2Str =
"ct2_" + name(
liftfield.size()) +
"_" + name(
606 word ct1AveStr =
"ct1Ave_" + name(
liftfield.size()) +
"_" + name(
620 word ct2AveStr =
"ct2Ave_" + name(
liftfield.size()) +
"_" + name(
673 "./ITHACAoutput/Matrices/");
676 "./ITHACAoutput/Matrices/");
678 "./ITHACAoutput/Matrices/");
683 "./ITHACAoutput/Matrices/");
685 "./ITHACAoutput/Matrices/");
696 "./ITHACAoutput/Matrices/");
699 "./ITHACAoutput/Matrices/");
701 "./ITHACAoutput/Matrices/");
706 "./ITHACAoutput/Matrices/");
708 "./ITHACAoutput/Matrices/");
721 "./ITHACAoutput/Matrices/ct1");
723 "./ITHACAoutput/Matrices/ct2");
728 "./ITHACAoutput/Matrices/ct1Ave");
730 "./ITHACAoutput/Matrices/ct2Ave");
742 "./ITHACAoutput/Matrices/");
744 "./ITHACAoutput/Matrices/");
752 if (rbfInterp ==
true && (!Pstream::parRun()))
758 "Thes size of the shape parameters vector must be equal to the number of eddy viscosity modes nNutModes");
768 Eigen::MatrixXd weights;
772 word weightName =
"wRBF_N" + name(
i + 1) +
"_" + name(
liftfield.size()) +
"_"
777 samples[
i] =
new SPLINTER::DataTable(1, 1);
779 for (label j = 0; j <
coeffL2.cols(); j++)
787 SPLINTER::RadialBasisFunctionType::GAUSSIAN, weights,
radii(
i));
788 std::cout <<
"Constructing RadialBasisFunction for mode " <<
i + 1 << std::endl;
792 samples[
i] =
new SPLINTER::DataTable(1, 1);
794 for (label j = 0; j <
coeffL2.cols(); j++)
800 SPLINTER::RadialBasisFunctionType::GAUSSIAN,
false,
radii(
i));
802 "./ITHACAoutput/weightsSUP/", weightName);
803 std::cout <<
"Constructing RadialBasisFunction for mode " <<
i + 1 << std::endl;
812 label Nnut,
bool rbfInterp)
822 for (label k = 0; k <
liftfield.size(); k++)
830 for (label k = 0; k <
NUmodes; k++)
838 word B_str =
"B_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
850 word btStr =
"bt_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
862 word K_str =
"K_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
874 word M_str =
"M_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
886 word D_str =
"D_" + name(
NPmodes);
897 word bc1_str =
"BC1_" + name(
liftfield.size()) +
"_" + name(
909 word bc2_str =
"BC2_" + name(
liftfield.size()) +
"_" + name(
922 word bc3_str =
"BC3_" + name(
liftfield.size()) +
"_" + name(
934 word C_str =
"C_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
946 word ct1Str =
"ct1_" + name(
liftfield.size()) +
"_" + name(
959 word ct2Str =
"ct2_" + name(
liftfield.size()) +
"_" + name(
972 word G_str =
"G_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
986 word ct1AveStr =
"ct1Ave_" + name(
liftfield.size()) +
"_" + name(
1000 word ct2AveStr =
"ct2Ave_" + name(
liftfield.size()) +
"_" + name(
1015 word ct1PPEStr =
"ct1PPE_" + name(
liftfield.size()) +
"_" + name(
1029 word ct2PPEStr =
"ct2PPE_" + name(
liftfield.size()) +
"_" + name(
1045 word ct1PPEAveStr =
"ct1PPEAve_" + name(
liftfield.size()) +
"_" + name(
1059 word ct2PPEAveStr =
"ct2PPEAve_" + name(
liftfield.size()) +
"_" + name(
1120 "./ITHACAoutput/Matrices/");
1122 "./ITHACAoutput/Matrices/");
1126 "./ITHACAoutput/Matrices/");
1128 "./ITHACAoutput/Matrices/");
1130 "./ITHACAoutput/Matrices/");
1132 "./ITHACAoutput/Matrices/");
1134 "./ITHACAoutput/Matrices/");
1139 "./ITHACAoutput/Matrices/");
1141 "./ITHACAoutput/Matrices/");
1143 "./ITHACAoutput/Matrices/");
1145 "./ITHACAoutput/Matrices/");
1156 "./ITHACAoutput/Matrices/");
1158 "./ITHACAoutput/Matrices/");
1162 "./ITHACAoutput/Matrices/");
1164 "./ITHACAoutput/Matrices/");
1166 "./ITHACAoutput/Matrices/");
1168 "./ITHACAoutput/Matrices/");
1170 "./ITHACAoutput/Matrices/");
1175 "./ITHACAoutput/Matrices/");
1177 "./ITHACAoutput/Matrices/");
1179 "./ITHACAoutput/Matrices/");
1181 "./ITHACAoutput/Matrices/");
1192 "./ITHACAoutput/Matrices/");
1194 "./ITHACAoutput/Matrices/");
1196 "./ITHACAoutput/Matrices/C");
1198 "./ITHACAoutput/Matrices/G");
1200 "./ITHACAoutput/Matrices/BC2");
1203 "./ITHACAoutput/Matrices/ct1");
1205 "./ITHACAoutput/Matrices/ct2");
1207 "./ITHACAoutput/Matrices/ct1PPE");
1209 "./ITHACAoutput/Matrices/ct2PPE");
1214 "./ITHACAoutput/Matrices/ct1Ave");
1216 "./ITHACAoutput/Matrices/ct2Ave");
1218 "./ITHACAoutput/Matrices/ct1PPEAve");
1220 "./ITHACAoutput/Matrices/ct2PPEAve");
1239 if (rbfInterp ==
true && (!Pstream::parRun()))
1245 "Thes size of the shape parameters vector must be equal to the number of eddy viscosity modes nNutModes");
1255 Eigen::MatrixXd weights;
1259 word weightName =
"wRBF_N" + name(
i + 1) +
"_" + name(
liftfield.size()) +
"_"
1264 samples[
i] =
new SPLINTER::DataTable(1, 1);
1266 for (label j = 0; j <
coeffL2.cols(); j++)
1274 SPLINTER::RadialBasisFunctionType::GAUSSIAN, weights,
radii(
i));
1275 std::cout <<
"Constructing RadialBasisFunction for mode " <<
i + 1 << std::endl;
1279 samples[
i] =
new SPLINTER::DataTable(1, 1);
1281 for (label j = 0; j <
coeffL2.cols(); j++)
1287 SPLINTER::RadialBasisFunctionType::GAUSSIAN,
false,
radii(
i));
1289 "./ITHACAoutput/weightsPPE/", weightName);
1290 std::cout <<
"Constructing RadialBasisFunction for mode " <<
i + 1 << std::endl;
1298 Eigen::VectorXd initSnapInd, Eigen::VectorXd timeSnap)
1300 List < Eigen::MatrixXd > newCoeffs;
1301 newCoeffs.setSize(2);
1302 label velCoeffsNum =
A.cols();
1303 label snapshotsNum =
A.rows();
1304 Eigen::MatrixXd pars;
1305 label parsSamplesNum = initSnapInd.size();
1306 label timeSnapshotsPerSample = snapshotsNum / parsSamplesNum;
1307 label newColsNum = 2 * velCoeffsNum;
1308 label newRowsNum = snapshotsNum - parsSamplesNum;
1309 newCoeffs[0].resize(newRowsNum, newColsNum);
1310 newCoeffs[1].resize(newRowsNum, G.cols());
1312 for (label j = 0; j < parsSamplesNum; j++)
1314 Eigen::MatrixXd b0 =
A.middleRows(j * timeSnapshotsPerSample,
1315 timeSnapshotsPerSample - 1);
1316 Eigen::MatrixXd b2 =
A.middleRows(j * timeSnapshotsPerSample + 1,
1317 timeSnapshotsPerSample - 1);
1318 Eigen::MatrixXd bNew(b0.rows(), b0.cols() + b2.cols());
1319 bNew << b2, (b2 - b0) / (timeSnap(j, 0));
1320 newCoeffs[0].block(j * timeSnapshotsPerSample - j, 0,
1321 timeSnapshotsPerSample - 1, newColsNum) = bNew;
1322 newCoeffs[1].middleRows(j * timeSnapshotsPerSample - j,
1323 timeSnapshotsPerSample - 1) = G.middleRows(j * timeSnapshotsPerSample + 1,
1324 timeSnapshotsPerSample - 1);
1334 List < Eigen::MatrixXd > newCoeffs;
1335 newCoeffs.setSize(2);
1336 Eigen::MatrixXd pars;
1337 pars =
z.leftCols(
z.cols() - 1);
1338 newCoeffs[0].resize(
A.rows(),
A.cols() +
z.cols() - 1);
1339 newCoeffs[1].resize(G.rows(), G.cols());
1340 newCoeffs[0] << pars,
A;
1347 Eigen::MatrixXd
A, Eigen::MatrixXd G,
1348 Eigen::VectorXd initSnapInd, Eigen::VectorXd timeSnap)
1350 List < Eigen::MatrixXd > newCoeffs;
1351 newCoeffs.setSize(2);
1352 label velCoeffsNum =
A.cols();
1353 label snapshotsNum =
A.rows();
1354 Eigen::MatrixXd pars;
1355 pars =
z.leftCols(
z.cols() - 1);
1356 label parsSamplesNum = initSnapInd.size();
1357 label timeSnapshotsPerSample = snapshotsNum / parsSamplesNum;
1358 label newColsNum = 2 * velCoeffsNum;
1359 label newRowsNum = snapshotsNum - parsSamplesNum;
1360 newCoeffs[0].resize(newRowsNum, newColsNum +
z.cols() - 1);
1361 newCoeffs[1].resize(newRowsNum, G.cols());
1363 for (label j = 0; j < parsSamplesNum; j++)
1365 Eigen::MatrixXd b0 =
A.middleRows(j * timeSnapshotsPerSample,
1366 timeSnapshotsPerSample - 1);
1367 Eigen::MatrixXd b2 =
A.middleRows(j * timeSnapshotsPerSample + 1,
1368 timeSnapshotsPerSample - 1);
1369 Eigen::MatrixXd bNew(b0.rows(), b0.cols() + b2.cols());
1370 bNew << b2, (b2 - b0) / (timeSnap(j, 0));
1371 newCoeffs[0].block(j * timeSnapshotsPerSample - j, 0,
1372 timeSnapshotsPerSample - 1,
z.cols() - 1) = pars.middleRows(
1373 j * timeSnapshotsPerSample + 1,
1374 timeSnapshotsPerSample - 1);
1375 newCoeffs[0].block(j * timeSnapshotsPerSample - j,
z.cols() - 1,
1376 timeSnapshotsPerSample - 1, newColsNum) = bNew;
1377 newCoeffs[1].middleRows(j * timeSnapshotsPerSample - j,
1378 timeSnapshotsPerSample - 1) = G.middleRows(j * timeSnapshotsPerSample + 1,
1379 timeSnapshotsPerSample - 1);
1387 Eigen::VectorXd par,
double timeSnap)
1389 Eigen::MatrixXd newCoeffs;
1390 label velCoeffsNum =
A.cols();
1391 label snapshotsNum =
A.rows();
1392 label parsSamplesNum = par.size();
1393 label newColsNum = 2 * velCoeffsNum + parsSamplesNum;
1394 label newRowsNum = snapshotsNum - 1;
1395 newCoeffs.resize(newRowsNum, newColsNum);
1396 Eigen::MatrixXd b0 =
A.topRows(
A.rows() - 1);
1397 Eigen::MatrixXd b1 =
A.bottomRows(
A.rows() - 1);
1398 Eigen::MatrixXd bNew(b0.rows(), b0.cols() + b1.cols());
1399 bNew << b1, ((b1 - b0) / (timeSnap));
1400 newCoeffs.leftCols(parsSamplesNum) = Eigen::MatrixXd::Ones(newRowsNum,
1401 parsSamplesNum) * par;
1402 newCoeffs.rightCols(newColsNum - parsSamplesNum) = bNew;
#define M_Assert(Expr, Msg)
Header file of the UnsteadyNSTurb class.
IOdictionary * ITHACAdict
Dictionary for input objects from file.
static ITHACAparameters * getInstance()
Gets an instance of ITHACAparameters, to be used if the instance is already existing.
Eigen::Tensor< double, 3 > ct1AveTensor
Turbulent average viscosity tensor for the splitting approach.
Eigen::Tensor< double, 3 > turbulenceAveTensor2(label NUmodes, label NSUPmodes)
ct2Ave added tensor for approximation of the averaged part of the eddy viscosity
Eigen::Tensor< double, 3 > cTotalTensor
Turbulent total viscosity tensor.
PtrList< volScalarField > nutAve
List of for eddy viscosity time-averaged fields.
scalar _pRefValue
Pressure reference value.
Eigen::MatrixXd btTurbulence(label NUmodes, label NSUPmodes)
bt added matrix for the turbulence treatement
List< Eigen::MatrixXd > velParDerivativeCoeff(Eigen::MatrixXd A, Eigen::MatrixXd G, Eigen::VectorXd initSnapInd, Eigen::VectorXd timeSnap)
A method to compute the two matrices needed for the RBF interpolation by combining the parameter valu...
Eigen::Tensor< double, 3 > turbulencePPETensor1(label NUmodes, label NSUPmodes, label NPmodes, label nNutModes)
ct1PPE added tensor for the turbulence treatement in the PPE method
std::vector< SPLINTER::RBFSpline * > rbfSplines
Create a samples for interpolation.
Eigen::Tensor< double, 3 > turbulenceAveTensor1(label NUmodes, label NSUPmodes)
ct1Ave added tensor for approximation of the averaged part of the eddy viscosity
void projectSUP(fileName folder, label NUmodes, label NPmodes, label NSUPmodes, label nNutModes, bool rbfInterp=true)
Project using a supremizer approach.
Eigen::Tensor< double, 3 > turbulencePPEAveTensor1(label NUmodes, label NSUPmodes, label NPmodes)
ct1PPEAve added tensor for approximation of the averaged part of the eddy viscosity with the usage of...
UnsteadyNSTurb()
Construct Null.
Eigen::Tensor< double, 3 > turbulenceTensor2(label NUmodes, label NSUPmodes, label nNutModes)
ct2 added tensor for the turbulence treatement
autoPtr< volScalarField > _nut
Eddy viscosity field.
Eigen::Tensor< double, 3 > ct2PPEAveTensor
Turbulent average viscosity tensor for the splitting approach in the PPE equation.
label interChoice
Interpolation independent variable choice.
Eigen::MatrixXd coeffL2
The matrix of L2 projection coefficients for the eddy viscosity.
Eigen::MatrixXd btMatrix
Turbulent viscosity term.
volScalarModes nutModes
List of POD modes for eddy viscosity.
Eigen::Tensor< double, 3 > turbulencePPEAveTensor2(label NUmodes, label NSUPmodes, label NPmodes)
ct2PPEAve added tensor for approximation of the averaged part of the eddy viscosity with the usage of...
Eigen::Tensor< double, 3 > cTotalPPEAveTensor
Turbulent total average viscosity tensor for the splitting approach in the PPE equation.
double e
RBF functions radius.
PtrList< volScalarField > nutFields
List of snapshots for the solution for eddy viscosity.
Eigen::Tensor< double, 3 > ct1PPEAveTensor
Turbulent average viscosity tensor for the splitting approach in the PPE equation.
Eigen::Tensor< double, 3 > ct2PPETensor
Turbulent viscosity tensor in the PPE equation.
Eigen::Tensor< double, 3 > ct1PPETensor
Turbulent viscosity tensor in the PPE equation.
Eigen::Tensor< double, 3 > ct2Tensor
Turbulent viscosity tensor.
Eigen::Tensor< double, 3 > ct2AveTensor
Turbulent average viscosity tensor for the splitting approach.
label _pRefCell
Pressure reference cell.
Eigen::Tensor< double, 3 > ct1Tensor
Turbulent viscosity tensor.
Eigen::Tensor< double, 3 > cTotalPPETensor
Turbulent total viscosity tensor in the PPE equation.
List< Eigen::MatrixXd > velParCoeff(Eigen::MatrixXd A, Eigen::MatrixXd G)
A method to compute the two matrices needed for the RBF interpolation by combining the parameter samp...
Eigen::MatrixXd bTotalMatrix
Total B Matrix.
List< Eigen::MatrixXd > velDerivativeCoeff(Eigen::MatrixXd A, Eigen::MatrixXd G, Eigen::VectorXd initSnapInd, Eigen::VectorXd timeSnap)
A method to compute the two matrices needed for the RBF interpolation by combining the velocity L2 pr...
label nNutModes
Number of viscoisty modes used for the projection.
Eigen::Tensor< double, 3 > cTotalAveTensor
Turbulent total average viscosity tensor for the splitting approach.
void projectPPE(fileName folder, label NUmodes, label NPmodes, label NSUPmodes, label nNutModes, bool rbfInterp=true)
Project using the Poisson Equation for pressure.
Eigen::VectorXd radii
RBF shape parameters vector.
Eigen::Tensor< double, 3 > turbulencePPETensor2(label NUmodes, label NSUPmodes, label NPmodes, label nNutModes)
ct2PPE added tensor for the turbulence treatement in the PPE method
Eigen::MatrixXd z
Time-parameter combined matrix.
std::vector< SPLINTER::DataTable * > samples
Create a Rbf splines for interpolation.
Eigen::MatrixXd velRBF
Velocity coefficients for RBF interpolation.
Eigen::Tensor< double, 3 > turbulenceTensor1(label NUmodes, label NSUPmodes, label nNutModes)
ct1 added tensor for the turbulence treatement
bool checkWrite(Time &timeObject)
Function to check if the solution must be exported.
scalar startTime
Start Time (initial time to start storing the snapshots)
scalar writeEvery
Time step of the writing procedure.
scalar timeStep
Time step of the simulation.
scalar nextWrite
Auxiliary variable to store the next writing instant.
scalar finalTime
Final time (final time of the simulation and consequently of the acquisition of the snapshots)
void writeMu(List< scalar > mu_now)
Write out a list of scalar corresponding to the parameters used in the truthSolve.
Eigen::MatrixXd mu_samples
Matrix of parameters to be used for PODI, where each row corresponds to a sample point....
label counter
Counter used for the output of the full order solutions.
bool offline
Boolean variable, it is 1 if the Offline phase has already been computed, else 0.
IOdictionary * ITHACAdict
dictionary to store input output infos
Eigen::MatrixXd mu
Row matrix of parameters.
autoPtr< argList > _args
argList
bool podex
Boolean variable, it is 1 if the POD has already been computed, else 0.
void truthSolve()
Perform a TruthSolve.
List< Eigen::MatrixXd > bcVelVec
Boundary term for penalty method - vector.
scalar maxIter
Number of maximum iterations to be done for the computation of the truth solution.
label NPmodes
Number of pressure modes used for the projection.
bool supex
Boolean variable to check the existence of the supremizer modes.
Eigen::MatrixXd BC1_matrix
PPE BC1.
Eigen::MatrixXd diffusive_term(label NUmodes, label NPmodes, label NSUPmodes)
Diffusive Term.
autoPtr< surfaceScalarField > _phi
Flux.
Eigen::MatrixXd BC3_matrix
PPE BC3.
Eigen::Tensor< double, 3 > C_tensor
Diffusion term.
PtrList< volScalarField > Pfield
List of pointers used to form the pressure snapshots matrix.
volVectorModes supmodes
List of pointers used to form the supremizer modes.
List< Eigen::MatrixXd > bcVelocityVec(label NUmodes, label NSUPmodes)
Boundary integral modes on boundary used by the penaly method.
autoPtr< fv::options > _fvOptions
fvOptions
autoPtr< Time > _runTime
Time.
volVectorModes Umodes
List of pointers used to form the velocity modes.
PtrList< volVectorField > Ufield
List of pointers used to form the velocity snapshots matrix.
Eigen::MatrixXd pressure_BC1(label NPmodes, label NUmodes)
Term N° 1 given by the additional boundary condition using a PPE approach.
Eigen::MatrixXd divergence_term(label NUmodes, label NPmodes, label NSUPmodes)
Divergence Term (supremizer approach)
scalar tolerance
Tolerance for the residual of the stationary problems, there is the same tolerance for velocity and p...
Eigen::MatrixXd mass_term(label NUmodes, label NPmodes, label NSUPmodes)
Mass Term.
autoPtr< fvMesh > _mesh
Mesh.
autoPtr< singlePhaseTransportModel > _laminarTransport
Laminar transport (used by turbulence model)
label NUmodes
Number of velocity modes used for the projection.
PtrList< volVectorField > liftfield
List of pointers used to form the list of lifting functions.
scalar pRefValue
Reference pressure value.
label pRefCell
Reference pressure cell.
volVectorModes L_U_SUPmodes
List of pointers containing the total number of lift, supremizer and velocity modes.
Eigen::MatrixXd pressure_BC3(label NPmodes, label NUmodes)
Term N° 3 given by the additional boundary condition using a PPE approach.
label NNutModesOut
Number of nut modes to be calculated.
Eigen::MatrixXd B_matrix
Diffusion term.
Eigen::MatrixXd D_matrix
Laplacian term PPE.
autoPtr< IOMRFZoneList > _MRF
MRF variable.
label NSUPmodes
Number of supremizer modes used for the projection.
Eigen::Tensor< double, 3 > gTensor
Divergence of momentum PPE.
label NNutModes
Number of nut modes used for the projection.
Eigen::MatrixXd K_matrix
Gradient of pressure matrix.
Eigen::Tensor< double, 3 > convective_term_tens(label NUmodes, label NPmodes, label NSUPmodes)
Export convective term as a tensor.
label NUmodesOut
Number of velocity modes to be calculated.
Eigen::Tensor< double, 3 > divMomentum(label NUmodes, label NPmodes)
Divergence of convective term (PPE approach)
Eigen::MatrixXd pressure_gradient_term(label NUmodes, label NPmodes, label NSUPmodes)
Gradient of pressure.
List< Eigen::MatrixXd > bcVelMat
Boundary term for penalty method - matrix.
Eigen::MatrixXd P_matrix
Div of velocity.
Eigen::MatrixXd M_matrix
Mass Matrix.
Eigen::MatrixXd laplacian_pressure(label NPmodes)
Laplacian of pressure term (PPE approach)
label NPmodesOut
Number of pressure modes to be calculated.
List< Eigen::MatrixXd > bcVelocityMat(label NUmodes, label NSUPmodes)
Boundary integral modes on boundary used by the penaly method.
Eigen::Tensor< double, 3 > bc2Tensor
PPE BC2.
autoPtr< volVectorField > _U
Velocity field.
Eigen::Tensor< double, 3 > pressureBC2(label NPmodes, label NUmodes)
Term N° 2 given by the additional boundary condition using a PPE approach.
volScalarModes Pmodes
List of pointers used to form the pressure modes.
word bcMethod
Boundary Method.
autoPtr< volScalarField > _p
Pressure field.
autoPtr< incompressible::turbulenceModel > turbulence
Turbulence model.
word timeDerivativeSchemeOrder
autoPtr< pimpleControl > _pimple
pimpleControl
void ReadDenseMatrix(MatrixType &Matrix, word folder, word MatrixName)
Read a dense matrix from a binary format file.
void exportSolution(GeometricField< Type, PatchField, GeoMesh > &s, fileName subfolder, fileName folder, word fieldName)
Export a field to file in a certain folder and subfolder.
void exportMatrix(Eigen::Matrix< T, -1, dim > &matrix, word Name, word type, word folder)
Export the reduced matrices in numpy (type=python), matlab (type=matlab) and txt (type=eigen) format ...
void SaveDenseMatrix(MatrixType &Matrix, word folder, word MatrixName)
Save a dense matrix to a binary format file.
void ReadDenseTensor(TensorType &Tensor, word folder, word MatrixName)
Read a dense tensor from file.
List< Eigen::MatrixXd > readMatrix(word folder, word mat_name)
Read a three dimensional matrix from a txt file in Eigen format.
void exportTensor(Eigen::Tensor< T, 3 > tensor, word Name, word type, word folder)
Export the reduced tensor in numpy (tipo=python), matlab (tipo=matlab) and txt (tipo=eigen) format.
void SaveDenseTensor(TensorType &Tensor, word folder, word MatrixName)
Save a dense tensor to file.
Eigen::VectorXd getCoeffs(GeometricField< Type, PatchField, GeoMesh > &snapshot, PtrList< GeometricField< Type, PatchField, GeoMesh > > &modes, label Nmodes, bool consider_volumes)
Projects a snapshot on a basis function and gets the coefficients of the projection.
bool check_pod()
Check if the POD data folder "./ITHACAoutput/POD" exists.
bool check_off()
Check if the offline data folder "./ITHACAoutput/Offline" exists.
bool check_folder(word folder)
Checks if a folder exists.
bool check_file(std::string fileName)
Function that returns true if a file exists.
bool check_sup()
Check if the supremizer folder exists.
singlePhaseTransportModel & laminarTransport