Repository navigation
Fix bubbleColumn tutorial setup (initial bubble and closed box) - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two setup errors in
Tutorial/bubbleColumnthat made it differ from test case 2 of Hysing et al. (2009). Every benchmark number reported before this PR came from the incorrect setup.1. The initial bubble was not a circle at (0.5, 0.5)
setFieldsDictusedcylinderToCellwithp1 (0.25 0.5 -1)andp2 (0.75 0.5 1). That axis is tilted in the x-z plane, so its cut through the one-cell-thick mesh was an ellipse:The bubble is now set with
setAlphaField(type cylinder, origin (0.5 0.5 0), direction (0 0 1), radius 0.25,invert true). It integrates the volume fraction exactly in each cut cell. The initial water fraction is now 0.901877, within 0.05% of the exact bubble area.2. The box was not closed
outlet, withfixedValuep_rgh while U was fixed at zero. Flow could therefore pass through it.zeroGradientp_rgh, which does not cancel the gravity and surface-tension flux on wall faces.All three boundaries are now walls with
fixedFluxPressure, as in the benchmark. The top patch is renamedtop, andpRefCell/pRefValueare set in PIMPLE. The wall flux is now exactly zero.Results with the corrected setup
Test case 2 on OpenFOAM v2606, compared with the reference codes from Hysing et al., Table XVI:
curvatureFrom/propertiesFrom volumeFraction, the solver reproduces stockinterFoamto four digits on 1/h = 80. The level-set coupling stays closer to TP2D after the first maximum: the centre of mass at t = 3 is 20.6 mm below TP2D, against 24.0 mm.The README table is updated to these numbers, with a note that earlier results came from the incorrect setup.