How to get partial pressure of oxygen?
Hello World.
Can anybody tell me how I can access the partial pressure of a species / componente? In my case I need the partial pressure of oxgen! Cheers. S. |
i too need the same!
|
Quote:
pi=C_P(c,t)*gas_molar_fraction where, pi is the partial pressure, C_P(c,t) gets the mixed gas pressure. gas_molar_fraction is the mole fraction of a species in the mixture, which can be calculated by - first summing up [mass fraction / molecular weight] of all species and - then dividing the same quotient for the individual species by the calculated sum. This is done automatically by the following function call (including variables and preparation): Material *mix_mat = mixture_material(Get_Domain(1)); Material *spe_mat = NULL; real all_mass_fracts[MAX_SPE_EQNS]; real all_mole_fracts[MAX_SPE_EQNS]; int i = -1; mixture_species_loop(mix_mat, spe_mat, i) { all_mass_fracts[i] = C_YI(c,t,i); } Mole_Fraction(mix_mat, all_mass_fracts, all_mole_fracts) After this, the mole fractions of all species can be found in the array "all_mole_fracts". |
Great, Thank you.
This leads me to the question to determine which position in the array corresponds to which species? Any idea how I can know this? |
Quote:
If the list in the Fluent is : O2, CO, CO2......, then all_mass_fracts[0] means the mass fraction of O2, all_mass_fracts[1] means that of CO , and so on. |
Quote:
And how do I know the actual list? |
Ok. I put this so far into my code
Code:
Material *mixtureMaterial = mixture_material(Get_Domain(1)); But there is one - right after Mole_Fraction( ... ). So what may be wrong? |
How to get partial pressure of oxygen?
Hi,
Well, as new member in OpenFoam (days of experience in OpenFoam) I would say using dsmcFoam (Direct simulation Monte Carlo (DSMC) solver for 3D, transient, multi- species flows) might help Back in my Fluent experience, you have to use the Multiphase model and depends to the nature of component (mixture, Eulerian or VOF) will works fine. Looks the same approach is working in OpenFoam: -compressibleInterFoam: Solver for 2 compressible, isothermal immiscible fluids using a VOF (volume of fluid) phase-fraction based interface capturing approach, ) More could be find at Standard solvers: http://www.openfoam.com/features/standard-solvers.php |
Quote:
Maybe you have mixed up your answers ...:) |
Quote:
I want to have my species' partial pressure but the problem is that I have back flow in my simulating.(I simulate a 2D bubble column). so the static pressure that I recive from (c_P()) is negetive in some cells. do you think using the absolute of static pressure is ok? my codeis becom: Po2= abs(C_P(c,t))*mol_fraction_o2 |
Quote:
LIBRARY: CEL: EXPRESSIONS: kconst=Arr*((CH4.p)^0.47)*((H2O.p)^0.01) END END END LIBRARY: CEL: EXPRESSIONS: Arr= 0.390 [mol s^-1 Pa^-0.46] END END END LIBRARY: CEL: EXPRESSIONS: Eact = 43200 [J mol^-1] END END END LIBRARY: CEL: EXPRESSIONS: Rate= kconst* e^(-Eact/R/T) END END |
All times are GMT -4. The time now is 16:23. |