CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   RunTimePostProcessing and picture creation (https://www.cfd-online.com/Forums/openfoam-post-processing/219746-runtimepostprocessing-picture-creation.html)

Carlo_P August 7, 2019 09:58

RunTimePostProcessing and picture creation
 
Hey Foamers,
I'm having some trouble in working with rnTimePostProcessing, in order to create some images.


I found this guide, but not more other explanation:https://www.openfoam.com/documentati...ocessing-usage


The main problem is that mine installation (OpenFoam 7) gives me:


Caught FatalError
--> FOAM FATAL ERROR:

Unknown function type runTimePostProcessing



I attach here the controlDict file:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application simpleFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 5;

deltaT 1;

writeControl timeStep;

writeInterval 1;

purgeWrite 0;

writeFormat binary;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

functions
{
#include "cuttingPlane"
#include "streamLines"
#include "forceCoeffs"

ostPro_images
{
type runTimePostProcessing;
libs ("librunTimePostProcessing.so");
writeControl writeTime;
output
{
name image;
width 2000;
height 1200;
}
camera
{
// If camera is moving, optionally provide start and end times
// startPosition 0.0002;
// endPosition 0.75;
// Total number of frames to generate
nFrameTotal 1;
// Parallel projection flag
parallelProjection no;
clipBox (-8.442 -8.283 0.5)(6.917 1.521 0.5); // optional
focalPoint (-0.7625002861022949 -3.380999982357025 0.5);
up (0 1 0);
position (-0.7625002861022949 -3.380999982357025 35.700929625175824);
}
// 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 functionObjectLine;
functionObject streamLines;
representation tube;
visible yes;
tubeRadius 0.01;
colourBy field;
field U;
range (0 14);
opacity 0.5;
scalarBar
{
visible yes;
position (0.8 0.1);
vertical yes;
fontSize 16;
title "velocity / [m/s]";
labelFormat "%6.2f";
numberOfLabels 10;
}
}
}

// Surface data
surfaces
{
surface1
{
type geometry;
files ("$FOAM_CASE/constant/triSurface/Duct_Simulation430oclock_5.stl");
renderMode phong;
representation surface;
edgeColour (0 0 0);
visible yes;
featureEdges yes;
opacity 0.5;
}
cuttingPlane1
{
type functionObjectSurface;
functionObject cuttingPlane;
colourMap blueWhiteRed;
representation glyph;
maxGlyphLength 0.1;
visible yes;
featureEdges no;
colourBy field;
field U;
range (0 14);
opacity 0.5;
scalarBar
{
visible no;
}
}
}

// Text data
text
{
text1
{
string "TEST_TEXT";
position (0.1 0.05);
size 32;
bold yes;
visible yes;
}
}
}
}



Do someome has any idea how to create images?


Thanks
Cheers
Carlo

Za-ck August 26, 2019 14:37

Hi Carlo,

think you need to compile this utility:

run ./Allwmake in
.../src/functionObjects/graphics/runTimePostProcessing/

Best regards,
Za-ck

Carlo_P August 27, 2019 02:42

Hey Za-ck,
thanks for your answer...but where I can find that file?
I mean, if you look in that folder, there isn't the graphics subfolder.
https://github.com/OpenFOAM/OpenFOAM...unctionObjects


Is that folder link to a specific version? OpenFOAM1906?
Thanks a lot,
Carlo

Yann August 27, 2019 04:14

Hello Carlo,


I don't think this functionObject is implemented in the foundation version. It has been initially released in ESI's OpenFOAM v3.0+ version (release notes here) and has been improved in the newer versions (see v1906 release notes)


So you will probably need to use ESI's branch to use it. Or maybe try to compile it in your own version but I don't know if it's straightforward or not.



Regards,
Yann

Carlo_P August 27, 2019 05:08

Thanks Yann.
I checked in Esi's openFOAM and I found the code:
https://develop.openfoam.com/Develop...unctionObjects


I have to check how to install now ESI's OpenFOAM. I mean, openFoam 7 is more simple to install.


Thanks,
Carlo


All times are GMT -4. The time now is 11:23.