View Issue Details
ID  Project  Category  View Status  Date Submitted  Last Update 

0003492  OpenFOAM  Bug  public  20200511 08:34  20200522 08:42 
Reporter  FoamerLY  Assigned To  will  
Priority  normal  Severity  minor  Reproducibility  always 
Status  resolved  Resolution  fixed  
Platform  GNU/Linux  OS  Ubuntu  OS Version  14.04 
Product Version  7  
Fixed in Version  dev  
Summary  0003492: The formula in the OF is inconsistent with the RosinRammler distribution theory formula  
Description  The formula used to calculate CDF (Cumulative Distribution Function) is at line 31 in RosinRammler.H (https://github.com/OpenFOAM/OpenFOAM7/blob/master/src/lagrangian/distributionModels/RosinRammler/RosinRammler.H) The CDF is now calculated as: cumulative model=(1.0exp(((xd0)/d)^n))/(1.0exp(((d1d0)/d)^n)); where d0 and d1 are the minimum and maximum diameters of particles, respectively; d is the RosinRammler representative diameter and n is the RosinRammler exponent. They are all constants. However, according to Atomization and Sprays and Ansys Fluent Users Guide Release 19.0 the theoretical formula of RosinRammler distribution is as follows: cumulative model=(1.0exp((x/d)^n+(d0/d)^n))/(1.0exp((d1/d)^n+(d0/d)^n)); With the same parameters, these two formulas may get different solutions.  
Steps To Reproduce  Based on the coefficients in the OpenFOAM7/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 RosinRammler distribution parameters (Fig. 3) adopted in 'Large eddy simulation of highvelocity 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 RosinRammler 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/OpenFOAM7/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 OpenFOAM7/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 resampling? 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 resample 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. https://github.com/OpenFOAM/OpenFOAMdev/commit/8604c1eb5fe621f9084eaeb784e11dd559552f47 I can't do the same to version 7. Changes to numbered versions shouldn't affect results; they can only fix crashes and such. 
Date Modified  Username  Field  Change 

20200511 08:34  FoamerLY  New Issue  
20200511 08:34  FoamerLY  File Added: figure 1.png  
20200511 08:34  FoamerLY  File Added: figure 2.png  
20200511 08:34  FoamerLY  File Added: figure 3.jpg  
20200511 08:34  FoamerLY  File Added: figure4.png  
20200512 09:48  will  Note Added: 0011337  
20200512 09:49  will  Note Edited: 0011337  View Revisions 
20200514 09:57  FoamerLY  File Added: Equation 1.png  
20200514 09:57  FoamerLY  File Added: Equation 2.png  
20200514 09:57  FoamerLY  File Added: Equation 3.png  
20200514 09:57  FoamerLY  File Added: Equation 4.png  
20200514 09:57  FoamerLY  Note Added: 0011341  
20200514 19:26  will  Note Added: 0011344  
20200518 11:52  FoamerLY  File Added: picture 5.png  
20200518 11:52  FoamerLY  File Added: Table 2.png  
20200518 11:52  FoamerLY  File Added: picture 6.png  
20200518 11:52  FoamerLY  File Added: Table 3.png  
20200518 11:52  FoamerLY  Note Added: 0011352  
20200519 12:44  will  Note Added: 0011358  
20200521 07:34  FoamerLY  Note Added: 0011362  
20200522 08:42  will  Assigned To  => will 
20200522 08:42  will  Status  new => resolved 
20200522 08:42  will  Resolution  open => fixed 
20200522 08:42  will  Fixed in Version  => dev 
20200522 08:42  will  Note Added: 0011363 