45#ifndef ReducedUnsteadyNSTTurb_H
46#define ReducedUnsteadyNSTTurb_H
54#include <unsupported/Eigen/NonLinearOptimization>
55#include <unsupported/Eigen/NumericalDiff>
60 newton_unsteadyNSTTurb_sup() {}
62 newton_unsteadyNSTTurb_sup(
int Nx,
int Ny,
65 Nphi_u(problem.NUmodes + problem.liftfield.size() + problem.NSUPmodes),
66 Nphi_nut(problem.Nnutmodes),
67 Nphi_p(problem.NPmodes),
68 N_BC(problem.inletIndex.rows()),
69 nu_c(problem.Nnutmodes)
72 int operator()(
const Eigen::VectorXd& x, Eigen::VectorXd& fvec)
const;
73 int df(
const Eigen::VectorXd& x, Eigen::MatrixXd& fjac)
const;
80 int count_online_solve = 0;
81 Eigen::VectorXd mu_now;
84 Eigen::VectorXd y_old;
86 std::vector<SPLINTER::RBFSpline*> SPLINES;
92 newton_unsteadyNSTTurb_sup_t() {}
94 newton_unsteadyNSTTurb_sup_t(
int Nx,
int Ny,
97 Nphi_t(problem.NTmodes + problem.liftfieldT.size()),
98 N_BC_t(problem.inletIndexT.rows()),
99 nu_c(problem.Nnutmodes)
102 int operator()(
const Eigen::VectorXd& x, Eigen::VectorXd& fvec)
const;
103 int df(
const Eigen::VectorXd& x, Eigen::MatrixXd& fjac)
const;
109 Eigen::VectorXd nu_c;
115 Eigen::VectorXd a_tmp;
116 Eigen::MatrixXd Y_matrix;
117 Eigen::MatrixXd MT_matrix;
118 Eigen::VectorXd mu_now;
120 Eigen::VectorXd z_old;
121 Eigen::VectorXd BC_t;
122 std::vector<SPLINTER::RBFSpline*> SPLINES;
212 void reconstructSup(fileName folder =
"./ITHACAOutput/online_rec",
Header file of the reducedSteadyNS class.
Header file of the reducedUnsteadyNST class.
Header file of the unsteadyNSTTurb class.
ReducedUnsteadyNSTTurb()
Construct Null.
void solveOnlineSup(Eigen::MatrixXd &vel_now, Eigen::MatrixXd &temp_now, int startSnap=0)
Method to perform an online solve using a supremizer stabilisation method.
double time
Scalar to store the current time.
newton_unsteadyNSTTurb_sup_t newton_object_sup_t
Functor object to call the non linear solver sup. approach for temperature field.
double dt
Scalar to store the time increment.
newton_unsteadyNSTTurb_sup newton_object_sup
Functor object to call the non linear solver sup. approach.
scalar Prt
Scalar to store the turbulent Prandtl number.
PtrList< volScalarField > nutFields
List of snapshots for the solution for eddy viscosity.
PtrList< volScalarField > nuTmodes
List of POD modes for eddy viscosity.
int Nphi_nut
Number of nut field modes.
UnsteadyNSTTurb * problem
Pointer to the FOM problem.
void reconstructSup(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
Method to reconstruct a solution for velocity and pressure from an online solve with a supremizer sta...
PtrList< volScalarField > nutREC
Reconstructed eddy viscosity field.
double finalTime
Scalar to store the final time if the online simulation.
void reconstructSupt(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
Method to reconstruct a solution for temperature from an online solve with a supremizer stabilisation...
scalar Pr
Scalar to store the Prandtl number.
double tstart
Scalar to store the final time if the online simulation.
Implementation of a parametrized full order unsteady NST problem weakly coupled with the energy equa...
Eigen::MatrixXd vel_now
Online inlet velocity vector.
reducedUnsteadyNST()
Construct Null.