Skip to content

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

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

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

Conversation

@philipcardiff

@philipcardiff philipcardiff commented Aug 28, 2026

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 the solid discretisation order and holding everything else fixed:

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

The first row is the default scheme rather than highOrderCoeffs with polynomialOrder 1. Both are first order and give essentially the same answer, differing only through the stencil size, so only the default one is listed.

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.

Constitutive law

Flagging a discrepancy that predates this PR and is worth a decision. This case uses a compressible neo-Hookean law (neoHookeanElastic), which matches the deal.II participant (set Model = neo-Hookean) and the HronTurekFsi3 case that solids4foam ships. However, the original Turek-Hron benchmark specifies a St. Venant-Kirchhoff solid, and that is what the Nutils participant implements (S_ij = lambda E_kk delta_ij + 2 mu E_ij). So the three solid participants in this tutorial are not currently consistent with each other on the material model.

At the strain levels reached in FSI3 the two laws are very close, and the p = 3 result above lands within 0.35% of the benchmark amplitude, so this does not look like a source of error here. But if you would prefer the solids4foam case to follow the benchmark definition, StVenantKirchhoffElastic is a drop-in replacement in constant/mechanicalProperties with the same E/nu entries, and I am happy to re-run the 15 s case with it and post the comparison. Say the word and I will do that rather than leave it as a note in the README.

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
philipcardiff force-pushed the turek-hron-solids4foam branch from 0ed1d7f to 6c0fff1 Compare August 28, 2026 20:20
@MakisH MakisH self-assigned this Aug 29, 2026
philipcardiff and others added 2 commits September 2, 2026 10:01
The table previously showed the default (no highOrderCoeffs) scheme as
having no polynomial order. It is linear, i.e. p = 1, reached through its
own reconstruction rather than the generalised high-order machinery, so
the two first-order paths are now named explicitly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T8a3NJt7iPU6XJtqgFyZmR
This case uses a neo-Hookean law, matching the deal.II participant, while
the benchmark itself specifies St. Venant-Kirchhoff, as used by the Nutils
participant. Also notes that the first-order row of the polynomial-order
table uses the default scheme rather than highOrderCoeffs with
polynomialOrder 1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T8a3NJt7iPU6XJtqgFyZmR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants