OpenFOAM: forces measured during the solve, dotted fields, the cell count of the mesh used - #23
Merged
Merged
Conversation
…ith dots includeFunc <response> is the controller's second own step: one line, #includeFunc <response>, in the functions of the node's copy of system/controlDict, so the solver measures the response while it solves. A force measured after the solve (<solver> -postProcess) sees the walls a rotating zone (MRF) turns at rest - OpenFOAM moves them only inside the solve - and misses the torque by an order of magnitude and its sign. The recipe rules take one response name, never under MPI, with a solve after it; the case rules take only a response of the task. A response field may carry dots, as phases are named (alpha.water); never a colon, since a probe writes one file per field. Patches and names stay words. SUPPORTED-INPUTS.md says the one line the node may add, when and why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A snapped case reported the background mesh blockMesh made (5,000 cells for 185,237): the first log with a count won, and snappyHexMesh words its count as "Snapped mesh : cells:N". The count now comes from the note OpenFOAM writes into every owner header (the latest time's mesh, else constant's; the processor meshes summed for a decomposed solve), else from the last count a step's log reports, snappyHexMesh's mesh lines included and its ideal layer count left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…node's copy
The runner does includeFunc in-process, like restore0Dir: one line at the
end of the last top-level functions block of the node's copy of
system/controlDict (a block of its own when there is none), never inside a
comment, a string, a #{ #} code block or a nested dictionary; the file's
bytes and line endings kept. A functions entry that is not a block fails
the step with its line and the copy unchanged. log.includeFunc says what
was added, where and why.
The kit oracle holds it on a Couette flow the MRF turns: the torque
measured during the solve is the closed form to 0.3 %; the same response
measured by simpleFoam -postProcess is +23.2 against -1.68.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host validates a case's recipe with the Model its module bundles; a recipe with the node's includeFunc step must pass the plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three findings of the OpenFOAM demo walk, fixed on the node side.
A force is measured during the solve (OpenFOAM.Model 1.4.0, OpenFOAM 1.1.0). A force measured after the solve (
<solver> -postProcess) sees the walls a rotating zone (MRF) turns at rest - OpenFOAM moves them only inside the solve - and the torque of a Couette flow came back ~118 times too large and of the wrong sign, with a green run. The node gains a second own step,includeFunc <response>: one line,#includeFunc <response>, at the end of the top-levelfunctionsblock of the node's copy ofsystem/controlDict(a block of its own when there is none). The case's own files never change; afunctionsthat is not a block fails the step by line;log.includeFuncsays what was added, where and why. Rules: one response word of the task, never under MPI, a solve after it.SUPPORTED-INPUTS.mdand both READMEs say it.A field may carry dots (
alpha.water,T.water), never a colon - every multiphase response was refused as "not a field name".The cell count is the mesh the run ended with. A snapped case reported the background mesh blockMesh made (5,000 for 185,237). The count now comes from the note OpenFOAM writes into every
ownerheader (the latest time's mesh, else constant's; the processor meshes summed for a decomposed solve), else the last count a step's log reports (snappyHexMesh's mesh lines included).Sweep 2.1.1 carries the Model: the host validates the recipe with the Model its module bundles.
Tests: OpenFOAM 311 (+6 kit tests that need MS-MPI, skipped on the dev machine), Sweep 98. New kit oracle on an own Couette MRF fixture: torque during the solve -1.67015 against the exact -1.67552; the same response by
simpleFoam -postProcess+23.23. Checked live on the kit throughFoamCaseSessionon the WitSweep demo cases: rotatingCylinders -1674.62 / -6707.389 (exact within 0.1 %), weirOverflowareaIntegrate(alpha.water)42.478, windAroundBuildings without checkMesh 185,237 cells.Publish order: OpenFOAM.Model, then OpenFOAM and Sweep. An older node refuses
includeFuncby name, so the servers take these before any client sends it.🤖 Generated with Claude Code