Loading...
Searching...
No Matches
reducedSteadyNS Class Reference

Class where it is implemented a reduced problem for the steady Navier-stokes problem. More...

#include <ReducedSteadyNS.H>

Inheritance diagram for reducedSteadyNS:
reducedProblem ReducedSteadyNSTurb ReducedSteadyNSTurbIntrusive reducedUnsteadyNS ReducedUnsteadyBB ReducedUnsteadyNSExplicit ReducedUnsteadyNSTurb ReducedUnsteadyNSTurbIntrusive reducedUnsteadyNST ReducedUnsteadyNSTTurb

Public Member Functions

 reducedSteadyNS ()
 Construct Null.
 
 reducedSteadyNS (steadyNS &problem)
 Construct Null.
 
 ~reducedSteadyNS ()
 
void solveOnline_PPE (Eigen::MatrixXd vel_now)
 Method to perform an online solve using a PPE stabilisation method.
 
void solveOnline_sup (Eigen::MatrixXd vel_now)
 Method to perform an online solve using a supremizer stabilisation method.
 
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.
 
void reconstruct (bool exportFields=false, fileName folder="./ITHACAoutput/online_rec", int printevery=1)
 Method to reconstruct the solutions from an online solve.
 
void reconstructLiftAndDrag (steadyNS &problem, fileName folder)
 Method to compute the reduced order forces.
 
double inf_sup_constant ()
 Method to evaluate the online inf-sup constant.
 
Eigen::MatrixXd setOnlineVelocity (Eigen::MatrixXd vel)
 Sets the online velocity.
 
- Public Member Functions inherited from reducedProblem
 reducedProblem ()
 Construct Null.
 
virtual ~reducedProblem ()
 
 reducedProblem (reductionProblem &problem)
 Construct with reduced Problem.
 
virtual void solveOnline ()
 Virtual Method to perform and online Solve.
 

Public Attributes

ITHACAparameterspara
 parameters to be read from the ITHACAdict file
 
Eigen::MatrixXd vel_now
 Online inlet velocity vector.
 
Eigen::MatrixXd fTau
 Reduced matrix for tangent forces.
 
Eigen::MatrixXd fN
 Reduced matrix for normal forces.
 
Eigen::VectorXd y_old
 Vector to store the previous solution during the Newton procedure.
 
Eigen::VectorXd y
 Vector to store the solution during the Newton procedure.
 
scalar nu
 Reduced viscosity in case of parametrized viscosity.
 
List< Eigen::MatrixXd > online_solution
 List of Eigen matrices to store the online solution.
 
PtrList< volVectorField > Umodes
 List of pointers to store the modes for velocity.
 
PtrList< volScalarField > Pmodes
 List of pointers to store the modes for pressure.
 
PtrList< volVectorField > Usnapshots
 List of pointers to store the snapshots for velocity.
 
PtrList< volScalarField > Psnapshots
 List of pointers to store the snapshots for pressure.
 
PtrList< volScalarField > PREC
 Reconstructed pressure field.
 
PtrList< volVectorField > UREC
 Recontructed velocity field.
 
PtrList< volScalarField > pRecFields
 Reconstructed pressure fields list.
 
PtrList< volVectorField > uRecFields
 Recontructed velocity fields list.
 
newton_steadyNS newton_object
 Newton object used to solve the non linear problem.
 
steadyNSproblem
 Pointer to the FOM problem.
 
int Nphi_u
 Number of velocity modes.
 
int Nphi_p
 Number of pressure modes.
 
int Nphi_sup
 Number of supremizer modes.
 
int N_BC
 Number of parametrized boundary conditions.
 
int count_online_solve = 1
 Counter to count the online solutions.
 
Eigen::MatrixXd tauU
 Penalty Factor.
 
- Public Attributes inherited from reducedProblem
scalar nu
 Viscosity.
 
reductionProblemproblem
 Pointer to FOAM problem.
 

Additional Inherited Members

- Static Public Member Functions inherited from reducedProblem
static Eigen::MatrixXd solveLinearSys (List< Eigen::MatrixXd > LinSys, Eigen::MatrixXd x, Eigen::VectorXd &residual, const Eigen::MatrixXd &bc=Eigen::MatrixXd::Zero(0, 0), const std::string solverType="fullPivLu")
 Linear system solver for the online problem.
 
