36#include "setRootCase.H"
39 _pimple = autoPtr<pimpleControl>
68#include "initContinuityErrs.H"
69 volScalarField&
p =
_p();
70 volVectorField&
U =
_U();
71 surfaceScalarField&
phi =
_phi();
75 IOMRFZoneList& MRF =
_MRF();
77 dimensionedScalar&
IV1 =
_IV1();
80 volScalarField flux_old =
_flux();
82 volScalarField&
SP =
_SP();
85 volScalarField&
D =
_D();
91 volScalarField&
A =
_A();
95 dimensionedScalar&
Sc =
_Sc();
96 dimensionedScalar&
Sct =
_Sct();
120 volScalarField&
T =
_T();
121 dimensionedScalar&
Pr =
_Pr();
122 dimensionedScalar&
Prt =
_Prt();
135 volScalarField
v =
_v();
137 dimensionedScalar&
nu =
_nu();
144 dimensionedScalar&
tau =
_tau();
153 instantList Times =
runTime.times();
158 label Ntau =
static_cast<int> (
tau.value() /
timeStep);
162 label nsnapshots = 0;
166#include "readTimeControls.H"
167#include "CourantNo.H"
168#include "setDeltaT.H"
170 Info <<
"Time = " <<
runTime.timeName() << nl << endl;
192 while (npimple.loop())
202 Info <<
"ExecutionTime = " <<
runTime.elapsedCpuTime() <<
" s"
203 <<
" ClockTime = " <<
runTime.elapsedClockTime() <<
" s"
227 "./ITHACAoutput/Offline/");
234 std::ofstream of(
"./ITHACAoutput/Offline/" + name(
counter) +
"/" +
236 std::ofstream ofk(
"./ITHACAoutput/Offline/" + name(
counter) +
"/" + name(
267 for (label
i = 0;
i < mu_now.size();
i++)
302 "./ITHACAoutput/Offline");
309 scalar diffnow = mag(
nextWrite - atof(timeObject.timeName().c_str()));
310 scalar diffnext = mag(
nextWrite - atof(timeObject.timeName().c_str()) -
311 timeObject.deltaTValue());
313 if ( diffnow < diffnext)
330#include "initContinuityErrs.H"
334 volScalarField&
p =
_p();
335 volVectorField&
U =
_U();
336 surfaceScalarField&
phi =
_phi();
339 pimpleControl& npimple =
_npimple();
340 IOMRFZoneList& MRF =
_MRF();
342 dimensionedScalar&
IV1 =
_IV1();
345 volScalarField flux_old =
_flux();
347 volScalarField&
SP =
_SP();
350 volScalarField&
D =
_D();
356 volScalarField&
A =
_A();
360 dimensionedScalar&
Sc =
_Sc();
361 dimensionedScalar&
Sct =
_Sct();
385 volScalarField&
T =
_T();
386 dimensionedScalar&
Pr =
_Pr();
387 dimensionedScalar&
Prt =
_Prt();
400 volScalarField
v =
_v();
402 dimensionedScalar&
nu =
_nu();
412 dimensionedScalar&
tau =
_tau();
418 instantList Times =
runTime.times();
423 label Ntau =
static_cast<int> (
tau.value() /
timeStep);
427 label nsnapshots = 0;
431#include "readTimeControls.H"
432#include "CourantNo.H"
433#include "setDeltaT.H"
435 Info <<
"Time = " <<
runTime.timeName() << nl << endl;
457 while (npimple.loop())
467 Info <<
"ExecutionTime = " <<
runTime.elapsedCpuTime() <<
" s"
468 <<
" ClockTime = " <<
runTime.elapsedClockTime() <<
" s"
498 std::ofstream of(folder +
"/" + name(
counter) +
"/" +
runTime.timeName());
499 std::ofstream ofk(folder +
"/" + name(
counter) +
"/" + name(
Keff.value()));
529 for (label
i = 0;
i < mu_now.size();
i++)
605 dimensionedScalar&
tau =
_tau();
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.
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)
autoPtr< dimensionedScalar > _betaTot
autoPtr< volScalarField > _NSF
PtrList< volScalarField > Prec6field
List of pointers used to form the prec6 snapshots matrix.
autoPtr< volScalarField > _prec8
autoPtr< volScalarField > _dec3
autoPtr< volScalarField > _SP
autoPtr< dimensionedScalar > _rhoRef
autoPtr< dimensionedScalar > _betaTE
autoPtr< dimensionedScalar > _Pr
autoPtr< volScalarField > _T
PtrList< volScalarField > Prec8field
List of pointers used to form the prec8 snapshots matrix.
autoPtr< dimensionedScalar > _beta8
autoPtr< volScalarField > _dec2
autoPtr< dimensionedScalar > _Tref
autoPtr< dimensionedScalar > _CpRef
autoPtr< dimensionedScalar > _decBeta2
autoPtr< dimensionedScalar > _beta5
autoPtr< dimensionedScalar > _lam7
PtrList< volScalarField > vFields
List of pointers used to form the v snapshosts matrix.
autoPtr< dimensionedScalar > _SP1_0
label precinIndex
indexes of inlet and outlet to adopt for precursors boundary conditions
autoPtr< volScalarField > _prec2
autoPtr< dimensionedScalar > _lam3
autoPtr< dimensionedScalar > _Keff
PtrList< volScalarField > Fluxfield
List of pointers used to form the flux snapshots matrix.
autoPtr< volScalarField > _prec4
autoPtr< volScalarField > _alphat
autoPtr< dimensionedScalar > _beta2
PtrList< volScalarField > Prec4field
List of pointers used to form the prec4 snapshots matrix.
autoPtr< dimensionedScalar > _Sc
PtrList< volScalarField > DFields
List of pointers used to form the D snapshosts matrix.
autoPtr< dimensionedScalar > _lam6
autoPtr< IOMRFZoneList > _MRF
PtrList< volScalarField > AFields
List of pointers used to form the A snapshosts matrix.
autoPtr< dimensionedScalar > _beta3
autoPtr< dimensionedScalar > _TrefXS
PtrList< volScalarField > Dec3field
List of pointers used to form the dec3 snapshots matrix.
autoPtr< dimensionedScalar > _Prt
autoPtr< dimensionedScalar > _IV1
autoPtr< volVectorField > _U
autoPtr< dimensionedScalar > _D1_0
autoPtr< dimensionedScalar > _beta7
autoPtr< dimensionedScalar > _lam4
autoPtr< dimensionedScalar > _beta1
autoPtr< volScalarField > _difft
autoPtr< dimensionedScalar > _decLam3
autoPtr< volScalarField > _prec5
autoPtr< volScalarField > _v
autoPtr< dimensionedScalar > _beta4
autoPtr< fv::options > _fvOptions
fvOptions
PtrList< volScalarField > Dec1field
List of pointers used to form the dec1 snapshots matrix.
autoPtr< dimensionedScalar > _alfa_NSF1
autoPtr< dimensionedScalar > _lam5
autoPtr< dimensionedScalar > _lam1
autoPtr< dimensionedScalar > _Sct
autoPtr< volScalarField > _prec3
PtrList< volScalarField > PowerDensfield
List of pointers used to form the powerDens snapshots matrix.
autoPtr< dimensionedScalar > _NSF1_0
autoPtr< dimensionedScalar > _decBeta3
autoPtr< volScalarField > _prec6
autoPtr< volScalarField > _D
PtrList< volScalarField > Prec7field
List of pointers used to form the prec7 snapshots matrix.
autoPtr< dimensionedScalar > _alfa_A1
autoPtr< volScalarField > _prec7
autoPtr< dimensionedScalar > _lam8
autoPtr< dimensionedScalar > _nu
autoPtr< volScalarField > _TXS
autoPtr< dimensionedScalar > _decbetaTot
autoPtr< volScalarField > _p
PtrList< volScalarField > Pfield
List of pointers used to form the pressure snapshots matrix.
autoPtr< dimensionedScalar > _decBeta1
autoPtr< dimensionedScalar > _decLam2
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< volScalarField > Tfield
List of pointers used to form the temperature snapshots matrix.
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.
autoPtr< dimensionedScalar > _alfa_D1
autoPtr< volScalarField > _prec1
PtrList< volScalarField > SPFields
List of pointers used to form the SP snapshosts matrix.
autoPtr< dimensionedScalar > _A1_0
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.
bool precInBool
boolean variable to decide if apply prec inlet BC
PtrList< volScalarField > TXSFields
List of pointers used to form the SP snapshosts matrix.
autoPtr< dimensionedScalar > _alfa_SP1
autoPtr< surfaceScalarField > _phi
PtrList< volScalarField > Prec2field
List of pointers used to form the prec2 snapshots matrix.
autoPtr< volScalarField > _logT
autoPtr< volScalarField > _flux
autoPtr< volScalarField > _A
autoPtr< dimensionedScalar > _beta6
Eigen::MatrixXd bc_prec
matrix to store the values of precursors BC inlet conditions
autoPtr< singlePhaseTransportModel > _laminarTransport
autoPtr< volScalarField > _dec1
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.
bool offline
Boolean variable, it is 1 if the Offline phase has already been computed, else 0.
Eigen::MatrixXd mu
Row matrix of parameters.
bool podex
Boolean variable, it is 1 if the POD has already been computed, else 0.
void truthSolve()
Perform a TruthSolve.
bool checkWrite(Time &timeObject)
Function to check if the solution must be exported.
autoPtr< pimpleControl > _pimple
pimpleControl
autoPtr< dimensionedScalar > _tau
usmsrProblem()
Construct Null.
void assignPrecsBC(label call, label Ntau)
Method to assign the inlet BC to all precursors it assigns prec_i(x=inlet,t)=prec_i(x=outlet,...
void changePrecsBC()
Method to change the precursors' "precinIndex" (i.e.
void computePrecsBC(label call)
Method to compute the precursors inlet bc as: prec_i(x=outlet,t)exp(-lam_i*tau) where prec_i(x=outlet...
autoPtr< pimpleControl > _npimple
autoPtr< incompressible::turbulenceModel > turbulence
Turbulence model.
volScalarField & powerDens
dimensionedScalar & decbetaTot
dimensionedScalar & betaTot
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 & alfa_D1
dimensionedScalar & alfa_SP1
dimensionedScalar & SP1_0
dimensionedScalar & decLam1
dimensionedScalar & decBeta3
dimensionedScalar & decBeta1
dimensionedScalar & decBeta2
dimensionedScalar & decLam3
dimensionedScalar & decLam2
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 ...
bool check_pod()
Check if the POD data folder "./ITHACAoutput/POD" exists.
bool check_off()
Check if the offline data folder "./ITHACAoutput/Offline" exists.
void createSymLink(word folder)
Creates symbolic links to 0, system and constant.
singlePhaseTransportModel & laminarTransport