42 explicit tutorial19(
int argc,
char* argv[])
53 surfaceScalarField& phi;
57 Vector<double> inl(1, 0, 0);
58 List<scalar> mu_now(1);
72 for (label i = 0; i <
mu.cols(); i++)
84int main(
int argc,
char* argv[])
91 int NmodesUout = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesUout", 15);
92 int NmodesPout = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesPout", 15);
94 int NmodesUproj = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesUproj", 10);
95 int NmodesPproj = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesPproj", 10);
96 int NmodesSUPproj = 0;
102 example.setParameters();
104 example.mu_range(0, 0) = 0.01;
105 example.mu_range(0, 1) = 0.01;
107 example.genEquiPar();
109 example.inletIndex.resize(1, 2);
110 example.inletIndex(0, 0) = 0;
111 example.inletIndex(0, 1) = 0;
113 example.startTime = 0.0;
114 example.finalTime = 1.0;
115 example.timeStep = 0.005;
116 example.writeEvery = 0.005;
118 example.offlineSolve();
127 if (example.fluxMethod ==
"consistent")
135 example.discretizeThenProject(
"./Matrices", NmodesUproj, NmodesPproj,
140 reduced.tstart = 0.0;
141 reduced.finalTime = 1.0;
143 reduced.storeEvery = 0.005;
144 reduced.exportEvery = 0.005;
146 Eigen::MatrixXd vel_now(1, 1);
148 reduced.solveOnline(vel_now, 1);
150 reduced.reconstruct(
false,
"./ITHACAoutput/Reconstruction/");
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 ReducedUnsteadyNSExplicit class.
Header file of the UnsteadyNSExplicit class.
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.
Class where it is implemented a reduced problem for the unsteady Navier-stokes problem.
UnsteadyNSExplicit()
Construct Null.
bool offline
Boolean variable, it is 1 if the Offline phase has already been computed, else 0.
Eigen::MatrixXd mu
Row matrix of parameters.
void truthSolve()
Perform a TruthSolve.
autoPtr< surfaceScalarField > _phi
Flux.
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.
PtrList< surfaceScalarField > Phifield
List of pointers used to form the flux snapshots matrix.
word fluxMethod
Flux Method.
autoPtr< volVectorField > _U
Velocity field.
autoPtr< volScalarField > _p
Pressure 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.