CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to call inhomogeneousMixture.func() in XiFoam solver? (http://www.cfd-online.com/Forums/openfoam-solving/96535-how-call-inhomogeneousmixture-func-xifoam-solver.html)

chenhu January 25, 2012 07:02

How to call inhomogeneousMixture.func() in XiFoam solver?
 
Hello everyone!

I am currently working on the turbulent combustion (premixed and stratified) modelling, and I have some difficulties in openFOAM language programming.

I created a member function e.g. internalPhi() (which calculates the local equivalence ratio field) in the inhomogeneousMixture class. I need to visualize the Phi field in my solver (which is based on XiFoam or engineFoam), but I could not figure out how to call the inhomogeneousMixture class in XiFoam.

There are some hints in calling the member functions for turbulence model, e.g. in the createField.H

autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);

Then we can use "turbulence->k()" in the solver.

Another example is in createField.H
autoPtr<hhuCombustionThermo> pThermo
(
hhuCombustionThermo::New(mesh)
);

hhuCombustionThermo& thermo = pThermo();
Then we can use "thermo.rho()" in the solver.

But I couldn't find any example of creating a MixtureType (inhomogeneousMixture). Does anyone have idea about how to call inhomogeneousMixture.func() in XiFoam solver? Thanks!

Chen


All times are GMT -4. The time now is 17:34.