SEEnvironmentalConditions.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/system/SESystem.h"
6class SESubstance;
10
11// Keep enums in sync with appropriate schema/cdm/EnvironmentEnums.proto file !!
12enum class eSurroundingType { NullSurrounding = 0, Air, Water };
13extern CDM_DECL const std::string& eSurroundingType_Name(eSurroundingType m);
14
15class CDM_DECL SEEnvironmentalConditions : public Loggable
16{
17 friend class PBEnvironment;//friend the serialization class
18 friend class SEEnvironment;
19 friend class SEChangeEnvironmentConditions;
20 friend class SEInitialEnvironmentConditions;
21public:
22
25
26 virtual void Clear();
27 virtual void Copy(const SEEnvironmentalConditions&, const SESubstanceManager&);
28
29 bool SerializeToString(std::string& output, eSerializationFormat m) const;
30 bool SerializeToFile(const std::string& filename) const;
31 bool SerializeFromString(const std::string& src, eSerializationFormat m, const SESubstanceManager& subMgr);
32 bool SerializeFromFile(const std::string& filename, const SESubstanceManager& subMgr);
33
34 virtual void Merge(const SEEnvironmentalConditions& from, SESubstanceManager& subMgr);
35
36 virtual const SEScalar* GetScalar(const std::string& name);
37
38 virtual eSurroundingType GetSurroundingType() const;
39 virtual void SetSurroundingType(eSurroundingType name);
40
41 virtual bool HasAirDensity() const;
42 virtual SEScalarMassPerVolume& GetAirDensity();
43 virtual double GetAirDensity(const MassPerVolumeUnit& unit) const;
44
45 virtual bool HasAirVelocity() const;
46 virtual SEScalarLengthPerTime& GetAirVelocity();
47 virtual double GetAirVelocity(const LengthPerTimeUnit& unit) const;
48
49 virtual bool HasAmbientTemperature() const;
50 virtual SEScalarTemperature& GetAmbientTemperature();
51 virtual double GetAmbientTemperature(const TemperatureUnit& unit) const;
52
53 virtual bool HasAtmosphericPressure() const;
54 virtual SEScalarPressure& GetAtmosphericPressure();
55 virtual double GetAtmosphericPressure(const PressureUnit& unit) const;
56
57 virtual bool HasClothingResistance() const;
58 virtual SEScalarHeatResistanceArea& GetClothingResistance();
59 virtual double GetClothingResistance(const HeatResistanceAreaUnit& unit) const;
60
61 virtual bool HasEmissivity() const;
62 virtual SEScalar0To1& GetEmissivity();
63 virtual double GetEmissivity() const;
64
65 virtual bool HasMeanRadiantTemperature() const;
66 virtual SEScalarTemperature& GetMeanRadiantTemperature();
67 virtual double GetMeanRadiantTemperature(const TemperatureUnit& unit) const;
68
69 virtual bool HasMechanicalDeadSpace() const;
70 virtual SEScalarVolume& GetMechanicalDeadSpace();
71 virtual double GetMechanicalDeadSpace(const VolumeUnit& unit) const;
72
73 virtual bool HasRelativeHumidity() const;
74 virtual SEScalar0To1& GetRelativeHumidity();
75 virtual double GetRelativeHumidity() const;
76
77 virtual bool HasRespirationAmbientTemperature() const;
78 virtual SEScalarTemperature& GetRespirationAmbientTemperature();
79 virtual double GetRespirationAmbientTemperature(const TemperatureUnit& unit) const;
80
81 bool HasAmbientGas() const;
82 bool HasAmbientGas(const SESubstance& substance) const;
83 const std::vector<SESubstanceFraction*>& GetAmbientGases();
84 const std::vector<const SESubstanceFraction*>& GetAmbientGases() const;
85 SESubstanceFraction& GetAmbientGas(const SESubstance& substance);
86 const SESubstanceFraction* GetAmbientGas(const SESubstance& substance) const;
87 void RemoveAmbientGas(const SESubstance& substance);
88 void RemoveAmbientGases();
89
90 bool HasAmbientAerosol() const;
91 bool HasAmbientAerosol(const SESubstance& substance) const;
92 const std::vector<SESubstanceConcentration*>& GetAmbientAerosols();
93 const std::vector<const SESubstanceConcentration*>& GetAmbientAerosols() const;
94 SESubstanceConcentration& GetAmbientAerosol(const SESubstance& substance);
95 const SESubstanceConcentration* GetAmbientAerosol(const SESubstance& substance) const;
96 void RemoveAmbientAerosol(const SESubstance& substance);
97 void RemoveAmbientAerosols();
98
99protected:
100
101 eSurroundingType m_SurroundingType;
102
113
114 std::vector<SESubstanceFraction*> m_AmbientGases;
115 std::vector<const SESubstanceFraction*> m_cAmbientGases;
116
117 std::vector<SESubstanceConcentration*> m_AmbientAerosols;
118 std::vector<const SESubstanceConcentration*> m_cAmbientAerosols;
119};
Definition: SEScalarHeatResistanceArea.h:8
Definition: SEScalarLengthPerTime.h:8
Definition: Logger.h:23
Definition: Logger.h:71
Definition: SEScalarMassPerVolume.h:8
Definition: PBEnvironment.h:12
Definition: SEScalarPressure.h:8
Definition: SEEnvironment.h:13
Definition: SEEnvironmentalConditions.h:16
SEScalarTemperature * m_AmbientTemperature
Definition: SEEnvironmentalConditions.h:105
SEScalarHeatResistanceArea * m_ClothingResistance
Definition: SEEnvironmentalConditions.h:107
SEScalarTemperature * m_MeanRadiantTemperature
Definition: SEEnvironmentalConditions.h:109
SEScalar0To1 * m_Emissivity
Definition: SEEnvironmentalConditions.h:108
SEScalarVolume * m_MechanicalDeadSpace
Definition: SEEnvironmentalConditions.h:110
SEScalarMassPerVolume * m_AirDensity
Definition: SEEnvironmentalConditions.h:103
std::vector< const SESubstanceFraction * > m_cAmbientGases
Definition: SEEnvironmentalConditions.h:115
std::vector< const SESubstanceConcentration * > m_cAmbientAerosols
Definition: SEEnvironmentalConditions.h:118
SEScalar0To1 * m_RelativeHumidity
Definition: SEEnvironmentalConditions.h:111
SEScalarTemperature * m_RespirationAmbientTemperature
Definition: SEEnvironmentalConditions.h:112
std::vector< SESubstanceConcentration * > m_AmbientAerosols
Definition: SEEnvironmentalConditions.h:117
SEScalarPressure * m_AtmosphericPressure
Definition: SEEnvironmentalConditions.h:106
std::vector< SESubstanceFraction * > m_AmbientGases
Definition: SEEnvironmentalConditions.h:114
SEScalarLengthPerTime * m_AirVelocity
Definition: SEEnvironmentalConditions.h:104
eSurroundingType m_SurroundingType
Definition: SEEnvironmentalConditions.h:101
Definition: SEScalar0To1.h:8
Definition: SEScalarHeatResistanceArea.h:27
Definition: SEScalar.h:19
Definition: SEScalarLengthPerTime.h:30
Definition: SEScalarMassPerVolume.h:37
Definition: SEScalarPressure.h:29
Definition: SEScalarTemperature.h:27
Definition: SEScalarVolume.h:28
Definition: SESubstanceConcentration.h:11
Definition: SESubstanceFraction.h:10
Definition: SESubstance.h:15
Definition: SESubstanceManager.h:9
Definition: SEScalarTemperature.h:8
Definition: SEScalarVolume.h:8

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.