Class where it is implemented a reduced problem for the unsteady Navier-stokes problem. More...
#include <ReducedUnsteadyBB.H>
Public Member Functions | |
ReducedUnsteadyBB () | |
Construct Null. | |
ReducedUnsteadyBB (UnsteadyBB &problem) | |
Construct Null. | |
~ReducedUnsteadyBB () | |
Eigen::MatrixXd | solveOnline_sup (Eigen::MatrixXd &temp_now_BC, Eigen::MatrixXd &vel_now_BC, int NParaSet=0, int startSnap=0) |
Method to perform an online solve using a supremizer stabilisation method. | |
Eigen::MatrixXd | solveOnline_PPE (Eigen::MatrixXd &temp_now_BC, Eigen::MatrixXd &vel_now_BC, int NParaSet=0, int startSnap=0) |
Method to perform an online solve using a PPE stabilisation method. | |
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. | |
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 | |
Eigen::MatrixXd | online_solutiont |
List of Eigen matrices to store current online solution for temperature equation. | |
PtrList< volScalarField > | LTmodes |
List of pointers to store the modes for temperature including lift field modes. | |
PtrList< volVectorField > | LUmodes |
List of pointers to store the modes for velocity including lift field modes. | |
newton_unsteadyBB_sup | newton_object_sup |
Function object to call the non linear solver sup approach. | |
newton_unsteadyBB_PPE | newton_object_PPE |
Function object to call the non linear solver PPE approach. | |
PtrList< volScalarField > | TREC |
Reconstructed temperature field. | |
PtrList< volScalarField > | PREC |
int | Nphi_t |
Number of temperature modes. | |
int | Nphi_prgh |
Number of shifted pressure modes. | |
int | N_BC_t |
Number of parametrized boundary conditions related to temperature field. | |
scalar | Pr |
DimensionedScalar Pr;. | |
UnsteadyBB * | problem |
Pointer to the FOM problem. | |
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. | |
unsteadyNS * | problem |
Pointer to the FOM problem. | |
Public Attributes inherited from reducedSteadyNS | |
ITHACAparameters * | para |
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. | |
steadyNS * | problem |
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. | |
reductionProblem * | problem |
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. | |
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 126 of file ReducedUnsteadyBB.H.
ReducedUnsteadyBB::ReducedUnsteadyBB | ( | ) |
Construct Null.
Definition at line 42 of file ReducedUnsteadyBB.C.
|
explicit |
Construct Null.
[in] | problem | a full order UnsteadyBB problem |
Definition at line 46 of file ReducedUnsteadyBB.C.
|
inline |
Definition at line 139 of file ReducedUnsteadyBB.H.
void ReducedUnsteadyBB::reconstruct_sup | ( | fileName | folder = "./ITHACAOutput/online_rec", |
int | printevery = 1 ) |
Method to reconstruct a solution from an online solve with a supremizer stabilisation technique.
stabilisation method
[in] | folder | The folder where you want to store the results (default is "./ITHACAOutput/online_rec"). |
[in] | printevery | Variable to recover only every printevery online solutions default is 1. |
Definition at line 561 of file ReducedUnsteadyBB.C.
Eigen::MatrixXd ReducedUnsteadyBB::solveOnline_PPE | ( | Eigen::MatrixXd & | temp_now_BC, |
Eigen::MatrixXd & | vel_now_BC, | ||
int | NParaSet = 0, | ||
int | startSnap = 0 ) |
Method to perform an online solve using a PPE stabilisation method.
[in] | temp_now_BC | The scalar of online temperature. 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] | vel_now_BC | The scalar 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] | NParaSet | The parameter sets number for which the online solution is solved. |
[in] | startSnap | The first snapshot taken from the offline snapshots and used to get the reduced initial condition default = 0. |
Definition at line 391 of file ReducedUnsteadyBB.C.
Eigen::MatrixXd ReducedUnsteadyBB::solveOnline_sup | ( | Eigen::MatrixXd & | temp_now_BC, |
Eigen::MatrixXd & | vel_now_BC, | ||
int | NParaSet = 0, | ||
int | startSnap = 0 ) |
Method to perform an online solve using a supremizer stabilisation method.
[in] | temp_now_BC | The scalar of online temperature. 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] | vel_now_BC | The scalar 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] | NParaSet | The parameter sets number for which the online solution is solved. |
[in] | startSnap | The first snapshot taken from the offline snapshots and used to get the reduced initial condition default = 0. |
Definition at line 252 of file ReducedUnsteadyBB.C.
PtrList<volScalarField> ReducedUnsteadyBB::LTmodes |
List of pointers to store the modes for temperature including lift field modes.
Definition at line 145 of file ReducedUnsteadyBB.H.
PtrList<volVectorField> ReducedUnsteadyBB::LUmodes |
List of pointers to store the modes for velocity including lift field modes.
Definition at line 148 of file ReducedUnsteadyBB.H.
int ReducedUnsteadyBB::N_BC_t |
Number of parametrized boundary conditions related to temperature field.
Definition at line 168 of file ReducedUnsteadyBB.H.
newton_unsteadyBB_PPE ReducedUnsteadyBB::newton_object_PPE |
Function object to call the non linear solver PPE approach.
Definition at line 154 of file ReducedUnsteadyBB.H.
newton_unsteadyBB_sup ReducedUnsteadyBB::newton_object_sup |
Function object to call the non linear solver sup approach.
Definition at line 151 of file ReducedUnsteadyBB.H.
int ReducedUnsteadyBB::Nphi_prgh |
Number of shifted pressure modes.
Definition at line 165 of file ReducedUnsteadyBB.H.
int ReducedUnsteadyBB::Nphi_t |
Number of temperature modes.
Definition at line 162 of file ReducedUnsteadyBB.H.
Eigen::MatrixXd ReducedUnsteadyBB::online_solutiont |
List of Eigen matrices to store current online solution for temperature equation.
Definition at line 142 of file ReducedUnsteadyBB.H.
scalar ReducedUnsteadyBB::Pr |
DimensionedScalar Pr;.
Definition at line 171 of file ReducedUnsteadyBB.H.
PtrList<volScalarField> ReducedUnsteadyBB::PREC |
Definition at line 159 of file ReducedUnsteadyBB.H.
UnsteadyBB* ReducedUnsteadyBB::problem |
Pointer to the FOM problem.
Definition at line 174 of file ReducedUnsteadyBB.H.
PtrList<volScalarField> ReducedUnsteadyBB::TREC |
Reconstructed temperature field.
Definition at line 157 of file ReducedUnsteadyBB.H.