openfoam/tutorials/incompressible/simpleFoam/motorBike/system/wallBoundedStreamLines
Mark Olesen f16f3da645 ENH: streamline improvements
- barycentric coordinates in interpolation (instead of x/y/z)

- ease U (velocity) requirement.
  Needn't be named in the sampled fields.

- default tracking direction is 'forward'
2022-07-08 11:13:00 +02:00

96 lines
2.6 KiB
C++

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
// Interpolate U to create near-wall UNear
near
{
type nearWallFields;
libs (fieldFunctionObjects);
// Output every
writeControl writeTime;
// Calculate every
executeControl writeTime;
// Fields to be sampled. Per field original name and mapped field to
// create.
// Note: fields only get updated when writing!
fields
(
(U UNear)
);
// Patches/groups to sample (regular expressions)
patches (motorBikeGroup);
// Distance to sample
distance 0.001;
}
// Use UNear to track along wall
wallBoundedStreamLines
{
type wallBoundedStreamLine;
libs (fieldFunctionObjects);
U UNear; // Velocity field for tracking
fields (p U k UNear); // Fields to sample
setFormat vtk;
direction forward;
lifeTime 100; // Steps particles can travel before being removed
cloud wallBoundedParticleTracks;
seedSampleSet
{
type patchSeed;
uniformCoeffs
{
axis x; //distance;
start (0.0035 0.0999 0.0001);
end (0.0035 0.0999 0.0099);
nPoints 20;
}
cloudCoeffs
{
axis x; //distance;
points ((0.351516548679288 -0.0116085375585099 1.24));
}
patchSeedCoeffs
{
patches (motorBikeGroup);
axis x; //distance;
maxPoints 20000;
}
}
// Optional entries
// bounds (0.2 -10 -10)(0.22 10 10);
// trackLength 1e-3;
// nSubCycle 1;
interpolationScheme cellPoint;
// Optional (inherited) entries
region region0;
enabled true;
log true;
timeStart 0;
timeEnd 1000;
executeControl timeStep;
executeInterval 1;
writeControl writeTime;
writeInterval -1;
}
// ************************************************************************* //