blockIndexMassFraction

Computes the index of a substance in the mass fraction vector Xi

Information

This block computes the index that the subtance with name substanceName has in the mass fraction vector X. If the medium model has no component called substanceName, then the block writes an error message and terminates the simulation.

This block is used for example to obtain the index of the subtance 'water' to obtain the water vapor concentration, or to measure any other mass fraction.

Parameters

TypeNameDefaultDescription
StringsubstanceName""Name of species substance

Contents

NameDescription
MediumMedium model

Revisions

  • November 14, 2019, by Michael Wetter:
    Rewrote assignment of i_x to avoid a variable array index.
    This is for #1250.
  • January 18, 2019, by Jianjun Hu:
    Limited the media choice to moist air only. See #1050.
  • August 31, 2013, by Michael Wetter:
    Revised the model and added the parameter substanceName.
  • December 18, 2012, by Michael Wetter:
    First implementation.