7#ifndef FVSTRUCTUREDSOLVER3D_H
8#define FVSTRUCTUREDSOLVER3D_H
33 template <MBool isRans>
69 std::vector<std::unique_ptr<StructuredZonalBC>>
m_zonalBC;
81 template <MFloat (FvStructuredSolver::*)(MInt) const = &FvStructuredSolver::dummy>
92 template <MInt noVars>
94 template <MInt noVars>
96 template <MInt noVars>
98 template <fluxmethod ausm, MInt noVars>
127 template <MBool twoEqRans = false>
143 void initFFTW(fftw_complex* uPhysField, fftw_complex* vPhysField, fftw_complex* wPhysField,
MInt lx,
MInt ly,
MInt lz,
157 void waveSend(std::vector<MPI_Request>&);
3D structured solver class
void computeLambda2Criterion() override
Function to compute the lambda_2 criterion.
void shiftAverageCellValuesRestart()
static constexpr MInt xsd
void viscousFluxCorrection()
MFloat computeTotalPressure()
void initInterpolatedPoints()
Compute all the interpolation coefficients necessary for the interpolation output.
MFloat getCellLengthY(MInt, MInt, MInt) override
void AusmLES_PTHRC(MFloat *QLeft, MFloat *QRight, MInt dim, MInt cellId)
AUSM PTHRC.
MBool maxResidual()
Computation of the maximum residual.
void loadSampleFile(MString) override
Loads primitive variables from an HDF5 file.
void allocateSingularities()
void initializeNeighbourCellIds()
void scatter(const MBool, std::vector< std::unique_ptr< StructuredComm< 3 > > > &) override
void initBodyForce() override
void zonalBufferAverage()
void spanwiseWaveReorder() override
void computePrimitiveVariables() override
void zonalExchange() override
void spanwiseAvgZonal(std::vector< MFloat * > &) override
void manualInterpolationCorrection()
Manually correct errors made by the restart interpolation.
void applyBoundaryCondition() override
MInt surfId(MInt point, MInt isd, MInt dim)
void MusclVenkatakrishnan3D()
MUSCL with Venkatakrishan limiter.
void shiftAverageCellValues()
Shifts the averaged variables.
void computeTimeStep() override
MFloat dvardxyz(MInt, MInt, MFloat *) override
void applySandpaperTripAirfoil()
void tripForceCoefficients(MFloat *, MFloat *, MFloat *, MInt, MInt)
MFloat dist(MFloat *a, MFloat *b)
void BARTH_JESPERSON_FCT(MFloat effNghbrDelta, MFloat srfcDelta, MFloat dxEpsSqr, MInt cellPos, MInt var, MFloatScratchSpace &minPhi)
Barth-Jesperson Limiter.
void MusclMinModLimiter()
void gather(const MBool, std::vector< std::unique_ptr< StructuredComm< 3 > > > &) override
static constexpr MInt zsd
void(FvStructuredSolver3D::* reconstructSurfaceData)()
void(FvStructuredSolver3D::* Venkatakrishnan_function)(MFloat, MFloat, MFloat, MInt, MInt, MFloatScratchSpace &)
MInt getCellIdfromCell(const MInt, const MInt, const MInt, const MInt)
void saveNodalBoxes() override
void(FvStructuredSolver3D::* viscFluxMethod)()
void calcSurfaceMetrics()
MFloat getSampleVorticity(MInt, MInt) override
static constexpr MInt ysd
void interpolateFromDonor()
Interpolates the flow field from a given donor file.
std::vector< std::unique_ptr< StructuredZonalBC > > m_zonalBC
void distributeFluxToCells()
void getFourierCoefficients(MFloat *k, MFloat k0, std::complex< MFloat > *fourierCoefficient)
Generates a single complex coefficient of Fourier series.
void savePointsToAsciiFile(MBool) override
Saves variables of given cells to ASCII file.
void initPointsToAsciiFile() override
void waveSend(std::vector< MPI_Request > &)
void gcExtrapolate(std::vector< MFloat * > &)
void initialCondition() override
Computation of infinity values for the conservative and primitive variables.
MInt getPointIdFromCell(const MInt, const MInt, const MInt)
void getSampleVariables(MInt, MFloat *) override
void VENKATAKRISHNAN_MOD_FCT(MFloat effNghbrDelta, MFloat srfcDelta, MFloat dxEpsSqr, MInt cellPos, MInt var, MFloatScratchSpace &minPhi)
Venkatakrishnan limiter, modified for better results.
MInt cellIndex(const MInt, const MInt, const MInt)
void extrapolateGhostPointCoordinatesBC()
void initSolutionStep(MInt mode)
void applyViscousBoundaryCondition()
void tripFourierCoefficients(MFloat *, MInt, MFloat, MFloat)
MFloat randnormal(MFloat mu, MFloat sigma)
Returns a normal distributed random-number with mu=mean and sigma=standard deviation.
void loadRestartSTG(MBool)
MFloat dvardx(MInt, MFloat *) override
void addGhostPointCoordinateValues()
Extrapolates and exchanges ghost point coordinates.
MFloat computeTotalKineticEngergy()
void computeReconstructionConstantsSVD()
void gcFillGhostCells(std::vector< MFloat * > &)
void Muscl_AusmLES_PTHRC()
void loadAverageRestartFile(const MChar *, MFloat **, MFloat **, MFloat **, MFloat **) override
Loads the postprocessing restart file to continue the postprocessing.
void computePrimitiveVariables_()
void viscousFluxLES()
Viscous flux computation.
void Muscl(MInt timerId=-1) override
MInt getPointIdfromPoint(const MInt, const MInt, const MInt, const MInt)
MInt pointIndex(const MInt, const MInt, const MInt)
void computeCumulativeAverage(MBool forceReset) override
void loadAveragedVariables(const MChar *) override
Loads the averaged variables again to do further postprocessing.
void saveInterpolatedPoints() override
void initMovingGrid() override
void AusmDV(MFloat *QLeft, MFloat *QRight, MInt dim, MInt cellId)
void waveReceive(std::vector< MPI_Request > &)
void waveExchange() override
std::unique_ptr< StructuredInterpolation< 3 > > m_structuredInterpolation
void applyInviscidBoundaryCondition()
MFloat getPSI(MInt, MInt)
void(FvStructuredSolver3D::* fluxmethod)(MFloat *, MFloat *, MInt, MInt)
virtual void computePorousRHS(MBool) override
virtual void computeFrictionPressureCoef(MBool computePower) override
static constexpr const MInt nDim
void applyBodyForce(const MBool isRestart, const MBool zeroPos) override
std::unique_ptr< FvStructuredSolver3DRans > m_ransSolver
void computeVorticity() override
void zonalRealInterpolation()
std::unique_ptr< StructuredBndryCnd< 3 > > m_structuredBndryCnd
void applySandpaperTrip()
void computeZonalConnections()
void moveGrid(const MBool isRestart, const MBool zeroPos) override
void initFFTW(fftw_complex *uPhysField, fftw_complex *vPhysField, fftw_complex *wPhysField, MInt lx, MInt ly, MInt lz, MInt noPeakModes)
void VENKATAKRISHNAN_FCT(MFloat effNghbrDelta, MFloat srfcDelta, MFloat dxEpsSqr, MInt cellPos, MInt var, MFloatScratchSpace &minPhi)
Standard Venkatakrishnan limiter.
void crossProduct(MFloat *, const MFloat *, const MFloat *)
std::unique_ptr< StructuredInterpolation< 3 > > m_pointInterpolation
void computeDomainWidth() override
MFloat getCellCoordinate(MInt, MInt) override
void AusmLES(MFloat *QLeft, MFloat *QRight, const MInt dim, const MInt cellId)
AUSM central.
Base class of the structured solver.
This class is a ScratchSpace.
Class for the 3D stuctured boundary conditions.
std::basic_string< char > MString