View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003492||OpenFOAM||Bug||public||2020-05-11 08:34||2020-05-22 08:42|
|Fixed in Version||dev|
|Summary||0003492: The formula in the OF is inconsistent with the Rosin-Rammler distribution theory formula|
|Description||The formula used to calculate CDF (Cumulative Distribution Function) is at line 31 in RosinRammler.H (https://github.com/OpenFOAM/OpenFOAM-7/blob/master/src/lagrangian/distributionModels/RosinRammler/RosinRammler.H)|
The CDF is now calculated as:
where d0 and d1 are the minimum and maximum diameters of particles, respectively; d is the Rosin-Rammler representative diameter and n is the Rosin-Rammler exponent. They are all constants.
However, according to Atomization and Sprays and Ansys Fluent Users Guide Release 19.0
the theoretical formula of Rosin-Rammler distribution is as follows:
With the same parameters, these two formulas may get different solutions.
|Steps To Reproduce||Based on the coefficients in the OpenFOAM-7/tutorials/lagrangian/sprayFoam/aachenBomb/sprayCloudProperites#L139, We find that when the values of d0 and d1 are very different, the two curves of CDF are similar (see Figure 1).|
However, when the difference between the two values is not that large, the two curves began to show differences (see Figure 2).
Accoding to the Rosin-Rammler distribution parameters (Fig. 3) adopted in 'Large eddy simulation of high-velocity fuel sprays: studying mesh resolution and breakup model effects for spray A', there are obvious differences between the two CDF curves (Fig. 4).
|Tags||No tags attached.|
Rosin Rammler (or Weibull) is usually only stated as `Q = 1 - exp(-(x/d)^n)`. The additional (d0 and d1 dependent) terms are there to clip the distribution. I see no reference to how these additional parameters should be handled, either in Atomisation and Sprays, or on Wikipedia, though I might not have spotted it. I do not have access to the Fluent 19.0 user manual.
Can you be specific as to where (ideally, in Atomisation and Sprays, or in a publicly accessible document) that your proposed form of the distribution is defined?
I agree with you that there is no standard for the selection of these parameters in the Rosin-Rammler distribution. What we suspect is that the CDF formula used in OpenFOAM is wrong. The following is our derivation of this modified formula.
As you said, Rosin Rammler distribution is usually stated as `y = 1 - exp(-(x/d)^n)`, But generally, we only consider the situation where the particle diameter is in the range of [d0, d1]. The probability that the particle diameter is within this range is given by Equation 1. The red part ‘K’ is a scalar used in https://github.com/OpenFOAM/OpenFOAM-7/blob/master/src/lagrangian/distributionModels/RosinRammler/RosinRammler.C
Since the domain of definition changes from (0, ∞) to (d0, d1), the modified cumulative distribution function needs to satisfy Equation 2. In order to keep the linear relationship between the modified CDF function and the original function, the modified CDF function needs to meet the Equation 3.
Combined with Equation 1, 2 and 3, the modified CDF function can be derived (see Equation 4).
> In order to keep the linear relationship between the modified CDF function and the original function
Why is linearity important? Both forms transform the function from (0,+inf) to (d0,d1) so that y(d0)=0 and y(d1)=1.
RosinRammler has been the form it is now for almost a decade. I need good evidence to change it. Why is your form better? Is there a standard reference that supports what you are saying?
We understand that this formula has been in use for almost a decade. Through analysis, the formula used in OpenFOAM works well under certain parameters, such as the parameters used in the OpenFOAM-7/tutorials/lagrangian/sprayFoam/aachenBomb/sprayCloudProperites#L139
Under these parameters, the PDF curve used in OpenFOAM is quite consistent with our modified PDF curve (Fig. 5). Their mathematical expectations and variances are very close (Table 2).
We point out that there may be problems with the existing formula under other parameters, like the parameters used in Fig. 3. Under these parameters, deviation between the two curves occurs (Fig 6). Although their variances are the same, their mathematical expectations are different (Table 3).
We know it is hard to challenge an existing formula, especially it works under certain conditions. Could you provide me with the relevant references where the form adopted in OpenFOAM is proposed. This will help us a lot to understand it.
||Is your clipping equivalent to sampling the entire (0,+inf) range, but discarding any result that does not fall into the (d0,d1) range and re-sampling? Like what is currently implemented in massRosinRammler.C. If so, then I think consistency with other distributions might be reason enough to accept your proposed change.|
||Yes, you get it. As you think, they are equivalent. There are two methods of sampling a random number in a finite interval (d0, d1), one is to sample the whole (0, +inf) but need to re-sample if the selected number does not fall within the desired (d0, d1) range, the other is to transform the original function from (0, +inf) to (d0, d1) and the probability in the interval (d0, d1) is proportionally enlarged so that y(d0)=0 and y(d1)=1. The effect of the two methods is the same. The first method is now adopted in massRosinRammler.C as you said, the second method is the one we suggest.|
OK, thanks. Your change has been made to dev as the following commit.
I can't do the same to version 7. Changes to numbered versions shouldn't affect results; they can only fix crashes and such.
|2020-05-11 08:34||FoamerLY||New Issue|
|2020-05-11 08:34||FoamerLY||File Added: figure 1.png|
|2020-05-11 08:34||FoamerLY||File Added: figure 2.png|
|2020-05-11 08:34||FoamerLY||File Added: figure 3.jpg|
|2020-05-11 08:34||FoamerLY||File Added: figure4.png|
|2020-05-12 09:48||will||Note Added: 0011337|
|2020-05-12 09:49||will||Note Edited: 0011337|
|2020-05-14 09:57||FoamerLY||File Added: Equation 1.png|
|2020-05-14 09:57||FoamerLY||File Added: Equation 2.png|
|2020-05-14 09:57||FoamerLY||File Added: Equation 3.png|
|2020-05-14 09:57||FoamerLY||File Added: Equation 4.png|
|2020-05-14 09:57||FoamerLY||Note Added: 0011341|
|2020-05-14 19:26||will||Note Added: 0011344|
|2020-05-18 11:52||FoamerLY||File Added: picture 5.png|
|2020-05-18 11:52||FoamerLY||File Added: Table 2.png|
|2020-05-18 11:52||FoamerLY||File Added: picture 6.png|
|2020-05-18 11:52||FoamerLY||File Added: Table 3.png|
|2020-05-18 11:52||FoamerLY||Note Added: 0011352|
|2020-05-19 12:44||will||Note Added: 0011358|
|2020-05-21 07:34||FoamerLY||Note Added: 0011362|
|2020-05-22 08:42||will||Assigned To||=> will|
|2020-05-22 08:42||will||Status||new => resolved|
|2020-05-22 08:42||will||Resolution||open => fixed|
|2020-05-22 08:42||will||Fixed in Version||=> dev|
|2020-05-22 08:42||will||Note Added: 0011363|