FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add a solids4foam solid participant to turek-hron-fsi3 by philipcardiff · Pull Request #915 · precice/tutorials · GitHub

Add a solids4foam solid participant to turek-hron-fsi3 - #915

Draft
philipcardiff wants to merge 3 commits into
precice:developfrom
philipcardiff:turek-hron-solids4foam
Draft

Add a solids4foam solid participant to turek-hron-fsi3#915
philipcardiff wants to merge 3 commits into
precice:developfrom
philipcardiff:turek-hron-solids4foam

Conversation

Copy link
Copy Markdown
Contributor

Important

Draft: blocked on precice/openfoam-adapter#417 ("Support reading Stress in solid participants"). This case cannot run until that adapter change is released, and the reference-results tarball cannot be generated until it reaches the system-test images. Marking ready for review once #417 is merged.

Summary

Adds a solids4foam solid participant to turek-hron-fsi3, adapted from the HronTurekFsi3 benchmark that solids4foam ships. This is a natural fit: solids4foam maintains its own version of this benchmark, so the tutorial gains a cross-check against the deal.II and Nutils participants.

  • Neo-Hookean, nonlinear-geometry total-Lagrangian solid model, PETSc SNES, alpha stabilisation.
  • Material properties match the deal.II case: E = 5.6 MPa, nu = 0.4, rho = 1000 kg/m³.
  • 630-cell beam (105 x 6), patches renamed to interface / fixed / frontAndBack to match the repo's conventions.
  • The interface patch uses the solids4foam solidTraction boundary condition, whose tractionField option consumes the solidTraction volVectorField that the adapter fills.

Results

Full 15 s run (15000 time windows), fluid on 20 MPI ranks, solid serial. Flap-tip y-displacement over the settled limit cycle (t = 8 to 15 s), against the Turek-Hron FSI3 benchmark value of uy = 1.48 +/- 34.38 mm:

mean [mm] amplitude [mm] amplitude error
benchmark 1.48 34.38
this case (polynomialOrder 3) 1.47 34.50 +0.35%

Choice of polynomial order

Since the high-order (polynomial reconstruction) discretisation is a cost/accuracy knob, I ran the full 15 s simulation three times, changing only polynomialOrder and holding everything else fixed:

polynomialOrder amplitude [mm] amplitude error mean error solid solver cost end-to-end runtime
(no highOrderCoeffs) 32.59 -5.2% -2.2% 1.0x 1.00x
2 33.34 -3.0% -2.2% 1.8x 0.96x
3 (used here) 34.50 +0.3% -0.4% 3.2x 1.03x

Accuracy improves monotonically with order. The solid solver is genuinely 3.2x more expensive at p=3 (solid CPU time 5023 s -> 15913 s), but the end-to-end runtime is essentially unchanged, because in this tutorial the fluid participant dominates and the extra solid work hides behind the coupling. Wall-clock times were 28594 s, 27315 s and 29345 s respectively — within the noise of other jobs sharing the node.

I therefore propose polynomialOrder 3, but the trade-off is documented in the README and switching is a one-line edit, so please say if you would rather ship a cheaper solid. Note that polynomialOrder 2 is both cheaper and more accurate than no high-order reconstruction at all, so the plain low-order option is dominated.

One observation independent of the solid settings: all three variants give an oscillation frequency of 5.50-5.64 Hz against the benchmark's 5.3 Hz. Since polynomial order does not move it, that offset comes from the fluid side or the coupling rather than the solid discretisation.

Tested with OpenFOAM v2606, preCICE 3.4.1, solids4foam (development) and the OpenFOAM adapter from precice/openfoam-adapter#417.

Notes

  • Requires solids4foam v2.4 or later built with PETSc, and an OpenFOAM-preCICE adapter with support for reading Stress in solid participants.
  • The reference-results tarball still needs to be generated; the tests/tests.yaml entry already points at the expected path.
  • This PR and Add a solids4foam solid participant to elastic-tube-3d #914 / the multiple-perpendicular-flaps PR each add an entry to the solids4foam test suite in tests/tests.yaml, so whichever merges last will need a trivial rebase there.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SBFTMffUN7qDigrDQrPVb2

philipcardiff and others added 3 commits August 28, 2026 11:14
The case is adapted from the HronTurekFsi3 benchmark shipped with
solids4foam: a neo-Hookean, nonlinear-geometry total-Lagrangian solid model
solved with PETSc SNES, with the same material properties as the deal.II
case (E = 5.6 MPa, nu = 0.4, rho = 1000).

The interface patch uses the solids4foam solidTraction boundary condition,
whose tractionField option consumes the solidTraction volVectorField that
the adapter fills.

Requires an OpenFOAM-preCICE adapter with support for reading Stress in
solid participants, and solids4foam built with PETSc.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBFTMffUN7qDigrDQrPVb2
…ds4foam

Matches the settings used in breaking-dam-2d (PR precice#912): nonlinear-geometry
total-Lagrangian model with polynomial-reconstruction high-order
discretisation, alpha stabilisation and the PETSc SNES solution algorithm.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBFTMffUN7qDigrDQrPVb2
Measured over the settled limit cycle of the full 15 s simulation against
the Turek-Hron FSI3 benchmark value, comparing no high-order reconstruction,
polynomialOrder 2 and polynomialOrder 3.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBFTMffUN7qDigrDQrPVb2
philipcardiff force-pushed the turek-hron-solids4foam branch from 0ed1d7f to 6c0fff1 Compare August 28, 2026 20:20
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL