37#ifndef ReducedUnsteadyNSTurbIntrusive_H
38#define ReducedUnsteadyNSTurbIntrusive_H
46#include <unsupported/Eigen/NonLinearOptimization>
47#include <unsupported/Eigen/NumericalDiff>
53 newtonUnsteadyNSTurbIntrusive() {}
55 newtonUnsteadyNSTurbIntrusive(
int Nx,
int Ny,
58 Nphi_u(problem.nModesOnline),
59 N_BC(problem.inletIndex.rows())
62 int operator()(
const Eigen::VectorXd& x, Eigen::VectorXd& fvec)
const;
63 int df(
const Eigen::VectorXd& x, Eigen::MatrixXd& fjac)
const;
70 Eigen::VectorXd y_old;
71 Eigen::VectorXd yOldOld;
79 newtonUnsteadyNSTurbIntrusivePPE() {}
81 newtonUnsteadyNSTurbIntrusivePPE(
int Nx,
int Ny,
84 Nphi_u(problem.NUmodes),
85 Nphi_p(problem.NPmodes),
86 N_BC(problem.inletIndex.rows())
89 int operator()(
const Eigen::VectorXd& x, Eigen::VectorXd& fvec)
const;
90 int df(
const Eigen::VectorXd& x, Eigen::MatrixXd& fjac)
const;
98 Eigen::VectorXd y_old;
99 Eigen::VectorXd yOldOld;
101 Eigen::MatrixXd tauU;
172 fileName folder =
"./online_rec");
181 fileName folder =
"./online_rec");
Header file of the reducedSteadyNS class.
Header file of the reducedUnsteadyNS class.
Header file of the UnsteadyNSTurbIntrusive class.
void reconstructLiftAndDrag(UnsteadyNSTurbIntrusive &problem, fileName folder)
Method to compute the reduced order forces for same number of modes of velocity and pressure.
ReducedUnsteadyNSTurbIntrusive()
Construct Null.
Eigen::MatrixXd initCond
Tha matrix containing the initial conditions for the reduced variables, in case of PPE approach it mu...
PtrList< volScalarField > nutRecFields
Reconstructed eddy viscosity fields list.
newtonUnsteadyNSTurbIntrusive newtonObject
Function object to call the non linear solver sup approach.
PtrList< volScalarField > nutModes
List of pointers to store the modes for the eddy viscosity.
UnsteadyNSTurbIntrusive * problem
Pointer to the FOM problem.
Eigen::MatrixXd setOnlineVelocity(Eigen::MatrixXd vel)
Sets the online velocity.
void solveOnlinePPE(Eigen::MatrixXd vel)
Method to perform an online solve using an intrusive approach with the usage of PPE.
void reconstructPPE(bool exportFields=false, fileName folder="./online_rec")
Method to reconstruct the solutions from an online solve with a PPE semi-uniform approach.
void reconstruct(bool exportFields=false, fileName folder="./online_rec")
Method to reconstruct the solutions from an online solve with a fully uniform approach.
newtonUnsteadyNSTurbIntrusivePPE newtonObjectPPE
Function object to call the non linear solver sup approach.
Implementation of a parametrized full order unsteady NS problem and preparation of the the reduced ...
virtual void solveOnline()
Virtual Method to perform and online Solve.
reducedUnsteadyNS()
Construct Null.