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

thermo.rho() -= psi*p_rgh in buoyantPimpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 11, 2015, 00:18
Default thermo.rho() -= psi*p_rgh in buoyantPimpleFoam
  #1
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 10
wayne14 is on a distinguished road
Hi everyone,

I already have a good understanding of buoyantSimpleFoam, but in the pEqn.H of buoyantPimpleFoam, the following code makes it difficult to understand the logic of the solver:
Code:
// Thermodynamic density needs to be updated by psi*d(p) after the
    // pressure solution - done in 2 parts. Part 1:
    thermo.rho() -= psi*p_rgh;

    volScalarField rAU(1.0/UEqn.A());
    surfaceScalarField rAUf("rAUf", fvc::interpolate(rho*rAU));

    volVectorField HbyA("HbyA", U);
    HbyA = rAU*UEqn.H();

    surfaceScalarField phig(-rAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
Why we need thermo.rho() -= psi*p_rgh ?

Many thanks,
Yan Wang
wayne14 is offline   Reply With Quote

Old   November 21, 2015, 01:50
Default
  #2
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 10
wayne14 is on a distinguished road
Quote:
Originally Posted by wayne14 View Post
Hi everyone,

I already have a good understanding of buoyantSimpleFoam, but in the pEqn.H of buoyantPimpleFoam, the following code makes it difficult to understand the logic of the solver:
Code:
// Thermodynamic density needs to be updated by psi*d(p) after the
    // pressure solution - done in 2 parts. Part 1:
    thermo.rho() -= psi*p_rgh;

    volScalarField rAU(1.0/UEqn.A());
    surfaceScalarField rAUf("rAUf", fvc::interpolate(rho*rAU));

    volVectorField HbyA("HbyA", U);
    HbyA = rAU*UEqn.H();

    surfaceScalarField phig(-rAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
Why we need thermo.rho() -= psi*p_rgh ?

Many thanks,
Yan Wang

It seems that I have solved the question.
wayne14 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
Fan in buoyantPimpleFoam tommo97 OpenFOAM Running, Solving & CFD 2 January 12, 2016 16:23
buoyantPimpleFoam high Courant numbers lcbuijs OpenFOAM Running, Solving & CFD 5 March 23, 2015 04:35
buoyantPimpleFoam with thermalBaffle1D: strange temperature decrease donQi OpenFOAM Running, Solving & CFD 0 July 14, 2014 20:30
buoyantPimpleFoam Convergence Issues joel.lehikoinen OpenFOAM 1 December 5, 2013 14:58
Questions about buoyantPimpleFoam and rhoPimpleFoam Mojtaba.a OpenFOAM Running, Solving & CFD 6 August 1, 2012 04:50


All times are GMT -4. The time now is 10:56.