CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   thermo model - where is R() defined? (https://www.cfd-online.com/Forums/openfoam/79092-thermo-model-where-r-defined.html)

OMN August 12, 2010 04:53

thermo model - where is R() defined?
 
Hello

I am writing a new thermo class to model the mixture of two gases, for example air (itself a mixture) and methane.

I think I have understood how to define it, but I have trouble understanding how to link the scalar used to transport the methane specie, called Y in the 0 directory, to the properties of the methane specie defined in the thermophysicalProperties file.

What I have done is the following:
1) Added the following
makeBasicMixture
(
multiComponentMixture,
constTransport,
hConstThermo,
perfectGas
);
to the file basicMixtures.C

2) Added the following
Y_
(
IOobject
(
“Y”,
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
),
to the file basicThermo.C

3) Created a new perfectGas directory, called speciesPerfectGas, and changed the calculation of psi to the following:
inline scalar speciesPerfectGas::psi(scalar, scalar T, scalar Y) const
{
return 1.0/((R()*(1-Y) + R_Y*Y)*T);
}


I have tried to find where R() is calculated, to know how to define R_Y in the previous code, but I can't find it. Would someone know that please?

Is there an example of multiComponentMixture somewhere?

Cheers

Olivier

Chris Lucas August 18, 2010 03:07

Hi,

have a look at the class specie in the folder "thermophysicalModels/specie/specie"

Regards,
Christian

OMN August 18, 2010 04:31

Thank you Christian!

Cheers

Olivier

carowjp June 21, 2011 20:08

multiComponentMixture
 
Hello Olivier,

I am working on a similar feature. Would you be willing to share your implementation? :D

thank you and best regards,

James

OMN June 24, 2011 01:43

implementation
 
Yes of course James.

Have you got an email?

regards

Olivier

carowjp June 24, 2011 07:45

implementation
 
My email is:

james dot p dot carow at wmich dot edu

Thank you Olivier and have a good weekend!

James


All times are GMT -4. The time now is 08:10.