|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6 ![]() |
Hi all,
I wonder how I can get the partial pressure of a species to use it in a UDF? Is there a macro available to do this? Thanks for the advice! Kind regards, Anne-Sophue |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Khan
Join Date: Sep 2019
Location: India
Posts: 25
Rep Power: 6 ![]() |
for ideal gas,
density = (PM/RT). M is molecular weight. P = (density*RT)/M I guess the right hand side in above equation when multiplied by mass fraction of a species would give partial pressure of that species. species mass fraction is accessible in Fluent. Check Fluent manual on the particular macro available for the purpose. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
|
Partial pressure of a species is determined using pressure in the domain and mole fractions. Do note that partial pressure is affected by moles and not by mass. So, you have to convert mass fractions to mole fractions.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Khan
Join Date: Sep 2019
Location: India
Posts: 25
Rep Power: 6 ![]() |
mass divided by molecular weight gives molar quantities.
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6 ![]() |
Dear Khan and Vinerm,
Thank you so much for your help! This is what I conclude: molar mass of the mixture based on ideal gas law (with R=universal gass constant): real mm_mix=(C_R(c,t)*R*C_T(c,t))/C_P(c,t); mole fraction of water (with mm_h2o= molar mass of h2o): real molfr_h2o=C_YI(c,t,0)*(mm_mix/mm_h2o); partial pressure of h2o: real pw=molfr_h2o*C_P(c,t); Does that seem ok? |
|
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Khan
Join Date: Sep 2019
Location: India
Posts: 25
Rep Power: 6 ![]() |
I request you to verify this before using it, through simple example hand calculations:
Partial pressure of species 'i' in an ideal gas mixture = (density_mixture*R*Temp_mixture*mass fraction_species_i)/(Molecular weight of species_i) |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
|
If you have a binary mixture, then you can calculate it as
![]() where ![]()
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
![]() |
![]() |
![]() |
![]() |
#8 | |
New Member
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6 ![]() |
Quote:
Hi Khan, Thanks, but I don't really understand where this equation comes from. Could you explain this? And also, do you mean my conclusion was incorrect? Thanks for your time! |
||
![]() |
![]() |
![]() |
![]() |
#9 | |
New Member
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6 ![]() |
Quote:
Hi Vinerm, Thanks for this usefull equation. Unfortunately, my mixture contains CO2, h2o and air, so I have more than 2 components. In which way could I adapt the equation? And also, do you think my conclusion from the previous reply was incorrect? Thanks for your time! |
||
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
|
Then it won't work.
Yes, your calculation is correct. It would work. You can use your calculation for binary and you will find that it fits the equation I mentioned.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
![]() |
![]() |
![]() |
![]() |
#11 |
New Member
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6 ![]() |
Ok, thank you very much for all the help, Vinerm!
|
|
![]() |
![]() |
![]() |
![]() |
#12 | |
New Member
Khan
Join Date: Sep 2019
Location: India
Posts: 25
Rep Power: 6 ![]() |
Quote:
If you plug in values of first and second equations of yours into third one, what you get is my equation. So your conclusion is correct...! (caution: For the sake of confidence in your simulation, I urge you to verify this equation by simple examples) (mixture density * mass fraction of i) = mass of i / mixture volume; divide right hand side by molecular mass of i and you get (moles of i / mixture volume). multiply by RT (R is J/mol.K of mixture = Pa*m3/mol.K of mixture) and you get (moles of i / moles of mixture)* mixture pressure which is nothing but partial pressure of i. Regards. |
||
![]() |
![]() |
![]() |
![]() |
#13 | |
New Member
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6 ![]() |
Quote:
Yes, now I can see it too. Thank you so much for the help, Khan! |
||
![]() |
![]() |
![]() |
Tags |
macro, partial pressure, porous media, transient 2d |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Residuals and forces spiraling out of control before failing | edomalley1 | OpenFOAM Running, Solving & CFD | 3 | September 7, 2018 10:42 |
Getting divergence while increasing the back pressure at pressure outlet | greenfields15 | FLUENT | 0 | March 18, 2018 23:39 |
pisoFOAM (LES) - internal pipe flow - convergence | gu1 | OpenFOAM Running, Solving & CFD | 0 | January 11, 2018 16:39 |
"Pressure Inlet" Boundary Setup | Wijaya | FLUENT | 15 | May 18, 2016 10:08 |
Pressure BC for combustion chamber | Giuki | FLUENT | 1 | July 19, 2011 11:35 |