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

fvc::flux(a,b,scheme) and -fvc::flux(-a,b,scheme) 's difference

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By schröder

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 24, 2015, 06:29
Default fvc::flux(a,b,scheme) and -fvc::flux(-a,b,scheme) 's difference
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
Hi guys,

In twoPhaseEulerFoam's alpha code. we have:
Code:
surfaceScalarField alphaPhic1
            (
                fvc::flux
                (
                    phic,
                    alpha1,
                    alphaScheme
                )
              + fvc::flux
                (
                    -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),
                    alpha1,
                    alpharScheme
                )
            );
Shouldn't it be the same with:

Code:
surfaceScalarField alphaPhic1
            (
                fvc::flux
                (
                    phic,
                    alpha1,
                    alphaScheme
                )
              + fvc::flux
                (
                    fvc::flux(phir, scalar(1) - alpha1, alpharScheme), //no minus minus here!
                    alpha1,
                    alpharScheme
                )
            );
Is there some tricky to do this in OpenFOAM? for some numerical considerations?

Thanks guys!!!
sharonyue is offline   Reply With Quote

Old   April 24, 2015, 06:51
Default
  #2
New Member
 
Martin S.
Join Date: Apr 2015
Posts: 9
Rep Power: 11
schröder is on a distinguished road
It may be the same for some schemes.
At least for upwind schemes -flux(-phi)!=flux(phi).
EngMec likes this.
schröder is offline   Reply With Quote

Old   April 24, 2015, 08:04
Default
  #3
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
Quote:
Originally Posted by schröder View Post
It may be the same for some schemes.
At least for upwind schemes -flux(-phi)!=flux(phi).
Um, quite clear....a good hint. haha. Let me dig it deeper. thanks.
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
rho in fvc::flux santiagomarquezd OpenFOAM Running, Solving & CFD 0 February 29, 2012 14:31
flux limiter involving tensor : How to use fvc::flux() with volTensorField ? Cyp OpenFOAM Programming & Development 2 January 21, 2011 05:36


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