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/)
-   -   problem with plotting both forces and coeff (https://www.cfd-online.com/Forums/openfoam-post-processing/168414-problem-plotting-both-forces-coeff.html)

giammy92 March 21, 2016 17:04

problem with plotting both forces and coeff
 
Hi guys, i can't plot both forces and force coefficients togheter with gnuplot but one for time. When i include only the function object of forces in system directory i can plot forces with gnuplot but if i add the function object of force coefficients, in directory postprocessing i find only force coeff and i can plot only those. What was i wrong?

giammy92 March 22, 2016 10:59

In controldict i have addes this:
functions
{
#include "forces"
#include "readFields"
#include "forces_coeff"
}
And I have defined those funcions object:

forces
{
type forces;

functionObjectLibs ( "libforces.so" );

outputControl timeStep;
timeInterval 1;

log yes;

patches ( "TRAILING_EDGE.*" "SUCTION_SIDE.*" "PRESSURE_SIDE.*" );
pName p;
UName U;
rhoName rhoInf; // Indicates incompressible
log true;
rhoInf 1; // Redundant for incompressible

CofR (0 0 0); // Rotation around centre line of propeller
pitchAxis (0 0 1);
}

forces
{
type forceCoeffs;

functionObjectLibs ( "libforces.so" );

outputControl timeStep;
timeInterval 1;

log yes;

patches ( "TRAILING_EDGE" "SUCTION_SIDE" "PRESSURE_SIDE" );
pName p;
UName U;
rhoName rhoInf;
rhoInf 1;
log true;
CofR (0 0 0);
liftDir (-0.1736 0.9848 0);
dragDir (0.9848 0.1736 0);
pitchAxis (0 0 1);
magUInf 25.75;
lRef 0.5459;
Aref 0.5459;
}

And also readfields:

readFields
{
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");

type readFields;
fields (p U k omega);
}

Do you individuate any errors which impede contemporary writing of both forces and forces coeff in postprocessing?

JNSN March 23, 2016 04:25

names for both function objects in your controlDict are the same. Change one of them and it should work.

Best regards,
Jan


All times are GMT -4. The time now is 15:20.