- Index
- » Users
- » ulfsen
- » Profile
Posts
Posts
Page Start Prev 1 Next End
Update...just checked the bug tickes database - Ticket #2858 is what I mean...
Hi,
I wanted to use a gas mixture with varying composition and got a problem while looking at the molar mass. Following is a simple test:
Code:
model molarMassesTest "Test gas mixtures"
extends Modelica.Icons.Example;
package Medium = Modelica.Media.IdealGases.MixtureGases.SimpleNaturalGas "Medium model";
Medium.BaseProperties medium();
parameter Real data[:]=medium.MMX;
Real molm "molar mass from media library";
Real molm2 "molar mass calculated by myself";
equation
medium.X = {0.0, 0.0, 0.0, 0.0, 0.0+time, 1.0-time};
medium.p = 100000;
medium.T = 300;
molm = medium.MM;
molm2 = 1 / sum(medium.state.X[j] / data[j] for j in 1:size(medium.state.X, 1));
end molarMassesTest;
It seems, that the molar mass from media library is constant. This shouldn't because the composition is changing. I checked MixtureGasNase and the function there is identical to the function for molm2. Did I miss something or made a mistake?
Thanks in advance for your help !
Page Start Prev 1 Next End
- Index
- » Users
- » ulfsen
- » Profile