static Eigen::MatrixXd solveLinearSys (List< Eigen::MatrixXd > LinSys, Eigen::MatrixXd x, Eigen::VectorXd &residual, const std::string solverType)
 Linear system solver for the online problem.
 

Detailed Description

Class where it is implemented a reduced problem for the steady Navier-stokes problem.

In this class are implemented the methods to solve a reduced version of the stationary Navier-stokes equations. This class must be used together with the steadyNS class

Examples
03steadyNS.C, and 06POD_RBF.C.

Definition at line 84 of file ReducedSteadyNS.H.

Constructor & Destructor Documentation

◆ reducedSteadyNS() [1/2]

reducedSteadyNS::reducedSteadyNS ( )

Construct Null.

Definition at line 39 of file ReducedSteadyNS.C.

◆ reducedSteadyNS() [2/2]

reducedSteadyNS::reducedSteadyNS ( steadyNS & problem)
explicit

Construct Null.

Parameters
[in]problema full order steadyNS problem
[in]tipoType of pressure stabilisation method you want to use "SUP" for supremizer, "PPE" for pressure Poisson equation.

Definition at line 44 of file ReducedSteadyNS.C.

◆ ~reducedSteadyNS()

reducedSteadyNS::~reducedSteadyNS ( )
inline

Definition at line 100 of file ReducedSteadyNS.H.

Member Function Documentation

◆ inf_sup_constant()

double reducedSteadyNS::inf_sup_constant ( )

Method to evaluate the online inf-sup constant.

Returns
return the reduced version of the inf-sup constant.

Definition at line 295 of file ReducedSteadyNS.C.

◆ reconstruct()

void reducedSteadyNS::reconstruct ( bool exportFields = false,
fileName folder = "./ITHACAoutput/online_rec",
int printevery = 1 )

Method to reconstruct the solutions from an online solve.

Parameters
[in]exportFieldsA boolean variable which determines whether to export fields or not
[in]folderThe folder where to output the solutions in case on wants to
[in]printeveryThe printevery variabel, when it is 1 the function outputs all stored fields

Definition at line 249 of file ReducedSteadyNS.C.

◆ reconstruct_PPE()

void reducedSteadyNS::reconstruct_PPE ( fileName folder = "./ITHACAoutput/online_rec",
int printevery = 1 )

Method to reconstruct a solution from an online solve with a PPE stabilisation technique.

stabilisation method

Parameters
[in]folderThe folder where to output the solutions
[in]printeveryThe printevery

Definition at line 215 of file ReducedSteadyNS.C.

◆ reconstructLiftAndDrag()

void reducedSteadyNS::reconstructLiftAndDrag ( steadyNS & problem,
fileName folder )

Method to compute the reduced order forces.

Parameters
problema steadyNS full order problem.
[in]folderThe folder where to output the forces matrices

Definition at line 317 of file ReducedSteadyNS.C.

◆ setOnlineVelocity()

Eigen::MatrixXd reducedSteadyNS::setOnlineVelocity ( Eigen::MatrixXd vel)

Sets the online velocity.

Parameters
[in]velThe velocity
Returns
The rescaled velocity vector

Definition at line 379 of file ReducedSteadyNS.C.

◆ solveOnline_PPE()

void reducedSteadyNS::solveOnline_PPE ( Eigen::MatrixXd vel_now)

Method to perform an online solve using a PPE stabilisation method.

Parameters
[in]vel_nowThe vector of online velocity. It is defined in with an Eigen::MatrixXd and must have one col and as many rows as the number of parametrized boundary conditions.

Definition at line 139 of file ReducedSteadyNS.C.

◆ solveOnline_sup()

void reducedSteadyNS::solveOnline_sup ( Eigen::MatrixXd vel_now)

Method to perform an online solve using a supremizer stabilisation method.

Parameters
[in]vel_nowThe vector of online velocity. It is defined in with an Eigen::MatrixXd and must have one col and as many rows as the number of parametrized boundary conditions.

Definition at line 146 of file ReducedSteadyNS.C.

Member Data Documentation

◆ count_online_solve

