CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Sum of mass fractions is zero for species 6(NO NH3 O2 CO2 N2 H2O) (https://www.cfd-online.com/Forums/openfoam-solving/233463-sum-mass-fractions-zero-species-6-no-nh3-o2-co2-n2-h2o.html)

Davyd January 28, 2021 09:20

Sum of mass fractions is zero for species 6(NO NH3 O2 CO2 N2 H2O)
 
5 Attachment(s)
Hello.
I am trying to do simulation of the gas-solid fluidized bed catalytic reactor. For this purpose I use tutorial reactingTwoPhaseEulerFoam--->laminar--->fluidisedBed. However, since it does not contain any files responsible for chemistry, I use chemistry files from combustion tutorial--->chemFoam--->h2. Of course I have modified them according to my case (reaction, species, conditions).
When I start simulation I get the ERROR described below, however it seems that I have defined the mole fractions for species. You can find the files responsible for chemistry attached to this thread.
Please, if someone knows how to overcome this issue, give me your advice. Thank you for your help!!!
Best,
Davyd.


/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : _f3950763fe-20191219 OPENFOAM=1912
Arch : "LSB;label=32;scalar=64"
Exec : reactingTwoPhaseEulerFoam
Date : Jan 28 2021
Time : 15:44:49
Host : LAPTOP-LTH2ON9V
PID : 1922
I/O : uncollated
Case : /mnt/c/Users/David/Downloads/OpenFOAM/OpenFOAM-v1912/RUN/fluidisedBed_REACTING_comb_h2
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: no residual control data found. Calculations will employ 3 corrector loops


Reading g

Reading hRef
Creating phaseSystem

Selecting twoPhaseSystem interfaceCompositionPhaseChangeTwoPhaseSystem
Selecting phaseModel for particles: purePhaseModel
Selecting diameterModel for phase particles: constant
Selecting thermodynamics package
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleInternalEnergy;
}

Calculating face flux field phi.particles
Selecting turbulence model type RAS
Selecting RAS turbulence model phasePressure
phasePressureCoeffs
{
preAlphaExp 500;
expMax 1000;
alphaMax 0.62;
g0 1000;
}

Selecting phaseModel for air: reactingPhaseModel
Selecting diameterModel for phase air: isothermal
Selecting thermodynamics package
{
type heRhoThermo;
mixture reactingMixture;
transport sutherland;
thermo janaf;
equationOfState perfectGas;
specie specie;
energy sensibleEnthalpy;
}

Selecting chemistryReader chemkinReader


--> FOAM FATAL ERROR:
Sum of mass fractions is zero for species 6(NO NH3 O2 CO2 N2 H2O)

From function void Foam::multiComponentMixture<ThermoType>::correctMa ssFractions() [with ThermoType = Foam::sutherlandTransport<Foam::species::thermo<Fo am::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy> >]
in file lnInclude/multiComponentMixture.C at line 64.

FOAM exiting

HosamAlrefaie August 31, 2021 10:09

Hi Davyd, did find how to add the mass fractions of the species?

I am using multiComponentMixture with buoyantSimpleFoam, but I don't know where to add the mass fractions.

houss August 15, 2022 13:18

hello!

i am facing the same issue with reactingFoam? have you guys been able to overcome the problem?

houss August 15, 2022 15:29

for those who may encounter the problem :

the initial value of the internalField of one of the specie files (CH4, CO2 O2 N2 or H2O) must be set to one. Same thing for the initial value at the outlet
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 1;
}

senammoises April 9, 2024 20:58

Quote:

Originally Posted by houss (Post 833842)
hello!

i am facing the same issue with reactingFoam? have you guys been able to overcome the problem?

hey did you find the solution? I'm facing the same problem with reactingFoam

senammoises April 9, 2024 20:59

Quote:

Originally Posted by houss (Post 833854)
for those who may encounter the problem :

the initial value of the internalField of one of the specie files (CH4, CO2 O2 N2 or H2O) must be set to one. Same thing for the initial value at the outlet
outlet
{
type inletOutlet;
inletValue uniform 0;
value uniform 1;
}

I did that but it didn't work

Krapf April 10, 2024 04:01

Quote:

Originally Posted by senammoises (Post 867456)
hey did you find the solution? I'm facing the same problem with reactingFoam

Is it possible for you to upload your case? If not, then please upload the files in the 0 folder (with the information about which species you are using).

senammoises April 10, 2024 08:43

2 Attachment(s)
Quote:

Originally Posted by krapf (Post 867476)
is it possible for you to upload your case? If not, then please upload the files in the 0 folder (with the information about which species you are using).

Attachment 99341

Attachment 99342

Krapf April 10, 2024 10:10

For "inletPilot" and "inletAir", the values for "value" must add up to 1 and for "outlet", the values for "inletValue" must add up to 1.

senammoises April 10, 2024 10:36

Quote:

Originally Posted by Krapf (Post 867511)
For "inletPilot" and "inletAir", the values for "value" must add up to 1 and for "outlet", the values for "inletValue" must add up to 1.

thank you!! It worked!!!

One more question:

I starting to use reactingFoam and now successfully I inputed a new reaction, started from the Sandia tutorial. Now I want to change the geometry.

Which steps should I follow to change the geometry?

I already have the mesh (a .unv file).

thank you once again

Krapf April 11, 2024 04:06

There is the command "ideasUnvToFoam" (I have never used it): https://www.openfoam.com/documentati...UnvToFoam.html.
But if you don't know how to use your own geometry, you might want to take a step back and look at tutorials first (you can find some here, for example: https://wiki.openfoam.com/Tutorials).


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