Loading...
Searching...
No Matches
ReducedUnsteadyNSTurb Class Reference

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

#include <ReducedUnsteadyNSTurb.H>

Inheritance diagram for ReducedUnsteadyNSTurb:
reducedUnsteadyNS reducedSteadyNS reducedProblem

Public Member Functions

 ReducedUnsteadyNSTurb ()
 Construct Null.
 
 ReducedUnsteadyNSTurb (UnsteadyNSTurb &problem)
 Construct Null.
 
 ~ReducedUnsteadyNSTurb ()
 
void solveOnlinePPE (Eigen::MatrixXd velNow)
 Method to perform an online solve using a PPE stabilisation method.
 
void solveOnlineSUP (Eigen::MatrixXd velNow)
 Method to perform an online solve using a supremizer stabilisation method.
 
void solveOnlineSUPAve (Eigen::MatrixXd velNow)
 Method to perform an online solve using a supremizer stabilisation method with the use of the average splitting approach for the eddy viscosity.
 
void solveOnlinePPEAve (Eigen::MatrixXd velNow)
 Method to perform an online solve using a PPE stabilisation method with the use of the average splitting approach for the eddy viscosity.
 
void reconstruct (bool exportFields=false, fileName folder="./online_rec")
 Method to reconstruct the solutions from an online solve with any of the two techniques SUP or the PPE.
 
Eigen::MatrixXd setOnlineVelocity (Eigen::MatrixXd vel)
 Sets the online velocity.
 
- Public Member Functions inherited from reducedUnsteadyNS
 reducedUnsteadyNS ()
 Construct Null.
 
 reducedUnsteadyNS (unsteadyNS &problem)
 Construct Null.
 
 ~reducedUnsteadyNS ()
 
Eigen::MatrixXd penalty_PPE (Eigen::MatrixXd &vel_now, Eigen::MatrixXd &tauIter, int startSnap=0)
 Method to determine the penalty factors iteratively.
 
Eigen::MatrixXd penalty_sup (Eigen::MatrixXd &vel_now, Eigen::MatrixXd &tauIter, int startSnap=0)
 Method to determine the penalty factors iteratively.
 
void solveOnline_PPE (Eigen::MatrixXd vel_now, int startSnap=0)
 Method to perform an online solve using a PPE stabilisation method.
 
void solveOnline_sup (Eigen::MatrixXd vel_now, int startSnap=0)
 Method to perform an online solve using a supremizer stabilisation method.
 
void reconstruct (bool exportFields=false, fileName folder="./online_rec")
 Method to reconstruct the solutions from an online solve with a supremizer stabilisation technique.
 
Eigen::MatrixXd setOnlineVelocity (Eigen::MatrixXd vel)
 Sets the online velocity.
 
- 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

UnsteadyNSTurbproblem
 Pointer to the FOM problem.
 
int nphiNut
 Number of viscosity modes.
 
int dimA
 Dimension of the interpolation independent variable.
 
PtrList< volScalarField > nutModes
 List of pointers to store the modes for the eddy viscosity.
 
Eigen::MatrixXd rbfCoeffMat
 The matrix of the eddy viscosity RBF interoplated coefficients.
 
Eigen::MatrixXd initCond
 The matrix of the initial velocity and pressure reduced coefficients.
 
Eigen::VectorXd nut0
 The initial eddy viscosity reduced coefficients.
 
newtonUnsteadyNSTurbSUP newtonObjectSUP
 Function object to call the non linear solver sup approach.
 
newtonUnsteadyNSTurbSUPAve newtonObjectSUPAve
 Function object to call the non linear solver sup approach with the splitting of the eddy viscosity.
 
newtonUnsteadyNSTurbPPE newtonObjectPPE
 Function object to call the non linear solver PPE approach.
 
newtonUnsteadyNSTurbPPEAve newtonObjectPPEAve
 Function object to call the non linear solver PPE approach with the splitting of the eddy viscosity.
 
Eigen::VectorXd muStar
 Online parameter value.
 
