mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated motorbike tutorial (Chris' updates)
This commit is contained in:
@ -16,7 +16,7 @@ FoamFile
|
|||||||
|
|
||||||
application simpleFoam;
|
application simpleFoam;
|
||||||
|
|
||||||
startFrom startTime;
|
startFrom latestTime;
|
||||||
|
|
||||||
startTime 0;
|
startTime 0;
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ writeFormat ascii;
|
|||||||
|
|
||||||
writePrecision 6;
|
writePrecision 6;
|
||||||
|
|
||||||
writeCompression off;
|
writeCompression compressed;
|
||||||
|
|
||||||
timeFormat general;
|
timeFormat general;
|
||||||
|
|
||||||
@ -52,59 +52,10 @@ libs
|
|||||||
|
|
||||||
functions
|
functions
|
||||||
{
|
{
|
||||||
// Make sure all fields for functionObjects are loaded. Prevents any
|
#include "readFields"
|
||||||
// problems running with execFlowFunctionObjects.
|
#include "streamLines"
|
||||||
readFields
|
#include "cuttingPlane"
|
||||||
{
|
#include "forceCoeffs"
|
||||||
// Where to load it from (if not already in solver)
|
|
||||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
|
||||||
|
|
||||||
type readFields;
|
|
||||||
fields (p U k);
|
|
||||||
}
|
|
||||||
|
|
||||||
streamLines
|
|
||||||
{
|
|
||||||
type streamLine;
|
|
||||||
|
|
||||||
// Output every
|
|
||||||
outputControl outputTime;
|
|
||||||
// outputInterval 10;
|
|
||||||
|
|
||||||
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
|
|
||||||
|
|
||||||
// Velocity field to use for tracking.
|
|
||||||
U U;
|
|
||||||
|
|
||||||
// Tracked forwards (+U) or backwards (-U)
|
|
||||||
trackForward true;
|
|
||||||
|
|
||||||
// Names of fields to sample. Should contain above velocity field!
|
|
||||||
fields (p U k);
|
|
||||||
|
|
||||||
// Steps particles can travel before being removed
|
|
||||||
lifeTime 10000;
|
|
||||||
|
|
||||||
// Number of steps per cell (estimate). Set to 1 to disable subcycling.
|
|
||||||
nSubCycle 5;
|
|
||||||
|
|
||||||
// Cloud name to use
|
|
||||||
cloudName particleTracks;
|
|
||||||
|
|
||||||
// Seeding method. See the sampleSets in sampleDict.
|
|
||||||
seedSampleSet uniform; //cloud;//triSurfaceMeshPointSet;
|
|
||||||
|
|
||||||
uniformCoeffs
|
|
||||||
{
|
|
||||||
type uniform;
|
|
||||||
axis x; //distance;
|
|
||||||
|
|
||||||
// Note: tracks slightly offset so as not to be on a face
|
|
||||||
start (-1.001 1e-7 0.0011);
|
|
||||||
end (-1.001 1e-7 1.0011);
|
|
||||||
nPoints 20;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,35 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
cuttingPlane
|
||||||
|
{
|
||||||
|
type surfaces;
|
||||||
|
functionObjectLibs ("libsampling.so");
|
||||||
|
outputControl outputTime;
|
||||||
|
|
||||||
|
surfaceFormat vtk;
|
||||||
|
fields ( p U );
|
||||||
|
|
||||||
|
surfaces
|
||||||
|
(
|
||||||
|
yNormal
|
||||||
|
{
|
||||||
|
type cuttingPlane;
|
||||||
|
planeType pointAndNormal;
|
||||||
|
pointAndNormalDict
|
||||||
|
{
|
||||||
|
basePoint (0 0 0);
|
||||||
|
normalVector (0 1 0);
|
||||||
|
}
|
||||||
|
interpolate true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
forces
|
||||||
|
{
|
||||||
|
type forceCoeffs;
|
||||||
|
functionObjectLibs ( "libforces.so" );
|
||||||
|
outputControl timeStep;
|
||||||
|
outputInterval 1;
|
||||||
|
|
||||||
|
patches ( "motorBike.*" );
|
||||||
|
pName p;
|
||||||
|
UName U;
|
||||||
|
rhoName rhoInf; // Indicates incompressible
|
||||||
|
log true;
|
||||||
|
rhoInf 1; // Redundant for incompressible
|
||||||
|
liftDir (0 0 1);
|
||||||
|
dragDir (1 0 0);
|
||||||
|
CofR (0.72 0 0); // Axle midpoint on ground
|
||||||
|
pitchAxis (0 1 0);
|
||||||
|
magUInf 20;
|
||||||
|
lRef 1.42; // Wheelbase length
|
||||||
|
Aref 0.75; // Estimated
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ 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,53 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: dev |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
streamLines
|
||||||
|
{
|
||||||
|
type streamLine;
|
||||||
|
|
||||||
|
// Output every
|
||||||
|
outputControl outputTime;
|
||||||
|
// outputInterval 10;
|
||||||
|
|
||||||
|
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
|
||||||
|
|
||||||
|
// Velocity field to use for tracking.
|
||||||
|
U U;
|
||||||
|
|
||||||
|
// Tracked forwards (+U) or backwards (-U)
|
||||||
|
trackForward true;
|
||||||
|
|
||||||
|
// Names of fields to sample. Should contain above velocity field!
|
||||||
|
fields (p U k);
|
||||||
|
|
||||||
|
// Steps particles can travel before being removed
|
||||||
|
lifeTime 10000;
|
||||||
|
|
||||||
|
// Number of steps per cell (estimate). Set to 1 to disable subcycling.
|
||||||
|
nSubCycle 5;
|
||||||
|
|
||||||
|
// Cloud name to use
|
||||||
|
cloudName particleTracks;
|
||||||
|
|
||||||
|
// Seeding method. See the sampleSets in sampleDict.
|
||||||
|
seedSampleSet uniform; //cloud;//triSurfaceMeshPointSet;
|
||||||
|
|
||||||
|
uniformCoeffs
|
||||||
|
{
|
||||||
|
type uniform;
|
||||||
|
axis x; //distance;
|
||||||
|
|
||||||
|
// Note: tracks slightly offset so as not to be on a face
|
||||||
|
start (-1.001 1e-7 0.0011);
|
||||||
|
end (-1.001 1e-7 1.0011);
|
||||||
|
nPoints 20;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user