I have a string vector with the names of some substances vec = {"H2","O2"}
, and I would like to use these strings to access a record
in a package such that
Modelica.Media.IdealGases.Common.SingleGasesData.'vec[1]'
returns the data of H2
.
Is this possible in Modelica, or do I have to do it manually?