37#ifndef ReducedSteadyNS_H
38#define ReducedSteadyNS_H
47#include <unsupported/Eigen/NonLinearOptimization>
48#include <unsupported/Eigen/NumericalDiff>
64 int operator()(
const Eigen::VectorXd& x, Eigen::VectorXd& fvec)
const;
65 int df(
const Eigen::VectorXd& x, Eigen::MatrixXd& fjac)
const;
211 fileName folder =
"./ITHACAoutput/online_rec",
Header file of the EigenFunctions class.
Header file of the ITHACAutilities namespace.
Header file of the reducedProblem class.
Class for the definition of some general parameters, the parameters must be defined from the file ITH...
Template object created to solve non linear problems using the Eigen library.
Base class for the implementation of a reduced problem.
Class where it is implemented a reduced problem for the steady Navier-stokes problem.
PtrList< volScalarField > PREC
Reconstructed pressure field.
int Nphi_sup
Number of supremizer modes.
Eigen::VectorXd y
Vector to store the solution during the Newton procedure.
ITHACAparameters * para
parameters to be read from the ITHACAdict file
Eigen::MatrixXd setOnlineVelocity(Eigen::MatrixXd vel)
Sets the online velocity.
void solveOnline_sup(Eigen::MatrixXd vel_now)
Method to perform an online solve using a supremizer stabilisation method.
Eigen::MatrixXd fTau
Reduced matrix for tangent forces.
PtrList< volScalarField > Pmodes
List of pointers to store the modes for pressure.
List< Eigen::MatrixXd > online_solution
List of Eigen matrices to store the online solution.
int Nphi_p
Number of pressure modes.
Eigen::VectorXd y_old
Vector to store the previous solution during the Newton procedure.
scalar nu
Reduced viscosity in case of parametrized viscosity.
Eigen::MatrixXd tauU
Penalty Factor.
void reconstructLiftAndDrag(steadyNS &problem, fileName folder)
Method to compute the reduced order forces.
void solveOnline_PPE(Eigen::MatrixXd vel_now)
Method to perform an online solve using a PPE stabilisation method.
PtrList< volScalarField > pRecFields
Reconstructed pressure fields list.
steadyNS * problem
Pointer to the FOM problem.
int count_online_solve
Counter to count the online solutions.
reducedSteadyNS()
Construct Null.
Eigen::MatrixXd vel_now
Online inlet velocity vector.
Eigen::MatrixXd fN
Reduced matrix for normal forces.
PtrList< volScalarField > Psnapshots
List of pointers to store the snapshots for pressure.
PtrList< volVectorField > Usnapshots
List of pointers to store the snapshots for velocity.
PtrList< volVectorField > Umodes
List of pointers to store the modes for velocity.
PtrList< volVectorField > uRecFields
Recontructed velocity fields list.
int N_BC
Number of parametrized boundary conditions.
PtrList< volVectorField > UREC
Recontructed velocity field.
void reconstruct_PPE(fileName folder="./ITHACAoutput/online_rec", int printevery=1)
Method to reconstruct a solution from an online solve with a PPE stabilisation technique.
double inf_sup_constant()
Method to evaluate the online inf-sup constant.
int Nphi_u
Number of velocity modes.
void reconstruct(bool exportFields=false, fileName folder="./ITHACAoutput/online_rec", int printevery=1)
Method to reconstruct the solutions from an online solve.
newton_steadyNS newton_object
Newton object used to solve the non linear problem.
Implementation of a parametrized full order steady NS problem and preparation of the the reduced ma...
Header file of the steadyNS class.
Structure to implement a newton object for a stationary NS problem.
int operator()(const Eigen::VectorXd &x, Eigen::VectorXd &fvec) const
int df(const Eigen::VectorXd &x, Eigen::MatrixXd &fjac) const
newton_steadyNS(int Nx, int Ny, steadyNS &problem)