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

massSource of specie i into the domain

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 19, 2022, 12:29
Default massSource of specie i into the domain
  #1
New Member
 
NuclearLeaf's Avatar
 
Mario Zuber
Join Date: Apr 2018
Location: Zurich
Posts: 5
Rep Power: 8
NuclearLeaf is on a distinguished road
Hello all,

I am attempting to add a massSource term via fvModels to my domain. This massSource term is to be of the specie O2. My inlet is of specie CH4 at 2e-8 kg/s. The entire domain, inlet, wall BC are all at 1273 K). Chemistry/combustion is turned off

I run into issues when I add O2 as a massSource term. I currently have it set up like this within fvModels:


Code:
massSource
{
    type            massSource;

    selectionMode   all;
    
    massFlowRate    4e-8; 

    fieldValues
    {
        O2                1.0;
        CH4                0.0;
        H2O                0.0;
        CO2                0.0;
        CO                0.0;
        H2                0.0;
        T                1273;
        U                (0 0 0); 
    }
}
With this selection I notice two main things:
1. The temperature increases up to 20 K in the domain
2. The mass balance, nor the mass fractions are correct. For one, one should expect Y_CH4 = 0.33 but it is equal to 0.38. Also the total mass at the outlet is 6.7e-8 (determined via Calculator>ExtractBlock>IntegrateVariables with equation 'U_X*p*0.016/8.314/T*CH4+U_X*p*0.032/8.314/T*O2'). The CH4 component=1.57e-8, and the O2 component=5.14e-8. The CH4 component results in a mass fraction of 0.23 which doesn't match the 0.38 taken from the contour plot, so leads me to believe I may be doing something wrong here as well.
EDIT UPDATE: when using postProcess -func "patchFlowRate(name=outlet, patch =outlet)" -latestTime, I get the correct 6e-8 value at the outlet for phi. So something in the logic to get 6.7e-8 was wrong.


It's important to note that I do not run into these issues when I select CH4 as the massSource. Then the mass balance is correct and there are no temperature fluxes. My thought is that it has something to do with the mass fractions and how this is interpreted as a source.

Am I overlooking something, are my selected parameters even possible?

Other info
- openfoam9
- reactingFoam solver
- laminar
- cylindrical domain modeled as axisymmetric (i.e. wedge)
- thermophysicalProperties (perfectGas)
- default species is AR (i.e. argon). Changing the default specie has no effect
- a massSource value smaller than the inlet value has no effect
- forcing the U to be equal to the cell's current value (i.e. not zero) has no effect


First post on here, so let's see how it goes, all help is appreciated

Last edited by NuclearLeaf; July 20, 2022 at 14:12. Reason: new information, namely patchFlowRate
NuclearLeaf is offline   Reply With Quote

Old   July 21, 2022, 10:08
Default
  #2
New Member
 
NuclearLeaf's Avatar
 
Mario Zuber
Join Date: Apr 2018
Location: Zurich
Posts: 5
Rep Power: 8
NuclearLeaf is on a distinguished road
When I switch the transport type from sutherland to const this effect went away.
That is, the mass fraction at the outlet is 0.33 as expected. So the mass fraction and mass balance (see 'EDIT UPDATE') are resolved.


I still see a temperature increase of roughly 100 K. Is this really enthalpy of mixing, even though I have ideal gases?



I need to do some more research into the reason behind both effects but thought I'd share for now

Last edited by NuclearLeaf; July 22, 2022 at 09:40.
NuclearLeaf is offline   Reply With Quote

Old   July 25, 2022, 12:24
Default
  #3
New Member
 
NuclearLeaf's Avatar
 
Mario Zuber
Join Date: Apr 2018
Location: Zurich
Posts: 5
Rep Power: 8
NuclearLeaf is on a distinguished road
okay, so I totally misinterpreted the fieldValues of massSource


A field value of T=1273 K implies an energy source addition equivalent to the current cell at 1273 K. So if that cell contains CH4 this energy source is for CH4 and not the O2 mass source.


For now, to fix this problem, as I'm dealing solely with O2 I made and edited a new 'o2Source' file to ensure I add an energy source equivalent to O2 at 1273 K


wishing my coding skills were better right about now...
NuclearLeaf is offline   Reply With Quote

Reply

Tags
fvmodels, masssource, openfoam, species


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
FOAM FATAL IO ERROR: Unknown rhoThermo type rupak504 OpenFOAM Running, Solving & CFD 1 November 22, 2021 02:40
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 17, 2020 00:44
Can I achieve better convergence? sheaker CFX 12 September 19, 2019 16:36
Turbomachinery Mass imbalance sheaker CFX 12 September 5, 2019 09:09
Closed Domain Buoyancy Flow Problem Madhatter92 CFX 6 June 20, 2016 22:05


All times are GMT -4. The time now is 13:18.