34#include <unsupported/Eigen/NonLinearOptimization>
35#include <unsupported/Eigen/NumericalDiff>
49 int operator()(
const Eigen::VectorXd& x, Eigen::VectorXd& fvec)
const;
50 int df(
const Eigen::VectorXd& x, Eigen::MatrixXd& fjac)
const;
83 int operator()(
const Eigen::VectorXd& n, Eigen::VectorXd& fvecn)
const;
84 int df(
const Eigen::VectorXd& n, Eigen::MatrixXd& fjacn)
const;
147 int operator()(
const Eigen::VectorXd& n, Eigen::VectorXd& fvecn)
const;
148 int df(
const Eigen::VectorXd& n, Eigen::MatrixXd& fjacn)
const;
371 void solveOnline(Eigen::MatrixXd vel_now, Eigen::MatrixXd temp_now,
372 Eigen::VectorXd mu_online);
382 void reconstructAP(fileName folder =
"./ITHACAOutput/online_rec",
385 void reconstruct_fd(fileName folder =
"./ITHACAOutput/online_rec",
388 void reconstruct_n(fileName folder =
"./ITHACAOutput/online_rec",
391 void reconstruct_t(fileName folder =
"./ITHACAOutput/online_rec",
394 void reconstruct_C(fileName folder =
"./ITHACAOutput/online_rec",
Header file of the ITHACAutilities namespace.
Header file of the reducedProblem class.
Class to implement Molten Salt Reactor multiphysics problem.
Template object created to solve non linear problems using the Eigen library.
PtrList< volScalarField > NSFREC
PtrList< volScalarField > Tsnapshots
PtrList< volScalarField > DEC3REC
msrProblem * problem
Pointer to the FOM problem.
PtrList< volScalarField > vREC
void reconstruct_n(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
reconstruct neutronics
newton_msr_n newton_object_n
PtrList< volScalarField > DEC2REC
PtrList< volScalarField > Dec1modes
PtrList< volScalarField > Pmodes
PtrList< volVectorField > Usnapshots
List of pointers to store the snapshots for each field.
PtrList< volScalarField > Psnapshots
PtrList< volScalarField > FLUXREC
PtrList< volVectorField > Umodes
List of pointers to store the modes for each field.
PtrList< volScalarField > Prec8snapshots
PtrList< volScalarField > Dec2modes
scalar nu
characteristic constants of the problem
PtrList< volScalarField > TXSREC
bool recall
boolean variable to check if the user wants to reconstruct all the three physics of the problem
PtrList< volScalarField > PREC4REC
PtrList< volScalarField > Prec2modes
void reconstruct_C(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
reconstruct temperature dependent constants
PtrList< volScalarField > Prec6snapshots
PtrList< volScalarField > PREC3REC
PtrList< volScalarField > vsnapshots
PtrList< volVectorField > UREC
Recontructed fields.
List< Eigen::MatrixXd > online_solution_n
PtrList< volScalarField > Prec7modes
PtrList< volScalarField > Prec6modes
PtrList< volScalarField > SPmodes
void reconstruct_t(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
reconstruct thermal fields
PtrList< volScalarField > Prec5snapshots
PtrList< volScalarField > TXSsnapshots
PtrList< volScalarField > Dec3snapshots
PtrList< volScalarField > Prec3modes
PtrList< volScalarField > Prec3snapshots
PtrList< volScalarField > Prec7snapshots
newton_msr_fd newton_object_fd
Newton object used to solve the non linear problem.
PtrList< volScalarField > Amodes
void loadConstants(msrProblem *problem)
Method to load all the constants needed in the ROM from ///the FOM.
PtrList< volScalarField > DEC1REC
PtrList< volScalarField > NSFmodes
PtrList< volScalarField > Fluxsnapshots
void reconstruct_fd(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
reconstruct fluid-dynamics
int N_BC
Number of parametrized boundary conditions.
PtrList< volScalarField > Dec1snapshots
PtrList< volScalarField > SPsnapshots
PtrList< volScalarField > Asnapshots
PtrList< volScalarField > Prec4modes
PtrList< volScalarField > PREC1REC
PtrList< volScalarField > Prec1snapshots
PtrList< volScalarField > Dsnapshots
PtrList< volScalarField > Prec8modes
List< Eigen::MatrixXd > online_solution_fd
List of Eigen matrices to store the online solution.
PtrList< volScalarField > POWERDENSREC
PtrList< volScalarField > PREC6REC
PtrList< volScalarField > TREC
Eigen::VectorXd y_old
Vector to store the previous solution during the Newton procedure.
PtrList< volScalarField > NSFsnapshots
PtrList< volScalarField > TXSmodes
PtrList< volScalarField > Dec3modes
int count_online_solve
Counter to count the online solutions.
PtrList< volScalarField > AREC
PtrList< volScalarField > vmodes
PtrList< volScalarField > Prec4snapshots
PtrList< volScalarField > PREC2REC
PtrList< volScalarField > Tmodes
PtrList< volScalarField > Dmodes
int Nphi_u
Number of modes for each field.
List< Eigen::MatrixXd > online_solution_t
void reconstructAP(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
Methods to reconstruct a solution from an online solve with a PPE stabilisation technique.
PtrList< volScalarField > Prec5modes
PtrList< volScalarField > Prec2snapshots
newton_msr_t newton_object_t
PtrList< volScalarField > PREC
PtrList< volScalarField > SPREC
void clearFields()
Method to clear all the fields of MSR (sets the size to zero)
PtrList< volScalarField > Dec2snapshots
PtrList< volScalarField > Prec1modes
Eigen::VectorXd y
Vector to store the solution during the Newton procedure.
PtrList< volScalarField > PREC5REC
PtrList< volScalarField > Fluxmodes
PtrList< volScalarField > PREC8REC
PtrList< volScalarField > DREC
List< Eigen::MatrixXd > online_solution_C
PtrList< volScalarField > PREC7REC
Base class for the implementation of a reduced problem.
virtual void solveOnline()
Virtual Method to perform and online Solve.
Structure to implement a newton object for a stationary MSR problem.
int df(const Eigen::VectorXd &x, Eigen::MatrixXd &fjac) const
newton_msr_fd(int Nx, int Ny, msrProblem &problem)
int operator()(const Eigen::VectorXd &x, Eigen::VectorXd &fvec) const
int df(const Eigen::VectorXd &n, Eigen::MatrixXd &fjacn) const
std::vector< SPLINTER::RBFSpline * > SPLINES_d
newton_msr_n(int Nx, int Ny, msrProblem &problem)
int operator()(const Eigen::VectorXd &n, Eigen::VectorXd &fvecn) const
std::vector< SPLINTER::RBFSpline * > SPLINES_a
std::vector< SPLINTER::RBFSpline * > SPLINES_nsf
newton_msr_t(int Nx, int Ny, msrProblem &problem)
std::vector< SPLINTER::RBFSpline * > SPLINES_TXS
int df(const Eigen::VectorXd &n, Eigen::MatrixXd &fjacn) const
std::vector< SPLINTER::RBFSpline * > SPLINES_v
int operator()(const Eigen::VectorXd &n, Eigen::VectorXd &fvecn) const
std::vector< SPLINTER::RBFSpline * > SPLINES_sp