9#include "setRootCase.H"
12 _simple = autoPtr<simpleControl>
48 volScalarField&
p =
_p();
49 volVectorField&
U =
_U();
50 surfaceScalarField&
phi =
_phi();
53 IOMRFZoneList& MRF =
_MRF();
55 dimensionedScalar&
IV1 =
_IV1();
58 volScalarField flux_old =
_flux();
60 volScalarField&
SP =
_SP();
63 volScalarField&
D =
_D();
69 volScalarField&
A =
_A();
73 dimensionedScalar&
Sc =
_Sc();
74 dimensionedScalar&
Sct =
_Sct();
98 volScalarField&
T =
_T();
99 dimensionedScalar&
Pr =
_Pr();
100 dimensionedScalar&
Prt =
_Prt();
113 volScalarField
v =
_v();
115 dimensionedScalar&
nu =
_nu();
131 for (label
i = 0;
i < mu_now.size();
i++)
145 "./ITHACAoutput/Offline");
155 label NF =
para->
ITHACAdict->lookupOrDefault<label>(
"NFluxout", 10);
156 label NPrec1 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout1", 10);
157 label NPrec2 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout2", 10);
158 label NPrec3 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout3", 10);
159 label NPrec4 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout4", 10);
160 label NPrec5 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout5", 10);
161 label NPrec6 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout6", 10);
162 label NPrec7 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout7", 10);
163 label NPrec8 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout8", 10);
165 label NDec1 =
para->
ITHACAdict->lookupOrDefault<label>(
"NDecout1", 10);
166 label NDec2 =
para->
ITHACAdict->lookupOrDefault<label>(
"NDecout2", 10);
167 label NDec3 =
para->
ITHACAdict->lookupOrDefault<label>(
"NDecout3", 10);
219 Info <<
"End\n" << endl;
227 label NF =
para->
ITHACAdict->lookupOrDefault<label>(
"NFluxout", 10);
228 label NPrec1 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout1", 10);
229 label NPrec2 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout2", 10);
230 label NPrec3 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout3", 10);
231 label NPrec4 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout4", 10);
232 label NPrec5 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout5", 10);
233 label NPrec6 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout6", 10);
234 label NPrec7 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout7", 10);
235 label NPrec8 =
para->
ITHACAdict->lookupOrDefault<label>(
"NPrecout8", 10);
237 label NDec1 =
para->
ITHACAdict->lookupOrDefault<label>(
"NDecout1", 10);
238 label NDec2 =
para->
ITHACAdict->lookupOrDefault<label>(
"NDecout2", 10);
239 label NDec3 =
para->
ITHACAdict->lookupOrDefault<label>(
"NDecout3", 10);
288 Info <<
"End\n" << endl;
296 surfaceScalarField&
phi =
_phi();
298 volScalarField
p =
_p();
299 volVectorField
U =
_U();
300 IOMRFZoneList& MRF =
_MRF();
302 volVectorField Ulift(
"Ulift" + name(k),
U);
303 instantList Times =
runTime.times();
305 pisoControl potentialFlow(
mesh,
"potentialFlow");
306 Info <<
"Solving a lifting Problem" << endl;
307 Vector<double> v1(0, 0, 0);
309 Vector<double>
v0(0, 0, 0);
311 for (label j = 0; j <
U.boundaryField().size(); j++)
317 else if (
U.boundaryField()[BCind].type() ==
"fixedValue")
326 phi = linearInterpolate(Ulift) &
mesh.Sf();
329 Info <<
"Constructing velocity potential field Phi\n" << endl;
337 IOobject::READ_IF_PRESENT,
341 dimensionedScalar(
"Phi", dimLength * dimVelocity, 0),
342 p.boundaryField().types()
344 label PhiRefCell = 0;
345 scalar PhiRefValue = 0;
349 potentialFlow.dict(),
353 mesh.setFluxRequired(Phi.name());
354 runTime.functionObjects().start();
355 MRF.makeRelative(
phi);
358 while (potentialFlow.correctNonOrthogonal())
360 fvScalarMatrix PhiEqn
362 fvm::laplacian(dimensionedScalar(
"1", dimless, 1), Phi)
366 PhiEqn.setReference(PhiRefCell, PhiRefValue);
369 if (potentialFlow.finalNonOrthogonalIter())
371 phi -= PhiEqn.flux();
375 MRF.makeAbsolute(
phi);
376 Info <<
"Continuity error = "
377 << mag(fvc::div(
phi))().weightedAverage(
mesh.V()).value()
379 Ulift = fvc::reconstruct(
phi);
380 Ulift.correctBoundaryConditions();
381 Info <<
"Interpolated velocity error = "
382 << (sqrt(sum(sqr((fvc::interpolate(
U) &
mesh.Sf()) -
phi)))
383 / sum(
mesh.magSf())).value()
396 Eigen::VectorXi NPrec, label NT, Eigen::VectorXi NDec, label NC)
398 if (NPrec.size() != 8 || NDec.size() != 3)
401 "The model assumes 8 groups of precursors and 3 of decay heat, check NDrec and NDec dimensions..."
424 Info <<
"\n Computing fluid-dynamics matrices\n" << endl;
434 Info <<
"\n End \n" << endl;
435 Info <<
"\n Computing neutronics matrices\n" << endl;
480 Info <<
"\n End \n" << endl;
481 Info <<
"\n Computing thermal matrices\n" << endl;
501 Info <<
"\n End \n" << endl;
512 PtrList<volVectorField> Together(0);
516 for (label k = 0; k <
liftfield.size(); k++)
524 for (label k = 0; k <
NUmodes; k++)
526 Together.append(
Umodes[k].clone());
531 for (label
i = 0;
i < Bsize;
i++)
533 for (label j = 0; j < Bsize; j++)
535 B_matrix(
i, j) = fvc::domainIntegrate(Together[
i] & fvc::laplacian(
536 dimensionedScalar(
"1", dimless, 1), Together[j])).value();
542 "./ITHACAoutput/Matrices/fluid_dynamics/");
550 Eigen::MatrixXd
K_matrix(K1size, K2size);
551 PtrList<volVectorField> Together(0);
555 for (label k = 0; k <
liftfield.size(); k++)
563 for (label k = 0; k <
NUmodes; k++)
565 Together.append(
Umodes[k].clone());
570 for (label
i = 0;
i < K1size;
i++)
572 for (label j = 0; j < K2size; j++)
574 K_matrix(
i, j) = fvc::domainIntegrate(Together[
i] & fvc::grad(
581 "./ITHACAoutput/Matrices/fluid_dynamics/");
592 for (label j = 0; j < Csize; j++)
597 PtrList<volVectorField> Together(0);
601 for (label k = 0; k <
liftfield.size(); k++)
609 for (label k = 0; k <
NUmodes; k++)
611 Together.append(
Umodes[k].clone());
615 for (label
i = 0;
i < Csize;
i++)
617 for (label j = 0; j < Csize; j++)
619 for (label k = 0; k < Csize; k++)
621 C_matrix[
i](j, k) = fvc::domainIntegrate(Together[
i] & fvc::div(
622 linearInterpolate(Together[j]) & Together[j].
mesh().Sf(), Together[k])).value();
629 "./ITHACAoutput/Matrices/fluid_dynamics/");
636 Eigen::MatrixXd
M_matrix(Msize, Msize);
637 PtrList<volVectorField> Together(0);
641 for (label k = 0; k <
liftfield.size(); k++)
649 for (label k = 0; k <
NUmodes; k++)
651 Together.append(
Umodes[k].clone());
656 for (label
i = 0;
i < Msize;
i++)
658 for (label j = 0; j < Msize; j++)
660 M_matrix(
i, j) = fvc::domainIntegrate(Together[
i] & Together[j]).value();
666 "./ITHACAoutput/Matrices/fluid_dynamics/");
676 Eigen::MatrixXd
P_matrix(P1size, P2size);
677 PtrList<volVectorField> Together(0);
681 for (label k = 0; k <
liftfield.size(); k++)
689 for (label k = 0; k <
NUmodes; k++)
691 Together.append(
Umodes[k].clone());
696 for (label
i = 0;
i < P1size;
i++)
698 for (label j = 0; j < P2size; j++)
701 Together[j])).value();
707 "./ITHACAoutput/Matrices/fluid_dynamics/");
719 for (label j = 0; j < G1size; j++)
724 PtrList<volVectorField> Together(0);
728 for (label k = 0; k <
liftfield.size(); k++)
736 for (label k = 0; k <
NUmodes; k++)
738 Together.append(
Umodes[k].clone());
742 for (label
i = 0;
i < G1size;
i++)
744 for (label j = 0; j < G2size; j++)
746 for (label k = 0; k < G2size; k++)
749 fvc::interpolate(Together[j]) & Together[j].
mesh().Sf(), Together[k]))).value();
756 "./ITHACAoutput/Matrices/fluid_dynamics/");
763 Eigen::MatrixXd
D_matrix(Dsize, Dsize);
766 for (label
i = 0;
i < Dsize;
i++)
768 for (label j = 0; j < Dsize; j++)
777 "./ITHACAoutput/Matrices/fluid_dynamics/");
785 Eigen::MatrixXd
BC1_matrix(P_BC1size, P_BC2size);
787 PtrList<volVectorField> Together(0);
791 for (label k = 0; k <
liftfield.size(); k++)
799 for (label k = 0; k <
NUmodes; k++)
801 Together.append(
Umodes[k].clone());
805 for (label
i = 0;
i < P_BC1size;
i++)
807 for (label j = 0; j < P_BC2size; j++)
809 surfaceScalarField lpl((fvc::interpolate(fvc::laplacian(
810 Together[j]))&
mesh.Sf())*fvc::interpolate(
Pmodes[
i]));
813 for (label k = 0; k < lpl.boundaryField().size(); k++)
815 s += gSum(lpl.boundaryField()[k]);
823 "./ITHACAoutput/Matrices/fluid_dynamics/");
836 for (label j = 0; j < P2_BC1size; j++)
841 PtrList<volVectorField> Together(0);
845 for (label k = 0; k <
liftfield.size(); k++)
853 for (label k = 0; k <
NUmodes; k++)
855 Together.append(
Umodes[k].clone());
859 for (label
i = 0;
i < P2_BC1size;
i++)
861 for (label j = 0; j < P2_BC2size; j++)
863 for (label k = 0; k < P2_BC2size; k++)
865 surfaceScalarField div_m(fvc::interpolate(fvc::div(fvc::interpolate(
866 Together[j]) &
mesh.Sf(), Together[k]))&
mesh.Sf()*fvc::interpolate(
Pmodes[
i]));
869 for (label k = 0; k < div_m.boundaryField().size(); k++)
871 s += gSum(div_m.boundaryField()[k]);
881 "./ITHACAoutput/Matrices/fluid_dynamics/");
889 Eigen::MatrixXd
BC3_matrix(P3_BC1size, P3_BC2size);
891 PtrList<volVectorField> Together(0);
895 for (label k = 0; k <
liftfield.size(); k++)
903 for (label k = 0; k <
NUmodes; k++)
905 Together.append(
Umodes[k].clone());
909 surfaceVectorField n(
mesh.Sf() /
mesh.magSf());
911 for (label
i = 0;
i < P3_BC1size;
i++)
913 for (label j = 0; j < P3_BC2size; j++)
915 surfaceVectorField BC3 = fvc::interpolate(fvc::curl(Together[j])).ref();
916 surfaceVectorField BC4 = (n ^ fvc::interpolate(fvc::grad(
Pmodes[
i]))).ref();
917 surfaceScalarField BC5 = ((BC3 & BC4) *
mesh.magSf()).ref();
920 for (label k = 0; k < BC5.boundaryField().size(); k++)
922 s += gSum(BC5.boundaryField()[k]);
930 "./ITHACAoutput/Matrices/fluid_dynamics/");
944 for (label j = 0; j < LFsize; j++)
951 for (label
i = 0;
i < LFsize;
i++)
953 for (label j = 0; j <
NCmodes; j++)
955 for (label k = 0; k < LFsize; k++)
965 "./ITHACAoutput/Matrices/neutronics/");
976 for (label
i = 0;
i < MFsize;
i++)
978 for (label j = 0; j < MFsize; j++)
986 "./ITHACAoutput/Matrices/neutronics/");
996 for (label j = 0; j < PFsize; j++)
1003 for (label
i = 0;
i < PFsize;
i++)
1005 for (label j = 0; j <
NCmodes; j++)
1007 for (label k = 0; k < PFsize; k++)
1017 "./ITHACAoutput/Matrices/neutronics/");
1027 for (label j = 0; j < AFsize; j++)
1034 for (label
i = 0;
i < AFsize;
i++)
1036 for (label j = 0; j <
NCmodes; j++)
1038 for (label k = 0; k < AFsize; k++)
1048 "./ITHACAoutput/Matrices/neutronics/");
1056 PtrList<volScalarField> Precmodes =
choose_group(
"prec",
p);
1059 Eigen::MatrixXd PS_matrix;
1060 PS_matrix.resize(PS1size, PS2size);
1063 for (label
i = 0;
i < PS1size;
i++)
1065 for (label j = 0; j < PS2size; j++)
1067 PS_matrix(
i, j) = fvc::domainIntegrate(
Fluxmodes[
i] * Precmodes[j]).value();
1071 savegroupMatrix(
"PS",
p,
"./ITHACAoutput/Matrices/neutronics/", PS_matrix);
1081 PtrList<volScalarField> Precmodes =
choose_group(
"prec",
p);
1084 List<Eigen::MatrixXd> ST_matrix;
1085 ST_matrix.setSize(ST1size);
1087 for (label j = 0; j < ST1size; j++)
1089 ST_matrix[j].resize(ST2size, ST1size);
1090 ST_matrix[j].setZero();
1093 PtrList<volVectorField> Together(0);
1097 for (label k = 0; k <
liftfield.size(); k++)
1105 for (label k = 0; k <
NUmodes; k++)
1107 Together.append(
Umodes[k].clone());
1112 for (label
i = 0;
i < ST1size;
i++)
1114 for (label j = 0; j < ST2size; j++)
1116 for (label k = 0; k < ST1size; k++)
1118 ST_matrix[
i](j, k) = fvc::domainIntegrate(Precmodes[
i] * fvc::div(
1119 fvc::interpolate(Together[j]) & Together[j].
mesh().Sf(), Precmodes[k])).value();
1124 savegroupMatrix(
"ST",
p,
"./ITHACAoutput/Matrices/neutronics/", ST_matrix);
1131 PtrList<volScalarField> Precmodes =
choose_group(
"prec",
p);
1133 Eigen::MatrixXd MP_matrix;
1134 MP_matrix.resize(MPsize, MPsize);
1137 for (label
i = 0;
i < MPsize;
i++)
1139 for (label j = 0; j < MPsize; j++)
1141 MP_matrix(
i, j) = fvc::domainIntegrate(Precmodes[
i] * Precmodes[j]).value();
1145 savegroupMatrix(
"MP",
p,
"./ITHACAoutput/Matrices/neutronics/", MP_matrix);
1152 PtrList<volScalarField> Precmodes =
choose_group(
"prec",
p);
1154 Eigen::MatrixXd LP_matrix;
1155 LP_matrix.resize(LPsize, LPsize);
1157 for (label
i = 0;
i < LPsize;
i++)
1159 for (label j = 0; j < LPsize; j++)
1161 LP_matrix(
i, j) = fvc::domainIntegrate(Precmodes[
i] * fvc::laplacian(
1162 dimensionedScalar(
"1", dimless, 1), Precmodes[j])).value();
1166 savegroupMatrix(
"LP",
p,
"./ITHACAoutput/Matrices/neutronics/", LP_matrix);
1171 label NPrecmodes, label NCmodes, label family)
1174 PtrList<volScalarField> Precmodes =
choose_group(
"prec",
p);
1176 List<Eigen::MatrixXd> FS_matrix;
1177 FS_matrix.setSize(FSsize);
1179 for (label j = 0; j < FSsize; j++)
1182 FS_matrix[j].setZero();
1186 for (label
i = 0;
i < FSsize;
i++)
1188 for (label j = 0; j <
NCmodes; j++)
1192 FS_matrix[
i](j, k) = fvc::domainIntegrate(Precmodes[
i] *
NSFmodes[j] *
1198 savegroupMatrix(
"FS",
p,
"./ITHACAoutput/Matrices/neutronics/", FS_matrix);
1215 List<Eigen::MatrixXd> SD_matrix;
1216 SD_matrix.setSize(SD1size);
1218 for (label j = 0; j < SD1size; j++)
1220 SD_matrix[j].resize(SD2size, SD1size);
1221 SD_matrix[j].setZero();
1224 PtrList<volVectorField> Together(0);
1228 for (label k = 0; k <
liftfield.size(); k++)
1236 for (label k = 0; k <
NUmodes; k++)
1238 Together.append(
Umodes[k].clone());
1243 for (label
i = 0;
i < SD1size;
i++)
1245 for (label j = 0; j < SD2size; j++)
1247 for (label k = 0; k < SD1size; k++)
1249 SD_matrix[
i](j, k) = fvc::domainIntegrate(Decmodes[
i] * fvc::div(
1250 fvc::interpolate(Together[j]) & Together[j].
mesh().Sf(), Decmodes[k])).value();
1264 Eigen::MatrixXd MD_matrix;
1265 MD_matrix.resize(MDsize, MDsize);
1268 for (label
i = 0;
i < MDsize;
i++)
1270 for (label j = 0; j < MDsize; j++)
1272 MD_matrix(
i, j) = fvc::domainIntegrate(Decmodes[
i] * Decmodes[j]).value();
1286 Eigen::MatrixXd LD_matrix;
1287 LD_matrix.resize(LDsize, LDsize);
1290 for (label
i = 0;
i < LDsize;
i++)
1292 for (label j = 0; j < LDsize; j++)
1294 LD_matrix(
i, j) = fvc::domainIntegrate(Decmodes[
i] * fvc::laplacian(
1295 dimensionedScalar(
"1", dimless, 1), Decmodes[j])).value();
1304 label NDecmodes, label NCmodes, label decgroup)
1309 List<Eigen::MatrixXd> DFS_matrix;
1310 DFS_matrix.setSize(DFSsize);
1312 for (label j = 0; j < DFSsize; j++)
1315 DFS_matrix[j].setZero();
1319 for (label
i = 0;
i < DFSsize;
i++)
1321 for (label j = 0; j <
NCmodes; j++)
1325 DFS_matrix[
i](j, k) = fvc::domainIntegrate(Decmodes[
i] *
SPmodes[j] *
1344 PtrList<volScalarField> TogetherT(0);
1348 for (label k = 0; k <
liftfieldT.size(); k++)
1356 for (label k = 0; k <
NTmodes; k++)
1358 TogetherT.append(
Tmodes[k].clone());
1363 for (label
i = 0;
i < TMsize;
i++)
1365 for (label j = 0; j < TMsize; j++)
1367 TM_matrix(
i, j) = fvc::domainIntegrate(TogetherT[
i] * TogetherT[j]).value();
1373 "./ITHACAoutput/Matrices/thermal/");
1384 for (label j = 0; j < TS1size; j++)
1390 PtrList<volVectorField> Together(0);
1394 for (label k = 0; k <
liftfield.size(); k++)
1402 for (label k = 0; k <
NUmodes; k++)
1404 Together.append(
Umodes[k].clone());
1408 PtrList<volScalarField> TogetherT(0);
1412 for (label k = 0; k <
liftfieldT.size(); k++)
1420 for (label k = 0; k <
NTmodes; k++)
1422 TogetherT.append(
Tmodes[k].clone());
1427 for (label
i = 0;
i < TS1size;
i++)
1429 for (label j = 0; j < TS2size; j++)
1431 for (label k = 0; k < TS1size; k++)
1433 TS_matrix[
i](j, k) = fvc::domainIntegrate(TogetherT[
i] * fvc::div(
1434 fvc::interpolate(Together[j]) & Together[j].
mesh().Sf(), TogetherT[k])).value();
1441 "./ITHACAoutput/Matrices/thermal/");
1451 PtrList<volScalarField> TogetherT(0);
1455 for (label k = 0; k <
liftfieldT.size(); k++)
1463 for (label k = 0; k <
NTmodes; k++)
1465 TogetherT.append(
Tmodes[k].clone());
1470 for (label
i = 0;
i < LTsize;
i++)
1472 for (label j = 0; j < LTsize; j++)
1474 LT_matrix(
i, j) = fvc::domainIntegrate(TogetherT[
i] * fvc::laplacian(
1475 dimensionedScalar(
"1", dimless, 1), TogetherT[j])).value();
1481 "./ITHACAoutput/Matrices/thermal/");
1486 label NFluxmodes, label NCmodes)
1492 for (label j = 0; j < TXSsize; j++)
1498 PtrList<volScalarField> TogetherT(0);
1502 for (label k = 0; k <
liftfieldT.size(); k++)
1510 for (label k = 0; k <
NTmodes; k++)
1512 TogetherT.append(
Tmodes[k].clone());
1517 for (label
i = 0;
i < TXSsize;
i++)
1519 for (label j = 0; j <
NCmodes; j++)
1530 "./ITHACAoutput/Matrices/thermal/");
1535 label NDecmodes, label NCmodes, label decgroup)
1540 List<Eigen::MatrixXd> THS_matrix;
1541 THS_matrix.setSize(THSsize);
1543 for (label j = 0; j < THSsize; j++)
1546 THS_matrix[j].setZero();
1549 PtrList<volScalarField> TogetherT(0);
1553 for (label k = 0; k <
liftfieldT.size(); k++)
1561 for (label k = 0; k <
NTmodes; k++)
1563 TogetherT.append(
Tmodes[k].clone());
1568 for (label
i = 0;
i < THSsize;
i++)
1570 for (label j = 0; j <
NCmodes; j++)
1574 THS_matrix[
i](j, k) = fvc::domainIntegrate(TogetherT[
i] *
vmodes[j] *
1575 Decmodes[k]).value();
1586 if (field ==
"prec")
1647 nome.append(std::to_string(n));
1666 volVectorField&
U =
_U();
1667 volScalarField&
p =
_p();
1677 volScalarField&
T =
_T();
1681 volScalarField&
v =
_v();
1682 volScalarField&
D =
_D();
1684 volScalarField&
A =
_A();
1685 volScalarField&
SP =
_SP();
1718 volVectorField&
U =
_U();
1719 volScalarField&
p =
_p();
1729 volScalarField&
T =
_T();
1733 volScalarField&
v =
_v();
1734 volScalarField&
D =
_D();
1736 volScalarField&
A =
_A();
1737 volScalarField&
SP =
_SP();
1742 std::string folder = dir;
1746 for (label
i = 0;
i <
mu.cols();
i++)
1748 folder.append(std::to_string(
i));
1777 std::cout <<
"Error" << std::endl;
1785 volScalarField& ciao =
const_cast<volScalarField&
>(
nu);
1788 for (label
i = 0;
i < ciao.boundaryFieldRef().size();
i++)
1799 "./ITHACAoutput/Matrices/");
1800 label Ncol = Ncoeff_v.cols();
1806 std::cout <<
"Constructing v RadialBasisFunction for mode " <<
i + 1 <<
1808 SAMPLES_v[
i] =
new SPLINTER::DataTable(1, 1);
1810 for (label j = 0; j < Ncol; j++)
1816 SPLINTER::RadialBasisFunctionType::GAUSSIAN);
1821 "./ITHACAoutput/Matrices/");
1827 std::cout <<
"Constructing D RadialBasisFunction for mode " <<
i + 1 <<
1829 SAMPLES_D[
i] =
new SPLINTER::DataTable(1, 1);
1831 for (label j = 0; j < Ncol; j++)
1837 SPLINTER::RadialBasisFunctionType::GAUSSIAN);
1843 "./ITHACAoutput/Matrices/");
1849 std::cout <<
"Constructing NSF RadialBasisFunction for mode " <<
i + 1 <<
1853 for (label j = 0; j < Ncol; j++)
1859 SPLINTER::RadialBasisFunctionType::GAUSSIAN);
1864 "./ITHACAoutput/Matrices/");
1870 std::cout <<
"Constructing A RadialBasisFunction for mode " <<
i + 1 <<
1872 SAMPLES_A[
i] =
new SPLINTER::DataTable(1, 1);
1874 for (label j = 0; j < Ncol; j++)
1880 SPLINTER::RadialBasisFunctionType::GAUSSIAN);
1886 "./ITHACAoutput/Matrices/");
1892 std::cout <<
"Constructing SP RadialBasisFunction for mode " <<
i + 1 <<
1896 for (label j = 0; j < Ncol; j++)
1902 SPLINTER::RadialBasisFunctionType::GAUSSIAN);
1908 "./ITHACAoutput/Matrices/");
1914 std::cout <<
"Constructing TXS RadialBasisFunction for mode " <<
i + 1 <<
1918 for (label j = 0; j < Ncol; j++)
1924 SPLINTER::RadialBasisFunctionType::GAUSSIAN);
1935 volScalarField&
T =
_T();
1936 volVectorField&
U =
_U();
1937 surfaceScalarField&
phi =
_phi();
1938 phi = linearInterpolate(
U) &
mesh.Sf();
1941 IOMRFZoneList& MRF =
_MRF();
1943 turbulence = autoPtr<incompressible::turbulenceModel>
1947 dimensionedScalar&
nu =
_nu();
1948 dimensionedScalar&
Pr =
_Pr();
1949 dimensionedScalar&
Prt =
_Prt();
1951 volScalarField&
v =
_v();
1952 dimensionedScalar& cp =
_CpRef();
1953 dimensionedScalar& rho =
_rhoRef();
1954 dimensionedScalar& sp =
_SP1_0();
1957 volScalarField Tlift(
"Tlift" + name(k),
T);
1958 instantList Times =
runTime.times();
1960 Info <<
"Solving a lifting Problem" << endl;
1964 alphat.correctBoundaryConditions();
1965 volScalarField source
1973 IOobject::AUTO_WRITE
1976 dimensionedScalar(
"source", dimensionSet(0, -2, -1, 0, 0, 0, 0), 1)
1979 for (label j = 0; j <
T.boundaryField().size(); j++)
1986 else if (
T.boundaryField()[BCind].type() ==
"fixedValue")
1996 while (
simple.correctNonOrthogonal())
2001 + sp * (1 - dbtot) / (cp * rho)*source
2004 Info <<
"ExecutionTime = " <<
runTime.elapsedCpuTime() <<
" s"
2005 <<
" ClockTime = " <<
runTime.elapsedClockTime() <<
" s"
2017 volScalarField&
p =
_p();
2018 volScalarField&
p0 =
_p0();
2019 volVectorField&
U =
_U();
2020 volVectorField&
U0 =
_U0();
2021 surfaceScalarField&
phi =
_phi();
2041 volScalarField&
T =
_T();
2042 volScalarField&
T0 =
_T0();
2050 dimensionedScalar&
K0 =
_K0();
2051 volScalarField&
v =
_v();
2052 volScalarField&
v0 =
_v0();
2055 volScalarField&
A =
_A();
2056 volScalarField&
A0 =
_A0();
2057 volScalarField&
D =
_D();
2058 volScalarField&
D0 =
_D0();
2059 volScalarField&
SP =
_SP();
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.
List< Eigen::MatrixXd > stream_term(label NUmodes, label NPrecmodes, label family)
precursor eq. methods:
Eigen::MatrixXd MP7_matrix
precursor mass term-7
autoPtr< dimensionedScalar > _betaTot
autoPtr< volScalarField > _NSF
Eigen::MatrixXd MD1_matrix
decay heat mass term-1
void homogenizeT()
Method to compute the homogenized temperature field, it also sets homboolT=true.
std::vector< SPLINTER::DataTable * > SAMPLES_NSF
List< Eigen::MatrixXd > ST5_matrix
precursor stream term-5
PtrList< volScalarField > Prec6field
List of pointers used to form the prec6 snapshots matrix.
autoPtr< volScalarField > _prec8
List< Eigen::MatrixXd > THS2_matrix
temperature decay heat source term-2
Eigen::MatrixXd LP3_matrix
precursor laplacian term-3
std::vector< SPLINTER::DataTable * > SAMPLES_v
List< Eigen::MatrixXd > SD1_matrix
decay heat stream term-1
autoPtr< incompressible::turbulenceModel > turbulence
Eigen::MatrixXd BC1_matrix
PPE BC1.
std::vector< SPLINTER::DataTable * > SAMPLES_A
PtrList< volScalarField > NSFmodes
List of pointers used to form the NSF snapshosts matrix.
autoPtr< volScalarField > _dec3
PtrList< volScalarField > Prec5modes
List of pointers used to form the prec1 modes.
autoPtr< volScalarField > _SP
autoPtr< dimensionedScalar > _rhoRef
List< Eigen::MatrixXd > PF_matrix
production flux
autoPtr< dimensionedScalar > _betaTE
autoPtr< dimensionedScalar > _Pr
autoPtr< volScalarField > _T
autoPtr< volScalarField > _v0
PtrList< volScalarField > choose_group(string field, label ith)
method to choose one field among precs & decs field can be "prec" or "dec" only if field==prec then i...
void savegroupMatrix(string nome, label n, word folder, M matrice)
method to save matrices for precs and decs M can be an Eigen::MatrixXd or List<Eigen::MatrixXd> nome ...
autoPtr< volScalarField > _dec30
PtrList< volScalarField > Prec4modes
List of pointers used to form the prec1 modes.
List< Eigen::MatrixXd > FS3_matrix
precursor flux source term-3
List< Eigen::MatrixXd > BC2_matrix
PPE BC2.
List< Eigen::MatrixXd > ST7_matrix
precursor stream term-7
PtrList< volScalarField > Prec8field
List of pointers used to form the prec8 snapshots matrix.
autoPtr< dimensionedScalar > _beta8
autoPtr< volScalarField > _dec2
List< Eigen::MatrixXd > FS1_matrix
precursor flux source term-1
PtrList< volScalarField > Prec1modes
List of pointers used to form the prec1 modes.
List< Eigen::MatrixXd > TXS_matrix
temperature flux source term TXS
List< Eigen::MatrixXd > LF_matrix
laplacian_flux
PtrList< volScalarField > Pmodes
List of pointers used to form the pressure modes.
label NUmodes
Number of modes adopted during Galerkin projection.
autoPtr< dimensionedScalar > _Tref
Eigen::MatrixXd MP1_matrix
precursor mass term-1
autoPtr< dimensionedScalar > _CpRef
autoPtr< dimensionedScalar > _decBeta2
autoPtr< dimensionedScalar > _beta5
List< Eigen::MatrixXd > ST8_matrix
precursor stream term-8
PtrList< volVectorField > Uomfield
List of pointers used to form the homogeneous velocity snapshots.
List< Eigen::MatrixXd > ST4_matrix
precursor stream term-4
autoPtr< dimensionedScalar > _lam7
PtrList< volScalarField > Prec7modes
List of pointers used to form the prec1 modes.
PtrList< volScalarField > vFields
List of pointers used to form the v snapshosts matrix.
autoPtr< dimensionedScalar > _SP1_0
Eigen::MatrixXd PS3_matrix
prec_source 3
Eigen::MatrixXd prec_mass(label NPrecmodes, label family)
List< Eigen::MatrixXd > abs_flux(label NFluxmodes, label NCmodes)
PtrList< volScalarField > Tmodes
List of pointers used to form the temperature modes.
label precinIndex
indexes of inlet and outlet to adopt for precursors boundary conditions
Eigen::MatrixXd K_matrix
Gradient of pressure matrix.
autoPtr< volScalarField > _prec2
List< Eigen::MatrixXd > G_matrix
Divergence of momentum PPE.
List< Eigen::MatrixXd > AF_matrix
absorption flux
std::vector< SPLINTER::RBFSpline * > rbfsplines_A
Eigen::MatrixXd MP2_matrix
precursor mass term-2
List< Eigen::MatrixXd > FS2_matrix
precursor flux source term-2
Eigen::MatrixXd LP8_matrix
precursor laplacian term-8
Eigen::MatrixXd PS6_matrix
prec_source 6
autoPtr< dimensionedScalar > _lam3
PtrList< volScalarField > Prec8modes
List of pointers used to form the prec1 modes.
autoPtr< dimensionedScalar > _Keff
List< Eigen::MatrixXd > FS4_matrix
precursor flux source term-4
PtrList< volScalarField > Fluxfield
List of pointers used to form the flux snapshots matrix.
Eigen::MatrixXd BC3_matrix
PPE BC3.
Eigen::MatrixXd LP4_matrix
precursor laplacian term-4
Eigen::MatrixXd LP7_matrix
precursor laplacian term-7
Eigen::MatrixXd TM_matrix
temperature mass term
autoPtr< volScalarField > _prec4
std::vector< SPLINTER::RBFSpline * > rbfsplines_NSF
autoPtr< dimensionedScalar > _K0
autoPtr< volScalarField > _alphat
Eigen::MatrixXd laplacian_prec(label NPrecmodes, label family)
List< Eigen::MatrixXd > SD3_matrix
decay heat stream term-3
PtrList< volScalarField > Prec2modes
List of pointers used to form the prec1 modes.
Eigen::MatrixXd LP6_matrix
precursor laplacian term-6
autoPtr< volScalarField > _NSF0
List< Eigen::MatrixXd > TS_matrix
temperature stream term
Eigen::MatrixXd MF_matrix
mass flux
autoPtr< dimensionedScalar > _beta2
PtrList< volScalarField > Prec4field
List of pointers used to form the prec4 snapshots matrix.
List< Eigen::MatrixXd > temp_heatsource(label NTmodes, label NDecmodes, label NCmodes, label decgroup)
autoPtr< dimensionedScalar > _Sc
Eigen::MatrixXd MP3_matrix
precursor mass term-3
PtrList< volScalarField > DFields
List of pointers used to form the D snapshosts matrix.
Eigen::MatrixXd D_matrix
Laplacian term PPE.
List< Eigen::MatrixXd > DFS2_matrix
decay heat flux source term-2
void change_viscosity(double mu)
method to change the viscosity in UEqn
autoPtr< dimensionedScalar > _lam6
List< Eigen::MatrixXd > laplacian_flux(label NFluxmodes, label NCmodes)
diffusion eq. methods:
autoPtr< volScalarField > _flux0
autoPtr< IOMRFZoneList > _MRF
PtrList< volScalarField > AFields
List of pointers used to form the A snapshosts matrix.
Eigen::MatrixXd pressure_gradient_term(label NUmodes, label NPmodes)
autoPtr< dimensionedScalar > _beta3
Eigen::MatrixXd PS7_matrix
prec_source 7
autoPtr< volScalarField > _T0
List< Eigen::MatrixXd > FS7_matrix
precursor flux source term-7
List< Eigen::MatrixXd > ST6_matrix
precursor stream term-6
void readMSRfields()
Method to read all the fieds of the MSR problem in the offline folder, it also reads mu_samples matri...
Eigen::MatrixXd LP1_matrix
precursor laplacian term-1
autoPtr< dimensionedScalar > _TrefXS
PtrList< volScalarField > Dec1modes
List of pointers used to form the dec1 modes.
List< Eigen::MatrixXd > THS1_matrix
temperature decay heat source term-1
PtrList< volScalarField > Dec3field
List of pointers used to form the dec3 snapshots matrix.
autoPtr< dimensionedScalar > _Prt
List< Eigen::MatrixXd > ST1_matrix
precursor stream term-1
void liftSolve()
Perform a lift solve for the velocity field.
autoPtr< dimensionedScalar > _IV1
autoPtr< volVectorField > _U
Eigen::MatrixXd LT_matrix
temperature laplacian term
autoPtr< dimensionedScalar > _D1_0
PtrList< volScalarField > Prec6modes
List of pointers used to form the prec1 modes.
autoPtr< dimensionedScalar > _beta7
autoPtr< volScalarField > _prec70
void liftSolveT()
Perform a lift solve for the temperature.
autoPtr< dimensionedScalar > _lam4
List< Eigen::MatrixXd > FS6_matrix
precursor flux source term-6
Eigen::VectorXi NPrecmodes
autoPtr< dimensionedScalar > _beta1
autoPtr< volScalarField > _difft
Eigen::MatrixXd mass_temp(label NTmodes)
temperature eq. methods
autoPtr< dimensionedScalar > _decLam3
autoPtr< volScalarField > _prec5
std::vector< SPLINTER::RBFSpline * > rbfsplines_v
autoPtr< volScalarField > _TXS0
PtrList< volScalarField > vmodes
List of pointers used to form the v modes.
Eigen::MatrixXd P_matrix
Div of velocity.
autoPtr< volScalarField > _v
autoPtr< dimensionedScalar > _beta4
autoPtr< fv::options > _fvOptions
fvOptions
scalar tolerance
Tolerance for the residual of the stationary problems, there is the same tolerance for velocity and p...
PtrList< volScalarField > Dec1field
List of pointers used to form the dec1 snapshots matrix.
scalar maxIter
Number of maximum iterations to be done for the computation of the truth solution.
autoPtr< dimensionedScalar > _alfa_NSF1
PtrList< volScalarField > TXSmodes
List of pointers used to form the SP snapshosts matrix.
autoPtr< dimensionedScalar > _lam5
Eigen::MatrixXd divergence_term(label NUmodes, label NPmodes)
continuity eq. methods:
Eigen::VectorXi NDecmodes
autoPtr< dimensionedScalar > _lam1
Eigen::MatrixXd dec_mass(label NDecmodes, label decgroup)
Eigen::MatrixXd LD1_matrix
decay heat laplacian term-1
List< Eigen::MatrixXd > SD2_matrix
decay heat stream term-2
autoPtr< simpleControl > _simple
simpleControl
std::vector< SPLINTER::DataTable * > SAMPLES_SP
autoPtr< dimensionedScalar > _Sct
Eigen::MatrixXd MP5_matrix
precursor mass term-5
autoPtr< volScalarField > _prec3
PtrList< volScalarField > PowerDensfield
List of pointers used to form the powerDens snapshots matrix.
autoPtr< volScalarField > _prec40
autoPtr< volScalarField > _A0
autoPtr< dimensionedScalar > _NSF1_0
PtrList< volScalarField > Prec3modes
List of pointers used to form the prec1 modes.
Eigen::MatrixXd LP2_matrix
precursor laplacian term-2
autoPtr< volScalarField > _p0
Initial fields (for restart purposes)
autoPtr< volVectorField > _U0
Eigen::MatrixXd diffusive_term(label NUmodes, label NPmodes)
sub-functions needed by projectPPE
autoPtr< dimensionedScalar > _decBeta3
autoPtr< volScalarField > _prec6
Eigen::MatrixXd prec_source(label NFluxmodes, label NPrecmodes, label family)
autoPtr< volScalarField > _D
bool homboolU
boolean variables to check if the homogenization of U and T is performed (true) or not (false)
autoPtr< volScalarField > _SP0
Eigen::MatrixXd LD2_matrix
decay heat laplacian term-2
autoPtr< volScalarField > _dec20
Eigen::MatrixXd pressure_BC1(label NUmodes, label NPmodes)
autoPtr< volScalarField > _prec60
PtrList< volScalarField > Prec7field
List of pointers used to form the prec7 snapshots matrix.
Eigen::MatrixXd PS8_matrix
prec_source 8
autoPtr< dimensionedScalar > _alfa_A1
Eigen::MatrixXd MP8_matrix
precursor mass term-8
autoPtr< volScalarField > _prec7
List< Eigen::MatrixXd > div_momentum(label NUmodes, label NPmodes)
autoPtr< dimensionedScalar > _lam8
autoPtr< dimensionedScalar > _nu
autoPtr< volScalarField > _TXS
autoPtr< dimensionedScalar > _decbetaTot
autoPtr< volScalarField > _prec30
autoPtr< volScalarField > _p
Eigen::MatrixXd MD2_matrix
decay heat mass term-2
Eigen::MatrixXd laplacian_pressure(label NPmodes)
PtrList< volScalarField > liftfieldT
List of pointers used to form the list of lifting functions.
List< Eigen::MatrixXd > dec_fluxsource(label NFluxmodes, label NDecmodes, label NCmodes, label decgroup)
PtrList< volScalarField > Dec2modes
List of pointers used to form the dec2 modes.
void restart()
method to set all fields back to values in 0 folder
PtrList< volVectorField > liftfield
List of pointers used to form the list of lifting functions.
Eigen::MatrixXd PS4_matrix
prec_source 4
std::vector< SPLINTER::DataTable * > SAMPLES_TXS
PtrList< volScalarField > Pfield
List of pointers used to form the pressure snapshots matrix.
autoPtr< dimensionedScalar > _decBeta1
autoPtr< dimensionedScalar > _decLam2
Eigen::MatrixXd MP6_matrix
precursor mass term-6
autoPtr< dimensionedScalar > _lam2
PtrList< volScalarField > NSFFields
List of pointers used to form the NSF snapshosts matrix.
PtrList< volScalarField > Prec3field
List of pointers used to form the prec3 snapshots matrix.
autoPtr< dimensionedScalar > _decLam1
PtrList< volVectorField > Umodes
List of pointers used to form the velocity modes.
PtrList< volScalarField > Dec3modes
List of pointers used to form the dec3 modes.
PtrList< volScalarField > Tfield
List of pointers used to form the temperature snapshots matrix.
Eigen::MatrixXd B_matrix
Diffusion term.
PtrList< volScalarField > Tomfield
List of pointers used to form the homogeneous velocity snapshots.
PtrList< volVectorField > Ufield
List of pointers used to form the velocity snapshots matrix.
PtrList< volScalarField > Prec1field
List of pointers used to form the prec1 snapshots matrix.
std::vector< SPLINTER::RBFSpline * > rbfsplines_SP
Eigen::MatrixXd laplacian_temp(label NTmodes)
autoPtr< dimensionedScalar > _alfa_D1
List< Eigen::MatrixXd > pressure_BC2(label NUmodes, label NPmodes)
Eigen::MatrixXd M_matrix
Mass Matrix.
Eigen::MatrixXd mass_flux(label NFluxmodes)
Eigen::MatrixXd MP4_matrix
precursor mass term-4
autoPtr< surfaceScalarField > _phi0
autoPtr< volScalarField > _prec1
PtrList< volScalarField > SPmodes
List of pointers used to form the SP snapshosts matrix.
autoPtr< volScalarField > _prec10
List< Eigen::MatrixXd > ST2_matrix
precursor stream term-2
std::vector< SPLINTER::DataTable * > SAMPLES_D
List< Eigen::MatrixXd > FS8_matrix
precursor flux source term-8
PtrList< volScalarField > SPFields
List of pointers used to form the SP snapshosts matrix.
List< Eigen::MatrixXd > convective_term(label NUmodes, label NPmodes)
void msrcoeff(label &NC)
method to apply RBF interpolation procedure NC is the number of modes to adopt for construncting the ...
Eigen::MatrixXd PS1_matrix
prec_source 1
List< Eigen::MatrixXd > DFS1_matrix
decay heat flux source term-1
List< Eigen::MatrixXd > DFS3_matrix
decay heat flux source term-3
autoPtr< dimensionedScalar > _A1_0
List< Eigen::MatrixXd > flux_source(label NFluxmodes, label NPrecmodes, label NCmodes, label family)
Eigen::MatrixXd pressure_BC3(label NUmodes, label NPmodes)
void homogenizeU()
Method to compute the homogenized velocity field, it also sets homboolU=true.
List< Eigen::MatrixXd > stream_dec(label NUmodes, label NDecmodes, label decgroup)
decay heat eq. methods:
List< Eigen::MatrixXd > FS5_matrix
precursor flux source term-5
void projectPPE(fileName folder, label NUmodes, label NPmodes, label NFluxmodes, Eigen::VectorXi Nprecmodes, label NTmodes, Eigen::VectorXi Ndecmodes, label NCmodes)
Project using the Poisson Equation for pressure.
List< Eigen::MatrixXd > THS3_matrix
temperature decay heat source term-3
List< Eigen::MatrixXd > temp_stream(label NUmodes, label NTmodes)
PtrList< volScalarField > Dec2field
List of pointers used to form the dec2 snapshots matrix.
PtrList< volScalarField > Prec5field
List of pointers used to form the prec5 snapshots matrix.
Eigen::MatrixXd LD3_matrix
decay heat laplacian term-3
bool precInBool
boolean variable to decide if apply prec inlet BC
List< Eigen::MatrixXd > C_matrix
Non linear term.
PtrList< volScalarField > TXSFields
List of pointers used to form the SP snapshosts matrix.
Eigen::MatrixXd LP5_matrix
precursor laplacian term-5
void msrgetModesEVD()
Method to compute the modes for all the fields in the MSR problem, if hombool==false the velocity mod...
Eigen::MatrixXd MD3_matrix
decay heat mass term-3
autoPtr< dimensionedScalar > _alfa_SP1
PtrList< volScalarField > Amodes
List of pointers used to form the A snapshosts matrix.
autoPtr< volScalarField > _prec20
Eigen::MatrixXd PS2_matrix
prec_source 2
autoPtr< volScalarField > _D0
PtrList< volScalarField > Fluxmodes
List of pointers used to form the flux modes.
autoPtr< surfaceScalarField > _phi
Eigen::MatrixXd laplacian_dec(label NDecmodes, label decgroup)
PtrList< volScalarField > Prec2field
List of pointers used to form the prec2 snapshots matrix.
autoPtr< volScalarField > _prec80
autoPtr< volScalarField > _logT
PtrList< volScalarField > Dmodes
List of pointers used to form the D modes.
void msrgetModesSVD()
Method to compute the modes for all the fields in the MSR problem, if hombool==false the velocity mod...
Eigen::MatrixXd mass_term(label NUmodes, label NPmodes)
autoPtr< volScalarField > _dec10
List< Eigen::MatrixXd > temp_XSfluxsource(label NTmodes, label NFluxmodes, label NCmodes)
autoPtr< volScalarField > _flux
autoPtr< volScalarField > _A
autoPtr< volScalarField > _prec50
autoPtr< dimensionedScalar > _beta6
List< Eigen::MatrixXd > prod_flux(label NFluxmodes, label NCmodes)
autoPtr< singlePhaseTransportModel > _laminarTransport
std::vector< SPLINTER::RBFSpline * > rbfsplines_D
std::vector< SPLINTER::RBFSpline * > rbfsplines_TXS
List< Eigen::MatrixXd > ST3_matrix
precursor stream term-3
autoPtr< volScalarField > _dec1
Eigen::MatrixXd PS5_matrix
prec_source 5
Eigen::MatrixXi inletIndexT
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.
void assignBC(volVectorField &s, label BC_ind, Vector< double > &value)
Assign Boundary Condition to a volVectorField.
void assignIF(T &s, G &value)
Assign internal field condition.
void computeLift(T &Lfield, T &liftfield, T &omfield)
Homogenize the snapshot matrix, it works with PtrList of volVectorField and volScalarField.
bool offline
Boolean variable, it is 1 if the Offline phase has already been computed, else 0.
void computeLiftT(T &Lfield, T &liftfield, T &omfield)
Virtual function to compute the lifting function.
IOdictionary * ITHACAdict
dictionary to store input output infos
Eigen::MatrixXd mu
Row matrix of parameters.
Eigen::MatrixXi inletIndex
Matrix that contains informations about the inlet boundaries.
bool podex
Boolean variable, it is 1 if the POD has already been computed, else 0.
void truthSolve()
Perform a TruthSolve.
volScalarField & powerDens
dimensionedScalar & decbetaTot
dimensionedScalar & betaTot
volScalarField prec20(prec2)
volScalarField prec40(prec4)
volScalarField prec10(prec1)
volScalarField prec70(prec7)
volScalarField prec50(prec5)
volScalarField prec60(prec6)
volScalarField flux0(flux)
volScalarField prec30(prec3)
volScalarField prec80(prec8)
volScalarField dec10(dec1)
volScalarField dec20(dec2)
volScalarField dec30(dec3)
dimensionedScalar & rhoRef
dimensionedScalar & CpRef
dimensionedScalar & betaTE
dimensionedScalar & beta1
dimensionedScalar & beta3
dimensionedScalar & beta2
dimensionedScalar & beta5
dimensionedScalar & beta4
dimensionedScalar & beta8
dimensionedScalar & alfa_NSF1
dimensionedScalar & alfa_A1
dimensionedScalar & beta6
dimensionedScalar & NSF1_0
dimensionedScalar & TrefXS
dimensionedScalar & beta7
dimensionedScalar K0(Keff)
dimensionedScalar & alfa_D1
dimensionedScalar & alfa_SP1
dimensionedScalar & SP1_0
dimensionedScalar & decLam1
dimensionedScalar & decBeta3
dimensionedScalar & decBeta1
dimensionedScalar & decBeta2
dimensionedScalar & decLam3
dimensionedScalar & decLam2
void getModes(PtrList< GeometricField< Type, PatchField, GeoMesh > > &snapshots, PtrList< GeometricField< Type, PatchField, GeoMesh > > &modes, word fieldName, bool podex, bool supex, bool sup, label nmodes, bool correctBC)
Computes the bases or reads them for a field.
void getModesSVD(PtrList< GeometricField< Type, PatchField, GeoMesh > > &snapshots, PtrList< GeometricField< Type, PatchField, GeoMesh > > &modes, word fieldName, bool podex, bool supex, bool sup, label nmodes, bool correctBC)
Gets the bases for a scalar field using SVD instead of the method of snapshots.
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 ...
List< Eigen::MatrixXd > readMatrix(word folder, word mat_name)
Read a three dimensional matrix from a txt file in Eigen format.
void read_fields(PtrList< GeometricField< Type, PatchField, GeoMesh > > &Lfield, word Name, fileName casename, int first_snap, int n_snap)
Function to read a list of fields from the name of the field and casename.
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.
simpleControl simple(mesh)
surfaceScalarField phi0(phi)
singlePhaseTransportModel & laminarTransport
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue)