ENH: propeller: use functionObjects

This commit is contained in:
mattijs
2014-01-23 10:53:24 +00:00
parent 8cb6853072
commit cb01bcec31
6 changed files with 135 additions and 2 deletions

View File

@ -10,6 +10,4 @@ runApplication decomposePar
runParallel `getApplication` 4 runParallel `getApplication` 4
runParallel vorticity 4
runApplication reconstructPar runApplication reconstructPar

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
// Calculate Q (from U)
Q
{
// Where to load it from
functionObjectLibs ("libutilityFunctionObjects.so");
type Q;
// Output every
outputControl outputTime;
}
// ************************************************************************* //

View File

@ -58,4 +58,12 @@ adjustTimeStep yes;
maxCo 2; maxCo 2;
functions
{
#include "readFields"
#include "Q"
#include "surfaces"
#include "forces"
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -0,0 +1,32 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
forces
{
type forces;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
timeInterval 1;
log yes;
patches ( "propeller.*" );
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 1 0);
}
// ************************************************************************* //

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
// Make sure all fields for functionObjects are loaded. Prevents any
// problems running with execFlowFunctionObjects.
readFields
{
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
type readFields;
fields (p U k);
}
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
surfaces
{
type surfaces;
functionObjectLibs ("libsampling.so");
outputControl outputTime;
surfaceFormat vtk;
fields ( p U Q);
interpolationScheme cellPoint;
surfaces
(
zNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
basePoint (0 0 0);
normalVector (0 0 1);
}
interpolate true;
}
isoQ
{
type isoSurface;
isoField Q;
isoValue 1000;
interpolate true;
}
propeller
{
type patch;
patches ( "propeller.*" );
interpolate true;
}
);
}
// ************************************************************************* //