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

fvc::div() instead of fvc::flux()?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2014, 07:55
Default fvc::div() instead of fvc::flux()?
  #1
New Member
 
Join Date: Sep 2014
Posts: 15
Rep Power: 11
Franko is on a distinguished road
Hi!
Could anybody tell me, is there any difference between using these two solver's codes? Can I use the first code instead of the second code and vice versa? (Personally I think they have the same result):

So, the first code:
Code:
    surfaceScalarField phi ("phi", A);

    surfaceScalarField phiflux = fvc::flux(phi, B, "div(phi,B)");

     fvScalarMatrix sEqn
        (
              fvm::ddt(s) + fvc::div(phiflux)
        );    
     sEqn.solve();
and the second code:

Code:
     surfaceScalarField phi ("phi", A);

     fvScalarMatrix sEqn
      (
        fvm::ddt(s) + fvc::div(phi, B, "div(phi,B)")
      );
     sEqn.solve();
Franko is offline   Reply With Quote

Old   December 23, 2014, 11:11
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
The reason to use fvc::flux() MIGHT be to use flux limiter scheme. such as vanleer~

http://www.cfd-online.com/Forums/ope...interfoam.html
sharonyue 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
fvc::div for surfaceVectorField ARTem OpenFOAM Programming & Development 4 November 2, 2018 12:41
rho in fvc::flux santiagomarquezd OpenFOAM Running, Solving & CFD 0 February 29, 2012 13:31
flux limiter involving tensor : How to use fvc::flux() with volTensorField ? Cyp OpenFOAM Programming & Development 2 January 21, 2011 04:36
fvc::div() strange behaviour ivan_cozza OpenFOAM Running, Solving & CFD 2 February 6, 2010 06:09
What type return fvcdiv su_junwei OpenFOAM Running, Solving & CFD 6 October 13, 2008 07:09


All times are GMT -4. The time now is 14:34.