include/meltpooldg/phase_change/evaporation_model_constant.hpp Source File

Developer Documentation: include/meltpooldg/phase_change/evaporation_model_constant.hpp Source File
Developer Documentation
evaporation_model_constant.hpp
Go to the documentation of this file.
1#pragma once
2#include <deal.II/base/exceptions.h>
3#include <deal.II/base/function_parser.h>
4#include <deal.II/base/point.h>
5
8
9#include <string>
10
12{
13 template <typename number>
15 {
16 private:
17 // function to compute the evaporative mass flux at a given time
18 mutable dealii::FunctionParser<1> m_dot;
19
20 public:
21 EvaporationModelConstant(const std::string &expr_evaporative_mass_flux)
22 : m_dot(expr_evaporative_mass_flux)
23 {}
24
25 number
26 local_compute_evaporative_mass_flux(const number time /*here used as time*/) const final
27 {
28 AssertThrow(not numbers::is_invalid(time),
29 dealii::ExcMessage("Time must be set to compute the evaporative mass flux."));
30 m_dot.set_time(time);
31 return m_dot.value(dealii::Point<1>() /* dummy value*/);
32 }
33 };
34} // namespace MeltPoolDG::Evaporation
Definition evaporation_model_base.hpp:13
Definition evaporation_model_constant.hpp:15
number local_compute_evaporative_mass_flux(const number time) const final
Definition evaporation_model_constant.hpp:26
EvaporationModelConstant(const std::string &expr_evaporative_mass_flux)
Definition evaporation_model_constant.hpp:21
dealii::FunctionParser< 1 > m_dot
Definition evaporation_model_constant.hpp:18
Definition evaporation_data.hpp:15
bool is_invalid(const double &number)
Definition numbers.hpp:16