37#ifndef ReducedUnsteadyNST_H
38#define ReducedUnsteadyNST_H
44#include <unsupported/Eigen/NonLinearOptimization>
45#include <unsupported/Eigen/NumericalDiff>
51 newton_unsteadyNST_sup() {}
53 newton_unsteadyNST_sup(
int Nx,
int Ny,
56 Nphi_u(problem.NUmodes + problem.liftfield.size() + problem.NSUPmodes),
57 Nphi_p(problem.NPmodes),
58 N_BC(problem.inletIndex.rows())
61 int operator()(
const Eigen::VectorXd& x, Eigen::VectorXd& fvec)
const;
62 int df(
const Eigen::VectorXd& x, Eigen::MatrixXd& fjac)
const;
69 Eigen::VectorXd y_old;
77 newton_unsteadyNST_sup_t() {}
79 newton_unsteadyNST_sup_t(
int Nx,
int Ny,
82 Nphi_t(problem.NTmodes + problem.liftfieldT.size()),
83 N_BC_t(problem.inletIndexT.rows())
86 int operator()(
const Eigen::VectorXd& x, Eigen::VectorXd& fvec)
const;
87 int df(
const Eigen::VectorXd& x, Eigen::MatrixXd& fjac)
const;
95 Eigen::VectorXd a_tmp;
96 Eigen::VectorXd z_old;
Header file of the reducedUnsteadyNS class.
Eigen::MatrixXd vel_now
Online inlet velocity vector.
Eigen::MatrixXd B_matrix
Diffusion Term.
Eigen::MatrixXd MT_matrix
Mass Matrix Term for temperature.
PtrList< volScalarField > TREC
Reconstructed temperature field.
scalar finalTime
Scalar to store the final time if the online simulation.
int N_BC_t
Number of parametrized boundary conditions related to temperature field.
Eigen::VectorXd z_old
Vector to store the previous temperature solution during the Newton procedure.
Eigen::MatrixXd P_matrix
Divergence of velocity.
PtrList< volScalarField > Tmodes
List of pointers to store the modes for temperature.
Eigen::MatrixXd K_matrix
Gradient of pressure.
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...
PtrList< volScalarField > T_rec
Reconstructed temperature field.
reducedUnsteadyNST()
Construct Null.
List< Eigen::MatrixXd > online_solutiont
List of Eigen matrices to store the online solution for temperature equation.
List< Eigen::MatrixXd > S_matrix
Turbulent thermal term.
newton_unsteadyNST_sup_t newton_object_sup_t
Functor object to call the non linear solver sup. approach for temperature case.
Eigen::MatrixXd D_matrix
Laplacian of pressure.
scalar tstart
Scalar to store the final time if the online simulation.
unsteadyNST * problem
pointer to the FOM problem
List< Eigen::MatrixXd > Q_matrix
Convective Term for temperature transport equation.
List< Eigen::MatrixXd > G_matrix
Divergence of momentum.
Eigen::MatrixXd M_matrix
Mass Matrix Term.
int Nphi_t
Number of temperature modes.
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.
Eigen::MatrixXd Y_matrix
Laplacian Term for temperature trasnport equation.
newton_unsteadyNST_sup newton_object_sup
Functor object to call the non linear solver sup. approach for velocity case.
Eigen::VectorXd z
Vector to store the temperature solution during the Newton procedure.
List< Eigen::MatrixXd > C_matrix
Convective Term.
PtrList< volScalarField > Tsnapshots
List of pointers to store the snapshots for temperature.
scalar time
Scalar to store the current time.
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.
reducedUnsteadyNS()
Construct Null.
Implementation of a parametrized full order unsteady NS problem weakly coupled with the energy equat...
Newton object for the resolution of the reduced problem using a supremizer approach.
Header file of the unsteadyNST class.