40#include "singlePhaseTransportModel.H"
41#include "turbulentTransportModel.H"
42#include "simpleControl.H"
43#include "pisoControl.H"
260 autoPtr<volScalarField>
_p;
263 autoPtr<volVectorField>
_U;
266 autoPtr<volScalarField>
_p0;
269 autoPtr<volVectorField>
_U0;
293 autoPtr<surfaceScalarField>
_phi;
747 const Eigen::MatrixXd& pressureCoeffs, fileName folder);
Header file of the ITHACAstream class, it contains the implementation of several methods for input ou...
Header file of the Modes class.
Class for the definition of some general parameters, the parameters must be defined from the file ITH...
A general class for the implementation of a full order parametrized problem.
Eigen::MatrixXd mu
Row matrix of parameters.
void truthSolve()
Perform a TruthSolve.
Implementation of a parametrized full order steady NS problem and preparation of the the reduced ma...
void change_viscosity(double mu)
Function to change the viscosity.
List< Eigen::MatrixXd > bcVelVec
Boundary term for penalty method - vector.
scalar maxIter
Number of maximum iterations to be done for the computation of the truth solution.
void restart()
set U and P back to the values into the 0 folder
List< Eigen::MatrixXd > pressure_gradient_term_linsys_div(label NPmodes)
Laplacian of pressure Linear System - Divergence term.
label NPmodes
Number of pressure modes used for the projection.
List< Eigen::MatrixXd > pressure_gradient_term_linsys_conv(label NPmodes)
Laplacian of pressure Linear System - Convection term.
bool supex
Boolean variable to check the existence of the supremizer modes.
void projectPPE(fileName folder, label NUmodes, label NPmodes, label NSUPmodes=0)
Project using the Poisson Equation for pressure.
Eigen::MatrixXd nMatrix
Pressure forces.
Eigen::MatrixXd BC1_matrix
PPE BC1.
Eigen::MatrixXd diffusive_term(label NUmodes, label NPmodes, label NSUPmodes)
Diffusive Term.
autoPtr< surfaceScalarField > _phi
Flux.
Eigen::MatrixXd BC4_matrix
PPE BC4.
Eigen::MatrixXd tauMatrix
Viscous forces.
Eigen::MatrixXd BC3_matrix
PPE BC3.
Eigen::Tensor< double, 3 > C_tensor
Diffusion term.
autoPtr< volVectorField > _U0
Initial Velocity field (for restart purposes)
void forcesMatrices(label NUmodes, label NPmodes, label NSUPmodes)
Compute lift and drag matrices.
autoPtr< simpleControl > _simple
simpleControl
surfaceScalarModes L_PHImodes
List of pointers containing the total number of flux modes.
PtrList< volScalarField > Pfield
List of pointers used to form the pressure snapshots matrix.
volVectorModes supmodes
List of pointers used to form the supremizer modes.
autoPtr< surfaceScalarField > _phi0
Initial Flux (for restart purposes)
List< Eigen::MatrixXd > bcVelocityVec(label NUmodes, label NSUPmodes)
Boundary integral modes on boundary used by the penaly method.
List< Eigen::MatrixXd > boundary_vector_convection_consistent(label NUmodes, label NSUPmodes)
Boundary vector convection term - Consistent Flux Method.
Eigen::MatrixXd W_matrix
Mass Matrix New Time Step - Consistent Flux Method.
Eigen::MatrixXd mass_matrix_oldtime_consistent(label NUmodes, label NPmodes, label NSUPmodes)
Mass Matrix old time step (consistent flux method)
List< Eigen::MatrixXd > pressure_gradient_term_linsys_diff(label NPmodes)
Laplacian of pressure Linear System - Diffusion term.
autoPtr< fv::options > _fvOptions
fvOptions
Eigen::MatrixXd pressure_BC4(label NPmodes, label NUmodes)
Term N° 4 given by the additional boundary condition using a PPE approach for time-dependent BCs.
void solvesupremizer(word type="snapshots")
solve the supremizer either with the use of the pressure snaphots or the pressure modes
autoPtr< Time > _runTime
Time.
Eigen::MatrixXd I_matrix
Mass Matrix Old Time Step - Consistent Flux Method.
volVectorModes Umodes
List of pointers used to form the velocity modes.
Eigen::MatrixXd diffusive_term_sym(label NUmodes, label NPmodes, label NSUPmodes)
Symetric diffusive Term.
PtrList< volVectorField > Ufield
List of pointers used to form the velocity snapshots matrix.
List< Eigen::MatrixXd > boundary_vector_diffusion_consistent(label NUmodes, label NSUPmodes)
Boundary vector diffusion term (consistent flux method)
List< Eigen::MatrixXd > LinSysDiff
Projection Peqn onto Pressure modes - Diffusion term.
autoPtr< dimensionedScalar > dt_dummy
Dummy time step including unit.
Eigen::MatrixXd diffusive_term_flux_method(label NUmodes, label NPmodes, label NSUPmodes)
Diffusive Flux Method.
Eigen::MatrixXd diffusive_term_consistent(label NUmodes, label NPmodes, label NSUPmodes)
Diffusion Term (consistent flux method)
Eigen::MatrixXd pressure_BC1(label NPmodes, label NUmodes)
Term N° 1 given by the additional boundary condition using a PPE approach.
steadyNS()
Null constructor.
Eigen::MatrixXd divergence_term(label NUmodes, label NPmodes, label NSUPmodes)
Divergence Term (supremizer approach)
List< Eigen::MatrixXd > G_matrix
Divergence of momentum PPE.
scalar tolerance
Tolerance for the residual of the stationary problems, there is the same tolerance for velocity and p...
Eigen::MatrixXd mass_term(label NUmodes, label NPmodes, label NSUPmodes)
Mass Term.
autoPtr< fvMesh > _mesh
Mesh.
autoPtr< singlePhaseTransportModel > _laminarTransport
Laminar transport (used by turbulence model)
label NUmodes
Number of velocity modes used for the projection.
autoPtr< dimensionedScalar > nu_dummy
Dummy viscocity including unit.
List< Eigen::MatrixXd > boundary_vector_diffusion(label NUmodes, label NPmodes, label NSUPmodes)
Boundary vector diffusion term.
List< Eigen::MatrixXd > LinSysDiv
Projection Peqn onto Pressure modes - Divergence term.
PtrList< surfaceScalarField > Phifield
List of pointers used to form the flux snapshots matrix.
PtrList< volVectorField > liftfield
List of pointers used to form the list of lifting functions.
Eigen::Tensor< double, 3 > convective_term_flux_tens(label NUmodes, label NPmodes, label NSUPmodes)
Convective Term.
Eigen::Tensor< double, 3 > convective_term_consistent_tens(label NUmodes, label NPmodes, label NSUPmodes)
Convective Term (consistent flux method)
scalar pRefValue
Reference pressure value.
label pRefCell
Reference pressure cell.
word fluxMethod
Flux Method.
volVectorModes L_U_SUPmodes
List of pointers containing the total number of lift, supremizer and velocity modes.
PtrList< volVectorField > Uomfield
List of pointers used to form the homogeneous velocity snapshots.
Eigen::MatrixXd pressure_BC3(label NPmodes, label NUmodes)
Term N° 3 given by the additional boundary condition using a PPE approach.
List< Eigen::MatrixXd > boundary_vector_convection(label NUmodes, label NPmodes, label NSUPmodes)
Boundary vector convection term.
label NNutModesOut
Number of nut modes to be calculated.
Eigen::MatrixXd B_matrix
Diffusion term.
List< Eigen::MatrixXd > RD_matrix
Boundary term for diffusion term.
Eigen::MatrixXd D_matrix
Laplacian term PPE.
autoPtr< IOMRFZoneList > _MRF
MRF variable.
List< Eigen::MatrixXd > SD_matrix
Boundary term for diffusion term - Consistent Flux Method.
label NSUPmodes
Number of supremizer modes used for the projection.
Eigen::Tensor< double, 3 > gTensor
Divergence of momentum PPE.
label NNutModes
Number of nut modes used for the projection.
Eigen::MatrixXd KF_matrix
Pressure Gradient Term - Consistent Flux Method.
Eigen::MatrixXd K_matrix
Gradient of pressure matrix.
List< Eigen::MatrixXd > C_matrix
Non linear term.
Eigen::Tensor< double, 3 > convective_term_tens(label NUmodes, label NPmodes, label NSUPmodes)
Export convective term as a tensor.
autoPtr< incompressible::turbulenceModel > turbulence
Turbulence model.
List< Eigen::MatrixXd > convective_term(label NUmodes, label NPmodes, label NSUPmodes)
Convective Term.
Eigen::MatrixXd pressure_gradient_term_consistent(label NUmodes, label NPmodes, label NSUPmodes)
Pressure Gradient Term (consistent flux method)
List< Eigen::MatrixXd > pressure_BC2(label NPmodes, label NUmodes)
Term N° 2 given by the additional boundary condition using a PPE approach.
label NUmodesOut
Number of velocity modes to be calculated.
List< Eigen::MatrixXd > LinSysConv
Projection Peqn onto Pressure modes - Convection term.
PtrList< volVectorField > supfield
List of pointers used to form the supremizer snapshots matrix.
Eigen::Tensor< double, 3 > divMomentum(label NUmodes, label NPmodes)
Divergence of convective term (PPE approach)
List< Eigen::MatrixXd > SC_matrix
Boundary term for convection term - Consistent Flux Method.
Eigen::MatrixXd pressure_gradient_term(label NUmodes, label NPmodes, label NSUPmodes)
Gradient of pressure.
Eigen::MatrixXd DF_matrix
Diffusion Term - Consistent Flux Method.
List< Eigen::MatrixXd > bcVelMat
Boundary term for penalty method - matrix.
Eigen::MatrixXd P_matrix
Div of velocity.
List< Eigen::MatrixXd > RC_matrix
Boundary vector for convection term.
Eigen::MatrixXd BP_matrix
Diffusion term for flux method PPE.
Eigen::Tensor< double, 3 > Cf_tensor
Convection term for flux method.
Eigen::MatrixXd M_matrix
Mass Matrix.
List< Eigen::MatrixXd > BC2_matrix
PPE BC2.
autoPtr< volVectorField > Uinl
Initial dummy field with all Dirichlet boundary conditions.
void discretizeThenProject(fileName folder, label NUmodes, label NPmodes, label NSUPmodes=0)
Project using the Discretize-then-project approach.
void projectSUP(fileName folder, label NUmodes, label NPmodes, label NSUPmodes)
Project using a supremizer approach.
Eigen::MatrixXd laplacian_pressure(label NPmodes)
Laplacian of pressure term (PPE approach)
label NPmodesOut
Number of pressure modes to be calculated.
surfaceScalarModes Phimodes
List of pointers used to form the flux modes.
Eigen::MatrixXd mass_matrix_newtime_consistent(label NUmodes, label NPmodes, label NSUPmodes)
Mass Matrix new time step (consistent flux method)
autoPtr< volScalarField > _p0
Initial Pressure field (for restart purposes)
List< Eigen::MatrixXd > bcVelocityMat(label NUmodes, label NSUPmodes)
Boundary integral modes on boundary used by the penaly method.
Eigen::Tensor< double, 3 > bc2Tensor
PPE BC2.
autoPtr< volVectorField > _U
Velocity field.
Eigen::Tensor< double, 3 > pressureBC2(label NPmodes, label NUmodes)
Term N° 2 given by the additional boundary condition using a PPE approach.
Eigen::Tensor< double, 3 > Ci_tensor
Convection term - Consistent Flux Method.
void liftSolve()
Perform a lift solve.
List< Eigen::MatrixXd > div_momentum(label NUmodes, label NPmodes)
Divergence of convective term (PPE approach)
volScalarModes Pmodes
List of pointers used to form the pressure modes.
word bcMethod
Boundary Method.
scalar cumulativeContErr
continuity error
void reconstructLiftAndDrag(const Eigen::MatrixXd &velCoeffs, const Eigen::MatrixXd &pressureCoeffs, fileName folder)
Method to reconstruct the forces using velocity and pressure coefficients.
autoPtr< volScalarField > _p
Pressure field.
label NSUPmodesOut
Number of supremizer modes to be calculated.
Header file of the reductionProblem class.