You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #551 we added support for species to be labeled as third-body, meaning a species that is non reacting, whose concentration doesn't change, but can still be present in a list of products or reactants.
However, if you set any of these M species in our examples as a third body by setting them to something like
94% tests passed, 4 tests failed out of 69
Total Test time (real) = 17.88 sec
The following tests FAILED:
49 - chapman_integration (Failed)
66 - carbon_bond_5_example (Subprocess aborted)
67 - chapman_example (Subprocess aborted)
69 - ts1_example (Subprocess aborted)
Errors while running CTest
Each of them fails with the same message
:: ctest -R chapman_integration --verbose
49: [ RUN ] ChapmanIntegration.CanBuildChapmanSystemUsingConfig
49: unknown file: Failure
49: C++ exception with description "M: Reactant does not exist" thrown in the test body.
This is the same failure that we see in music box when trying to set a third body species.
The reason this happens is that products and reactants are read in as names from their reaction lists and turned into Species objects, which look like our regular species.
std::string name = object[NAME].get<std::string>();
Species species{ name };
// Load remaining keys as properties
for (auto& [key, value] : object.items())
{
if (key != NAME && key != TYPE)
{
if (value.is_string())
{
if (key == TRACER_TYPE && value == THIRD_BODY)
{
species.SetThirdBody();
}
When we indicate that a species is a third body, we set a value called parameterize_ which holds a lambda function to return the air density, which is the value that needs to be used for the concentration of a third body species when calculating reaction rates.
But, we don't know that M, or whatever species is marked as third body, should be a third body species when parsing the reactants and products.
The error occurs when we try to build a solver which has read in a configuration with a third body species present. Specifically it fails during construction of the process set. In the snippet below, reactant will eventually be M, but because it was read from the reactant or product list, it will never have been set as a parameterized species. And, because variable_map contains only the non-parameterized species, we will throw an error on line 148.
All configurations used in our tests with M have M set as a third body species
Configurations can build and run
Ideas
Remove the idea of the third body species entirely, or
In the configuration reader, use a map of strings to species and lookup the species to set as a reactant or product when constructing the products or reactants
The text was updated successfully, but these errors were encountered:
In #551 we added support for species to be labeled as third-body, meaning a species that is non reacting, whose concentration doesn't change, but can still be present in a list of products or reactants.
However, if you set any of these M species in our examples as a third body by setting them to something like
micm/examples/configs/TS1/species.json
Lines 1274 to 1278 in c74099c
micm/examples/configs/chapman/species.json
Lines 3 to 7 in c74099c
micm/examples/configs/carbon_bond_5/species.json
Lines 131 to 134 in c74099c
micm/test/unit/unit_configs/small_mechanism/species.json
Lines 7 to 11 in c74099c
we end up with test failures
Each of them fails with the same message
This is the same failure that we see in music box when trying to set a third body species.
The reason this happens is that products and reactants are read in as names from their reaction lists and turned into
Species
objects, which look like our regular species.micm/include/micm/configure/solver_config.hpp
Lines 417 to 453 in c74099c
The problem is that a species being a third body is only known when reading from the species list.
micm/include/micm/configure/solver_config.hpp
Lines 346 to 373 in c74099c
When we indicate that a species is a third body, we set a value called
parameterize_
which holds a lambda function to return the air density, which is the value that needs to be used for the concentration of a third body species when calculating reaction rates.But, we don't know that
M
, or whatever species is marked as third body, should be a third body species when parsing the reactants and products.The error occurs when we try to build a solver which has read in a configuration with a third body species present. Specifically it fails during construction of the process set. In the snippet below,
reactant
will eventually beM
, but because it was read from the reactant or product list, it will never have been set as a parameterized species. And, becausevariable_map
contains only the non-parameterized species, we will throw an error on line 148.micm/include/micm/process/process_set.hpp
Lines 136 to 165 in c74099c
Acceptance criteria
M
haveM
set as a third body speciesIdeas
The text was updated successfully, but these errors were encountered: