1 #ifndef ABLATELIBRARY_PRESSUREGRADIENTSCALING_HPP
2 #define ABLATELIBRARY_PRESSUREGRADIENTSCALING_HPP
6 #include "finiteVolume/finiteVolumeSolver.hpp"
7 #include "flowProcess.hpp"
8 #include "monitors/logs/log.hpp"
10 namespace ablate::finiteVolume::processes {
22 const std::string
id =
"PressureGradientScaling";
27 const std::shared_ptr<eos::EOS> eos;
32 const PetscReal maxMachAllowed = 0.7;
37 const PetscReal maxAlphaChange = 0.10;
42 const PetscReal maxAlphaAllowed;
47 const PetscReal maxDeltaPressureFac;
52 const PetscReal domainLength;
57 const std::shared_ptr<ablate::monitors::logs::Log> log;
62 PetscReal maxMach = 0.0;
66 PressureGradientScaling(std::shared_ptr<eos::EOS> eos,
double alphaInit,
double domainLength,
double maxAlphaAllowed = {},
double maxDeltaPressureFac = {},
67 std::shared_ptr<ablate::monitors::logs::Log> = {});
84 inline const PetscReal& GetAlpha() {
return alpha; }
87 inline const PetscReal& GetMaxMach() {
return maxMach; }
93 const std::string&
GetId()
const override {
return id; }
101 PetscErrorCode
Save(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time)
override;
109 PetscErrorCode
Restore(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time)
override;
Definition: finiteVolumeSolver.hpp:28
Definition: flowProcess.hpp:8
Definition: pressureGradientScaling.hpp:17
const std::string & GetId() const override
Definition: pressureGradientScaling.hpp:93
PetscErrorCode Save(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
Definition: pressureGradientScaling.cpp:154
void Setup(ablate::finiteVolume::FiniteVolumeSolver &fv) override
Definition: pressureGradientScaling.cpp:144
PetscErrorCode Restore(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
Definition: pressureGradientScaling.cpp:160
PetscErrorCode UpdatePreconditioner(TS flowTs, ablate::solver::Solver &flow)
Definition: pressureGradientScaling.cpp:16
Definition: serializable.hpp:13
Definition: solver.hpp:17