ABLATE Source Documentation  0.12.34
compressibleFlowFields.hpp
1 #ifndef ABLATELIBRARY_COMPRESSIBLEFLOWFIELDS_HPP
2 #define ABLATELIBRARY_COMPRESSIBLEFLOWFIELDS_HPP
3 
4 #include <domain/region.hpp>
5 #include <memory>
6 #include <string>
7 #include <vector>
8 #include "domain/fieldDescriptor.hpp"
9 #include "eos/eos.hpp"
10 #include "parameters/mapParameters.hpp"
11 
12 namespace ablate::finiteVolume {
13 
15  public:
16  typedef enum { RHO, RHOE, RHOU, RHOV, RHOW } EulerComponents;
17 
19  inline const static std::string EULER_FIELD = "euler";
20 
22  inline const static std::string CONSERVED = "density";
23 
25  inline const static std::string YI_FIELD = eos::EOS::YI;
26  inline const static std::string DENSITY_YI_FIELD = CONSERVED + YI_FIELD;
27 
29  inline const static std::string PROGRESS_FIELD = eos::EOS::PROGRESS;
30  inline const static std::string DENSITY_PROGRESS_FIELD = CONSERVED + PROGRESS_FIELD;
31 
33  inline const static std::string EV_TAG = "EV";
34 
36  enum class ValidRange { POSITIVE, FULL, BOUND, MINUSONETOONE };
37  inline const static std::string PositiveRange = "positive";
38  inline const static std::string FullRange = "full";
39  inline const static std::string BoundRange = "bound";
40  inline const static std::string MinusOneToOneRange = "minusOneToOneRange";
41 
43  inline const static std::string EV_FIELD = "EV";
44  inline const static std::string DENSITY_EV_FIELD = CONSERVED + EV_FIELD;
45 
47  inline const static std::string TEMPERATURE_FIELD = "temperature";
48  inline const static std::string VELOCITY_FIELD = "velocity";
49  inline const static std::string PRESSURE_FIELD = "pressure";
50 
51  protected:
52  const std::shared_ptr<eos::EOS> eos;
53  const std::shared_ptr<domain::Region> region;
54  const std::shared_ptr<parameters::Parameters> conservedFieldOptions;
55  const std::shared_ptr<parameters::Parameters> auxFieldOptions = ablate::parameters::MapParameters::Create({{"petscfv_type", "leastsquares"}, {"petsclimiter_type", "none"}});
56 
57  public:
64  explicit CompressibleFlowFields(std::shared_ptr<eos::EOS> eos, std::shared_ptr<domain::Region> region = {}, std::shared_ptr<parameters::Parameters> conservedFieldParameters = {});
65 
70  std::vector<std::shared_ptr<domain::FieldDescription>> GetFields() override;
71 };
72 
73 std::istream& operator>>(std::istream& is, CompressibleFlowFields::ValidRange& v);
74 
75 } // namespace ablate::finiteVolume
76 
77 #endif // ABLATELIBRARY_COMPRESSIBLEFLOWFIELDS_HPP
Definition: fieldDescriptor.hpp:15
Definition: compressibleFlowFields.hpp:14
static const std::string EV_FIELD
these are arbitrary ev fields
Definition: compressibleFlowFields.hpp:43
static const std::string PROGRESS_FIELD
progress fields are used by the eos/chemistry model to transport required non species
Definition: compressibleFlowFields.hpp:29
static const std::string CONSERVED
The conserved prefix used for fields that have a conserved and non conserved form.
Definition: compressibleFlowFields.hpp:22
static const std::string EV_TAG
the conserved tag used to tag all fields that should act like extra variables (transported with the f...
Definition: compressibleFlowFields.hpp:33
static const std::string EULER_FIELD
the primary euler field containing the EulerComponents
Definition: compressibleFlowFields.hpp:19
CompressibleFlowFields(std::shared_ptr< eos::EOS > eos, std::shared_ptr< domain::Region > region={}, std::shared_ptr< parameters::Parameters > conservedFieldParameters={})
Definition: compressibleFlowFields.cpp:7
static const std::string YI_FIELD
the conserved (density*yi) solution field for species mass fractions
Definition: compressibleFlowFields.hpp:25
static const std::string TEMPERATURE_FIELD
some common aux fields
Definition: compressibleFlowFields.hpp:47
ValidRange
store extra variable founds
Definition: compressibleFlowFields.hpp:36
std::vector< std::shared_ptr< domain::FieldDescription > > GetFields() override
Definition: compressibleFlowFields.cpp:11
static std::shared_ptr< MapParameters > Create(std::initializer_list< Parameter >)
Definition: mapParameters.cpp:28