Mixtures composed from components defined at different thermodynamic conditions

It is possible to define a mixture of two or more components that are defined at their specific initial temperature and pressure. The following describes the corresponding scripting constructs as well as the way the Gmix engine hadles these kind of definitions.
The first example shows how to define a mixture consisting of two components defined at different temperatures. The definition of the two complex components is: 1) a composite fuel 50%CH4 – 20%C2H2 – 30%C2H6 at pressure of 1atmosphere (by default) and temperature of 700K, 2) air at pressure of 1 atmosphere (by default) and temperature of 1000K. The stoichiometric mixture of these two components at atmospheric pressure can be defined with
$model = New-ModelObject $GRI3 -OptIn -Species ch4, c2h2, c2h6, o2, n2

$mixture = $model.CreateIdealGasMixture("
    *main
    {
        [fuel] = ?
        [air] = ?
        [equivalence ratio] = 1
        [temperature] = ?
        [pressure] = 1  
    }

    [fuel] 
    { 
        CH4 = 0.5   
        C2H2 = 0.2
        C2H6 = ?
        [temperature] = 700.0 
        
    }
    [air]  
    { 
        O2  = 0.21  
        N2   = ? 
        [temperature] = 1000.0 
        
    } 
    " )

"The resulting mixture is: $($mixture)"

The question mark specified instead of the mixtures temperature informs the engine that this value needs to be evaluated based on all other parameters found in the mixture definition script. Note, that when the temperature evaluation is delegated to the engine, the mixtures pressure must be given explicitely. In this case the default value of 1 atmosphere will not be assigned to the mixtures pressure, and the script interpreter will stop processing with an error. Running the script results in the following output
The resulting mixture is:  [T] = 951.055352152617
 [P] = 1
 o2 = 0.194021739130435
 ch4 = 0.0380434782608696
 c2h2 = 0.0152173913043478
 c2h6 = 0.0228260869565217
 n2 = 0.729891304347826

Things become more complex when the mixture components are defined not only at different temperatures, but also at different pressures. Gmix handles this situation in a fixed way. First all the rmodynamic states of the involved component are changed to adjust their pressure to the value specified in the main gas mixture. In this step, the thermodynamic states are transformed with the isentropic compression (or decompression) process. After that, the standard mixture formation is simulated for the main mixture pressure.
In the following example the ideal gas mixture is defined as 50% of argon and 50% of nitrogen. The initial conditions for argon and nitrogen are defined for temperature of 300K and pressures of 50 and 20 atmospheres respectively.
$model = New-ModelObject $GRI3 -OptIn -Species ar, n2 

$mixture = $model.CreateIdealGasMixture("
    *main
    {
        [argon]       = 0.5
        [nitrogen]    = ?        
        [pressure]    = 1
        [temperature] = ?
    }

    [argon] 
    { 
        AR = 1
        [temperature] = 300.0
        [pressure]    = 50
        
    }

    [nitrogen]  
    { 
        N2  = 1
        [temperature] = 300
        [pressure]    = 20        
    } 
    " )

"The resulting mixture is: $($mixture)"
Running this script results in the following output
The resulting mixture is:  [T] = 100.428269141843
 [P] = 1
 n2 = 0.5
 ar = 0.5

Notice, that the mixtures temperature is about 100K. This is caused by the fact that first both components, prior to be mixed, were decompressed till the atmospheric pressure. The decompression process resulted in the temperature decrease for both and consecuenttly for the resulting mixture as well.

Last edited Nov 19, 2013 at 9:06 PM by AlexeyE, version 1

Comments

No comments yet.