View Issue Details

IDProjectCategoryView StatusLast Update
0001287OpenFOAMBugpublic2014-12-18 13:09
Reporterdkxls Assigned Tohenry  
PriorityurgentSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinux x86_64OSopenSUSEOS Version12.3
Summary0001287: [SprayParcel]: Incorrect properties for parent/child parcels after child parcel is added
DescriptionSeveral properties are set incorrectly after breakup, mainly due to a confusion of parcel and particle mass (related to that is bug #1285).

1. The breakup model returns child parcel mass and not particle (i.e. droplet) mass.

2. Correctly reducing the 'mass0' of the parent parcel is not possible in the present implementation. But as the quantity has no relevance in spray simulation the quantity should be left unchanged for the parent parcel after breakup.

3. The initial droplet diameter d0 of the child parcels is dc and not d0 of the parent parcel.

4. The age of the child droplet is 0.

The attached patch corrects these issues.
Tagsbreakup, Lagrangian, spray

Activities

dkxls

2014-05-10 15:11

reporter  

0001-lagrangian-SprayParcel-Correct-properties-for-child-.patch (1,638 bytes)   
diff --git a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C
index 63f4e74..da615ae 100644
--- a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C
+++ b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C
@@ -259,7 +259,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup

     const vector g = td.cloud().g().value();

-    scalar massChild = 0.0;
+    scalar parcelMassChild = 0.0;
     scalar dChild = 0.0;
     if
     (
@@ -285,24 +285,26 @@ void Foam::SprayParcel<ParcelType>::calcBreakup
             Urmag,
             this->tMom(),
             dChild,
-            massChild
+            parcelMassChild
         )
     )
     {
         scalar Re = rhoAv*Urmag*dChild/muAv;
-        this->mass0() -= massChild;

         // Add child parcel as copy of parent
         SprayParcel<ParcelType>* child = new SprayParcel<ParcelType>(*this);
-        child->mass0() = massChild;
         child->d() = dChild;
-        child->nParticle() = massChild/(this->rho()*this->volume(dChild));
+        child->d0() = dChild;
+        const scalar massChild = child->mass();
+        child->mass0() = massChild;
+        child->nParticle() = parcelMassChild/massChild;

         const forceSuSp Fcp =
             forces.calcCoupled(*child, dt, massChild, Re, muAv);
         const forceSuSp Fncp =
             forces.calcNonCoupled(*child, dt, massChild, Re, muAv);

+        child->age() = 0.0;
         child->liquidCore() = 0.0;
         child->KHindex() = 1.0;
         child->y() = td.cloud().breakup().y0();
--
1.8.1.4

dkxls

2014-12-17 16:18

reporter   ~0003327

This bug is still present in 2.3.1!

henry

2014-12-18 13:08

manager   ~0003336

Thanks for the bug-report and patch
Resolved by commit 3ccfb5ae3948b7e55486ff83c26a1c68dd9a0ed0

Issue History

Date Modified Username Field Change
2014-05-10 15:11 dkxls New Issue
2014-05-10 15:11 dkxls File Added: 0001-lagrangian-SprayParcel-Correct-properties-for-child-.patch
2014-06-11 16:10 dkxls Tag Attached: breakup
2014-06-11 16:10 dkxls Tag Attached: Lagrangian
2014-06-11 16:10 dkxls Tag Attached: spray
2014-12-17 16:18 dkxls Note Added: 0003327
2014-12-18 13:08 henry Note Added: 0003336
2014-12-18 13:08 henry Status new => resolved
2014-12-18 13:08 henry Resolution open => fixed
2014-12-18 13:08 henry Assigned To => henry