51 tutorial26(
int argc,
char* argv[])
91int main(
int argc,
char* argv[])
95 std::clock_t startOff;
101 int NmodesUout = readInt(para->ITHACAdict->lookup(
"NmodesUout"));
102 int NmodesPout = readInt(para->ITHACAdict->lookup(
"NmodesPout"));
103 int NmodesEout = readInt(para->ITHACAdict->lookup(
"NmodesEout"));
104 int NmodesUproj = readInt(para->ITHACAdict->lookup(
"NmodesUproj"));
105 int NmodesPproj = readInt(para->ITHACAdict->lookup(
"NmodesPproj"));
106 int NmodesEproj = readInt(para->ITHACAdict->lookup(
"NmodesEproj"));
110 example.startTime = 0;
111 example.finalTime = 0.15;
112 example.timeStep = 2e-06;
113 example.writeEvery = 4e-04;
115 startOff = std::clock();
116 example.offlineSolve();
118 durationOff = (std::clock() - startOff);
119 Info <<
"The Offline phase duration is equal to " << durationOff <<
122 if (example.podex == 0 )
125 example.podex, 0, 0, NmodesUout);
127 example.podex, 0, 0, NmodesPout);
129 example.podex, 0, 0, NmodesEout);
142 hyperreduced.startTime = example.startTime;
143 hyperreduced.finalTime = example.finalTime;
144 hyperreduced.timeStep = example.timeStep;
145 hyperreduced.writeEvery = example.writeEvery;
147 hyperreduced.SolveHyperReducedSys(NmodesUproj, NmodesPproj, NmodesEproj);
Header file of the CompressibleUnSteadyPimple class.
Header file of the Foam2Eigen class.
Header file of the reducedSteadyNS class.
Header file of the ITHACAPOD class.
Header file of the ITHACAstream class, it contains the implementation of several methods for input ou...
CompressibleUnSteadyRhoPimple()
Null constructor.
PtrList< volScalarField > Efield
List of pointers used to store the energy solutions.
DEIM(PtrList< O > &SnapShotsMatrix, label MaxModes, word FunctionName, word FieldName)
Class where it is implemented a reduced problem for the UnSteady RhoPimple problem.
Class for the definition of some general parameters, the parameters must be defined from the file ITH...
static ITHACAparameters * getInstance()
Gets an instance of ITHACAparameters, to be used if the instance is already existing.
bool offline
Boolean variable, it is 1 if the Offline phase has already been computed, else 0.
void truthSolve()
Perform a TruthSolve.
PtrList< volScalarField > Pfield
List of pointers used to form the pressure snapshots matrix.
PtrList< volVectorField > Ufield
List of pointers used to form the velocity snapshots matrix.
autoPtr< volVectorField > _U
Velocity field.
autoPtr< volScalarField > _p
Pressure field.
void offlineSolve(word folder="./ITHACAoutput/Offline/")
Hyper-reduced object.
volScalarField & p
Pressure field.
volVectorField & U
Velocity field.
volScalarField & E
Energy field.
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 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.