View Issue Details

IDProjectCategoryView StatusLast Update
0003866OpenFOAMBugpublic2022-07-28 11:14
Reporteredwardji2005 Assigned Towill  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformlinuxOSUbuntuOS Version20.04
Fixed in Version10 
Summary0003866: patchFlowRateInjection + SprayCloud
DescriptionHello,

When the patchFlowRateinjection is used in the SprayCloud, the Floating point exception always happens. After having debugged, I found the error is from the constructor of the class SprayCloud at the line of "averageParcelMass_ = this->injectors().averageParcelMass(); ". This line is called from the InjectionModelList.C file, and will return a value of mass/massTotal. However, When the patchFlowRateinjection is used, the constructor of patchFlowRateinjection will initialize the variable massTotal as zero (this->massTotal_ = 0.0; ) no matter which value of massTotal in the file sprayCloudProperties is used. Due to the zero massTotal, the Floating point exception happens when the expression of the "mass/massTotal" in the InjectionModelList.C file is evaluated. Could you please check it?

Thanks a lot

Edward
TagsNo tags attached.

Activities

will

2022-07-27 16:51

manager   ~0012695

The problem is that the concept of an "averageParcelMass" based on total injected quantities makes no sense for an injection which simply creates particles at a rate proportional to the flow rate of the carrier. It really shouldn't be part of the injection model's interface.

Fortunately, "averageParcelMass" is only actually used in one breakup model (ReitzKHRT), so it is only a very small subset of the functionality that remains incompatible with the patch flow rate injection. The code will now raise a "NotImplemented" error if this combination is requested.

Considered fixed in dev and in version 10.

https://github.com/OpenFOAM/OpenFOAM-10/commit/b2f0c22c5002ec162897665260a59dab987cc8e8
https://github.com/OpenFOAM/OpenFOAM-dev/commit/32bef33f4c03d734161546d910dfe937a71209cb

Issue History

Date Modified Username Field Change
2022-07-22 18:50 edwardji2005 New Issue
2022-07-27 16:51 will Assigned To => will
2022-07-27 16:51 will Status new => resolved
2022-07-27 16:51 will Resolution open => fixed
2022-07-27 16:51 will Fixed in Version => 10
2022-07-27 16:51 will Note Added: 0012695