-
Notifications
You must be signed in to change notification settings - Fork 10
Labels
enhancementNew feature or requestNew feature or request
Description
In the mechanism configuration, the PhaseSpecies struct is defined as below. micm::Phase stores species as a std::vectormicm::Species, instead std::vector<PhaseSpecies> and therefore, diffusion coefficient information for species in a given phase is not captured during the conversion from the mechanism configuration type to the micm type. This needs to be implemented.
From mechanism configuration
struct PhaseSpecies
{
std::string name;
std::optional<double> diffusion_coefficient;
/// @brief Unknown properties, prefixed with two underscores (__)
std::unordered_map<std::string, std::string> unknown_properties;
};
struct Phase
{
std::string name;
std::vector<PhaseSpecies> species;
/// @brief Unknown properties, prefixed with two underscores (__)
std::unordered_map<std::string, std::string> unknown_properties;
};Ideas
- Update the function in
/src/micm/v1_parse.cpponcemicm::Phaseis updated micm issue #845
std::vector<micm::Phase> convert_phases(
const std::vector<mechanism_configuration::v1::types::Phase>& phases,
std::unordered_map<std::string, micm::Species>& species_map)- Update the full configuration to remove the entry for diffusion coefficient (
/config/v1/full_configuration)
{
"version": "1.0.0",
"name": "Full Configuration",
"species": [
{
"name": "A",
"molecular weight [kg mol-1]": 0.02897,
"diffusion coefficient [m2 s-1]": 1.0e-05, <---- HERE!
"__absolute tolerance": 1.0e-30
},- Update the configuration to add diffusion coefficient entry, and update the test
"phases": [
{
"name": "gas",
"species": [
{"name": "A"},
{"name": "B"},
{"name": "C"},
{
"name": "ethanol",
"diffusion coefficient [m2 s-1]": 2.1e-5
},
{
"name": "H2O2",
"diffusion coefficient [m2 s-1]": 2.1e-5
}
]
}
],Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request