From 2cbad2d47f4c4fc818c379ef4b15896e901f8bcc Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 7 Jan 2016 16:31:01 +0000 Subject: [PATCH] ENH: motorBike: example of run-time postprocessing --- .../motorBike/motorBike/system/controlDict | 2 + .../motorBike/system/runtimePostProcessing | 122 ++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/runtimePostProcessing diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict index 86060f2128..e00a21e4ea 100644 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/controlDict @@ -119,6 +119,8 @@ functions lRef 1.42; Aref 0.75; } + + #include "runtimePostProcessing" } diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/runtimePostProcessing b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/runtimePostProcessing new file mode 100644 index 0000000000..b331e95ac0 --- /dev/null +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/runtimePostProcessing @@ -0,0 +1,122 @@ +postPro1 +{ + type runTimePostProcessing; + functionObjectLibs ("librunTimePostProcessing.so"); + outputControl outputTime; + output + { + name image; + width 2000; + height 1200; + } + camera + { + // If camera is moving, optionally provide start and end times + // startPosition 0.2; + // endPosition 0.75; + + // Total number of frames to generate + nFrameTotal 1; + + // Parallel projection flag + parallelProjection no; + + // Camera mode: + // - flightPath: define flight path + // - static: fixed position + mode static; + staticCoeffs + { + clipBox (-0.2 -0.2 0)(1.65 0.2 1.25); // optional + focalPoint (1.2 1.1 0.2); + up (0 0 1); + lookDir (2.4 4.0 -1.5); + } + } + + // Default colours + // - If select to colourBy colour, these values are used unless + // they are locally overriden + colours + { + background (1 1 1); + background2 (0 0 1); + text (0 0 0); + edge (1 0 0); + surface (0.5 0.5 0.5); + line (1 0 0); + } + // Line data + lines + { + streamline + { + type line; + functionObject streamLines; + representation tube; + visible yes; + tubeRadius 0.01; + colourBy field; + fieldName U; + range (0 20); + opacity 1; + scalarBar + { + visible yes; + position (0.8 0.1); + vertical yes; + fontSize 16; + title "velocity / [m/s]"; + labelFormat "%6.2f"; + numberOfLabels 5; + } + } + } + + // Surface data + surfaces + { + surface1 + { + type geometry; + files ("$FOAM_CASE/constant/triSurface/motorBike.obj.gz"); + renderMode phong; + representation surface; + edgeColour (0 0 0); + visible yes; + featureEdges yes; + opacity 1; + } + cuttingPlane1 + { + type functionObject; + functionObject cuttingPlane; + colourMap blueWhiteRed; + representation glyph; + maxGlyphLength 0.1; + visible yes; + featureEdges no; + colourBy field; + fieldName U; + range (0 30); + opacity 1; + scalarBar + { + visible no; + } + } + } + + // Text data + text + { + text1 + { + string "Motorbike"; + position (0.1 0.05); + size 72; + bold yes; + visible yes; + } + } +}