|
[Sponsors] |
November 21, 2015, 15:50 |
+ or - pEqn().flux()?
|
#1 |
New Member
Algis Dziugys
Join Date: Apr 2015
Posts: 10
Rep Power: 11 |
Hi,
Why for some cases pEqn().flux() are subtracted, as for example: phi = phiHbyA - pEqn().flux()as in applications\solvers\incompressible\simpleFoam\pEq n.H, while for other cases are added, as for example phi = phiHbyA + pEqn().flux()as in applications\solvers\compressible\rhoSimpleFoam\pE qn.H? Thanks in advance, |
|
November 21, 2015, 20:06 |
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
If your pressure laplacian has a minus sign (-), then it's
phi = phiHbyA + pEqn().flux() This is the case in compressible solvers. For incompressible solvers, the pressure laplacian has a positive sign and it's phi = phiHbyA - pEqn().flux() Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
November 22, 2015, 05:28 |
|
#3 |
New Member
Algis Dziugys
Join Date: Apr 2015
Posts: 10
Rep Power: 11 |
Thank you very much.
|
|
November 22, 2015, 09:38 |
|
#4 |
Senior Member
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11 |
Hi,
what is flux() function in phi -= pEqn.flux() ? thank u. |
|
November 23, 2015, 01:00 |
does the + or - depend on how the pEqn is declared?
|
#5 | |
Member
Karelke Yu
Join Date: Dec 2014
Posts: 96
Rep Power: 12 |
Quote:
i wonder if the + or - operation depends on how the pEqn is declared. i mean for the incompressible solver pimpleFoam, the pEqn is Code:
fvScalarMatrix pEqn ( fvm::laplacian(rAUf, p) == fvc::div(phiHbyA) ); Code:
phi = phiHbyA - pEqn.flux(); Code:
fvScalarMatrix pEqn ( fvm::laplacian(rAUf, p) - fvc::div(phiHbyA) ); Code:
fvScalarMatrix pEqn ( - fvm::laplacian(rAUf, p) + fvc::div(phiHbyA) ); another question, for the shallowWaterFoam, the "pEqn" is Code:
fvScalarMatrix hEqn ( fvm::ddt(h) + fvc::div(phiHbyA) - fvm::laplacian(ghrAUf, h) ); Code:
phi = phiHbyA + hEqn.flux(); thanks very much for your valuable time. best, karelke |
||
Tags |
peqn.flux() |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Difference between pEqn.flux and fvc::snGrad(p) | ganeshv | OpenFOAM Programming & Development | 1 | January 19, 2022 06:13 |
phi -= pEqn.flux() vs. linearInterpolate(U) & mesh.Sf() | santiagomarquezd | OpenFOAM Programming & Development | 33 | October 15, 2019 11:24 |
phi == pEqn.flux() rhoSimpleFoam | David1 | OpenFOAM Programming & Development | 0 | July 9, 2015 11:10 |
pEqn.flux() | cheng1988sjtu | OpenFOAM Running, Solving & CFD | 4 | November 21, 2012 16:08 |
pEqn.flux() | ata | OpenFOAM | 2 | January 24, 2011 23:31 |