CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Modified twoPhaseEulerFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By alberto
  • 1 Post By alberto

Reply
 
LinkBack Thread Tools Display Modes
Old   November 7, 2006, 07:40
Default I can finally release the modi
  #1
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
I can finally release the modified version of twoPhaseEulerFoam.
It includes:

- Two additional drag models for gas-particle flows (Gidaspow, Syamlal-O'Brian).

- Additional radial distribution functions for the kinetic theory and their derivative.

- Additional granular pressure models and derivatives of the granular pressure coefficient.

- Additional frictional stress models.

- Variable averaging.

- Implementation of a "packing limiter" algorithm to try to stabilize the solution when the kinetic theory is used.
The implemented algorithm is just a trick to avoid numerical instabilities due to the discontinuity in the radial distribution function at the packing limit. However it requires quite a small time step. I think a more refined, less intrusive and robust method is needed such as some sort of relaxation of the granular pressure coupled to an implicit limitation on the particle-phase volume fraction similar to what done when the normal stress modulus is used in the same solver. Ideas and volunteers are welcome ;-)

- Correction of the zeroGradient BC proposed by Henry Weller and sent to me by Rasmus (thanks!).

I attach the code, an example and a detailed list of changes.






shenlong likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   March 25, 2007, 17:27
Default Is there anything wrong with t
  #2
Member
 
roy fokker
Join Date: Mar 2009
Posts: 44
Rep Power: 8
dbxmcf is on a distinguished road
Is there anything wrong with this forum? all attachments seemed unable to be clicked and download
dbxmcf is offline   Reply With Quote

Old   March 25, 2007, 17:32
Default I just downloaded one - works
  #3
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
I just downloaded one - works fine.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 25, 2007, 20:08
Default So are the above three downloa
  #4
Member
 
