CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Getting the quantities of the species as a field for further post processing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 6, 2021, 13:19
Default Getting the quantities of the species as a field for further post processing
  #1
TL-
New Member
 
Join Date: Apr 2021
Posts: 4
Rep Power: 5
TL- is on a distinguished road
Hey all,

I am simulating a chemical reaction with rhoReactingFoam and I want to calculate my rate of conversion. To be able to do so I need a new field with the molar quantities of my species. So far I've only found a way to display the molar fractions.

Is there a way to create a new output with the moles of my species?

Thanks in advance
TL- is offline   Reply With Quote

Old   October 6, 2021, 13:36
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 730
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Reaction rates can be obtained in post-processing.

I posted a list of quantities that can be obtained in post-processing in What is Object Registry in OpenFOAM? Item #9

Good luck, D.
dlahaye is offline   Reply With Quote

Old   October 7, 2021, 02:20
Default
  #3
TL-
New Member
 
Join Date: Apr 2021
Posts: 4
Rep Power: 5
TL- is on a distinguished road
Thanks for your reply. Unfortunately I'm not looking for a way to get the reaction rates but the conversion of my reaction system. Do you know a way to do that in OpenFOAM or paraview?
TL- is offline   Reply With Quote

Old   October 8, 2021, 06:56
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 730
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
How is this conversion defined?
dlahaye is offline   Reply With Quote

Old   December 20, 2021, 12:04
Default
  #5
TL-
New Member
 
Join Date: Apr 2021
Posts: 4
Rep Power: 5
TL- is on a distinguished road
Rate of conversion ist defined as X = \frac{n_{A,0} - n_A}{n_{A,0}}


If someone stumbles upon this post in search for an answer:
I rewrote the rate of conversion to the following form:
X_{i} = \frac{\dot n_{i,in} - \dot n_{i,out}}{\dot n_{i,in}} = \frac{\frac{\dot m_{i,in}}{M_{i}} - \frac{\dot m_{i,out}}{M_{i}}}{\frac{\dot m_{i,in}}{M_{i}}} =  \frac{\dot m_{i,in} - \dot m_{i,out}}{\dot m_{i,in}} =  \frac{\dot m_{in} \cdot w_{i,in} - \dot m_{out} \cdot w_{i,out}}{\dot m_{in} \cdot w_{i,in}}

To get the massflow of each species I needed to do some post processing (which can be directly added to the controlDict for further cases). To get the overall mass flow I used the post processing functions:

postProcess -func "flowRatePatch(name=inlet)
postProcess -func "flowRatePatch(name=outlet)

This provides me with an overview of my inlet and outlet massflow.

To optain the mass fractions of each species I used paraView. As the desired mesh region I checked inlet or outlet respectively and used the integrateVariables filter. There I checked "Divide Cell Data by Volume" property. This outputs the mass fraction of each species in the inlet/ outlet stream.

I used the makro feature of paraView to implement all of this in python code, which saves the values over time inside a .csv file for further use.
TL- is offline   Reply With Quote

Reply


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
problems after decomposing for running alessio.nz OpenFOAM 7 March 5, 2021 04:49
Run time post processing vs Post run post processing pruthvi1991 OpenFOAM Post-Processing 1 February 19, 2015 14:15
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
post processing unsteady species transport solomon FLUENT 0 October 25, 2003 17:44


All times are GMT -4. The time now is 17:45.