feat(cfd): OpenFOAM cold-plate case template + sweep orchestrator (Issue #5) #17

Merged
navigator merged 1 commit from feature/cfd-case-template into main 2026-05-24 11:43:25 -03:00
Owner

Closes Issue #5 (OpenFOAM cold-plate CFD simulation Phase 1 deliverable per board/cfd/cold-plate-spec.md).

25 files committed:

case-template/system/ — blockMeshDict (54x44x7 background, 250x200x15mm + 10mm padding), snappyHexMeshDict (refinement levels 4 on microchannels and dies, 5 boundary layers exp 1.3), surfaceFeaturesDict (includedAngle 150 on 3 STLs), controlDict (chtMultiRegionSimpleFoam, 8000 iter ceiling, residuals + probeHotDie at chip 3 die-top).

case-template/system/fluid/ + system/solid/ — fvSchemes (steadyState + Gauss linearUpwind grad U, upwind for k/omega) and fvSolution (SIMPLE, GAMG p_rgh, smoothSolver U/h/k, residualControl per spec).

case-template/constant/ — regionProperties (fluid + solid), fluid transportProperties + thermophysicalProperties (heRhoThermo, DIW+5%PG: rho 1003, cp 4150, mu 8.5e-4, k 0.610, Pr 5.8), turbulenceProperties (k-omega SST RAS), solid thermophysicalProperties (OFC copper: rho 8940, cp 385, k 391).

case-template/0/fluid/ — U/T/p/p_rgh/k/omega/nut/alphat with FLOW_VEL and TEMP_K placeholders patched by run-sweep.sh. Conjugate coupling BCs.

case-template/0/solid/ — T with conjugate coupling on wet patches and externalWallHeatFluxTemperature on die_soc_[1-8] (DIE_HEAT_FLUX = 146939 W/m2) and die_bridge (16667 W/m2).

run-sweep.sh (AGPL v3): iterates 15 cases over Q in {0.5,1,2,4,6} L/min x T_in in {25,30,35} C. Per case: clone template, sed BC placeholders, decomposePar/mpirun chtMultiRegionSimpleFoam/reconstructPar. Extract T_j and dP. Append CSV line.

post/extract-Tj.py (AGPL v3): pandas-free numpy+matplotlib post-proc. 3 PNG plots: Tj_vs_Q (85 C limit), dP_vs_Q, uniformity_vs_Q (5 K target).

Note: constant/triSurface/{coldplate,microchannels,dies}.stl expected from FreeCAD per board/coldplate/ workflow (out of scope here).

Tests: docs+config+shell+python only. CI runs shell-lint on run-sweep.sh; full OpenFOAM execution is a separate test environment (32-core dedicated host, ~90h sweep). Per GitOps workflow, will be auto-merged via infra/forgejo/auto-merge.sh once CI green.

Closes Issue #5 (OpenFOAM cold-plate CFD simulation Phase 1 deliverable per board/cfd/cold-plate-spec.md). 25 files committed: **case-template/system/** — blockMeshDict (54x44x7 background, 250x200x15mm + 10mm padding), snappyHexMeshDict (refinement levels 4 on microchannels and dies, 5 boundary layers exp 1.3), surfaceFeaturesDict (includedAngle 150 on 3 STLs), controlDict (chtMultiRegionSimpleFoam, 8000 iter ceiling, residuals + probeHotDie at chip 3 die-top). **case-template/system/fluid/ + system/solid/** — fvSchemes (steadyState + Gauss linearUpwind grad U, upwind for k/omega) and fvSolution (SIMPLE, GAMG p_rgh, smoothSolver U/h/k, residualControl per spec). **case-template/constant/** — regionProperties (fluid + solid), fluid transportProperties + thermophysicalProperties (heRhoThermo, DIW+5%PG: rho 1003, cp 4150, mu 8.5e-4, k 0.610, Pr 5.8), turbulenceProperties (k-omega SST RAS), solid thermophysicalProperties (OFC copper: rho 8940, cp 385, k 391). **case-template/0/fluid/** — U/T/p/p_rgh/k/omega/nut/alphat with FLOW_VEL and TEMP_K placeholders patched by run-sweep.sh. Conjugate coupling BCs. **case-template/0/solid/** — T with conjugate coupling on wet patches and externalWallHeatFluxTemperature on die_soc_[1-8] (DIE_HEAT_FLUX = 146939 W/m2) and die_bridge (16667 W/m2). **run-sweep.sh (AGPL v3)**: iterates 15 cases over Q in {0.5,1,2,4,6} L/min x T_in in {25,30,35} C. Per case: clone template, sed BC placeholders, decomposePar/mpirun chtMultiRegionSimpleFoam/reconstructPar. Extract T_j and dP. Append CSV line. **post/extract-Tj.py (AGPL v3)**: pandas-free numpy+matplotlib post-proc. 3 PNG plots: Tj_vs_Q (85 C limit), dP_vs_Q, uniformity_vs_Q (5 K target). Note: constant/triSurface/{coldplate,microchannels,dies}.stl expected from FreeCAD per board/coldplate/ workflow (out of scope here). Tests: docs+config+shell+python only. CI runs shell-lint on run-sweep.sh; full OpenFOAM execution is a separate test environment (32-core dedicated host, ~90h sweep). Per GitOps workflow, will be auto-merged via infra/forgejo/auto-merge.sh once CI green.
feat(cfd): OpenFOAM cold-plate case template + sweep orchestrator (Issue #5)
All checks were successful
build / scalafmt-check (push) Successful in 3s
build / sbt-compile (push) Successful in 3s
build / shell-lint (push) Successful in 16s
build / scalafmt-check (pull_request) Successful in 3s
build / sbt-compile (pull_request) Successful in 3s
build / shell-lint (pull_request) Successful in 8s
906b319319
Phase 1 CFD deliverable per board/cfd/cold-plate-spec.md.

case-template/ (24 files, all CHARRUA-1.2 SPDX where syntax allows):
  system/ — blockMeshDict (54x44x7 background, 16632 cells, 250x200x15mm
           + 10mm padding), snappyHexMeshDict (refinement levels 4 on
           microchannels and dies, 5 boundary layers exp 1.3, layered
           addLayersControls), surfaceFeaturesDict (includedAngle 150
           on 3 STLs), controlDict (chtMultiRegionSimpleFoam, 8000 iter
           ceiling, residuals + probeHotDie at chip 3 die-top centroid).
  system/fluid/ + system/solid/ — fvSchemes (steadyState + Gauss
           linearUpwind grad U for momentum, upwind for k/omega) and
           fvSolution (SIMPLE algorithm, GAMG p_rgh, smoothSolver U/h/k,
           residualControl per spec).
  constant/ — regionProperties (fluid + solid), fluid
           transportProperties + thermophysicalProperties (heRhoThermo
           pureMixture, DIW+5%PG: rho 1003, cp 4150, mu 8.5e-4, k 0.610,
           Pr 5.8), turbulenceProperties (k-omega SST RAS), solid
           thermophysicalProperties (heSolidThermo OFC copper: rho 8940,
           cp 385, k 391).
  0/fluid/ — U/T/p/p_rgh/k/omega/nut/alphat with placeholders FLOW_VEL
           and TEMP_K patched per case by run-sweep.sh. Conjugate
           coupling BCs on coldplate_to_fluid and microchannels patches.
  0/solid/ — T with conjugate coupling on fluid_to_coldplate and
           fluid_to_microchannels; externalWallHeatFluxTemperature on
           die_soc_[1-8] (DIE_HEAT_FLUX placeholder = 146939 W/m2) and
           die_bridge (16667 W/m2).

run-sweep.sh (AGPL v3): iterates 15 cases over Q in {0.5,1,2,4,6} L/min
  x T_in in {25,30,35} C. Per case: clone template, sed BC placeholders,
  decomposePar (if --parallel N), chtMultiRegionSimpleFoam,
  reconstructPar. Extract T_j max/min from probeHotDie, dP via
  postProcess patchAverage. Append CSV line. CSV header on first run.

post/extract-Tj.py (AGPL v3): pandas-free numpy+matplotlib post-proc.
  Three PNG plots: Tj_vs_Q (hline 85 C limit), dP_vs_Q (bar), and
  uniformity_vs_Q (hline 5 K target). Output to post/plots/.

Note: constant/triSurface/{coldplate,microchannels,dies}.stl expected
to be generated by FreeCAD per board/coldplate/ workflow; not in this
PR (out of scope, see board/cold-plate-spec.md Section 13).
fluidpop-bot left a comment
Collaborator

CI green (head 906b319319), auto-approving

CI green (head 906b319319f400be2de673cfc235e2f284cf8524), auto-approving
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Fluid/fluidpop-v1!17
No description provided.