roy fokker
Join Date: Mar 2009
Posts: 44
Rep Power: 8
dbxmcf is on a distinguished road
So are the above three download links in this post (twoPhaseEulerFoam, BubblingBed, Changes) dead already? I can only see three icons but no links:-(
dbxmcf is offline   Reply With Quote

Old   March 25, 2007, 20:57
Default The reason I found this old po
  #5
Member
 
roy fokker
Join Date: Mar 2009
Posts: 44
Rep Power: 8
dbxmcf is on a distinguished road
The reason I found this old post is that when I was trying the default twoPhaseEulerFoam cases: bed and bubbleColumn, when the execution ends, the terminal gives a "Segmentation fault" when the program stops
*********************************
Starting time loop

End

Segmentation fault
***********************************
I wonder if there is some bug inside this solver and if there is already someone that has fixed it, thanks!
dbxmcf is offline   Reply With Quote

Old   March 26, 2007, 07:19
Default Look here: http://www.cfd-o
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Look here:

http://www.cfd-online.com/OpenFOAM_D...es/1/3349.html

I made some mistake when I posted the code because the archives were too big to be uploaded.

The original code contains some bugs, yes. Some of them are reported in the bug discussion board. I link them here (hopefully all):

http://www.cfd-online.com/OpenFOAM_D...tml?1173086743
http://www.cfd-online.com/OpenFOAM_D...tml?1171048500
http://www.cfd-online.com/OpenFOAM_D...tml?1170065229
http://www.cfd-online.com/OpenFOAM_D...tml?1170064625
http://www.cfd-online.com/OpenFOAM_D...tml?1169210617

However the segmentation fault at the end of the time loop is new to me.

Regards,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   March 26, 2007, 22:06
Default Thanks a lot, Alberto, I have
  #7
Member
 
roy fokker
Join Date: Mar 2009
Posts: 44
Rep Power: 8
dbxmcf is on a distinguished road
Thanks a lot, Alberto, I have figured out that the segmentation fault at the end of the time loop is due to gcc version, I changed the gcc version to 4.0.2, after I recompiled the twoPhaseEulerFoam, the error no long exits, although I don't know why.
dbxmcf is offline   Reply With Quote

Old   July 16, 2010, 14:03
Default TwoPhaseEqulerFoam
  #8
Member
 
N. A.
Join Date: May 2010
Posts: 64
Rep Power: 7
N. A. is on a distinguished road
Hi Alberto and friends,

I am interested in the TwoPhaseEulerFoam and the relevent documentation of the two new drag models. Can you please reconfirm the links where both the solver, source code and the documentation can be downloaded.

Thanks,
Nir
N. A. is offline   Reply With Quote

Old   March 8, 2012, 06:07
Default PackingLimiter
  #9
Senior Member
 
rkhr
Join Date: May 2011
Posts: 222
Rep Power: 7
Kanarya is on a distinguished road
Hi Foamers,

I am using OpenFoam 210 and twoPhaseEulerFoam and it seems like packing limiter or maxAlpha does not work. my max Alpha is 0.62 I am getting higher results like 0.67. Do you have any suggestions?

thanks
Kanarya is offline   Reply With Quote

Old   March 9, 2012, 04:52
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Hi Recep: what you obtain is normal. The packing limiter there is a hack I implemented long time ago, and not really the best way to deal with the problem. You should try to extend the approach used with the ppMagf model to the kinetic theory approach (include the force balance into alphaEqn) to have a physically correct and more reliable code.

About the JJ BC's you are having issues with, they were written for OF 1.7.x, so some change to the code is likely to be required.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   March 9, 2012, 13:23
Default PackingLimiter
  #11
Senior Member
 
rkhr
Join Date: May 2011
Posts: 222
Rep Power: 7
Kanarya is on a distinguished road
Hi Alberto,

thanks a lot for the information...

Best!

recep
Kanarya is offline   Reply With Quote

Old   March 9, 2012, 16:05
Default
  #12
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Warning, marketing my stuff. You find the details of the derivation in my paper on the implementation of multi-fluid equations into OF. You'll have to change it since twoPhaseEulerFoam does not use the conservative form for the momentum equation, and the PEA algorithm, but this makes things easier in terms of derivation/implementation.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   March 12, 2012, 13:06
Default ppMagf model
  #13
Senior Member
 
rkhr
Join Date: May 2011
Posts: 222
Rep Power: 7
Kanarya is on a distinguished road
Hi Alberto,
I am getting this error because I used maybe ppMagf(alpha) there is another way to define the function. I took your twoPhaseEulerPimpleFoam as an example to modify my TwoPhaseEulerFoam.
I do not understand really what is the function of "kineticTheory.ppMagf(alpha)"?
PS: I am using OF 210.


Making dependency list for source file twoPhaseEulerFoam.C
SOURCE=twoPhaseEulerFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I../bubbleFoam -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/transportModels/incompressible/lnInclude -IturbulenceModel -IkineticTheoryModels/lnInclude -IinterfacialModels/lnInclude -IphaseModel/lnInclude -Iaveraging -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/twoPhaseEulerFoam.o
In file included from twoPhaseEulerFoam.C:81:0:
alphaEqn.H: In function ‘int main(int, char**)’:
alphaEqn.H:50:24: error: ‘class Foam::kineticTheoryModel’ has no member named ‘ppMagf’
alphaEqn.H:56:24: error: ‘class Foam::kineticTheoryModel’ has no member named ‘ppMagf’
In file included from twoPhaseEulerFoam.C:92:0:
alphaEqn.H:50:24: error: ‘class Foam::kineticTheoryModel’ has no member named ‘ppMagf’
alphaEqn.H:56:24: error: ‘class Foam::kineticTheoryModel’ has no member named ‘ppMagf’
/opt/openfoam210/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
make: *** [Make/linux64GccDPOpt/twoPhaseEulerFoam.o] Error 1

Thanks in advance for your time and patience to answer!
Best!

Recep

Last edited by Kanarya; March 13, 2012 at 07:00.
Kanarya is offline   Reply With Quote

Old   March 13, 2012, 12:37
Default
  #14
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
ppMagf is just the first derivative of the particle pressure. In the momentum equation you can write

grad(pa) = G(alpha)grad(alpha),

being G(alpha) = d(pa)/d(alpha).

P.S. twoPhaseEulerPimpleFoam is obsolete (twoPhaseEulerFoam was modified after my release to replace PISO with PIMPLE) and was written for OF 1.7.x and never adapted. I re-wrote the whole solver and I got rid off of the phase-intensive form of the momentum equation, and made the drag treatment more implicit, as discussed in a paper of mine, but I haven't released the code.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   March 13, 2012, 12:45
Default
  #15
Senior Member
 
rkhr
Join Date: May 2011
Posts: 222
Rep Power: 7
Kanarya is on a distinguished road
Thanks Alberto,

your code will be available soon or at least 1 year you need?because I should decide which software I should use to simulate CFB. I have a feeling that with OF twoPhaseEulerFoam I will get trouble in high velocities. nevertheless, I am insisting in OF and I am going to try to modify it in my case...

Best!

Recep
Kanarya is offline   Reply With Quote

Old   March 13, 2012, 14:54
Default
  #16
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Kanarya View Post
Thanks Alberto,

your code will be available soon or at least 1 year you need?because I should decide which software I should use to simulate CFB. I have a feeling that with OF twoPhaseEulerFoam I will get trouble in high velocities. nevertheless, I am insisting in OF and I am going to try to modify it in my case...

Best!

Recep
I have no actual plan to release the code at the moment, mostly because releasing the code means receiving support requests and spending a lot of time answering to them. At the moment my policy is to share codes only with people interested in doing some research work together (this means a co-authored publication) and/or contribute to the code development.

For what concerns twoPhaseEulerFoam, with the appropriate modifications, it can be used for CFB simulations.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   March 13, 2012, 16:17
Default
  #17
Senior Member
 
rkhr
Join Date: May 2011
Posts: 222
Rep Power: 7
Kanarya is on a distinguished road
hi Alberto,

Thanks a lot. I can understand you.
my last question is: alphaEqn.H should remain same and I should include in UEqns.H derivative of the particle pressure right?

thanks,

Recep
Kanarya is offline   Reply With Quote

Old   March 13, 2012, 16:32
Default
  #18
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Kanarya View Post
hi Alberto,

Thanks a lot. I can understand you.
my last question is: alphaEqn.H should remain same and I should include in UEqns.H derivative of the particle pressure right?

thanks,

Recep
The alphaEqn changes as shown here (lines 46 - 66):

https://github.com/AlbertoPa/twoPhas...ter/alphaEqn.H

The momentum equation for phase a will have a term due to pa (line 110):

https://github.com/AlbertoPa/twoPhas...master/UEqns.H

The term is included also in the pEqn, since it is based on the global continuity (lines 27 - 30):

https://github.com/AlbertoPa/twoPhas.../master/pEqn.H

Finally, ppMagf for the kinetic theory is defined here (lines 390 - 429):

https://github.com/AlbertoPa/twoPhas...cTheoryModel.C

and you should use CarnhanStarling radial distribution function to avoid stability issues in dense regions. Note that ppMagf uses Schaeffer's frictional pressure anyway (This idea comes from the MFIX code).

Best,
Kanarya likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   March 13, 2012, 17:17
Default
  #19
Senior Member
 
rkhr
Join Date: May 2011
Posts: 222
Rep Power: 7
Kanarya is on a distinguished road
Thanks Alberto,

I will try this!

thanks a lot again!

best!

Recep
Kanarya is offline   Reply With Quote

Old   March 14, 2012, 07:10
Default
  #20
Senior Member
 
rkhr
Join Date: May 2011
Posts: 222
Rep Power: 7
Kanarya is on a distinguished road
Hi Alberto,

I did same steps you gave except step 2 (momentum equation) before and I had error like in post 13. so now I include in momentum equation as well and I got more errors:

Step 2:
The momentum equation for phase a will have a term due to pa (line 110):

https://github.com/AlbertoPa/twoPhas...master/UEqns.H


errors like:


/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:1972:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::tmp<Foam::fvMatrix<Type> >&, const Foam:imensionedField<Type, Foam::volMesh>&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:1985:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::tmp<Foam::fvMatrix<Type> >&, const Foam::tmp<Foam:imensionedField<Type, Foam::volMesh> >&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:1999:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::tmp<Foam::fvMatrix<Type> >&, const Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:2013:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::fvMatrix<Type>&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:2027:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::tmp<Foam:imensionedField<Type, Foam::volMesh> >&, const Foam::fvMatrix<Type>&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:2042:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >&, const Foam::fvMatrix<Type>&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:2057:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::tmp<Foam::fvMatrix<Type> >&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:2071:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::tmp<Foam:imensionedField<Type, Foam::volMesh> >&, const Foam::tmp<Foam::fvMatrix<Type> >&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:2086:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >&, const Foam::tmp<Foam::fvMatrix<Type> >&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:2153:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::fvMatrix<Type>&, const Foam::dimensioned<Type>&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:2166:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::tmp<Foam::fvMatrix<Type> >&, const Foam::dimensioned<Type>&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:2179:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::dimensioned<Type>&, const Foam::fvMatrix<Type>&)
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:2193:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foamerator-(const Foam::dimensioned<Type>&, const Foam::tmp<Foam::fvMatrix<Type> >&)
In file included from twoPhaseEulerFoam.C:92:0:
alphaEqn.H:50:24: error: ‘class Foam::kineticTheoryModel’ has no member named ‘ppMagf’
alphaEqn.H:56:24: error: ‘class Foam::kineticTheoryModel’ has no member named ‘ppMagf’
/opt/openfoam210/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
make: *** [Make/linux64GccDPOpt/twoPhaseEulerFoam.o] Error 1




Do you have any idea?

thanks again!

Best!

Recep
Kanarya is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modified reconstructPar jens_klostermann OpenFOAM Post-Processing 1 March 29, 2007 14:34
Modified twoPhaseEulerFoam alberto OpenFOAM Running, Solving & CFD 1 November 7, 2006 08:09
Modified Equation for CFX algorithm Craig Johansen CFX 0 August 27, 2004 23:02
modified pressure boundary Rhydar CFX 0 July 16, 2002 06:00
ENO without ROE MODIFIED duanyee Main CFD Forum 0 January 27, 2002 10:48


All times are GMT -4. The time now is 17:06.