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/)
-   -   Don't understand solver's behaviour (http://www.cfd-online.com/Forums/openfoam-solving/113178-dont-understand-solvers-behaviour.html)

galap February 14, 2013 05:44

Don't understand solver's behaviour
 
Hello guys,

today I'm facing a problem, which I can't explain. I have done a dummy calculation for a variable f. f is set everywhere to 1 (boundary/internal). Nevertheless OpenFOAM calculates values differing from 1. Can anyone explain that behaviour to me? Thank you very much in advance.


I have a normal transport equation for variable f:

Code:

    f_(
        IOobject
        (
            "f",
            mesh.time().timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    ),

dimensions [0 0 0 0 0 0 0];

Boundary and internal values all set to 1.

Code:

  multivariateSurfaceInterpolationScheme<scalar>::fielTable fields;
    fields.add(f);

    tmp<fv::convectionScheme<scalar> > convection
    (
        fv::convectionScheme<scalar>::New
        (
            mesh_,
            fields,
            phi,
            mesh_.divScheme("div(phi,f)")
        )
    );


So again keep in mind, for testing purpose I set all values to 1. Now I'm trying to solve the following equations:
Code:

Info << "fmin/max  = " << min(f_).value() << ", " << max(f_).value() << endl;;

tmp<fvScalarMatrix> fEqn
(
    fvm::ddt(rho, f_)
    +  convection->fvmDiv(phi, f_)
    -  fvm::laplacian(turbulence_->alphaEff(), f_)
);
fEqn().relax();

solve(fEqn == rho* fSource);

fSource is set to 0.

Code:

Info << "fmin/max  = " << min(f_).value() << ", " << max(f_).value() << endl;;
The Output is:

f min/max = 1, 1
f min/max = 0.90082369, 1.1320949




Schemes:

laplacian(alphaEff,f) Gauss linear corrected;
div(phi,f) Gauss upwind;

RASModel kEpsilon;

galap February 14, 2013 06:05

solver used:

solver PBiCG;
preconditioner DILU;
tolerance 1e-7;
relTol 0.01;


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