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

rhoCentralFoam: Diffusion correction scheme?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By schuyler

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 30, 2016, 17:35
Default rhoCentralFoam: Diffusion correction scheme?
  #1
Member
 
W. Schuyler Hinman
Join Date: Apr 2013
Location: Calgary, Alberta, Canada
Posts: 38
Rep Power: 12
schuyler is on a distinguished road
Can someone please direct me to a good literature resource on diffusion correction predictor corrector scheme? I am having difficulty with understanding the one implemented in rhoCentralFoam.

I am doing extensive analysis using OpenFOAM, and rhoCentralFOAM in my research. Some of this analysis requires post-processing the transport equations themselves (the details of why are not important for my inquiry). This means regenerating the equations used by the solver. I am having some trouble understanding the implementation.

When I compare the corrector equation (below) to the equation from Greenshields:

Quote:
solve
(
fvm::ddt(rho, U) - fvc::ddt(rho, U)
- fvm::laplacian(muEff, U)
- fvc::div(tauMC)
);
I can't see how this matches the actual equation. In the Greenshields paper ((Link to paper), Equation 19 does not indicate to me a need for both the implicit AND explicit ddt(rho,U) terms.

Similarly in the energy equation, both an implicit and explicit term are included.

Some explanation from those wiser than I would be hugely appreciated.

Schuyler
granzer likes this.
schuyler is offline   Reply With Quote

Old   November 18, 2016, 23:41
Default
  #2
Senior Member
 
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 10
usv001 is on a distinguished road
Hi there,

The 'fvc::ddt(rho,U)' implicit term is the remnant of the predictor step. This is how I understand it.

The predictor step solves for:
Code:
fvm::ddt(rhoU) + fvc::div(phiUp) == 0
So, the results from this step correspond to the following with an updated U from the predictor step:
Code:
 - fvc::ddt(rho*U) = fvc::div(phiUp)
Now, they are reintroducing the flux term 'fvc::div(phiUp)' through an updated '- fvc::ddt(rho*U)'. So, when you combine the predictor and corrector steps, you get the correct equation, which should be the case.

Please correct me if I'm wrong, though.

USV
usv001 is offline   Reply With Quote

Old   November 19, 2016, 12:58
Default
  #3
Member
 
W. Schuyler Hinman
Join Date: Apr 2013
Location: Calgary, Alberta, Canada
Posts: 38
Rep Power: 12
schuyler is on a distinguished road
Completely forgot about this post!

Thanks for the reply! Yeah I figured this out while studying for my PhD candidacy exam.

The predictor is:

Code:
 solve(fvm::ddt(rhoU) + fvc::div(phiUp));
(viscous term omitted)

Then the corrector is:

Code:
            solve
            (
                fvm::ddt(rho, U) - fvc::ddt(rho, U)
              - fvm::laplacian(muEff, U)
              - fvc::div(tauMC)
            );
The corrector equation is the complete momentum equation. But instead of calculating the flux and the pressure gradient explicitly, they calculate: -fvc::ddt(rho, U) - fvm::laplacian(muEff, U) which is equivalent to div(phiUp) - using the predicted velocity field. Therefore the Navier-Stokes are recovered.


Schuyler
schuyler is offline   Reply With Quote

Old   November 19, 2016, 21:22
Default
  #4
Senior Member
 
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 10
usv001 is on a distinguished road
No problem.

Do you happen to know why they include the viscous term sigmaDotU in the predictor step of the energy equation? Isn't this supposed to be the inviscid predictor step? I am not able yo reconcile the fact that they are interpolating the U in this term using:
Code:
a_pos*U_pos + a_neg*U_neg
where a_pos and a_neg are calculated based on the eigenvalues of the Euler equations (U+c, U-c).

I was able to follow the calculation of phi, phiUp and phiEp as the implementation of the Kurganov flux scheme but this little piece above threw me off. I think I'm missing something important here.

USV
usv001 is offline   Reply With Quote

Old   November 20, 2016, 18:57
Default
  #5
Member
 
W. Schuyler Hinman
Join Date: Apr 2013
Location: Calgary, Alberta, Canada
Posts: 38
Rep Power: 12
schuyler is on a distinguished road
Quote:
Originally Posted by usv001 View Post
No problem.

Do you happen to know why they include the viscous term sigmaDotU in the predictor step of the energy equation? Isn't this supposed to be the inviscid predictor step? I am not able yo reconcile the fact that they are interpolating the U in this term using:
Code:
a_pos*U_pos + a_neg*U_neg
where a_pos and a_neg are calculated based on the eigenvalues of the Euler equations (U+c, U-c).

I was able to follow the calculation of phi, phiUp and phiEp as the implementation of the Kurganov flux scheme but this little piece above threw me off. I think I'm missing something important here.

USV
Good question. I think it is because it is a "diffusion correction scheme". The sigmadotU term (while it is a viscous term) is not a diffusive term in the energy equation it's a work term.

I'm not sure if I totally understand the other part of the question... but the a_pos and a_neg are the flux weighting factors calculated by Equation 9 in the rhoCentralFoam paper (linked in my original post).

Hopefully I was helpful.

Schuyler
schuyler is offline   Reply With Quote

Old   November 22, 2016, 04:05
Default
  #6
Senior Member
 
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 10
usv001 is on a distinguished road
Thanks Schuyler.

This has given me a new way of thinking about it.

USV
usv001 is offline   Reply With Quote

Reply

Tags
code, ddt, ddtscheme, predictor corrector, rhocentralfoam


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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
numerical scheme without artificial diffusion artifact mpeti OpenFOAM Running, Solving & CFD 2 October 26, 2011 11:36
Expert-param:: Cht diffusion scheme PCFD CFX 4 July 12, 2010 13:49
pressure correction scheme vs density based scheme PCFD Main CFD Forum 0 May 18, 2009 15:57


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