55 surfaceScalarField& phi;
60 Vector<double> inl(0, 0, 0);
61 List<scalar> mu_now(1);
73 Vector<double>
Uinl(1, 0, 0);
76 for (label i = 0; i <
mu.cols(); i++)
88int main(
int argc,
char* argv[])
95 int NmodesUout = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesUout", 15);
96 int NmodesPout = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesPout", 15);
97 int NmodesUproj = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesUproj", 10);
98 int NmodesPproj = para->ITHACAdict->lookupOrDefault<
int>(
"NmodesPproj", 10);
100 word filename(
"./par");
103 example.inletIndex.resize(1, 2);
104 example.inletIndex(0, 0) = 0;
105 example.inletIndex(0, 1) = 0;
107 example.offlineSolve();
110 example.computeLift(example.Ufield, example.liftfield, example.Uomfield);
120 PtrList<volVectorField> U_rec_list;
121 PtrList<volScalarField> P_rec_list;
123 word vel_file(para->ITHACAdict->lookup(
"online_velocities"));
127 for (label k = 0; k < (example.mu).size(); k++)
129 scalar mu_now = example.mu(0, k);
130 example.change_viscosity(mu_now);
131 reduced.setOnlineVelocity(vel);
132 reduced.solveOnline_Simple(mu_now, NmodesUproj, NmodesPproj);
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 reducedSteadyNS class.
Header file of the steadyNS 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.
SteadyNSSimple()
Null constructor.
void truthSolve2(List< scalar > mu_now, word Folder="./ITHACAoutput/Offline/")
Offline solver for the whole Navier-Stokes problem.
Class where it is implemented a reduced problem for the steady Navier-stokes problem.
Eigen::MatrixXd mu_samples
Matrix of parameters to be used for PODI, where each row corresponds to a sample point....
void assignIF(T &s, G &value)
Assign internal field condition.
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 change_viscosity(double mu)
Function to change the viscosity.
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.
autoPtr< volVectorField > Uinl
Initial dummy field with all Dirichlet boundary conditions.
autoPtr< volVectorField > _U
Velocity field.
autoPtr< volScalarField > _p
Pressure field.
volScalarField & p
Pressure field.
void offlineSolve()
Perform an Offline solve.
tutorial12(int argc, char *argv[])
Constructor.
volVectorField & U
Velocity 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.