View Issue Details

IDProjectCategoryView StatusLast Update
0000205OpenFOAM[All Projects] Bugpublic2011-05-26 08:27
ReporteralbertopAssigned Tohenry 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSOpenSuseOS Version11.3
Product Version 
Fixed in Version 
Summary0000205: Inconsistent behavior at processor boundaries in twoPhaseEulerFoam
DescriptionThe twoPhaseEulerFoam solver shows inconsistencies immediately after the processor boundaries used in parallel cases. This translates in altered values for the fields (alpha, U, ...) after such values.
Steps To ReproduceRun twoPhaseEulerFoam on the testcase bed2 on 4 processors, with simple decomposition along the y direction. Visualize the field of alpha in the portion of the system with 0.2 < y < 0.4, and rescale alpha between 0.54 and 0.55 at t = 0.01.
The case is attached for your convenience, with the decomposeParDict.
Additional InformationThe tar.gz file contains two pictures, showing the results in serial and in parallel.
TagsNo tags attached.

Activities

albertop

2011-05-25 00:35

reporter  

bed2.tar.gz (31,624 bytes)

albertop

2011-05-25 09:57

reporter  

GidaspowErgunWenYu.patch (1,586 bytes)
*** GidaspowErgunWenYu.C	2011-05-25 03:55:26.696938481 -0500
--- GidaspowErgunWenYuPatched.C	2011-05-25 03:55:18.764643670 -0500
***************
*** 73,106 ****
      volScalarField bp = pow(beta, -2.65);
      volScalarField Re = max(Ur*phasea_.d()/phaseb_.nu(), scalar(1.0e-3));
  
!     volScalarField Cds = 24.0*(1.0 + 0.15*pow(Re, 0.687))/Re;
! 
!     forAll(Re, celli)
!     {
!         if(Re[celli] > 1000.0)
!         {
!             Cds[celli] = 0.44;
!         }
!     }
!     
      // Wen and Yu (1966)
!     tmp<volScalarField> tKWenYu = 0.75*Cds*phaseb_.rho()*Ur*bp/phasea_.d();
!     volScalarField& KWenYu = tKWenYu();
! 
!     // Ergun
!     forAll (beta, cellj)
!     {
!         if (beta[cellj] <= 0.8)
!         {
!             KWenYu[cellj] =
!                 150.0*alpha_[cellj]*phaseb_.nu().value()*phaseb_.rho().value()
!                /sqr(beta[cellj]*phasea_.d().value())
!               + 1.75*phaseb_.rho().value()*Ur[cellj]
!                /(beta[cellj]*phasea_.d().value());
!         }
!     }
! 
!     return tKWenYu;
  }
  
  
--- 73,86 ----
      volScalarField bp = pow(beta, -2.65);
      volScalarField Re = max(Ur*phasea_.d()/phaseb_.nu(), scalar(1.0e-3));
  
!     volScalarField Cds = 
! 	neg(Re - 1000)*(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re)
!       + pos(Re - 1000)*0.44;
!  
      // Wen and Yu (1966)
!     return pos(beta - 0.8)*(0.75*alpha_*beta*Cds*phaseb_.rho()*Ur*bp/phasea_.d())
!       + neg(beta - 0.8)*(150.0*sqr(alpha_)*phaseb_.nu()*phaseb_.rho()
! 	/(beta*sqr(phasea_.d())) + 1.75*alpha_*phaseb_.rho()*Ur/phasea_.d());
  }
  
  
GidaspowErgunWenYu.patch (1,586 bytes)

albertop

2011-05-25 09:58

reporter   ~0000392

It seems the problem was caused by the implementation of the "GidaspowErgunWenYu" drag model, which did not update value properly at boundaries.

I attach a patch. I will look into the other drag models and let you know.

Thank you.

albertop

2011-05-25 10:43

reporter   ~0000393

Similar patches for Cds calculation to remove the loop in

- interfacialModel/GidaspowSchillerNaumann
- interfacialModel/SchillerNaumann
- interfacialModel/WenYu

and for B in interfacialModel/SyamlalOBrien.

I directly attach the corrected .C files.

albertop

2011-05-25 10:44

reporter  

GidaspowSchillerNaumannPatched.C (2,601 bytes)

albertop

2011-05-25 10:44

reporter  

SchillerNaumannPatched.C (2,421 bytes)

albertop

2011-05-25 10:45

reporter  

WenYuPatched.C (2,449 bytes)

albertop

2011-05-25 10:45

reporter  

SyamlalOBrienPatched.C (2,694 bytes)

henry

2011-05-25 11:57

manager   ~0000395

Thanks for the bug-report and the patches, I will merge them in today and push the changes into OpenFOAM-1.7.x

henry

2011-05-25 14:55

manager   ~0000396

Resolved by commit 1e7d927e96835885f4824e750bd182f76424f458

albertop

2011-05-25 21:08

reporter   ~0000404

Thanks for committing the patches. Unfortunately, I introduced a small bug with one of the patches. The GidaspowErgunWenYu.C return statement should read

    return
        pos(beta - 0.8)
       *(0.75*Cds*phaseb_.rho()*Ur*bp/phasea_.d())
      + neg(beta - 0.8)
       *(
           150.0*alpha_*phaseb_.nu()*phaseb_.rho()/(sqr(beta*phasea_.d()))
         + 1.75*phaseb_.rho()*Ur/(beta*phasea_.d())
        );

since K is divided by alpha*beta due to the phase-intensive form of the momentum equation. All other patches are fine.

Sorry for the inconvenience.

henry

2011-05-26 08:27

manager   ~0000409

Resolved by commit 40e7c06e5c65306e78e6a6c2c4fc6867ce250161

Issue History

Date Modified Username Field Change
2011-05-25 00:35 albertop New Issue
2011-05-25 00:35 albertop File Added: bed2.tar.gz
2011-05-25 09:57 albertop File Added: GidaspowErgunWenYu.patch
2011-05-25 09:58 albertop Note Added: 0000392
2011-05-25 10:43 albertop Note Added: 0000393
2011-05-25 10:44 albertop File Added: GidaspowSchillerNaumannPatched.C
2011-05-25 10:44 albertop File Added: SchillerNaumannPatched.C
2011-05-25 10:45 albertop File Added: WenYuPatched.C
2011-05-25 10:45 albertop File Added: SyamlalOBrienPatched.C
2011-05-25 11:57 henry Note Added: 0000395
2011-05-25 14:55 henry Note Added: 0000396
2011-05-25 14:55 henry Status new => resolved
2011-05-25 14:55 henry Resolution open => fixed
2011-05-25 14:55 henry Assigned To => henry
2011-05-25 21:08 albertop Note Added: 0000404
2011-05-25 21:08 albertop Status resolved => feedback
2011-05-25 21:08 albertop Resolution fixed => reopened
2011-05-26 08:27 henry Note Added: 0000409
2011-05-26 08:27 henry Status feedback => resolved
2011-05-26 08:27 henry Resolution reopened => fixed