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'
This commit is contained in:
Mark Olesen
2022-07-05 16:01:17 +02:00
parent 71246b94b7
commit f16f3da645
24 changed files with 360 additions and 391 deletions

View File

@ -3,7 +3,7 @@
nLines 24;
start (0 0.5 0);
end (9 0.5 0);
fields (U);
fields (p);
#includeEtc "caseDicts/postProcessing/visualization/streamlines.cfg"

View File

@ -13,25 +13,22 @@ streamLines
// Time control etc
${_visualization};
setFormat vtk;
setFormat vtk;
// Velocity field to use for tracking.
U U;
// Tracking direction (forward | backward | bidirectional)
direction forward;
// Tracked forwards (+U) or backwards (-U)
trackForward true;
// Names of fields to sample. Should contain above velocity field!
fields (p U);
// Fields to sample
fields (p U);
// Steps particles can travel before being removed
lifeTime 10000;
lifeTime 10000;
// Number of steps per cell (estimate). Set to 1 to disable subcycling.
nSubCycle 5;
nSubCycle 5;
// Cloud name to use
cloud particleTracks;
cloud particleTracks;
// Seeding method.
seedSampleSet

View File

@ -13,25 +13,22 @@ streamLines
// Time control etc
${_visualization};
setFormat vtk; // csv | raw | gnuplot | ensight | xmgr
setFormat vtk;
// Velocity field to use for tracking.
U U;
// Tracking direction (forward | backward | bidirectional)
direction forward;
// Tracked forwards (+U) or backwards (-U)
trackForward true;
// Names of fields to sample. Should contain above velocity field!
fields (p U);
// Fields to sample
fields (p U);
// Steps particles can travel before being removed
lifeTime 10000;
lifeTime 10000;
// Number of steps per cell (estimate). Set to 1 to disable subcycling.
nSubCycle 5;
nSubCycle 5;
// Cloud name to use
cloud particleTracks;
cloud particleTracks;
// Seeding method.
seedSampleSet

View File

@ -32,9 +32,6 @@ streamLine1
nSubCycle 1;
interpolationScheme cellPoint;
// Deprecated
// trackForward true;
// Optional (inherited) entries
region region0;
enabled true;

View File

@ -8,38 +8,35 @@
streamLines
{
// Where to load it from
libs (fieldFunctionObjects);
type streamLine;
type streamLine;
libs (fieldFunctionObjects);
// Output every
writeControl writeTime;
// writeInterval 10;
setFormat vtk; // csv | raw | gnuplot | ensight
setFormat vtk;
// Tracked forwards (+U) or backwards (-U)
trackForward true;
// Tracking direction (forward | backward | bidirectional)
direction forward;
// Names of fields to sample. Should contain above velocity field!
fields (p U k);
// Fields to sample
fields (p U k);
// Steps particles can travel before being removed
lifeTime 10000;
lifeTime 10000;
//- Specify either absolute length of steps (trackLength) or a number
// of subcycling steps per cell (nSubCycle)
// Size of single track segment [m]
//trackLength 1e-3;
// Number of steps per cell (estimate). Set to 1 to disable subcycling.
nSubCycle 5;
// Size of single track segment [m]
//trackLength 1e-3;
// Number of steps per cell (estimate). Set to 1 to disable subcycling.
nSubCycle 5;
// Cloud name to use
cloud particleTracks;
cloud particleTracks;
// Seeding method.
seedSampleSet

View File

@ -9,10 +9,8 @@
// Interpolate U to create near-wall UNear
near
{
// Where to load it from
libs (fieldFunctionObjects);
type nearWallFields;
type nearWallFields;
libs (fieldFunctionObjects);
// Output every
writeControl writeTime;
@ -39,15 +37,16 @@ near
// Use UNear to track along wall
wallBoundedStreamLines
{
// Mandatory entries
type wallBoundedStreamLine;
libs (fieldFunctionObjects);
U UNear; // Velocity field to use for tracking.
fields (p U k UNear); // Names of fields to sample.
setFormat vtk; // raw | gnuplot | xmgr
direction forward;
lifeTime 100; // Steps particles can travel before being removed
cloud wallBoundedParticleTracks;
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;
@ -80,9 +79,6 @@ wallBoundedStreamLines
// nSubCycle 1;
interpolationScheme cellPoint;
// Deprecated
// trackForward true;
// Optional (inherited) entries
region region0;
enabled true;

View File

@ -46,45 +46,7 @@ runTimeModifiable true;
functions
{
streamLines
{
type streamLine;
// Where to load it from (if not already in solver)
libs (fieldFunctionObjects);
// Output every
writeControl writeTime;
// writeInterval 10;
setFormat vtk; // csv | raw | gnuplot | ensight | xmgr
// Tracked forwards (+U) or backwards (-U)
trackForward true;
// Names of fields to sample. Should contain above velocity field!
fields (p k U);
// 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
cloud particleTracks;
// Seeding method.
seedSampleSet
{
type uniform;
axis x; //distance;
start (-0.0205 0.001 0.00001);
end (-0.0205 0.0251 0.00001);
nPoints 10;
}
}
#include "streamLines"
}

View File

@ -0,0 +1,41 @@
// -*- C++ -*-
streamLines
{
type streamLine;
libs (fieldFunctionObjects);
writeControl writeTime;
// writeInterval 10;
setFormat vtk;
// Tracking direction (forward | backward | bidirectional)
direction forward;
// Fields to sample
fields (p k U);
// 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
cloud particleTracks;
// Seeding method.
seedSampleSet
{
type uniform;
axis x; //distance;
start (-0.0205 0.001 0.00001);
end (-0.0205 0.0251 0.00001);
nPoints 10;
}
}
// ************************************************************************* //

View File

@ -9,25 +9,22 @@ streamLines
// Time control etc
${_visualization};
setFormat vtk;
setFormat vtk;
// Velocity field to use for tracking.
U U;
// Tracking direction (forward | backward | bidirectional)
direction forward;
// Tracked forwards (+U) or backwards (-U)
trackForward true;
// Names of fields to sample. Should contain above velocity field!
fields (p U);
// Fields to sample
fields (p U);
// Steps particles can travel before being removed
lifeTime 10000;
lifeTime 10000;
// Number of steps per cell (estimate). Set to 1 to disable subcycling.
nSubCycle 5;
nSubCycle 5;
// Cloud name to use
cloud particleTracks;
cloud particleTracks;
// Seeding method.
seedSampleSet