Hello everyone,
I am running a simple case with the combustion module on and i was wondering if there is any function present in the code to eventually convert the ym_fuel, ym_oxyd and ym_prod to the actual mass fractions of the components of the mixture (e.g., in the case of methane combustion, something like H2O and CO2 for the products).
I remember once reading about it in the documentation but i can't manage to find it back...
Thanks to everyone for the help,
Francesco
Mass fraction conversion with combustion module
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4220
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Mass fraction conversion with combustion module
Hello,
I am not sure this is in the documentation.
From converting some combustion routines from Fortran to C a few months ago, I recall some conversions which may be similar to your needs, at various levels in the code itself. You might find what you need when reading thermochemistry data (cs_combustion_read_data.cpp / colecd.f90), which can combine mass fractions with molar masses of the components.
Best regards,
Yvan
I am not sure this is in the documentation.
From converting some combustion routines from Fortran to C a few months ago, I recall some conversions which may be similar to your needs, at various levels in the code itself. You might find what you need when reading thermochemistry data (cs_combustion_read_data.cpp / colecd.f90), which can combine mass fractions with molar masses of the components.
Best regards,
Yvan
Re: Mass fraction conversion with combustion module
Hello,
I found a function called cs_combustion_gas_yg2xye that does partially what i wanted. I managed to call it correctly in my user subroutines but it doesn't actually give me the field of values but rather what i suppose being the average.
Is it me to not have understood correctly how the function works or what?
Thanks for the help,
Francesco
I found a function called cs_combustion_gas_yg2xye that does partially what i wanted. I managed to call it correctly in my user subroutines but it doesn't actually give me the field of values but rather what i suppose being the average.
Is it me to not have understood correctly how the function works or what?
Thanks for the help,
Francesco
-
- Posts: 4220
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Mass fraction conversion with combustion module
Hello,
This conversion function (and similar ones) are called in loops over all cells, so do not work over a full field, but only local values. You simply need to use it in a loop.
Best regards,
Yvan
This conversion function (and similar ones) are called in loops over all cells, so do not work over a full field, but only local values. You simply need to use it in a loop.
Best regards,
Yvan