ABLATE Source Documentation  0.12.34
temperatureSublimation.hpp
1 #ifndef ABLATELIBRARY_SUBLIMATIONTEMPERATURE_HPP
2 #define ABLATELIBRARY_SUBLIMATIONTEMPERATURE_HPP
3 
4 #include <map>
5 #include <memory>
6 #include "oneDimensionHeatTransfer.hpp"
7 #include "solver/cellSolver.hpp"
8 #include "solver/timeStepper.hpp"
9 #include "sublimationModel.hpp"
10 
11 namespace ablate::boundarySolver::physics::subModels {
12 
14  private:
16  std::map<PetscInt, std::shared_ptr<OneDimensionHeatTransfer>> oneDimensionHeatTransfer;
17 
19  std::map<PetscInt, PetscReal> heatFluxIntoSolid;
20 
22  const std::shared_ptr<ablate::parameters::Parameters> properties;
23 
25  const std::shared_ptr<ablate::mathFunctions::MathFunction> initialization;
26 
28  const std::shared_ptr<ablate::parameters::Parameters> options;
29 
31  const PetscReal latentHeatOfFusion;
32 
34  const PetscReal solidDensity;
35 
36  public:
37  TemperatureSublimation(const std::shared_ptr<ablate::parameters::Parameters> &properties, const std::shared_ptr<ablate::mathFunctions::MathFunction> &initialization,
38  const std::shared_ptr<ablate::parameters::Parameters> &options = {});
39 
44  void Initialize(ablate::boundarySolver::BoundarySolver &bSolver) override;
45 
51  bool RequiresUpdate() override { return true; };
52 
58  PetscErrorCode Update(PetscInt faceId, PetscReal dt, PetscReal heatFluxToSurface, PetscReal &temperature) override;
59 
64  PetscErrorCode Compute(PetscInt faceId, PetscReal heatFluxToSurface, SurfaceState &) override;
65 
70  [[nodiscard]] SerializerType Serialize() const override { return SerializerType::serial; }
71 
78  PetscErrorCode Save(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override;
79 
86  PetscErrorCode Restore(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override;
87 };
88 
89 } // namespace ablate::boundarySolver::physics::subModels
90 #endif // ABLATELIBRARY_SUBLIMATIONTEMPERATURE_HPP
Definition: boundarySolver.hpp:13
SerializerType Serialize() const override
Definition: temperatureSublimation.hpp:70
PetscErrorCode Restore(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
Definition: temperatureSublimation.cpp:86
PetscErrorCode Compute(PetscInt faceId, PetscReal heatFluxToSurface, SurfaceState &) override
Definition: temperatureSublimation.cpp:63
PetscErrorCode Save(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
Definition: temperatureSublimation.cpp:78
void Initialize(ablate::boundarySolver::BoundarySolver &bSolver) override
Definition: temperatureSublimation.cpp:15
PetscErrorCode Update(PetscInt faceId, PetscReal dt, PetscReal heatFluxToSurface, PetscReal &temperature) override
Definition: temperatureSublimation.cpp:55
bool RequiresUpdate() override
Definition: temperatureSublimation.hpp:51
SerializerType
Definition: serializable.hpp:18