I can finally release the modi
I can finally release the modified version of twoPhaseEulerFoam.
It includes:  Two additional drag models for gasparticle flows (Gidaspow, SyamlalO'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 particlephase 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. 
Is there anything wrong with t
Is there anything wrong with this forum? all attachments seemed unable to be clicked and download

I just downloaded one  works
I just downloaded one  works fine.
Hrv 
So are the above three downloa
So are the above three download links in this post (twoPhaseEulerFoam, BubblingBed, Changes) dead already? I can only see three icons but no links:(

The reason I found this old po
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 ithttp://www.cfdonline.com/OpenFOAM_D...part/happy.gif, thanks! 
Look here:
http://www.cfdo
Look here:
http://www.cfdonline.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.cfdonline.com/OpenFOAM_D...tml?1173086743 http://www.cfdonline.com/OpenFOAM_D...tml?1171048500 http://www.cfdonline.com/OpenFOAM_D...tml?1170065229 http://www.cfdonline.com/OpenFOAM_D...tml?1170064625 http://www.cfdonline.com/OpenFOAM_D...tml?1169210617 However the segmentation fault at the end of the time loop is new to me. Regards, Alberto 
Thanks a lot, Alberto, I have
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.

TwoPhaseEqulerFoam
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 
PackingLimiter
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 
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. 
PackingLimiter
Hi Alberto,
thanks a lot for the information... Best! recep 
Warning, marketing my stuff. You find the details of the derivation in my paper on the implementation of multifluid 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.

ppMagf model
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 Wnounusedparameter Woldstylecast Wnonvirtualdtor O3 DNoRepository ftemplatedepth100 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’ [Wunusedvariable] make: *** [Make/linux64GccDPOpt/twoPhaseEulerFoam.o] Error 1 Thanks in advance for your time and patience to answer! Best! Recep 
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 rewrote the whole solver and I got rid off of the phaseintensive 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. 
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 
Quote:
For what concerns twoPhaseEulerFoam, with the appropriate modifications, it can be used for CFB simulations. 
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 
Quote:
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, 
Thanks Alberto,
I will try this! thanks a lot again! best! Recep 
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> > Foam:perator(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> > Foam:perator(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’ [Wunusedvariable] make: *** [Make/linux64GccDPOpt/twoPhaseEulerFoam.o] Error 1 Do you have any idea? thanks again! Best! Recep 
All times are GMT 4. The time now is 06:35. 