Implicitly defined thermodynamic conditions

With Gmix script it is possible to define the mixture thermodynamic state that is reachable with either the shock wave compression or the isentropic compression/decompression. The mixture is considered to be well defined if the measure of the compression level is specified together with the initial values of pressure and temperature.
The example, shown below defines the air mixture at temperature and pressure reached with the isentropic compression with the compression ratio of 10
$model = New-ModelObject $GRI3 -OptIn -Species n2, o2
$mixture = $model.CreateIdealGasMixture("
    *main
    {
        N2 = 0.79
        O2 = ?  
        [pressure]    = ?
        [temperature] = ?
        [base temperature] = 300.0 ! K
        [base pressure]    = 1.0   ! ATM
        [compression ratio] = 10
    }
    " )
"The resulting mixture is: $($mixture)"
In this script, the initial temperature and pressure are specified using the base temperature and the base pressure keywords that are preserved in Gmix. By assigning the question sign to the final temperature and pressure, this mixture definition delegates computing the values to the Gmix engine. Executing this script results in the mixture temperature of about 727K and the pressure of about 24 atmospheres
The resulting mixture is:  [T] = 727.24106209756
 [P] = 24.2413687365853
 o2 = 0.21
 n2 = 0.79
Note that it is perfectly valid to invert the implicit definition by delegating to the engine finding the compression ration that would result in some specified temperature of the final state. For example, it can be required to determine the mixtures final state for the same initial temperature and pressure (300K and 1atm), and it is known that the final temperature must be 500K. By formulating the request in this manner, we delegate computing the corresponding compression ratio to the Gmix engine. Here is the corresponding PowerShell script
$model = New-ModelObject $GRI3 -OptIn -Species n2, o2
$mixture = $model.CreateIdealGasMixture("
    *main
    {
        N2 = 0.79
        O2 = ?  
        [pressure]         = ?
        [temperature]      = 500 ! K
        [base temperature] = 300.0 ! K
        [base pressure]    = 1.0   ! ATM
        [compression ratio] = ?
    }
    " )
"The resulting mixture is: $($mixture)"
In contrast with the previous example, here the question sing is assigned to the compression ratio and the final temperature is set to 500K explicitly. This results in the following
The resulting mixture is:  [T] = 500
 [P] = 6.11481897463845
 o2 = 0.21
 n2 = 0.79
Or, if required to find the value of compression ration such that the mixture reaches the pressure of 10 atmospheres, the previous script needs to be changed into
$model = New-ModelObject $GRI3 -OptIn -Species n2, o2
$mixture = $model.CreateIdealGasMixture("
    *main
    {
        N2 = 0.79
        O2 = ?  
        [pressure]         = 10
        [temperature]      = ?
        [base temperature] = 300.0 ! K
        [base pressure]    = 1  ! ATM
        [compression ratio] = ?
    }
    " )
"The resulting mixture is: $($mixture)"
that produces
The resulting mixture is:  [T] = 572.686356459766
 [P] = 10
 o2 = 0.21
 n2 = 0.79
If the computed compression ratio is of interest, it can bebe captured using the technique described in the Parameterized mixture definition.
In the above, specifying the compression ratio value along is silently interpreted by Gmix as the isentropic compression case. In order to change the compression type while remaining all the previously specified settings, the question sign assigned to the mach number parameter needs to be added to the mixture definition:
$model = New-ModelObject $GRI3 -OptIn -Species n2, o2

$mixture = $model.CreateIdealGasMixture("
    *main
    {
        N2 = 0.79
        O2 = ?  
        [pressure]          = ?
        [temperature]       = ?
        [base temperature]  = 300.0 ! K
        [base pressure]     = 1  ! ATM
        [compression ratio] = 4
        [mach number]       = ?
    }
    " )

"The resulting mixture is: $($mixture)"
with the output
The resulting mixture is:  [T] = 792.031358970752
 [P] = 10.56041811961
 o2 = 0.21
 n2 = 0.79
By questioning the engine on the mach number, the mixture definition gives a hint that the compressed state is reached with the shock wave rather than an isentropic compression.
As before, the request to build the mixture can be inverted, so that, for example, the pressure behind the shock wave can be predefined and the final temperature and the mach number become unknown:
$model = New-ModelObject $GRI3 -OptIn -Species n2, o2

$mixture = $model.CreateIdealGasMixture("
    *main
    {
        N2 = 0.79
        O2 = ?  
        [pressure]          = 100 ! ATM
        [temperature]       = ?
        [base temperature]  = 300.0 ! K
        [base pressure]     = 1  ! ATM
        [mach number]       = ?
    }
    " )

"The resulting mixture is: $($mixture)"
resulting in the output
The resulting mixture is:  [T] = 4237.51351449752
 [P] = 100
 o2 = 0.21
 n2 = 0.79
Note, that in this case the compression ratio obviously does not need to be specified.
Finally consider a complex mixture definition, where both the chemical composition and the thermodynamic state are specified implicitly:
$model = New-ModelObject $GRI3 
$mixture = $model.CreateIdealGasMixture("
    *main
    {
        [fuel]     = ?
        [oxidizer] = ?  
        [mixture fraction] = 0.06
        [pressure]          = ?
        [temperature]       = 5000
        [base temperature]  = 300.0 ! K
        [base pressure]     = 1  ! ATM
        [mach number]       = ?
    }
    [oxidizer] { O2 = 0.5   AR = ? }
    [fuel]     
    { 
        C2H4 = 0.5
        AR = 0.1
        [dilutant] = ?
    }
    [dilutant] { N2 = 0.1  AR = 0.1  CO2 = ? }
    " )

"The resulting mixture is: $($mixture)"
resulting in
The resulting mixture is:  [T] = 5000
 [P] = 107.527291613991
 o2 = 0.469070467253461
 co2 = 0.0197949009577851
 c2h4 = 0.0309295327465392
 n2 = 0.00247436261972314
 ar = 0.477730736422492
In this example, the fractions of the complex oxidizer and complex fuel are defined with the mixture fraction value of 0.06. The composition of the oxidizer is 50% of O2 and 50% of AR. The fuel consists of 50% of C2H4, 10% of AR and 40% of some dilutant, that is a complex gas mixture on its own. The dilutant is defined as 10% of N2, 10% of AR and 80% of CO2. The mixtures thermodynamic state is reached by the shock wave compression of the gas in some initial state (at 300K and 1 atmosphere) till the temperature of 5000K. Thus, the pressure and the chemical composition are unknowns.

Last edited Nov 20, 2013 at 9:29 PM by AlexeyE, version 6

Comments

No comments yet.