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 6
    • Merge requests 6
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #2360
Closed
Open
Created Feb 10, 2022 by Tobias Holzmann@THO

Bug in activePressureForceBaffleVelocity boundary condition

Summary

The activePressureForceBaffleVelocity boundary condition calculates the pressure difference between the two blocked cyclic patches in a wrong matter if we use a NONE forced-based approach because the weighting area is wrong. The set-up for such a boundary condition is as follows:

  • two cyclic patches
  • duplicate the two cyclic patches and merged them together to get one patch -> blocking wall

In the updateCoeffs function of the activePressureForceBaffleVelocity condition, we first calculate the force at the cyclic (master) patch and subtract the force at the cyclic (slave) patch. This force difference gets divided by the patch area which is the wall-patch (the wall patch has the master and slave area; so it's double as large as a single cyclic patch). The result is, the BC condition does not open at the user-defined threshold but rather when we reached the doubled delta value.

I found this issue a while ago while creating this case: https://holzmann-cfd.com/community/training-cases/tank-with-safety-valve ; same behavior for the OpenFOAM tutorial: $FOAM_TUTORIALS/combustion/PDRFoam/flamePropagationWithObstacles

Steps to reproduce

Download either the case I provided on my website or use the tutorial case and check the output of the log -> activation is not given within the specified threshold.

Example case

https://holzmann-cfd.com/community/training-cases/tank-with-safety-valve $FOAM_TUTORIALS/combustion/PDRFoam/flamePropagationWithObstacles

What is the current bug behaviour?

Wrong area (division) is used in the calculation of the dp calculation and hence, the BC condition does not switch its behavior when we reach the user-defined threshold.

What is the expected correct behavior?

The condition should switch its behavior after the user-defined threshold is reached.

Relevant logs and/or images

Environment information

  • OpenFOAM version : v2106 and v2112
  • Operating system : Ubuntu 21.04
  • Hardware info : Not relevant
  • Compiler : Not relevant

Possible fixes

Correct the used area for NONE forced-based calculations. Patch attached - additionally I added some more information to the output (for transparency reasons)

Code line which is wrong: https://develop.openfoam.com/Development/openfoam/-/blob/master/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C#L278

0001-BUG-activePressureForceBaffleVelocity-wrong-area-in-.patch

Edited Feb 10, 2022 by Tobias Holzmann
Assignee
Assign to
Time tracking