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

Difference between pEqn.flux and fvc::snGrad(p)

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By sharonyue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 24, 2015, 23:17
Default Difference between pEqn.flux and fvc::snGrad(p)
  #1
Member
 
Ganesh Vijayakumar
Join Date: Jan 2010
Posts: 44
Rep Power: 16
ganeshv is on a distinguished road
If I had a pEqn defined as follows

fvScalarMatrix pEqn
(
fvm::laplacian(p)
);


Could some one tell me the difference between pEqn.flux() and fvc::snGrad(p) * mesh.magSf()

Here are some of the other threads I've seen in this regard.

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

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

I know about faceH, the simple/piso algorithm. However, if what I understand about them is right, there should be no difference between pEqn.flux() and fvc::snGrad(p) * mesh.magSf(). And yet there is. Why? Dr. Jasak says faceH is computed the way it is for consistency purposes. Could some one throw more light on this matter please.

ganesh
ganeshv is offline   Reply With Quote

Old   January 19, 2022, 06:13
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
For this simple case, it equals exactly to

fvc::snGrad(p) * mesh.magSf() * fvc::interpolate(rAU)

You just need to multiply 1/A.

I think the reason is that eqn.flux() is more effective, since it only needs to use the information of lduMatrix. When implicit advection plays a role, it is more effective.
Matt7 likes this.
__________________
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
sharonyue is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



All times are GMT -4. The time now is 08:25.