The general distribution has been extended to accept cumulative distribution data, by means of a "cumulative" switch. The calculation of the mean value has also been corrected for this distribution, and additional header documentation and parameter checking has been added. In addition, the distribution models now all print some basic information (min, max and mean) into the log file to help in checking that the specification is correct. Patch contributed by Timo Niemi, VTT.
78 lines
2.1 KiB
C++
78 lines
2.1 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration | Website: https://openfoam.org
|
|
\\ / A nd | Version: dev
|
|
\\/ M anipulation |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
version 2.0;
|
|
format ascii;
|
|
class dictionary;
|
|
object testDict;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
|
|
densityFunction
|
|
{
|
|
type general;
|
|
generalDistribution
|
|
{
|
|
distribution
|
|
(
|
|
(10e-06 0.0025)
|
|
(15e-06 0.0528)
|
|
(20e-06 0.2795)
|
|
(25e-06 1.0918)
|
|
(30e-06 2.3988)
|
|
(35e-06 4.4227)
|
|
(40e-06 6.3888)
|
|
(45e-06 8.6721)
|
|
(50e-06 10.3153)
|
|
(55e-06 11.6259)
|
|
(60e-06 12.0030)
|
|
(65e-06 10.4175)
|
|
(70e-06 10.8427)
|
|
(75e-06 8.0016)
|
|
(80e-06 6.1333)
|
|
(85e-06 3.8827)
|
|
(90e-06 3.4688)
|
|
);
|
|
}
|
|
}
|
|
|
|
cumulativeFunction
|
|
{
|
|
type general;
|
|
generalDistribution
|
|
{
|
|
cumulative true;
|
|
distribution
|
|
(
|
|
(10e-06 0.0000000)
|
|
(15e-06 0.0281384)
|
|
(20e-06 0.1972235)
|
|
(25e-06 0.8949856)
|
|
(30e-06 2.6711166)
|
|
(35e-06 6.1421180)
|
|
(40e-06 11.643361)
|
|
(45e-06 19.306838)
|
|
(50e-06 28.968245)
|
|
(55e-06 40.132642)
|
|
(60e-06 52.155796)
|
|
(65e-06 63.564077)
|
|
(70e-06 74.381959)
|
|
(75e-06 83.97055)
|
|
(80e-06 91.162850)
|
|
(85e-06 96.259317)
|
|
(90e-06 100.00000)
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|