CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Continuity errors

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 23, 2020, 14:25
Default Continuity errors
  #1
New Member
 
Jagan Mohan
Join Date: Dec 2019
Location: New York
Posts: 26
Rep Power: 6
jagan1mohan is on a distinguished road
Hello fiends, foamLog creates three text files for continuity equation in openFOAM.


1. What is the difference between local, global and cumulative continuity errors?



How to judge convergence, (besides residuals from governing equations solved)?


Thank you,
Jagan Mohan
jagan1mohan is offline   Reply With Quote

Old   June 24, 2020, 16:53
Default
  #2
Senior Member
 
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 220
Rep Power: 19
tas38 is on a distinguished road
For incompressible flows:

Code:
volScalarField contErr(fvc::div(phi));

    scalar sumLocalContErr = runTime.deltaTValue()*
        mag(contErr)().weightedAverage(mesh.V()).value();

    scalar globalContErr = runTime.deltaTValue()*
        contErr.weightedAverage(mesh.V()).value();
    cumulativeContErr += globalContErr;

    Info<< "time step continuity errors : sum local = " << sumLocalContErr
        << ", global = " << globalContErr
        << ", cumulative = " << cumulativeContErr
        << endl;
Local appears to be:

\Delta t \frac{\sum_i V_i |\nabla \cdot \phi_i| }{\sum_i V}

Global:

\Delta t \frac{\sum_i V_i \nabla \cdot \phi_i }{\sum_i V}

and cumulative is the sum of the global continuity error over the total number of time steps.
tas38 is offline   Reply With Quote

Old   October 16, 2020, 17:10
Default time step continuity errors for "sum local" and "global"
  #3
New Member
 
Mahdi
Join Date: May 2020
Posts: 10
Rep Power: 6
M.Davoodi is on a distinguished road
Hi everyone,

Lately I have been working on an algorithm for a two-phase solver to couple the pressure and velocity fields. The method is Similar to PC_SIMPLE algorithm if you have heard about it (something like a phase coupled SIMPLE algorithm) ….

I believe that I have modified the pEqn.H file correctly, but I feel I am missing something obvious somewhere, as once I look at the time step continuity errors, my local error is always much larger than the global error:

"
time step continuity errors for sum local = 1.74033576902e-07, global = -9.93993329672e-21, cumulative = -8.2037380338e-16

"

Interestingly, the simulation doesn't diverge but my local error never gets smaller than 1e-7 which is a bit odd for me.

Does anyone have any idea why this might be happening? I have a feeling that it should be something small and obvious that I am missing here ….

Cheers,
Mahdi
M.Davoodi is offline   Reply With Quote

Reply

Tags
continuity convergence


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
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 46 March 6, 2022 14:21
LES, Courant Number, Crash, Sudden Alhasan OpenFOAM Running, Solving & CFD 5 November 22, 2019 03:05
decompose dependent solution arionfard OpenFOAM 3 December 10, 2018 10:36
InterFoam negative alpha karasa03 OpenFOAM 7 December 12, 2013 04:41
AMI interDyMFoam for mixer nu problem danny123 OpenFOAM Programming & Development 8 September 6, 2013 03:34


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