Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 454
    • Issues 454
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Merge requests
  • !598

ENH: forces: avoid redundant volumetric operations

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Kutalmış Berçin requested to merge feature-forces-fo-performance into develop Mar 21, 2023
  • Overview 1
  • Commits 2
  • Changes 57

Problem

It has been observed that employing the forces and forceCoeffs function objects in several simulations causes a slowdown ranging from 2 to 10%.

The culprits found were:

  • Calculation of velocity gradient
  • Redundant calculations performed for various internal fields

Solution

  • It is recommended to cache 'grad(U)' whenever using forces and forcesCoeffs function objects.
  • The recent commits have eliminated unnecessary computations for the internal field of devRhoReff.
    • Tests using the simpleCar tutorial ('grad(U)' was cached) produced the following 'profiling' figures: image
    • Tests using an industrial case ('grad(U)' was cached) reduced the functionObjects.execute() from ~72[s] to ~23[s].

Meta-data

  • EP2065
  • linux64ClangDPInt32Opt (clang13)
  • linux64GccDPInt32Opt
  • linux64GccSPDPInt64Debug
  • Alltest: No new error/No change in existing output
  • No output change in all operating conditions (e.g. direct force intensity, porosity, compressible flows etc.)
Edited Apr 28, 2023 by Kutalmış Berçin
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: feature-forces-fo-performance