Named composition parser for user-facing species input.
Supports strings such as "CH4:1.0,O2:0.233,N2:0.767" and maps the names into the solver/Cantera species ordering. This avoids fragile assumptions about numeric species indices when a mechanism such as GRI30 dynamically defines the transported species list.
Returns true if the composition input string is populated and non-empty.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | text |
String representation of initial composition to test. |
Systematically parses a composition string and maps values to species array indexes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | text |
The composition input string to parse. |
||
| character(len=*), | intent(in) | :: | species_names(:) | |||
| integer, | intent(in) | :: | nspecies |
Number of active species. |
||
| real(kind=rk), | intent(out) | :: | values(:) | |||
| character(len=*), | intent(in) | :: | owner |
Name of the calling subsystem for error traceback. |
||
| logical, | intent(in), | optional | :: | normalize |
Optional flag to normalize values to sum to 1.0 (default true). |
|
| logical, | intent(in), | optional | :: | require_sum_positive |
Optional flag to mandate a non-zero sum (default true). |