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/)
-   -   Combustion: species mass fraction's boundary conditions (https://www.cfd-online.com/Forums/openfoam-solving/144721-combustion-species-mass-fractions-boundary-conditions.html)

wenxu November 20, 2014 03:36

Combustion: species mass fraction's boundary conditions
 
1 Attachment(s)
Hello,everyone.
Now i'm confused with the bc's settings.
Yes, I did get some idea with the pressure,velocity boundary conditions' setting. But now i simulate the coal combustion using coalChemistryFoam, and i have 5 species----CH4,CO2,O2,H2O,N2.So i should give the initial boundary conditions about all of the five species! Yes, the mass fraction of CH4, N2,O2 we already know and the max mass fraction of the products(CO2,H2O) we can also calculate. But how can we set the initial bc for the products(CO2,H2O) in the 0 folder of the boundaryField?

PS:my idea:
  • FIRST:we can calculate the products,they are both zero. And the mass fraction on the wall we should set zeroGradient.
  • SECOND:we should set all of the mass fractions of the products to zeroGradient.(coalChemistryFOAM's case set so)But i get the wrong results(the mass fractions may be even more than one!!! ) see attachment.(the read zone is wall)
PPS:This is the log of the second idea(all zeroGradient):
fieldMinMax minmaxdomain output:
Quote:

fieldMinMax minmaxdomain output:
min(p) = 99993.59018 at position (0.1423067276 -0.001535889177 0.03909566513) on processor 44
max(p) = 100057.9441 at position (-0.02876601796 -0.002455007867 -0.001637763298) on processor 0
min(U) = (0.06182562838 -0.1727735702 -0.1362042887) at position (0.0001134475403 0.003433916957 0.002707307613) on processor 1
max(U) = (10.3040291 0.1706661933 0.180937736) at position (0.01405634631 0.001614694091 0.001754794808) on processor 11
min(CO2) = 9.581539903e-05 at position (0.00743049293 -0.0001740311583 0.001975430551) on processor 7
max(CO2) = 0.5842633195 at position (0.0001132140144 -0.0001908260622 -0.004868588846) on processor 1
min(H2O) = 9.657048485e-05 at position (0.00743049293 -0.0001740311583 0.001975430551) on processor 7
max(H2O) = 0.4783360027 at position (0.0001132140144 -0.0001908260622 -0.004868588846) on processor 1
min(N2) = 0 at position (0.0005711025294 -0.0002650978475 -0.006771420691) on processor 1
max(N2) = 0.76 at position (-0.03 -0.002963781571 -0.0001174455029) on processor 0

we can see that the total max fraction of H2O and CO2 has been more than 1. They locate at the same place both at the wall.-------so...what should we do ?

ARTem November 20, 2014 05:01

Hello, wenxu.

You should set mass fractions of products in the following way (according to OpenFOAM syntax):
initialValue uniform 0;
inlet: fixedValue uniform 0;
walls: zeroGradient;
outlet: you can go with zeroGradient, but I prefer in a case with reverse flow
type inletOutlet;
inletValue uniform 0;
value uniform 0;
its mathematical description is:
\frac{\partial Y_i}{\partial n} = 0 if outflow
Y_i = 0 if inflow
All this is according to physics: products can be generated inside a computational domain by chemistry (the source term in the transport equation), but not by flowing through boundaries (the convection and diffusion terms in the transport equation).

wenxu November 20, 2014 06:55

Thank you,Artem. Your answer is so clearly and powerful.I got that.regards,
wen


All times are GMT -4. The time now is 21:32.