CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Partial pressure of a species

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2020, 05:47
Default Partial pressure of a species
  #1
New Member
 
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6
Anne-Sophie is on a distinguished road
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
Anne-Sophie is offline   Reply With Quote

Old   June 11, 2020, 08:20
Default
  #2
New Member
 
Khan
Join Date: Sep 2019
Location: India
Posts: 23
Rep Power: 6
Khan_CFD is on a distinguished road
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.
Khan_CFD is offline   Reply With Quote

Old   June 15, 2020, 04:01
Default Partial Pressure
  #3
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
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.
vinerm is offline   Reply With Quote

Old   June 15, 2020, 08:37
Default
  #4
New Member
 
Khan
Join Date: Sep 2019
Location: India
Posts: 23
Rep Power: 6
Khan_CFD is on a distinguished road
mass divided by molecular weight gives molar quantities.
Khan_CFD is offline   Reply With Quote

Old   June 15, 2020, 08:53
Default Solution?
  #5
New Member
 
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6
Anne-Sophie is on a distinguished road
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?
Anne-Sophie is offline   Reply With Quote

Old   June 15, 2020, 09:30
Default
  #6
New Member
 
Khan
Join Date: Sep 2019
Location: India
Posts: 23
Rep Power: 6
Khan_CFD is on a distinguished road
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)
Khan_CFD is offline   Reply With Quote

Old   June 15, 2020, 10:01
Default Partial pressure
  #7
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
If you have a binary mixture, then you can calculate it as

\frac{M_1P}{M_1+M_2(\frac{1}{y_2}-1)}

where y_2 is mass fraction of species named 2 and P is absolute pressure. This will return partial pressure for the species 2. M denotes molecular weight.
__________________
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.
vinerm is offline   Reply With Quote

Old   June 15, 2020, 10:26
Default
  #8
New Member
 
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6
Anne-Sophie is on a distinguished road
Quote:
Originally Posted by Khan_CFD View Post
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)

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!
Anne-Sophie is offline   Reply With Quote

Old   June 15, 2020, 10:29
Default
  #9
New Member
 
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6
Anne-Sophie is on a distinguished road
Quote:
Originally Posted by vinerm View Post
If you have a binary mixture, then you can calculate it as

\frac{M_1P}{M_1+M_2(\frac{1}{y_2}-1)}

where y_2 is mass fraction of species named 2 and P is absolute pressure. This will return partial pressure for the species 2. M denotes molecular weight.

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!
Anne-Sophie is offline   Reply With Quote

Old   June 15, 2020, 10:49
Default Partial Pressure
  #10
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
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.
vinerm is offline   Reply With Quote

Old   June 15, 2020, 10:50
Default
  #11
New Member
 
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6
Anne-Sophie is on a distinguished road
Ok, thank you very much for all the help, Vinerm!
Anne-Sophie is offline   Reply With Quote

Old   June 15, 2020, 20:17
Default
  #12
New Member
 
Khan
Join Date: Sep 2019
Location: India
Posts: 23
Rep Power: 6
Khan_CFD is on a distinguished road
Quote:
Originally Posted by Anne-Sophie View Post
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!
Now I see that your 3 equations and my one equation are the same.

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.
Khan_CFD is offline   Reply With Quote

Old   June 16, 2020, 02:42
Default
  #13
New Member
 
Anne-Sophie
Join Date: Feb 2020
Location: Belgium
Posts: 17
Rep Power: 6
Anne-Sophie is on a distinguished road
Quote:
Originally Posted by Khan_CFD View Post
Now I see that your 3 equations and my one equation are the same.

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.

Yes, now I can see it too. Thank you so much for the help, Khan!
Anne-Sophie is offline   Reply With Quote

Reply

Tags
macro, partial pressure, porous media, transient 2d


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -4. The time now is 15:35.