Eigen::VectorXd gNutAve
 The reduced average vector for viscosity coefficients.
 
int interChoice = 1
 Interpolation independent variable choice.
 
bool skipLift = false
 Interpolation boolean variable to skip lifting functions.
 
PtrList< volScalarField > nutRecFields
 Reconstructed eddy viscosity fields list.
 
- Public Attributes inherited from reducedUnsteadyNS
newton_unsteadyNS_sup newton_object_sup
 Function object to call the non linear solver sup approach.
 
newton_unsteadyNS_PPE newton_object_PPE
 Function object to call the non linear solver PPE approach.
 
scalar time
 Scalar to store the current time.
 
double dt
 Scalar to store the time increment.
 
scalar finalTime
 Scalar to store the final time if the online simulation.
 
scalar tstart
 Scalar to store the initial time if the online simulation.
 
double storeEvery
 A variable for storing the reduced coefficients.
 
double exportEvery
 A variable for exporting the fields.
 
bool startFromZero = false
 A variable for starting solving the reduced system from zero or not.
 
int timeStepPenalty = 1
 Number of timesteps calculated for the iterative penalty method.
 
Eigen::MatrixXd tauIter
 Penalty Factor determined with iterative solver.
 
scalar maxIterPenalty
 Maximum number of iterations to be done for the computation of the penalty factor.
 
scalar tolerancePenalty
 Tolerance for the residual of the boundary values, there is the same tolerance for velocity and temperature.
 
unsteadyNSproblem
 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 unsteady 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

Definition at line 194 of file ReducedUnsteadyNSTurb.H.

Constructor & Destructor Documentation

◆ ReducedUnsteadyNSTurb() [1/2]

ReducedUnsteadyNSTurb::ReducedUnsteadyNSTurb ( )

Construct Null.

Definition at line 41 of file ReducedUnsteadyNSTurb.C.

◆ ReducedUnsteadyNSTurb() [2/2]

ReducedUnsteadyNSTurb::ReducedUnsteadyNSTurb ( UnsteadyNSTurb & problem)
explicit

Construct Null.

Parameters
problema full order UnsteadyNSTurb problem

Definition at line 45 of file ReducedUnsteadyNSTurb.C.

◆ ~ReducedUnsteadyNSTurb()

ReducedUnsteadyNSTurb::~ReducedUnsteadyNSTurb ( )
inline

Definition at line 208 of file ReducedUnsteadyNSTurb.H.

Member Function Documentation

◆ reconstruct()

void ReducedUnsteadyNSTurb::reconstruct ( bool exportFields = false,
fileName folder = "./online_rec" )

Method to reconstruct the solutions from an online solve with any of the two techniques SUP or the PPE.

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

Definition at line 1267 of file ReducedUnsteadyNSTurb.C.

◆ setOnlineVelocity()

Eigen::MatrixXd ReducedUnsteadyNSTurb::setOnlineVelocity ( Eigen::MatrixXd vel)

Sets the online velocity.

Parameters
[in]velThe velocity
Returns
The rescaled velocity vector

Definition at line 1334 of file ReducedUnsteadyNSTurb.C.

◆ solveOnlinePPE()

void ReducedUnsteadyNSTurb::solveOnlinePPE ( Eigen::MatrixXd velNow)

Method to perform an online solve using a PPE 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.

Definition at line 875 of file ReducedUnsteadyNSTurb.C.

◆ solveOnlinePPEAve()

void ReducedUnsteadyNSTurb::solveOnlinePPEAve ( Eigen::MatrixXd velNow)

Method to perform an online solve using a PPE stabilisation method with the use of the average splitting approach for the eddy viscosity.

Parameters
[in]velNowThe velocity now

Definition at line 1066 of file ReducedUnsteadyNSTurb.C.

◆ solveOnlineSUP()

