Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 381
    • Issues 381
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #2457
Closed
Open
Created May 05, 2022 by Johan Roenby@johan_roenbyDeveloper

BUG: isoAdvection not conserving volume of fluid across cyclic boundaries

Summary

isoAdvection not conserving volume of fluid across cyclic boundaries.

Steps to reproduce

  1. Execute the Allrun script in $FOAM_TUTORIALS/multiphase/interIsoFoam/discInConstantFlowCyclicBCs

  2. Extract "Phase-1" volume from log:

grep "Phase-1" log.interIsoFoam | cut -d' ' -f5 > Phase1

  1. Run gnuplot in the terminal and show data:

    plot "Phase1"

In the figure you will see the Phase-1 content in the domain change when the blob travels through the cyclic boundaries

Possible fixes

Reason for wrong behaviour: IsoAdvection creates a surfaceScalarField dVf which is the Phase-1 volume crosing a face in the time deltaT. dVf on a face uses the isoface information in its UPWIND cell. This also goes for boundary faces where fluid flows OUT of the domain. For boundary faces on which fluid flows INTO the domain isoAdvection does nothing because it assumes that the alpha1 boundary condition specifies how much of the incoming fluid that is Phase-1 and Phase-2, respectively.

Solution: At this point in the code - i.e. after havng set dVf on a downwind boundary face - check if the face is on a cyclic patch. If it is, set the same dVf value on the corresponding face of the coupled patch.

To solve this, I need to do a little digging into the functionality of cyclic related code. I will definitely do this before v2206. But if someone is up for fixing it before then, be my guest.

Edited May 10, 2022 by Johan Roenby
Assignee
Assign to
Time tracking