ABLATE Source Documentation  0.12.34
radiationFieldMonitor.hpp
1 #ifndef ABLATELIBRARY_RADIATIONFIELDMONITOR_H
2 #define ABLATELIBRARY_RADIATIONFIELDMONITOR_H
3 
4 #include "eos/eos.hpp"
5 #include "eos/radiationProperties/radiationProperties.hpp"
6 #include "fieldMonitor.hpp"
7 #include "finiteVolume/compressibleFlowFields.hpp"
8 #include "io/interval/fixedInterval.hpp"
9 #include "utilities/constants.hpp"
10 
11 namespace ablate::monitors {
12 
14  enum FieldPlacements { intensity, absorption, fieldsStart };
15  using tp = ablate::eos::ThermodynamicProperty;
16  using fLoc = ablate::domain::FieldLocation;
17 
18  public:
19  RadiationFieldMonitor(const std::shared_ptr<ablate::eos::EOS> eosIn, std::shared_ptr<eos::radiationProperties::RadiationModel> radiationModelIn,
20  std::shared_ptr<io::interval::Interval> intervalIn);
21 
22  void Register(std::shared_ptr<ablate::solver::Solver> solverIn) override;
23  PetscErrorCode Save(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override;
24  static PetscErrorCode MonitorRadiation(TS ts, PetscInt step, PetscReal crtime, Vec u, void* ctx);
25  PetscMonitorFunction GetPetscFunction() override { return MonitorRadiation; }
26 
27  private:
28  const std::shared_ptr<ablate::eos::EOS> eos;
29 
31  const std::shared_ptr<eos::radiationProperties::RadiationModel> radiationModel;
32 
34  eos::ThermodynamicTemperatureFunction absorptivityFunction;
35 
36  const std::shared_ptr<io::interval::Interval> interval;
37  PetscInt step;
38 
39  // Create suffix vector
40  std::vector<std::string> fieldNames{"radiationIntensity", "absorptionCoefficient"};
41 };
42 } // namespace ablate::monitors
43 #endif // ABLATELIBRARY_RADIATIONFIELDMONITOR_H
Definition: fieldMonitor.hpp:14
Definition: radiationFieldMonitor.hpp:13
PetscErrorCode Save(PetscViewer viewer, PetscInt sequenceNumber, PetscReal time) override
Definition: radiationFieldMonitor.cpp:26
static PetscErrorCode MonitorRadiation(TS ts, PetscInt step, PetscReal crtime, Vec u, void *ctx)
Definition: radiationFieldMonitor.cpp:36
PetscMonitorFunction GetPetscFunction() override
Definition: radiationFieldMonitor.hpp:25
Definition: boundarySolverMonitor.hpp:16