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);
142 example.
supex, 1, NmodesSUPout);
143 example.
projectSUP(
"./Matrices", NmodesUproj, NmodesPproj, NmodesTproj,
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;
int main(int argc, char *argv[])
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...
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 nu
Reduced viscosity in case of parametrized viscosity.
Class where it is implemented a reduced problem for the unsteady Navier-stokes weakly coupled with t...
scalar finalTime
Scalar to store the final time if the online simulation.
void reconstruct_supt(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
Method to reconstruct a solution from an online solve with a supremizer stabilisation technique for t...
scalar tstart
Scalar to store the final time if the online simulation.
void reconstruct_sup(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
Method to reconstruct a solution from an online solve with a supremizer stabilisation technique.
scalar dt
Scalar to store the time increment.
void solveOnline_sup(Eigen::MatrixXd &vel_now, Eigen::MatrixXd &temp_now, int startSnap=0)
Method to perform an online solve using a supremizer stabilisation method.
Eigen::MatrixXi inletIndexT
label Pnumber
Number of parameters.
Eigen::MatrixXd mu_samples
Matrix of parameters to be used for PODI, where each row corresponds to a sample point....
label Tnumber
Dimension of the training set (used only when gerating parameters without input)
void computeLift(T &Lfield, T &liftfield, T &omfield)
Homogenize the snapshot matrix, it works with PtrList of volVectorField and volScalarField.
bool offline
Boolean variable, it is 1 if the Offline phase has already been computed, else 0.
void computeLiftT(T &Lfield, T &liftfield, T &omfield)
Virtual function to compute the lifting function.
Eigen::MatrixXd mu
Row matrix of parameters.
Eigen::MatrixXd mu_range
Range of the parameter spaces.
void setParameters()
Set Parameters Problems.
Eigen::MatrixXi inletIndex
Matrix that contains informations about the inlet boundaries.
bool podex
Boolean variable, it is 1 if the POD has already been computed, else 0.
void truthSolve()
Perform a TruthSolve.
void genEquiPar()
Generate Equidistributed Numbers.
bool supex
Boolean variable to check the existence of the supremizer modes.
PtrList< volScalarField > Pfield
List of pointers used to form the pressure snapshots matrix.
volVectorModes supmodes
List of pointers used to form the supremizer modes.
void solvesupremizer(word type="snapshots")
solve the supremizer either with the use of the pressure snaphots or the pressure modes
volVectorModes Umodes
List of pointers used to form the velocity modes.
PtrList< volVectorField > Ufield
List of pointers used to form the velocity snapshots matrix.
PtrList< volVectorField > liftfield
List of pointers used to form the list of lifting functions.
PtrList< volVectorField > Uomfield
List of pointers used to form the homogeneous velocity snapshots.
PtrList< volVectorField > supfield
List of pointers used to form the supremizer snapshots matrix.
autoPtr< volVectorField > _U
Velocity field.
volScalarModes Pmodes
List of pointers used to form the pressure modes.
autoPtr< volScalarField > _p
Pressure field.
tutorial07(int argc, char *argv[])
Implementation of a parametrized full order unsteady NS problem weakly coupled with the energy equat...
PtrList< volScalarField > Tfield
List of pointers used to form the temperature snapshots matrix.
PtrList< volScalarField > liftfieldT
List of pointers used to form the list of the temperature lifting functions.
PtrList< volScalarField > Tomfield
List of pointers used to form the homogeneous temperature snapshots.
scalar timeStep
Time step of the simulation.
void projectSUP(fileName folder, label NUmodes, label NPmodes, label NTmodes, label NSUPmodes)
Specific variable for the unstationary case.
autoPtr< Time > _runTime
Time.
scalar finalTime
Final time (final time of the simulation and consequently of the acquisition of the snapshots)
scalar startTime
Start Time (initial time to start storing the snapshots)
autoPtr< volScalarField > _T
Temperature field.
scalar writeEvery
Time step of the writing procedure.
void liftSolve()
Perform a lift solve for velocity field.
autoPtr< fvMesh > _mesh
Mesh.
PtrList< volScalarField > Tmodes
List of pointers used to form the temperature modes.
void liftSolveT()
Perform a lift solve for 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.