Heat capacity of species
Dears,
I am going to implement a new model for calculating viscosity that needs to heat capacity of each species. The new solver is based on reactingFoam. Is it possible to get heat capacity of all species in all computational cells of the domain? I used the following with no success. Code:
volScalarField cpi = composition.Cp(i,T); i is the label of species and Code:
basicMultiComponentMixture& composition = thermo.composition(); Hossein |
If you look at the documentation, the return value for the Cp is a single scalar, and the inputs are single scalars as well. To get Cp for a single field like this you will need to go through each species, and each cell, and calculate the mass weighted Cp.
Or you can use the cp function from the thermo class that does this already: Code:
volScalarField cp = thermo.cp(); |
Thanks Marco,
How can I go through each species? I'm using OF2.1.x. In the documentation of basicMultiComponentMixture.H we read: Code:
//- Heat capacity at constant pressure [J/(kg K)] Code:
YEqn.H:53:52: error: no matching function for call to ‘Foam::basicMultiComponentMixture::Cp(Foam::label&, const volScalarField&)’ Your second suggestion gives the heat capacity of each cell but not each species. Also, Code:
thermo.cp(); Code:
class Foam::hsCombustionThermo’ has no member named ‘cp’ |
I used the following to get the species' heat capacities:
In createFields: Code:
PtrList<volScalarField>& cpi = Y; Code:
forAll(T, cellI) |
Looks good to me.
|
All times are GMT -4. The time now is 09:42. |