CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

buoyantPimpleFoam's equations.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2015, 12:53
Default buoyantPimpleFoam's equations.
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
Hello guys,

Right now Im working on buoyant driven force flow. I have a miner confusion about the equations implemented in buoyantPimpleFoam.

We know that:

rho1 = rho0 + psi*(p1-p0)
= rho0 + psi*(p_rgh1 - p_rgh0 + rho1 g h - rho0 g h) // neglected?

But in the code, it is:

rho1 = rho0 + psi*(p_rgh1 - p_rgh0)

Code:
fvScalarMatrix p_rghDDtEqn
    (
        fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
      + fvc::div(phiHbyA)
      ==
        fvOptions(psi, p_rgh, rho.name())
    );
Anybody knows the reason of neglecting the last two terms?

Thanks


Update:

Its neglected. more info:
http://www.openfoam.org/mantisbt/view.php?id=1772#c5033
__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html

Last edited by sharonyue; July 2, 2015 at 11:42.
sharonyue is offline   Reply With Quote

Old   September 11, 2019, 12:29
Default Another question on buoyantPimpeFoam's pEqn
  #2
Member
 
Jost Kemper
Join Date: Apr 2018
Location: Kiel, Germany
Posts: 39
Rep Power: 8
Jost K is on a distinguished road
Hi All,

I realize this thread is a bit old and the issue seems to be resolved by now.
However, I have a much related question and since the title of the thread is kept quite broad I hope its okay to post this here:

I'm having trouble understanding what buoyantPimpleFoam's pEqn does with the reference pressure (pRef) in an incompressible case.
The pressure equation is solved setting a reference pressure for p_rgh:
Code:
p_rghEqn.setReference
    (
        pRefCell,
        compressible ? getRefCellValue(p_rgh, pRefCell) : pRefValue
    );
(This is pEqn.H line 48-52 [OF-v1812])

This is in line with standard pimpleFoam for the incompressible case.
(okay so far)
But then, after caculating p from p_rgh...

Code:
p = p_rgh + rho*gh;
(This is pEqn.H line 73 [OF-v1812])

...they go ahead and change p again (if the reference pressure is used)

Code:
if (p_rgh.needReference())
{
    if (!compressible)
    {
        p += dimensionedScalar
        (
            "p",
            p.dimensions(),
            pRefValue - getRefCellValue(p, pRefCell)
        );
    }
    else
    {
        p += (initialMass - fvc::domainIntegrate(psi*p))
            /compressibility;
        thermo.correctRho(psi*p - psip0);
        rho = thermo.rho();
        p_rgh = p - rho*gh;
    }
}
else
{
    thermo.correctRho(psi*p - psip0);
}
(This is pEqn.H line 78-101 [OF-v1812])

Why do they do that?
Is pRef meant to be a reference value for p or for p_rgh now?
How can they accept, that p is inconsistent with p_rgh (in the sense that p != p_rgh + rho*gh)? And if that's fine, why did they choose a different path for bouyantSimpeFoam, where they do "p_rgh = p - rho*gh;" afterwards?

I would really appreciate if somebody could explain this to me.

Cheers,
Jost
Jost K is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide: Writing Equations in LaTeX on the CFD Online Forums pete Site Help, Feedback & Discussions 27 May 19, 2022 04:19
how to implement k-epsilon equations in ADI method kiamey Main CFD Forum 2 July 17, 2014 18:13
modelling Differential equations in a udf RikardMNorén Fluent UDF and Scheme Programming 2 October 1, 2013 04:36
Riemann invariants of adjoint equations of shallow water equations zqb0929 Main CFD Forum 0 March 15, 2012 01:54
CFD governing equations m.gos Main CFD Forum 0 April 30, 2011 15:21


All times are GMT -4. The time now is 04:20.