mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: propeller: use functionObjects
This commit is contained in:
@ -10,6 +10,4 @@ runApplication decomposePar
|
||||
|
||||
runParallel `getApplication` 4
|
||||
|
||||
runParallel vorticity 4
|
||||
|
||||
runApplication reconstructPar
|
||||
|
||||
22
tutorials/incompressible/pimpleDyMFoam/propeller/system/Q
Normal file
22
tutorials/incompressible/pimpleDyMFoam/propeller/system/Q
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -58,4 +58,12 @@ adjustTimeStep yes;
|
||||
|
||||
maxCo 2;
|
||||
|
||||
functions
|
||||
{
|
||||
#include "readFields"
|
||||
#include "Q"
|
||||
#include "surfaces"
|
||||
#include "forces"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user