1 #ifndef ABLATELIBRARY_NAVIERSTOKESTRANSPORT_HPP
2 #define ABLATELIBRARY_NAVIERSTOKESTRANSPORT_HPP
5 #include "eos/transport/transportModel.hpp"
6 #include "finiteVolume/fluxCalculator/fluxCalculator.hpp"
7 #include "flowProcess.hpp"
8 #include "pressureGradientScaling.hpp"
10 namespace ablate::finiteVolume::processes {
20 PetscInt numberSpecies;
29 ablate::finiteVolume::fluxCalculator::FluxCalculatorFunction fluxCalculatorFunction;
30 void* fluxCalculatorCtx;
42 const std::shared_ptr<fluxCalculator::FluxCalculator> fluxCalculator;
43 const std::shared_ptr<eos::EOS> eos;
44 const std::shared_ptr<eos::transport::TransportModel> transportModel;
54 struct CflTimeStepData {
61 std::shared_ptr<ablate::finiteVolume::processes::PressureGradientScaling> pgs;
63 CflTimeStepData timeStepData;
66 struct DiffusionTimeStepData {
68 PetscReal conductionStabilityFactor;
71 PetscReal viscousStabilityFactor;
82 DiffusionTimeStepData diffusionTimeStepData;
97 static PetscErrorCode
UpdateAuxTemperatureField(PetscReal time, PetscInt dim,
const PetscFVCellGeom* cellGeom,
const PetscInt uOff[],
const PetscScalar* conservedValues,
const PetscInt aOff[],
98 PetscScalar* auxField,
void* ctx);
102 static PetscErrorCode
UpdateAuxVelocityField(PetscReal time, PetscInt dim,
const PetscFVCellGeom* cellGeom,
const PetscInt uOff[],
const PetscScalar* conservedValues,
const PetscInt aOff[],
103 PetscScalar* auxField,
void* ctx);
108 static PetscErrorCode
UpdateAuxPressureField(PetscReal time, PetscInt dim,
const PetscFVCellGeom* cellGeom,
const PetscInt uOff[],
const PetscScalar* conservedValues,
const PetscInt aOff[],
109 PetscScalar* auxField,
void* ctx);
115 NavierStokesTransport(
const std::shared_ptr<parameters::Parameters>& parameters, std::shared_ptr<eos::EOS> eos, std::shared_ptr<fluxCalculator::FluxCalculator> fluxCalcIn = {},
116 std::shared_ptr<eos::transport::TransportModel> transportModel = {}, std::shared_ptr<ablate::finiteVolume::processes::PressureGradientScaling> = {});
131 static PetscErrorCode
AdvectionFlux(PetscInt dim,
const PetscFVFaceGeom* fg,
const PetscInt uOff[],
const PetscScalar fieldL[],
const PetscScalar fieldR[],
const PetscInt aOff[],
132 const PetscScalar auxL[],
const PetscScalar auxR[], PetscScalar* flux,
void* ctx);
141 static PetscErrorCode
DiffusionFlux(PetscInt dim,
const PetscFVFaceGeom* fg,
const PetscInt uOff[],
const PetscInt uOff_x[],
const PetscScalar field[],
const PetscScalar grad[],
142 const PetscInt aOff[],
const PetscInt aOff_x[],
const PetscScalar aux[],
const PetscScalar gradAux[], PetscScalar flux[],
void* ctx);
Definition: finiteVolumeSolver.hpp:28
Definition: flowProcess.hpp:8
Definition: navierStokesTransport.hpp:12
NavierStokesTransport(const std::shared_ptr< parameters::Parameters > ¶meters, std::shared_ptr< eos::EOS > eos, std::shared_ptr< fluxCalculator::FluxCalculator > fluxCalcIn={}, std::shared_ptr< eos::transport::TransportModel > transportModel={}, std::shared_ptr< ablate::finiteVolume::processes::PressureGradientScaling >={})
Definition: navierStokesTransport.cpp:10
static PetscErrorCode UpdateAuxVelocityField(PetscReal time, PetscInt dim, const PetscFVCellGeom *cellGeom, const PetscInt uOff[], const PetscScalar *conservedValues, const PetscInt aOff[], PetscScalar *auxField, void *ctx)
Definition: navierStokesTransport.cpp:528
static PetscErrorCode UpdateAuxPressureField(PetscReal time, PetscInt dim, const PetscFVCellGeom *cellGeom, const PetscInt uOff[], const PetscScalar *conservedValues, const PetscInt aOff[], PetscScalar *auxField, void *ctx)
Definition: navierStokesTransport.cpp:551
static PetscErrorCode UpdateAuxTemperatureField(PetscReal time, PetscInt dim, const PetscFVCellGeom *cellGeom, const PetscInt uOff[], const PetscScalar *conservedValues, const PetscInt aOff[], PetscScalar *auxField, void *ctx)
Definition: navierStokesTransport.cpp:541
void Setup(ablate::finiteVolume::FiniteVolumeSolver &flow) override
Definition: navierStokesTransport.cpp:35
static PetscErrorCode AdvectionFlux(PetscInt dim, const PetscFVFaceGeom *fg, const PetscInt uOff[], const PetscScalar fieldL[], const PetscScalar fieldR[], const PetscInt aOff[], const PetscScalar auxL[], const PetscScalar auxR[], PetscScalar *flux, void *ctx)
Definition: navierStokesTransport.cpp:97
static PetscErrorCode CompressibleFlowComputeStressTensor(PetscInt dim, PetscReal mu, const PetscReal *gradVel, PetscReal *tau)
Definition: navierStokesTransport.cpp:504
static PetscErrorCode DiffusionFlux(PetscInt dim, const PetscFVFaceGeom *fg, const PetscInt uOff[], const PetscInt uOff_x[], const PetscScalar field[], const PetscScalar grad[], const PetscInt aOff[], const PetscInt aOff_x[], const PetscScalar aux[], const PetscScalar gradAux[], PetscScalar flux[], void *ctx)
Definition: navierStokesTransport.cpp:448
Definition: navierStokesTransport.hpp:15
Definition: navierStokesTransport.hpp:34