Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Mixing gas media

Mixing gas media

Hello all, i have following problem: I want to mix some mixture gas which consists of H2, CO, CO2, C2H4 and CH4 into a vessel where initially only N2 gas is present, but i can not initiate the model, it tells me following:
[3] 16:20:34 Translation Error
[TestFlow: 42:3-43:105]: Incompatible components in connect statement: connect(ports_a, volume.ports[1])
- ports_a has components {C_outflow, Xi_outflow, h_outflow, m_flow, p}
- volume.ports[1] has components {C_outflow, Xi_outflow, h_outflow, m_flow, p}

I have attached a simple example where the setup is visible. Can someone tells me what i need to change in my system that it is possible to simulate the mixing? also, i do not use port data so the mixing is without pressure loss.
https://openmodelica.org/images/agorapro/attachments/6398/mini_TestFlowExample.JPG


Best regards,

Markus

Re: Mixing gas media

Ok, i think i overcame the problem by making adjustments in the media compositions, i did not use pure N2 but instead a mixture with 99,95 % N2 and 0,01 % for each of the remaining gas components and also included a small amount of N2 in the other gas mixture.

One small thing: The mixing occurs, the mass percentaces changes, also the specific heat capacity of the mixture is changing, but not the molar mass of the mixture which is strange, but i cannot find the reason for this.

Re: Mixing gas media

The wrong calculation of the mixture molar mass (e.g. with the MixtureGasNasa model) is a known issue: Ticket #2858. In this attachment of the ticket, you can find possible workarounds to properly calculate the molar mass of the gas mixture.

There are 0 guests and 0 other users also viewing this topic