void ReducedUnsteadyNSTurb::solveOnlineSUP ( 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.

Definition at line 467 of file ReducedUnsteadyNSTurb.C.

◆ solveOnlineSUPAve()

void ReducedUnsteadyNSTurb::solveOnlineSUPAve ( Eigen::MatrixXd velNow)

Method to perform an online solve using a supremizer stabilisation method with the use of the average splitting approach for the eddy viscosity.

Parameters
[in]velNowThe velocity now

Definition at line 673 of file ReducedUnsteadyNSTurb.C.

Member Data Documentation

◆ dimA

int ReducedUnsteadyNSTurb::dimA

Dimension of the interpolation independent variable.

Definition at line 217 of file ReducedUnsteadyNSTurb.H.

◆ gNutAve

Eigen::VectorXd ReducedUnsteadyNSTurb::gNutAve

The reduced average vector for viscosity coefficients.

Definition at line 247 of file ReducedUnsteadyNSTurb.H.

◆ initCond

Eigen::MatrixXd ReducedUnsteadyNSTurb::initCond

The matrix of the initial velocity and pressure reduced coefficients.

Definition at line 226 of file ReducedUnsteadyNSTurb.H.

◆ interChoice

int ReducedUnsteadyNSTurb::interChoice = 1

Interpolation independent variable choice.

Definition at line 250 of file ReducedUnsteadyNSTurb.H.

◆ muStar

Eigen::VectorXd ReducedUnsteadyNSTurb::muStar

Online parameter value.

Definition at line 244 of file ReducedUnsteadyNSTurb.H.

◆ newtonObjectPPE

newtonUnsteadyNSTurbPPE ReducedUnsteadyNSTurb::newtonObjectPPE

Function object to call the non linear solver PPE approach.

Definition at line 238 of file ReducedUnsteadyNSTurb.H.

◆ newtonObjectPPEAve

newtonUnsteadyNSTurbPPEAve ReducedUnsteadyNSTurb::newtonObjectPPEAve

Function object to call the non linear solver PPE approach with the splitting of the eddy viscosity.

Definition at line 241 of file ReducedUnsteadyNSTurb.H.

◆ newtonObjectSUP

newtonUnsteadyNSTurbSUP ReducedUnsteadyNSTurb::newtonObjectSUP

Function object to call the non linear solver sup approach.

Definition at line 232 of file ReducedUnsteadyNSTurb.H.

◆ newtonObjectSUPAve

newtonUnsteadyNSTurbSUPAve ReducedUnsteadyNSTurb::newtonObjectSUPAve

Function object to call the non linear solver sup approach with the splitting of the eddy viscosity.

Definition at line 235 of file ReducedUnsteadyNSTurb.H.

◆ nphiNut

int ReducedUnsteadyNSTurb::nphiNut

Number of viscosity modes.

Definition at line 214 of file ReducedUnsteadyNSTurb.H.

◆ nut0

Eigen::VectorXd ReducedUnsteadyNSTurb::nut0

The initial eddy viscosity reduced coefficients.

Definition at line 229 of file ReducedUnsteadyNSTurb.H.

◆ nutModes

PtrList<volScalarField> ReducedUnsteadyNSTurb::nutModes

List of pointers to store the modes for the eddy viscosity.

Definition at line 220 of file ReducedUnsteadyNSTurb.H.

◆ nutRecFields

PtrList<volScalarField> ReducedUnsteadyNSTurb::nutRecFields

Reconstructed eddy viscosity fields list.

Definition at line 256 of file ReducedUnsteadyNSTurb.H.

◆ problem

UnsteadyNSTurb* ReducedUnsteadyNSTurb::problem

Pointer to the FOM problem.

Definition at line 211 of file ReducedUnsteadyNSTurb.H.

◆ rbfCoeffMat

Eigen::MatrixXd ReducedUnsteadyNSTurb::rbfCoeffMat

The matrix of the eddy viscosity RBF interoplated coefficients.

Definition at line 223 of file ReducedUnsteadyNSTurb.H.

◆ skipLift

bool ReducedUnsteadyNSTurb::skipLift = false

Interpolation boolean variable to skip lifting functions.

Definition at line 253 of file ReducedUnsteadyNSTurb.H.


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