ABLATE Source Documentation  0.12.33
buoyancy.hpp
1 #ifndef ABLATELIBRARY_BUOYANCY_HPP
2 #define ABLATELIBRARY_BUOYANCY_HPP
3 
4 #include "flowProcess.hpp"
5 
6 namespace ablate::finiteVolume::processes {
7 
8 class Buoyancy : public FlowProcess {
9  private:
10  const std::vector<PetscReal> buoyancyVector;
14  PetscReal densityAvg = NAN;
15 
22  PetscErrorCode UpdateAverageDensity(TS flowTs, ablate::solver::Solver& flow);
23 
28  static PetscErrorCode ComputeBuoyancySource(PetscInt dim, PetscReal time, const PetscFVCellGeom* cg, const PetscInt uOff[], const PetscScalar u[], const PetscInt aOff[], const PetscScalar a[],
29  PetscScalar f[], void* ctx);
30 
31  public:
32  explicit Buoyancy(std::vector<double> buoyancyVector);
34 };
35 
36 } // namespace ablate::finiteVolume::processes
37 #endif // ABLATELIBRARY_BUOYANCY_HPP
Definition: finiteVolumeSolver.hpp:28
void Setup(ablate::finiteVolume::FiniteVolumeSolver &fv) override
Definition: buoyancy.cpp:5
Definition: solver.hpp:17