MEASUR-Tools-Suite v1.0.11
The MEASUR Tools Suite is a collection of industrial efficiency calculations written in C++ and with bindings for compilation to WebAssembly.
Loading...
Searching...
No Matches
gas_properties.h
1#pragma once
2#include <functional>
3namespace gas_properties {
4
6 public:
7 std::function<double(double t)> specific_heat;
8 double molecular_weight;
9 double specific_weight;
10 double composition_percent;
11 double composition_by_volume;
12 double o2_generated;
13 double heating_value;
14 double heating_value_volume;
15 double h2o_generated;
16 double co2_generated;
17 double composition_weight;
18 double composition_weight_fraction;
19
20 GasProperties(std::function<double(double t)> specific_heat, double molecular_weight, double specific_weight,
21 double composition_percent, double composition_by_volume, double o2_generated, double heating_value,
22 double heating_value_volume, double h2o_generated, double co2_generated)
23 : specific_heat(std::move(specific_heat)), molecular_weight(molecular_weight), specific_weight(specific_weight),
24 composition_percent(composition_percent), composition_by_volume(composition_by_volume),
25 o2_generated(o2_generated), heating_value(heating_value), heating_value_volume(heating_value_volume),
26 h2o_generated(h2o_generated), co2_generated(co2_generated),
27 composition_weight(composition_by_volume * specific_weight) {};
28
29 void setCompositionWeightFraction(double total_weight) {
30 composition_weight_fraction = composition_weight / total_weight;
31 }
32};
33} // namespace gas_properties