readme.md file is added for postprocessing

This commit is contained in:
Hamidreza
2025-04-23 00:47:03 +03:30
parent 8da8afbe63
commit 73f4b35fd4
4 changed files with 511 additions and 87 deletions

View File

@ -7,87 +7,114 @@ objectType dictionary;;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
// Yes: postprocessing is active during the simulation
// No: postprocessing is not active during the simulation
// and it can be done after simulation
runTimeActive yes;
// shapeType: defines the type of the shape that is used in the simulation
// (for example: sphere, grain, etc).
// shapeType is only used when postprocessing is done after simulation
// to initialize the shape object for post processing operatoins
shapeType sphere;
// default time control to be used in the postprocessing components
defaultTimeControl
{
timeControl timeStep;
timeControl timeStep; // timeStep, simulationTime are the options here
startTime 0;
endTime 1000;
executionInterval 150;
}
// list of postprocessing components
components
(
velocityProb
{
processMethod particleProbe;
processRegion centerPoints;
selector id;
field component(position,y);
ids (0 10 100);
}
onSingleSphere
{
// method of performing the sum (arithmetic, uniformDistribution, GaussianDistribution)
processMethod arithmetic;
processRegion sphere; // type of region on which processing is performed
sphereInfo
{
radius 0.01;
center (-0.08 -0.08 0.015);
}
timeControl default; // settings, timeStep, simulationTime
/// all the post process operations to be done
operations
(
// computes the arithmetic mean of particle velocity
averageVel
{
function average;
field velocity;
divideByVolume no; //default
threshold 3; //default is 1;
includeMask all;
}
// computes the fraction of par1 in the region
par1Fraction
{
function average;
field one;
phi one; // default
divideByVolume no;
includeMask lessThan;
// diameter of par1 is 0.003, so these settings
// will select only particles of type par1
lessThanInfo
{
field diameter;
value 0.0031;
}
}
numberDensity
{
function sum;
field one;
phi one; // default
divideByVolume yes;
}
);
// probing particles for their state variables, like velocity, position, etc
velocityProb
{
processMethod particleProbe;
processRegion centerPoints;
selector id;
field component(position,y);
ids (0 10 100);
timeControl default; // other options are settings, timeStep, simulationTime
// settings: uses parameters from settingsDict file
// timeStep: uses the time step of the simulation controlling the execution of postprocessing
// simulationTime: uses the simulation time of the simulation controlling the execution of postprocessing
// default: uses the default time control (defined in defaultTimeControl).
// default behavior: if you do not specify it, parameters in defaultTimeControl is used.
}
alongALine
on_single_sphere
{
processMethod arithmetic;
// method of performing the sum (arithmetic, uniformDistribution, GaussianDistribution)
processMethod arithmetic;
// Postprocessing is done on particles whose centers are inside this spehre
processRegion sphere;
sphereInfo
{
radius 0.01; // radius of sphere
center (-0.08 -0.08 0.015); // center of sphere
}
timeControl default;
/// all the postprocess operations to be done on sphere region
operations
(
// computes the arithmetic mean of particle velocity
averageVel
{
function average;
field velocity;
divideByVolume no; // default is no
threshold 3; // default is 1
includeMask all; // default is all
}
// - function: average, sum, and other derived ones from sum and average
// - field: names of the fields in the simulation. Some special fields
// are: mass, density, volume, position, one, I.
// - divideByVolume: whether the result is divided by the volume of the region
// - threshold: exclude regions that contains particles less than threshold
// - includeMask: all, lessThan, greaterThan, between, lessThanOrEq, greaterThanEq, betweenEq
// computes the fraction of par1 in the region
par1Fraction
{
function average;
field one; // default
phi one; // default
divideByVolume no;
includeMask lessThan;
// diameter of par1 is 0.003, so these settings
// will select only particles of type par1
lessThanInfo
{
field diameter;
value 0.0031;
}
}
numberDensity
{
function sum;
field one;
phi one;
divideByVolume yes;
}
);
}
along_a_line
{
processMethod arithmetic;
processRegion line;
// the time interval for executing the post-processing
@ -101,9 +128,9 @@ components
// 10 spheres with radius 0.01 along the straight line defined by p1 and p2
lineInfo
{
p1 (0 0 0);
p2 (0 0.15 0.15);
numPoints 10;
p1 (0 0 0);
p2 (0 0.15 0.15);
nSpheres 10;
radius 0.01;
}
@ -112,18 +139,65 @@ components
// computes the arithmetic mean of particle velocity
numberDensity
{
function sum;
field one;
function sum;
field one;
divideByVolume yes; //default is no
}
volumeDensity
{
function sum;
field cube(diameter); // d^3, although it differs by pi/6
divideByVolume yes; //default is no
field volume; //
divideByVolume yes; //default is no
}
);
}
);
);
/*
About processMethod
This defines the type of the processing method to be done.
The processing is done either on a collection of selected particles (the first three ones)
or individual particles (particleProbe).
Options are:
- arithmetic
- uniformDistribution
- GaussianDistribution
- particleProbe (only used with centerPoints)
When you use the first three optoins, then you can either perform two types of processing is possible
- sum
\f[
\text{result} = \sum_{i \in \text{processRegion and includeMask}} w_i \cdot \phi_i \cdot \text{field}_i
\f]
- average
\f[
\text{result} = \frac{1}{V_{\text{region}}} \frac{\sum_{j \in \text{includeMask}} w_j \cdot \phi_j \cdot \text{field}_j}
{\sum_{i \in \text{processRegion}} w_i \cdot \phi_i}
\f]
*/
/*
About processRegion
processRegion, defines processing regions on which postprocess operation are performed. Particles
whose centers are inside the regions are selected for post processing operation. Note that
you are allowed to use a correct combination of processRegion and processMethod.
For example centerPoints only works with particleProbe.
Options are:
- sphere
- multipleSpheres
- line
- centerPoints (only works with particleProbe)
- rectMesh: Not implemented yet
- generalMesh: not implemented yet
*/