CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   BuoyantBoussinesq(Pimple/Piso)Foam, changed equation from OF 1.6 to 1.7 ??? (https://www.cfd-online.com/Forums/openfoam/80466-buoyantboussinesq-pimple-piso-foam-changed-equation-1-6-1-7-a.html)

myself September 27, 2010 10:37

BuoyantBoussinesq(Pimple/Piso)Foam, changed equation from OF 1.6 to 1.7 ???
 
Hi Folks,

one question regarding the changes from OF 1.6 to 1.7 in the buoyantBoussinesq(Piso/Pimple)Foam solver. I think the implementation of splitting the pressure according to p = p_rgh + rho*g.x is not fully correct.

The pressure equation in OF 1.7 seems OK, since in the Rhie-Chow formulation the contributions from the static pressure cancel and we are left with:
Code:

phi = (fvc::interpolate(U) & mesh.Sf())
        + fvc::ddtPhiCorr(rUA, U, phi);

surfaceScalarField buoyancyPhi = rUAf*ghf*fvc::snGrad(rhok)*mesh.magSf();
phi -= buoyancyPhi;

instead of
Code:

surfaceScalarField phiU
    (
        (fvc::interpolate(U) & mesh.Sf())
      + fvc::ddtPhiCorr(rUA, U, phi)
    );

    phi = phiU + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf());

in OF 1.6.

In contrast, in the momentum equation the term for the buoyancy ( and gravity) force has changed from (OF 1.6)
Code:

fvc::reconstruct( ...
                    fvc::interpolate(rhok)*(g & mesh.Sf())  ...)

to (OF 1.7)
Code:

fvc::reconstruct( ...
  - ghf*fvc::snGrad(rhok)*mesh.magSf() ...)

These are two different expressions: F ~ rhok * g vs. F ~ gradT * g.h

Is this really a bug or do I miss some point? Thanks for any comment...

Regards,
Jan


Edit:
In the meantime I am pretty sure this is indeed a bug and I submitted a bugreport.

Edit:
Problem is solved. This bug was fixed a few days ago in the git repository.

Anne Lincke July 28, 2011 05:21

Dear Foamers,
can someone explain me why OF1.7 still uses

HTML Code:

- ghf*fvc::snGrad(rhok)*mesh.magSf()
instead of

HTML Code:

fvc::interpolate(rhok)*(g & mesh.Sf())
as it was used in the previous version OF1.6.
I do not understand why the gradient of the densitiy is used while in the equations I find in literature it has to be just the densitiy multiplied with the constant g.
Can someone help me? Is this still a bug or do I overlook something?

Anne Lincke September 13, 2011 08:38

For the answer see

http://www.cfd-online.com/Forums/ope...implefoam.html

makaveli_lcf September 14, 2011 02:03

Quote:

Originally Posted by myself (Post 276790)
Hi Folks,

one question regarding the changes from OF 1.6 to 1.7 in the buoyantBoussinesq(Piso/Pimple)Foam solver. I think the implementation of splitting the pressure according to p = p_rgh + rho*g.x is not fully correct.

The pressure equation in OF 1.7 seems OK, since in the Rhie-Chow formulation the contributions from the static pressure cancel and we are left with:
Code:

phi = (fvc::interpolate(U) & mesh.Sf())
        + fvc::ddtPhiCorr(rUA, U, phi);

surfaceScalarField buoyancyPhi = rUAf*ghf*fvc::snGrad(rhok)*mesh.magSf();
phi -= buoyancyPhi;

instead of
Code:

surfaceScalarField phiU
    (
        (fvc::interpolate(U) & mesh.Sf())
      + fvc::ddtPhiCorr(rUA, U, phi)
    );

    phi = phiU + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf());

in OF 1.6.

In contrast, in the momentum equation the term for the buoyancy ( and gravity) force has changed from (OF 1.6)
Code:

fvc::reconstruct( ...
                    fvc::interpolate(rhok)*(g & mesh.Sf())  ...)

to (OF 1.7)
Code:

fvc::reconstruct( ...
  - ghf*fvc::snGrad(rhok)*mesh.magSf() ...)

These are two different expressions: F ~ rhok * g vs. F ~ gradT * g.h

Is this really a bug or do I miss some point? Thanks for any comment...

Regards,
Jan


Edit:
In the meantime I am pretty sure this is indeed a bug and I submitted a bugreport.

Edit:
Problem is solved. This bug was fixed a few days ago in the git repository.

Hallo Jan!

You wrote that the term in OF17 was formulated with an error, am I correct?

But still if i look OF171 (Ubuntu package installed via apt-get):

Code:

            UEqn
        ==
            fvc::reconstruct
            (
                (
                - ghf*fvc::snGrad(rhok)
                  - fvc::snGrad(p_rgh)
                )*mesh.magSf()
            )

Is this term still there? And how it should be?

Regards,
Alexander


All times are GMT -4. The time now is 01:58.