ABLATE Source Documentation  0.12.33
ignitionDelayTemperature.hpp
1 #ifndef ABLATELIBRARY_IGNITIONDELAYTEMPERATURE_HPP
2 #define ABLATELIBRARY_IGNITIONDELAYTEMPERATURE_HPP
3 
4 #include <monitors/logs/log.hpp>
5 #include "eos/eos.hpp"
6 #include "monitor.hpp"
7 
8 namespace ablate::monitors {
9 
14  static PetscErrorCode MonitorIgnition(TS ts, PetscInt step, PetscReal crtime, Vec u, void *ctx);
15 
16  // store the eos inorder to compute temperature
17  const std::shared_ptr<eos::EOS> eos;
18  const double thresholdTemperature;
19  const std::shared_ptr<logs::Log> log;
20  const std::shared_ptr<logs::Log> historyLog;
21 
22  const std::string species;
23  const std::vector<double> location;
24 
25  // The offset for the euler and mass fractions in the solution array
26  PetscInt cellOfInterest;
27 
28  std::vector<double> timeHistory;
29  std::vector<double> temperatureHistory;
30 
31  // Get compute temperature function
32  eos::ThermodynamicFunction computeTemperature;
33 
34  public:
35  explicit IgnitionDelayTemperature(std::shared_ptr<eos::EOS>, std::vector<double> location, double thresholdTemperature, std::shared_ptr<logs::Log> log = {},
36  std::shared_ptr<logs::Log> historyLog = {});
37  ~IgnitionDelayTemperature() override;
38 
39  void Register(std::shared_ptr<solver::Solver>) override;
40  PetscMonitorFunction GetPetscFunction() override { return MonitorIgnition; }
41 };
42 } // namespace ablate::monitors
43 #endif // ABLATELIBRARY_IGNITIONDELAYTEMPERATURE_HPP
Definition: ignitionDelayTemperature.hpp:13
PetscMonitorFunction GetPetscFunction() override
Definition: ignitionDelayTemperature.hpp:40
void Register(std::shared_ptr< solver::Solver >) override
Definition: ignitionDelayTemperature.cpp:21
Definition: monitor.hpp:12
Definition: boundarySolverMonitor.hpp:16