Progress variable in mixture fraction space

90 views
Skip to first unread message

allo

unread,
Nov 20, 2023, 7:18:36 PM11/20/23
to Cantera Users' Group

Hi everyone,

 

I am trying to generate flamelet files for a counterflowdiffusion flame using Python. 

My goal is to use Ansys Fluent's definition for progress variable and compute the progress variable in mixture fraction space. 

To do this, I have to calculate the mass fractions and mixture fraction of the solved flame, which I have done by doing: 

 

Y = f.Y

for j in range(n_points):
        f.set_gas_state(j)
        Z[j] = gas.mixture_fraction(fuel, oxidizer, basis=basis)

 

 

I also have to calculate equilibrium mass fractions of each species, with H and P constant, in mixture fraction space: 

for j in range(n_points):
        gas.set_mixture_fraction(Z[j],fuel, oxidizer, basis=basis)
        gas.equilibrate('HP)
        if (j==0):
            Y_eq = [gas.Y]
        else:
            Y_eq = np.append(Y_eq, [gas.Y], axis = 0)

 

And finally unburnt mass fractions of each species in mixture fraction space: 

gas.set_multiplier(0)
    for j in range(f.flame.n_points):
        gas.set_mixture_fraction(Z[j], fuel, oxidizer, basis=basis)
        if (j==0):
            Y_unburnt = [gas.Y]
        else:
            Y_unburnt = np.append(Y_unburnt, [gas.Y], axis = 0)

 

Unfortunately, the values I get for the progress variable using these mass fractions are not accurate. Is there an issue with the way I compute these mass fractions?

 

Thanks a lot

Ray Speth

unread,
Dec 21, 2023, 1:14:05 PM12/21/23
to Cantera Users' Group

Hi,

One thing I noticed is that in your calculation of the equilibrium mass fractions you aren’t resetting the temperature during the loop, which means that the initial temperature for each point is the equilibrium temperature from the previous point. If your fuel and oxidizer are initially at the same temperature, I’d guess that what you want to do is use that temperature as the initial condition, by setting gas.TP before calling gas.equilibrate('HP') in the loop. I’m not sure what the right value would be if you have different fuel and oxidizer temperatures.

If that doesn’t solve the problem, can you please share the definition of the progress variable that you’re trying to compute?

Regards,
Ray

Reply all
Reply to author
Forward
0 new messages