Loading...
Searching...
No Matches
ReducedSteadyNSTurbIntrusive Class Reference

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

#include <ReducedSteadyNSTurbIntrusive.H>

Inheritance diagram for ReducedSteadyNSTurbIntrusive:
reducedSteadyNS reducedProblem

Public Member Functions

 ReducedSteadyNSTurbIntrusive ()
 Construct Null.
 
 ReducedSteadyNSTurbIntrusive (SteadyNSTurbIntrusive &problem)
 Construct Null.
 
 ~ReducedSteadyNSTurbIntrusive ()
 
void solveOnline (Eigen::MatrixXd velNow)
 Method to perform an online solve using a supremizer stabilisation method.
 
void reconstruct (fileName folder="./ITHACAOutput/online_rec", int printEvery=1)
 Method to reconstruct the solutions from an online solve with a supremizer stabilisation technique.
 
Eigen::MatrixXd setOnlineVelocity (Eigen::MatrixXd vel)
 Sets the online velocity.
 
void reconstructLiftAndDrag (SteadyNSTurbIntrusive &problem, fileName folder)
 Method to compute the reduced order forces for same number of modes of velocity and pressure.
 
- Public Member Functions inherited from reducedSteadyNS
 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

PtrList< volScalarField > nutFields
 List of snapshots for the solution for eddy viscosity.
 
PtrList< volScalarField > nutModes
 List of POD modes for eddy viscosity.
 
PtrList< volScalarField > nutRec
 Reconstructed eddy viscosity field.
 
int nphiNut
 Number of viscosity modes.
 
newtonSteadyNSTurbIntrusive newtonObject
 Newton Object to solve the nonlinear problem.
 
SteadyNSTurbIntrusiveproblem
 Pointer to the FOM problem.
 
- Public Attributes inherited from reducedSteadyNS
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 turbulent Navier-stokes problem.

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

Definition at line 82 of file ReducedSteadyNSTurbIntrusive.H.

Constructor & Destructor Documentation

◆ ReducedSteadyNSTurbIntrusive() [1/2]

ReducedSteadyNSTurbIntrusive::ReducedSteadyNSTurbIntrusive ( )

Construct Null.

Definition at line 36 of file ReducedSteadyNSTurbIntrusive.C.

◆ ReducedSteadyNSTurbIntrusive() [2/2]

ReducedSteadyNSTurbIntrusive::ReducedSteadyNSTurbIntrusive ( SteadyNSTurbIntrusive & problem)

Construct Null.

Parameters
problema full order SteadyNSTurb problem

Definition at line 40 of file ReducedSteadyNSTurbIntrusive.C.

◆ ~ReducedSteadyNSTurbIntrusive()

ReducedSteadyNSTurbIntrusive::~ReducedSteadyNSTurbIntrusive ( )
inline

Definition at line 96 of file ReducedSteadyNSTurbIntrusive.H.

Member Function Documentation

◆ reconstruct()

void ReducedSteadyNSTurbIntrusive::reconstruct ( fileName folder = "./ITHACAOutput/online_rec",
int printEvery = 1 )

Method to reconstruct the solutions from an online solve with a supremizer stabilisation technique.

stabilisation method

Parameters
[in]folderThe folder where to output the solutions
[in]printEveryThe printEvery

Definition at line 174 of file ReducedSteadyNSTurbIntrusive.C.

◆ reconstructLiftAndDrag()

void ReducedSteadyNSTurbIntrusive::reconstructLiftAndDrag ( SteadyNSTurbIntrusive & problem,
fileName folder )

Method to compute the reduced order forces for same number of modes of velocity and pressure.

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

Definition at line 230 of file ReducedSteadyNSTurbIntrusive.C.

◆ setOnlineVelocity()

Eigen::MatrixXd ReducedSteadyNSTurbIntrusive::setOnlineVelocity ( Eigen::MatrixXd vel)

Sets the online velocity.

Parameters
[in]velThe velocity
Returns
The rescaled velocity vector

Definition at line 209 of file ReducedSteadyNSTurbIntrusive.C.

◆ solveOnline()

void ReducedSteadyNSTurbIntrusive::solveOnline ( Eigen::MatrixXd velNow)

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

Parameters
[in]velNowThe 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.
[in]startSnapThe first snapshot taken from the offline snahpshots and used to get the reduced initial condition.

Definition at line 116 of file ReducedSteadyNSTurbIntrusive.C.

Member Data Documentation

◆ newtonObject

newtonSteadyNSTurbIntrusive ReducedSteadyNSTurbIntrusive::newtonObject

Newton Object to solve the nonlinear problem.

Definition at line 112 of file ReducedSteadyNSTurbIntrusive.H.

◆ nphiNut

int ReducedSteadyNSTurbIntrusive::nphiNut

Number of viscosity modes.

Definition at line 109 of file ReducedSteadyNSTurbIntrusive.H.

◆ nutFields

PtrList<volScalarField> ReducedSteadyNSTurbIntrusive::nutFields

List of snapshots for the solution for eddy viscosity.

Definition at line 100 of file ReducedSteadyNSTurbIntrusive.H.

◆ nutModes

PtrList<volScalarField> ReducedSteadyNSTurbIntrusive::nutModes

List of POD modes for eddy viscosity.

Definition at line 103 of file ReducedSteadyNSTurbIntrusive.H.

◆ nutRec

PtrList<volScalarField> ReducedSteadyNSTurbIntrusive::nutRec

Reconstructed eddy viscosity field.

Definition at line 106 of file ReducedSteadyNSTurbIntrusive.H.

◆ problem

SteadyNSTurbIntrusive* ReducedSteadyNSTurbIntrusive::problem

Pointer to the FOM problem.

Definition at line 115 of file ReducedSteadyNSTurbIntrusive.H.


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