CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Incompressible div(U) validation errors

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 25, 2020, 19:21
Default Incompressible div(U) validation errors
  #1
New Member
 
F.B.
Join Date: Mar 2020
Posts: 3
Rep Power: 6
steampunc is on a distinguished road
Thanks in advance for the potential help. I'm relatively new to OpenFoam, so I'm really sorry if this is a stupid mistake. I can't seem to find the same problem online, but I've been searching for a couple days.

I've been trying to apply some diagnostic/validation tests to incompressible pimpleFoam configurations and have been finding some anomalous results.

For any incompressible fluid, div(U) should be 0 or very near it. From what I understand, the pimpleFoam solver uses the div(U) -> 0 condition as it solves the pressure field, and it certainly seems to be doing that, because in each step the time continuity errors are very small (order 10^-17 or so). However, when I use funkySetFields/postProcess to compute the div(U) field at a given logged time, the values are much larger (on order 1 or even larger). I've tried it on my own configurations, along with several of the pimpleFoam/pisoFoam tutorials, and all of them result in large div(U) fields.

To compute the field, I've been using these commands:

Code:
 funkySetFields -time 0: -create -field divU -expression "div(U)"
and
Code:
postProcess -func "div(U)"
From what I understand, postProcessing (and funkySetFields?) uses the same divergence schemes as OpenFoam itself, so I'm confused why it's so large. I'm almost completely certain it's due to user error, but it seems like such a simple test that there's not much room for it to go wrong.

I've been using a Gaussian divergence scheme with linear interpolation in system/fvSchemes for div(U).

Attached are some images of the div(U) field in different pimpleFoam tutorial cases in paraView.









Also, here are some excerpts of logs from the pimpleFoam runner on channel395:
Code:
PIMPLE: iteration 1
smoothSolver:  Solving for Ux, Initial residual = 0.0117778, Final residual = 5.81593e-06, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0603226, Final residual = 2.72548e-06, No Iterations 3
smoothSolver:  Solving for Uz, Initial residual = 0.0585004, Final residual = 2.7339e-06, No Iterations 3
Pressure gradient source: uncorrected Ubar = 0.1335, pressure gradient = 2.76228e-05
GAMG:  Solving for p, Initial residual = 0.146204, Final residual = 0.0126411, No Iterations 1
time step continuity errors : sum local = 1.14563e-05, global = -8.27789e-20, cumulative = -2.0927e-18
Pressure gradient source: uncorrected Ubar = 0.1335, pressure gradient = 2.76872e-05
GAMG:  Solving for p, Initial residual = 0.0163918, Final residual = 4.2532e-07, No Iterations 5
time step continuity errors : sum local = 4.5834e-10, global = -1.12784e-19, cumulative = -2.20548e-18
Pressure gradient source: uncorrected Ubar = 0.1335, pressure gradient = 2.76392e-05
ExecutionTime = 14.27 s  ClockTime = 14 s

fieldAverage fieldAverage1 write:
    Calculating averages

Courant Number mean: 0.30284 max: 0.540451
Time = 5.4

PIMPLE: iteration 1
smoothSolver:  Solving for Ux, Initial residual = 0.0118056, Final residual = 5.80108e-06, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0603712, Final residual = 2.65463e-06, No Iterations 3
smoothSolver:  Solving for Uz, Initial residual = 0.0584964, Final residual = 2.67235e-06, No Iterations 3
Pressure gradient source: uncorrected Ubar = 0.1335, pressure gradient = 2.76884e-05
GAMG:  Solving for p, Initial residual = 0.146366, Final residual = 0.0127159, No Iterations 1
time step continuity errors : sum local = 1.15734e-05, global = -1.22909e-19, cumulative = -2.32839e-18
Pressure gradient source: uncorrected Ubar = 0.1335, pressure gradient = 2.77468e-05
GAMG:  Solving for p, Initial residual = 0.0165409, Final residual = 5.45694e-07, No Iterations 5
time step continuity errors : sum local = 5.65104e-10, global = -1.5652e-20, cumulative = -2.34404e-18
Pressure gradient source: uncorrected Ubar = 0.1335, pressure gradient = 2.76982e-05
ExecutionTime = 14.61 s  ClockTime = 15 s

fieldAverage fieldAverage1 write:
    Calculating averages

Courant Number mean: 0.302862 max: 0.539102
Time = 5.6
steampunc is offline   Reply With Quote

 

Tags
divergence free, pimplefoam


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
[solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend" bigphil OpenFOAM CC Toolkits for Fluid-Structure Interaction 686 December 22, 2022 09:10
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 16, 2019 23:12
[OpenFOAM] Take derivative of mean velocity in paraFoam hiuluom ParaView 13 April 26, 2016 06:44
InterFoam negative alpha karasa03 OpenFOAM 7 December 12, 2013 03:41
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33


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