View Issue Details

IDProjectCategoryView StatusLast Update
0004032OpenFOAMBugpublic2023-10-31 08:50
ReporterZSW_EC_SIM Assigned Towill  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformServer/LinuxOSRed Hat Enterprise LinuxOS Version8
Product Version11 
Summary0004032: fvModels massSource with negative mass flow rate don't have an effect on species equation
DescriptionThe solver module used was MulticomponentFluid.

Chemical reactions are described by positive and negative mass sources, e.g. in a gas mixture of O2, H20 and N2 a positive mass source is defined for H20 and a negative mass source for O2. In the case of a positive mass source term in fvModels, mass and species mass fractions are correctly adjusted. In case of a negative term only the mass changes as expected. In OpenFOAM-10 both negative and positive mass sources have an effect on the species mass fraction.
Steps To Reproduce1. Define a multi-component pipe flow with at least two species and a mass fraction at the inlet, e.g. of 0.5/0.5.
2. Define a negative mass source for one species (mass fraction = 1) in the fvModels domain.
3. Run the case
4. Mass fractions remain unchanged
5. But the mass fraction should change accordingly.
6. An example case is prepared and attached
Additional InformationThe reason why it does not work should be related to recent changes within the fvModel massSource. There has been a change to make the mass sink implicit. The simulation results are as expected when using the OpenFOAM-10 implementation.
TagsNo tags attached.

Activities

ZSW_EC_SIM

2023-10-27 11:53

reporter  

will

2023-10-31 08:50

manager   ~0013150

The massSource model is not intended or recommended to be used for representing chemical reactions. We have combustion modelling for that. Even if you did want to use an fvModel, you shouldn't start from massSource. Reactions conserve mass, so you only need to create sources of the species fractions (and heat). Not of density.

However, as it happens, what you want **is** actually available now in dev.

https://github.com/OpenFOAM/OpenFOAM-dev/commit/171101d1e539c24cec3c75e8aa4192aa5fbfb4fc

Your species source condition can be `uniformFixedValue` if you want it to be fully explicit, `internal` if you want it fully implicit, or `uniformInletOutlet` if you want it to switch based on the flow rate direction like it does in version 11.

Even so, don't do this. Use a combustion model, or make an fvModel that just changes the species fractions and the heat.

Issue History

Date Modified Username Field Change
2023-10-27 11:53 ZSW_EC_SIM New Issue
2023-10-27 11:53 ZSW_EC_SIM File Added: OpenFOAM-11-massSource.zip
2023-10-31 08:50 will Assigned To => will
2023-10-31 08:50 will Status new => closed
2023-10-31 08:50 will Resolution open => no change required
2023-10-31 08:50 will Note Added: 0013150