Skip to content

Render and re-render figures

Figures are on by default. Each run or sweep point samples its wall patches and cutting planes as VTP every 20 iterations over its last 200, and a render step draws the set in a headless ParaView container. The views are listed in Figure views.

Pass a dict as figures to submit_case or submit_sweep:

"figures": {
"patches": ["wing", "fuselage", "pods"],
"planes": [{"name": "y080", "point": [0, 0.80, 0], "normal": [0, 1, 0]}],
"views": ["A", "B", "E"],
"window": 300
}

figures: false turns sampling and rendering off.

render_figures redraws a set from the samples already on disk, typically in 10 to 60 seconds, and the job need not be running:

render_figures({"job_id": "...", "point": 1, "views": ["C", "D"]})

render_strip rebuilds the strip of view A across a sweep’s points.

A window average blurs a case that alternates, such as a wing that drops left, then right. frames adds single-snapshot figures beside the average, with the same colour range so they compare:

render_figures({"job_id": "...", "frames": "extremes", "frame_field": "CmRoll"})

extremes picks the snapshots where the field is lowest and highest; first_last and snapshots are the other choices. The files are named after the view and the frame, such as A_minCmRoll_t880.png.

A job submitted without figures can still get views A, A2 and B when its case has its own wallSurfaces sampler: render_figures falls back to that output and says so in the result. A job with neither returns reason: "figures_disabled".

Every figure carries a line stating which body axis points up and right on screen and where the camera is. The words come from the camera, not from a caption. Set MCOPENFOAM_AXIS_LABELS, or an axis_labels entry in a case’s case.json, to use your own names per axis:

{"+X": "+X = CFD port (right-handed reading)", "-X": "-X = CFD starboard (right-handed reading)"}