CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   mass fractions to mol fractions (

arun May 18, 2011 10:21

mass fractions to mol fractions
Hi All,

I simulating combustion simulation using dieselEngineFoam, and I would like to get the output of mol fractions of pollutants such as CO, CO2, HC, NO at every CAD. Currently I manage to get the mass of the species at every CAD.

COAv << runTime.theta() << " " << fvc::domainIntegrate(composition.Y("CO")*rho).valu e() << endl;

Anyone can got any suggestion on how can I get the mol fractions?
Thanks in advance.


adhiraj May 18, 2011 15:48

Mass to mole fractions
I use OpenFOAM 1.7.1. As far as I see, you need to do the conversion yourself--possibly as a post processing step.

valikiut December 29, 2011 15:58

hello foamer

I want to simulate dual fuel diesel engine with OpenFOAM. Do I simulate this with dieselEngineFoam? If not, which solver I must use?
If I can use dieselEngineFoam, can I use (CH4) mass fraction in initial condition such as O2 and N2?
I want to calculate heat release rate (j/s), but in dieselEngineFoam output, dimension of dQ is (kg/(m^3*s)). How can I calculate heat release rate (j/s)? Do I have to change code?
Best Regards,

All times are GMT -4. The time now is 02:30.