int reducedSteadyNS::count_online_solve = 1

Counter to count the online solutions.

Definition at line 169 of file ReducedSteadyNS.H.

◆ fN

Eigen::MatrixXd reducedSteadyNS::fN

Reduced matrix for normal forces.

Definition at line 112 of file ReducedSteadyNS.H.

◆ fTau

Eigen::MatrixXd reducedSteadyNS::fTau

Reduced matrix for tangent forces.

Definition at line 109 of file ReducedSteadyNS.H.

◆ N_BC

int reducedSteadyNS::N_BC

Number of parametrized boundary conditions.

Definition at line 166 of file ReducedSteadyNS.H.

◆ newton_object

newton_steadyNS reducedSteadyNS::newton_object

Newton object used to solve the non linear problem.

Definition at line 151 of file ReducedSteadyNS.H.

◆ Nphi_p

int reducedSteadyNS::Nphi_p

Number of pressure modes.

Definition at line 160 of file ReducedSteadyNS.H.

◆ Nphi_sup

int reducedSteadyNS::Nphi_sup

Number of supremizer modes.

Definition at line 163 of file ReducedSteadyNS.H.

◆ Nphi_u

int reducedSteadyNS::Nphi_u

Number of velocity modes.

Definition at line 157 of file ReducedSteadyNS.H.

◆ nu

scalar reducedSteadyNS::nu

Reduced viscosity in case of parametrized viscosity.

Definition at line 121 of file ReducedSteadyNS.H.

◆ online_solution

List< Eigen::MatrixXd> reducedSteadyNS::online_solution

List of Eigen matrices to store the online solution.

Definition at line 124 of file ReducedSteadyNS.H.

◆ para

ITHACAparameters* reducedSteadyNS::para

parameters to be read from the ITHACAdict file

Definition at line 103 of file ReducedSteadyNS.H.

◆ Pmodes

PtrList<volScalarField> reducedSteadyNS::Pmodes

List of pointers to store the modes for pressure.

Definition at line 130 of file ReducedSteadyNS.H.

◆ PREC

PtrList<volScalarField> reducedSteadyNS::PREC

Reconstructed pressure field.

Definition at line 139 of file ReducedSteadyNS.H.

◆ pRecFields

PtrList<volScalarField> reducedSteadyNS::pRecFields

Reconstructed pressure fields list.

Definition at line 145 of file ReducedSteadyNS.H.

◆ problem

steadyNS* reducedSteadyNS::problem

Pointer to the FOM problem.

Definition at line 154 of file ReducedSteadyNS.H.

◆ Psnapshots

PtrList<volScalarField> reducedSteadyNS::Psnapshots

List of pointers to store the snapshots for pressure.

Definition at line 136 of file ReducedSteadyNS.H.

◆ tauU

Eigen::MatrixXd reducedSteadyNS::tauU

Penalty Factor.

Definition at line 172 of file ReducedSteadyNS.H.

◆ Umodes

PtrList<volVectorField> reducedSteadyNS::Umodes

List of pointers to store the modes for velocity.

Definition at line 127 of file ReducedSteadyNS.H.

◆ UREC

PtrList<volVectorField> reducedSteadyNS::UREC

Recontructed velocity field.

Definition at line 142 of file ReducedSteadyNS.H.

◆ uRecFields

PtrList<volVectorField> reducedSteadyNS::uRecFields

Recontructed velocity fields list.

Definition at line 148 of file ReducedSteadyNS.H.

◆ Usnapshots

PtrList<volVectorField> reducedSteadyNS::Usnapshots

List of pointers to store the snapshots for velocity.

Definition at line 133 of file ReducedSteadyNS.H.

◆ vel_now

Eigen::MatrixXd reducedSteadyNS::vel_now

Online inlet velocity vector.

Definition at line 106 of file ReducedSteadyNS.H.

◆ y

Eigen::VectorXd reducedSteadyNS::y

Vector to store the solution during the Newton procedure.

Definition at line 118 of file ReducedSteadyNS.H.

◆ y_old

Eigen::VectorXd reducedSteadyNS::y_old

Vector to store the previous solution during the Newton procedure.

Definition at line 115 of file ReducedSteadyNS.H.


The documentation for this class was generated from the following files: