CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Problems with volScalarField (

niklas November 28, 2005 04:30

Why not? volScalarField pf =
Why not?
volScalarField pf = pow(10,25.0)*pow(max(0.0, alpha - alphaMax), 10.0);

different results?
does the pf field differ or what do you mean?


alberto November 28, 2005 14:42

I'm still working on twoPhaseE
I'm still working on twoPhaseEulerFoam to make granular pressure, radial distribution functions, and frictional stress models runtime selectable.

The problem happens with frictional stress models, where pf is the frictional pressure.

If I use the first piece of code, I get solution singularity at the second time step due to an abnormal value in the granular pressure, which is related to pf.
If I use the second piece of code, the calculation goes on regularly.
However, it seems the initialization of the pf field has some effect. I mean the forAll cycle doesn't seem to overwrite all initial values also in the second piece of code.


alberto November 28, 2005 17:05

You were right. The problem wa
You were right. The problem was that I forgot the Foam::max(alpha-alphaMax, 0.0).

Thank you again

P.S. How are you?

Alberto :-)

All times are GMT -4. The time now is 14:23.