View Issue Details

IDProjectCategoryView StatusLast Update
0003912OpenFOAMPatchpublic2022-10-18 21:25
Reportertniemi Assigned Towill  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Versiondev 
Fixed in Versiondev 
Summary0003912: Patch to prevent crash when using films with surfaceFilmModel none in cloudProperties
DescriptionCurrently it is not possible to have particles (eg. passive tracers) with surfaceFilmModel none in a case which includes surface films. The NoSurfaceFilm-model calls SurfaceFilmModel(CloudType& owner) constructor which ignores owner and sets deltaFilmPatch_(0). This will cause a segFault when using deltaFilmPatch_[primaryPatchi] in cacheFilmFields.

I have attached a patch which uses deltaFilmPatch_(owner.mesh().boundary().size()) to initialize the deltaFilmPatch_ similarly as in the other constructor.
Steps To ReproduceIn tutorials/modules/multicomponentFluid/splashPanel set surfaceFilmModel none; in constant/cloudProperties
TagsNo tags attached.

Activities

tniemi

2022-10-17 13:32

reporter  

patch.diff (738 bytes)   
diff --git a/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C b/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C
index 0f57ab7b3..e5a3e35d6 100644
--- a/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C
+++ b/src/lagrangian/parcel/submodels/Momentum/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C
@@ -41,7 +41,7 @@ Foam::SurfaceFilmModel<CloudType>::SurfaceFilmModel(CloudType& owner)
     diameterParcelPatch_(0),
     UFilmPatch_(0),
     rhoFilmPatch_(0),
-    deltaFilmPatch_(0),
+    deltaFilmPatch_(owner.mesh().boundary().size()),
     nParcelsTransferred_(0),
     nParcelsInjected_(0)
 {}
patch.diff (738 bytes)   

will

2022-10-18 21:25

manager   ~0012814

Thanks for the patch. Pushed here:

https://github.com/OpenFOAM/OpenFOAM-dev/commit/4b4c124f9785c51a78b8feab93f71b17955b8ca8

Issue History

Date Modified Username Field Change
2022-10-17 13:32 tniemi New Issue
2022-10-17 13:32 tniemi File Added: patch.diff
2022-10-18 21:25 will Assigned To => will
2022-10-18 21:25 will Status new => resolved
2022-10-18 21:25 will Resolution open => fixed
2022-10-18 21:25 will Fixed in Version => dev
2022-10-18 21:25 will Note Added: 0012814