56 List<scalar> mu_now(1);
65 for (label
i = 0;
i <
mu.cols();
i++)
78int main(
int argc,
char* argv[])
86 double dtDMD = readScalar(para->
ITHACAdict->lookup(
"dtDMD"));
87 double finalTimeDMD = readScalar(para->
ITHACAdict->lookup(
"finalTimeDMD"));
88 double startTimeDMD = readScalar(para->
ITHACAdict->lookup(
"startTimeDMD"));
89 int numberOfModesDMD = readInt(para->
ITHACAdict->lookup(
"numberOfModesDMD"));
90 bool exactDMD = readBool(para->
ITHACAdict->lookup(
"exactDMD"));
91 bool exportDMDModes = readBool(para->
ITHACAdict->lookup(
"exportDMDModes"));
92 word exportFolder = string(para->
ITHACAdict->lookup(
"exportFolder"));
112 word exportFieldNameU = example.
Ufield[0].name() +
"_" + name(numberOfModesDMD);
114 DMDv.
getModes(numberOfModesDMD, exactDMD, exportDMDModes);
115 DMDv.
getDynamics(startTimeDMD, finalTimeDMD, dtDMD);
118 word exportFieldNameP = example.
Pfield[0].name() +
"_" + name(numberOfModesDMD);
120 DMDp.
getModes(numberOfModesDMD, exactDMD, exportDMDModes);
121 DMDp.
getDynamics(startTimeDMD, finalTimeDMD, dtDMD);
int main(int argc, char *argv[])
Header file of the ITHACADMD class.
Header file of the ITHACAPOD class.
Header file of the ITHACAstream class, it contains the implementation of several methods for input ou...
Header file of the reducedUnsteadyNS class.
Class of the computation of the DMD, it exploits the SVD methods.
void getDynamics(double tStart, double tFinal, double dt)
Export the dynamics of DMD given an initial time step, a final one and a time step.
void reconstruct(word exportFolder, word fieldName)
Reconstruct and export the solution using the computed dynamics.
void getModes(label SVD_rank=-1, bool exact=true, bool exportDMDmodes=false)
Get the DMD modes.
Class for the definition of some general parameters, the parameters must be defined from the file ITH...
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 finalTime
Final time (final time of the simulation and consequently of the acquisition of the snapshots)
label Pnumber
Number of parameters.
label Tnumber
Dimension of the training set (used only when gerating parameters without input)
bool offline
Boolean variable, it is 1 if the Offline phase has already been computed, else 0.
Eigen::MatrixXd mu
Row matrix of parameters.
Eigen::MatrixXd mu_range
Range of the parameter spaces.
void setParameters()
Set Parameters Problems.
void truthSolve()
Perform a TruthSolve.
void genEquiPar()
Generate Equidistributed Numbers.
void change_viscosity(double mu)
Function to change the viscosity.
PtrList< volScalarField > Pfield
List of pointers used to form the pressure snapshots matrix.
autoPtr< Time > _runTime
Time.
PtrList< volVectorField > Ufield
List of pointers used to form the velocity snapshots matrix.
autoPtr< fvMesh > _mesh
Mesh.
autoPtr< volVectorField > _U
Velocity field.
autoPtr< volScalarField > _p
Pressure field.
tutorial14(int argc, char *argv[])
Implementation of a parametrized full order unsteady NS problem and preparation of the the reduced ...
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.
Header file of the unsteadyNS class.