CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   compressible scalar transport euqation (

Chrisi1984 September 22, 2010 10:35

compressible scalar transport euqation
Hi all,

I added three scalar transport equations to my compressible solver like this:


fvScalarMatrix w4Eqn
fvm::ddt(rho, w4)
+ fvm::div(phi, w4)
- fvm::laplacian(turbulence->muEff(), w4)


Info<< "Phase 1 mass fraction = "
<< w4.weightedAverage(mesh.V()).value()
<< " Min(w4) = " << min(w4).value()
<< " Max(w4) = " << max(w4).value()
<< endl;
My species are all the same material (air), so I thought I need not change something in the energy equation hEqn. I only want to track air flow through different inlets in my flow.

As long as my temperatures don't differ very much in my flow, I am getting proper results. But when I get regions with higher or lower temperatures, then the sum of my species exceeds 1 in the hot regions, where rho is small. In the colder regions, where rho is high, the sum of my species is too small.

So there might be a problem with the coupling of the transport equations with the energy equation.

I know that in other Solvers like rhoReactingFoam there is applied a multivariant scheme (mvConvection) to couple the energy equation with the species transport. But I thought if my species are all the same this is unnecessary.

Can anyone help me to solve my problem or has anyone any experience with similar problems?

Thanks in advance!

Best regards Chrisi

Chrisi1984 October 18, 2010 05:17


perhabs someone will once have a similar problem.

Here is the solution for my problem:

I changed the interpolation schemes and than everything was all right:


default linear;
div(U,p) upwind phi;
div(U,rho) upwind rho;
div(U,h) upwind h;
Regards Chrisi

All times are GMT -4. The time now is 13:21.