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

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

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

Reply
 
LinkBack Thread Tools 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: 4
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, 12:11
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 743
Rep Power: 9
sharonyue is on a distinguished road
The reason to use fvc::flux() MIGHT be to use flux limiter scheme. such as vanleer~

About the gammaEqn in interFoam
sharonyue is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
rho in fvc::flux santiagomarquezd OpenFOAM Running, Solving & CFD 0 February 29, 2012 14:31
fvc::div for surfaceVectorField ARTem OpenFOAM Programming & Development 0 March 16, 2011 05:18
flux limiter involving tensor : How to use fvc::flux() with volTensorField ? Cyp OpenFOAM Programming & Development 2 January 21, 2011 05:36
fvc::div() strange behaviour ivan_cozza OpenFOAM Running, Solving & CFD 2 February 6, 2010 07: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 07:29.