40 explicit tutorial07(
int argc,
char* argv[])
55 Vector<double> inl(0, 0, 0);
56 List<scalar> mu_now(1);
57 Info <<
"here" << endl;
69 for (label i = 0; i <
mu.cols(); i++)
82int main(
int argc,
char* argv[])
89 int NmodesUout = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesUout", 5);
90 int NmodesPout = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesPout", 5);
91 int NmodesTout = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesTout", 5);
92 int NmodesSUPout = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesSUPout", 5);
93 int NmodesUproj = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesUproj", 5);
94 int NmodesPproj = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesPproj", 15);
95 int NmodesTproj = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesTproj", 5);
96 int NmodesSUPproj = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesSUPproj", 5);
102 example.setParameters();
104 example.mu_range(0, 0) = 0.1;
105 example.mu_range(0, 1) = 0.1;
107 example.genEquiPar();
109 example.inletIndex.resize(2, 2);
110 example.inletIndex << 3, 0, 2, 1;
111 example.inletIndexT.resize(3, 1);
112 example.inletIndexT << 3, 2, 0;
114 example.startTime = 0;
115 example.finalTime = 50;
116 example.timeStep = 0.05;
117 example.writeEvery = 0.1;
119 example.offlineSolve();
121 example.solvesupremizer();
125 example.liftSolveT();
127 example.computeLift(example.Ufield, example.liftfield, example.Uomfield);
129 example.computeLiftT(example.Tfield, example.liftfieldT, example.Tomfield);
142 example.supex, 1, NmodesSUPout);
143 example.projectSUP(
"./Matrices", NmodesUproj, NmodesPproj, NmodesTproj,
149 reduced.finalTime = 50;
153 Eigen::MatrixXd vel_now;
154 vel_now.resize(2, 1);
157 Eigen::MatrixXd temp_now;
158 temp_now.resize(3, 1);
159 temp_now << 60, 70, 60;
160 reduced.solveOnline_sup(vel_now, temp_now);
162 reduced.reconstruct_sup(
"./ITHACAoutput/ReconstructionSUP/", 2);
163 reduced.reconstruct_supt(
"./ITHACAoutput/ReconstructionSUP/", 2);
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 reducedUnsteadyNST class.
Header file of the reducedUnsteadyNS 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 weakly coupled with t...
Eigen::MatrixXd mu_samples
Matrix of parameters to be used for PODI, where each row corresponds to a sample point....
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.
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.
PtrList< volScalarField > Tfield
List of pointers used to form the temperature snapshots matrix.
unsteadyNST()
Constructors.
autoPtr< volScalarField > _T
Temperature 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.
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.
Header file of the unsteadyNST class.