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");
93 NUmodesOut =
para->ITHACAdict->lookupOrDefault<label>(
"NmodesUout", 15);
95 NPmodesOut =
para->ITHACAdict->lookupOrDefault<label>(
"NmodesPout", 15);
99 NUmodes =
para->ITHACAdict->lookupOrDefault<label>(
"NmodesUproj", 10);
101 NSUPmodes =
para->ITHACAdict->lookupOrDefault<label>(
"NmodesSUPproj", 10);
103 NPmodes =
para->ITHACAdict->lookupOrDefault<label>(
"NmodesPproj", 10);
105 NNutModes =
para->ITHACAdict->lookupOrDefault<label>(
"NmodesNutProj", 0);
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();
126 mesh.setFluxRequired(
p.name());
131 label nsnapshots = 0;
136#include "readTimeControls.H"
137#include "CourantNo.H"
138#include "setDeltaT.H"
140 Info <<
"Time = " <<
runTime.timeName() << nl << endl;
160 Info <<
"ExecutionTime = " <<
runTime.elapsedCpuTime() <<
" s"
161 <<
" ClockTime = " <<
runTime.elapsedClockTime() <<
" s"
173 std::ofstream of(offlinepath + name(
counter) +
"/" +
175 Ufield.append(tmp<volVectorField>(
U));
176 Pfield.append(tmp<volScalarField>(
p));
185 for (label
i = 0;
i < mu_now.size();
i++)
212 for (label
i = 0;
i < cSize;
i++)
216 for (label k = 0; k < cSize; k++)
237 label samplesNumber =
nutAve.size();
240 for (label
i = 0;
i < cSize;
i++)
242 for (label j = 0; j < samplesNumber; j++)
244 for (label k = 0; k < cSize; k++)
270 for (label k = 0; k < cSize; k++)
296 label samplesNumber =
nutAve.size();
301 for (label j = 0; j < samplesNumber; j++)
303 for (label k = 0; k < cSize; k++)
331 for (label
i = 0;
i < cSize;
i++)
335 for (label k = 0; k < cSize; k++)
355 label samplesNumber =
nutAve.size();
358 for (label
i = 0;
i < cSize;
i++)
360 for (label j = 0; j < samplesNumber; j++)
362 for (label k = 0; k < cSize; k++)
388 for (label k = 0; k < cSize; k++)
413 label samplesNumber =
nutAve.size();
418 for (label j = 0; j < samplesNumber; j++)
420 for (label k = 0; k < cSize; k++)
445 Eigen::MatrixXd
btMatrix(btSize, btSize);
449 for (label
i = 0;
i < btSize;
i++)
451 for (label j = 0; j < btSize; j++)
466 label Nnut,
bool rbfInterp)
476 for (label k = 0; k <
liftfield.size(); k++)
484 for (label k = 0; k <
NUmodes; k++)
500 word bStr =
"B_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
512 word btStr =
"bt_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
524 word kStr =
"K_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
536 word pStr =
"P_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
548 word mStr =
"M_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
560 word C_str =
"C_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
572 word ct1Str =
"ct1_" + name(
liftfield.size()) +
"_" + name(
585 word ct2Str =
"ct2_" + name(
liftfield.size()) +
"_" + name(
600 word ct1AveStr =
"ct1Ave_" + name(
liftfield.size()) +
"_" + name(
614 word ct2AveStr =
"ct2Ave_" + name(
liftfield.size()) +
"_" + name(
660 if (
para->exportPython)
667 "./ITHACAoutput/Matrices/");
670 "./ITHACAoutput/Matrices/");
672 "./ITHACAoutput/Matrices/");
677 "./ITHACAoutput/Matrices/");
679 "./ITHACAoutput/Matrices/");
683 if (
para->exportMatlab)
690 "./ITHACAoutput/Matrices/");
693 "./ITHACAoutput/Matrices/");
695 "./ITHACAoutput/Matrices/");
700 "./ITHACAoutput/Matrices/");
702 "./ITHACAoutput/Matrices/");
715 "./ITHACAoutput/Matrices/ct1");
717 "./ITHACAoutput/Matrices/ct2");
722 "./ITHACAoutput/Matrices/ct1Ave");
724 "./ITHACAoutput/Matrices/ct2Ave");
736 "./ITHACAoutput/Matrices/");
738 "./ITHACAoutput/Matrices/");
746 if (rbfInterp ==
true && (!Pstream::parRun()))
752 "Thes size of the shape parameters vector must be equal to the number of eddy viscosity modes nNutModes");
762 Eigen::MatrixXd weights;
766 word weightName =
"wRBF_N" + name(
i + 1) +
"_" + name(
liftfield.size()) +
"_"
771 samples[
i] =
new SPLINTER::DataTable(1, 1);
773 for (label j = 0; j <
coeffL2.cols(); j++)
781 SPLINTER::RadialBasisFunctionType::GAUSSIAN, weights,
radii(
i));
782 std::cout <<
"Constructing RadialBasisFunction for mode " <<
i + 1 << std::endl;
786 samples[
i] =
new SPLINTER::DataTable(1, 1);
788 for (label j = 0; j <
coeffL2.cols(); j++)
794 SPLINTER::RadialBasisFunctionType::GAUSSIAN,
false,
radii(
i));
796 "./ITHACAoutput/weightsSUP/", weightName);
797 std::cout <<
"Constructing RadialBasisFunction for mode " <<
i + 1 << std::endl;
806 label Nnut,
bool rbfInterp)
816 for (label k = 0; k <
liftfield.size(); k++)
824 for (label k = 0; k <
NUmodes; k++)
832 word B_str =
"B_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
844 word btStr =
"bt_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
856 word K_str =
"K_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
868 word M_str =
"M_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
880 word D_str =
"D_" + name(
NPmodes);
891 word bc1_str =
"BC1_" + name(
liftfield.size()) +
"_" + name(
903 word bc2_str =
"BC2_" + name(
liftfield.size()) +
"_" + name(
916 word bc3_str =
"BC3_" + name(
liftfield.size()) +
"_" + name(
928 word C_str =
"C_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
940 word ct1Str =
"ct1_" + name(
liftfield.size()) +
"_" + name(
953 word ct2Str =
"ct2_" + name(
liftfield.size()) +
"_" + name(
966 word G_str =
"G_" + name(
liftfield.size()) +
"_" + name(
NUmodes) +
"_" + name(
980 word ct1AveStr =
"ct1Ave_" + name(
liftfield.size()) +
"_" + name(
994 word ct2AveStr =
"ct2Ave_" + name(
liftfield.size()) +
"_" + name(
1009 word ct1PPEStr =
"ct1PPE_" + name(
liftfield.size()) +
"_" + name(
1023 word ct2PPEStr =
"ct2PPE_" + name(
liftfield.size()) +
"_" + name(
1039 word ct1PPEAveStr =
"ct1PPEAve_" + name(
liftfield.size()) +
"_" + name(
1053 word ct2PPEAveStr =
"ct2PPEAve_" + name(
liftfield.size()) +
"_" + name(
1107 if (
para->exportPython)
1114 "./ITHACAoutput/Matrices/");
1116 "./ITHACAoutput/Matrices/");
1120 "./ITHACAoutput/Matrices/");
1122 "./ITHACAoutput/Matrices/");
1124 "./ITHACAoutput/Matrices/");
1126 "./ITHACAoutput/Matrices/");
1128 "./ITHACAoutput/Matrices/");
1133 "./ITHACAoutput/Matrices/");
1135 "./ITHACAoutput/Matrices/");
1137 "./ITHACAoutput/Matrices/");
1139 "./ITHACAoutput/Matrices/");
1143 if (
para->exportMatlab)
1150 "./ITHACAoutput/Matrices/");
1152 "./ITHACAoutput/Matrices/");
1156 "./ITHACAoutput/Matrices/");
1158 "./ITHACAoutput/Matrices/");
1160 "./ITHACAoutput/Matrices/");
1162 "./ITHACAoutput/Matrices/");
1164 "./ITHACAoutput/Matrices/");
1169 "./ITHACAoutput/Matrices/");
1171 "./ITHACAoutput/Matrices/");
1173 "./ITHACAoutput/Matrices/");
1175 "./ITHACAoutput/Matrices/");
1179 if (
para->exportTxt)
1186 "./ITHACAoutput/Matrices/");
1188 "./ITHACAoutput/Matrices/");
1190 "./ITHACAoutput/Matrices/C");
1192 "./ITHACAoutput/Matrices/G");
1194 "./ITHACAoutput/Matrices/BC2");
1197 "./ITHACAoutput/Matrices/ct1");
1199 "./ITHACAoutput/Matrices/ct2");
1201 "./ITHACAoutput/Matrices/ct1PPE");
1203 "./ITHACAoutput/Matrices/ct2PPE");
1208 "./ITHACAoutput/Matrices/ct1Ave");
1210 "./ITHACAoutput/Matrices/ct2Ave");
1212 "./ITHACAoutput/Matrices/ct1PPEAve");
1214 "./ITHACAoutput/Matrices/ct2PPEAve");
1233 if (rbfInterp ==
true && (!Pstream::parRun()))
1239 "Thes size of the shape parameters vector must be equal to the number of eddy viscosity modes nNutModes");
1249 Eigen::MatrixXd weights;
1253 word weightName =
"wRBF_N" + name(
i + 1) +
"_" + name(
liftfield.size()) +
"_"
1258 samples[
i] =
new SPLINTER::DataTable(1, 1);
1260 for (label j = 0; j <
coeffL2.cols(); j++)
1268 SPLINTER::RadialBasisFunctionType::GAUSSIAN, weights,
radii(
i));
1269 std::cout <<
"Constructing RadialBasisFunction for mode " <<
i + 1 << std::endl;
1273 samples[
i] =
new SPLINTER::DataTable(1, 1);
1275 for (label j = 0; j <
coeffL2.cols(); j++)
1281 SPLINTER::RadialBasisFunctionType::GAUSSIAN,
false,
radii(
i));
1283 "./ITHACAoutput/weightsPPE/", weightName);
1284 std::cout <<
"Constructing RadialBasisFunction for mode " <<
i + 1 << std::endl;
1292 Eigen::VectorXd initSnapInd, Eigen::VectorXd timeSnap)
1294 List < Eigen::MatrixXd > newCoeffs;
1295 newCoeffs.setSize(2);
1296 label velCoeffsNum =
A.cols();
1297 label snapshotsNum =
A.rows();
1298 Eigen::MatrixXd pars;
1299 label parsSamplesNum = initSnapInd.size();
1300 label timeSnapshotsPerSample = snapshotsNum / parsSamplesNum;
1301 label newColsNum = 2 * velCoeffsNum;
1302 label newRowsNum = snapshotsNum - parsSamplesNum;
1303 newCoeffs[0].resize(newRowsNum, newColsNum);
1304 newCoeffs[1].resize(newRowsNum, G.cols());
1306 for (label j = 0; j < parsSamplesNum; j++)
1308 Eigen::MatrixXd b0 =
A.middleRows(j * timeSnapshotsPerSample,
1309 timeSnapshotsPerSample - 1);
1310 Eigen::MatrixXd b2 =
A.middleRows(j * timeSnapshotsPerSample + 1,
1311 timeSnapshotsPerSample - 1);
1312 Eigen::MatrixXd bNew(b0.rows(), b0.cols() + b2.cols());
1313 bNew << b2, (b2 - b0) / (timeSnap(j, 0));
1314 newCoeffs[0].block(j * timeSnapshotsPerSample - j, 0,
1315 timeSnapshotsPerSample - 1, newColsNum) = bNew;
1316 newCoeffs[1].middleRows(j * timeSnapshotsPerSample - j,
1317 timeSnapshotsPerSample - 1) = G.middleRows(j * timeSnapshotsPerSample + 1,
1318 timeSnapshotsPerSample - 1);
1328 List < Eigen::MatrixXd > newCoeffs;
1329 newCoeffs.setSize(2);
1330 Eigen::MatrixXd pars;
1331 pars =
z.leftCols(
z.cols() - 1);
1332 newCoeffs[0].resize(
A.rows(),
A.cols() +
z.cols() - 1);
1333 newCoeffs[1].resize(G.rows(), G.cols());
1334 newCoeffs[0] << pars,
A;
1341 Eigen::MatrixXd
A, Eigen::MatrixXd G,
1342 Eigen::VectorXd initSnapInd, Eigen::VectorXd timeSnap)
1344 List < Eigen::MatrixXd > newCoeffs;
1345 newCoeffs.setSize(2);
1346 label velCoeffsNum =
A.cols();
1347 label snapshotsNum =
A.rows();
1348 Eigen::MatrixXd pars;
1349 pars =
z.leftCols(
z.cols() - 1);
1350 label parsSamplesNum = initSnapInd.size();
1351 label timeSnapshotsPerSample = snapshotsNum / parsSamplesNum;
1352 label newColsNum = 2 * velCoeffsNum;
1353 label newRowsNum = snapshotsNum - parsSamplesNum;
1354 newCoeffs[0].resize(newRowsNum, newColsNum +
z.cols() - 1);
1355 newCoeffs[1].resize(newRowsNum, G.cols());
1357 for (label j = 0; j < parsSamplesNum; j++)
1359 Eigen::MatrixXd b0 =
A.middleRows(j * timeSnapshotsPerSample,
1360 timeSnapshotsPerSample - 1);
1361 Eigen::MatrixXd b2 =
A.middleRows(j * timeSnapshotsPerSample + 1,
1362 timeSnapshotsPerSample - 1);
1363 Eigen::MatrixXd bNew(b0.rows(), b0.cols() + b2.cols());
1364 bNew << b2, (b2 - b0) / (timeSnap(j, 0));
1365 newCoeffs[0].block(j * timeSnapshotsPerSample - j, 0,
1366 timeSnapshotsPerSample - 1,
z.cols() - 1) = pars.middleRows(
1367 j * timeSnapshotsPerSample + 1,
1368 timeSnapshotsPerSample - 1);
1369 newCoeffs[0].block(j * timeSnapshotsPerSample - j,
z.cols() - 1,
1370 timeSnapshotsPerSample - 1, newColsNum) = bNew;
1371 newCoeffs[1].middleRows(j * timeSnapshotsPerSample - j,
1372 timeSnapshotsPerSample - 1) = G.middleRows(j * timeSnapshotsPerSample + 1,
1373 timeSnapshotsPerSample - 1);
1381 Eigen::VectorXd par,
double timeSnap)
1383 Eigen::MatrixXd newCoeffs;
1384 label velCoeffsNum =
A.cols();
1385 label snapshotsNum =
A.rows();
1386 label parsSamplesNum = par.size();
1387 label newColsNum = 2 * velCoeffsNum + parsSamplesNum;
1388 label newRowsNum = snapshotsNum - 1;
1389 newCoeffs.resize(newRowsNum, newColsNum);
1390 Eigen::MatrixXd b0 =
A.topRows(
A.rows() - 1);
1391 Eigen::MatrixXd b1 =
A.bottomRows(
A.rows() - 1);
1392 Eigen::MatrixXd bNew(b0.rows(), b0.cols() + b1.cols());
1393 bNew << b1, ((b1 - b0) / (timeSnap));
1394 newCoeffs.leftCols(parsSamplesNum) = Eigen::MatrixXd::Ones(newRowsNum,
1395 parsSamplesNum) * par;
1396 newCoeffs.rightCols(newColsNum - parsSamplesNum) = bNew;
#define M_Assert(Expr, Msg)
Header file of the UnsteadyNSTurb class.
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