|
[Sponsors] |
Creating New Solver: For particle-laden compressible jets |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 5, 2010, 08:03 |
Creating New Solver: For particle-laden compressible jets
|
#1 |
New Member
sankarv
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
Hello OpenFoamers
I am a new user of OpenFoam and I am trying to set-up a particle-laden under-expanded supersonic jet issuing into an open atmosphere. Note, before I started OpenFoam, I ran fluent and got a converged solution for this problem Here are details of OpenFoam simulation: --------------------------------------- Solver: rhoCentralFoam Grid: axi-symmetric grid imported from Fluent using fluentMeshtoFoam I.C: I used the converged Fluent solution as initial condition for openFoam I managed to get a converged steady state solution for this problem without particles Particle laden jets: !---------------------------------- Now I am trying to run a particle-laden jets. Since the solver rhoCentralFoam does not have Lagrangian Particle Tracking in it, I realized that I have to create a new solver. I came across the icoLagrangianFoam solver which is basically a particle tracking solver for an incompressible flow. I found a nice tutorial "Tutorial icoLagrangianFoam/SolidParticle" by Auerlia Vallier (google for file name: Tutorial_icoLagrangianFoam_reviewed.pdf). I used that and managed to implement particle tracking in the rhoCentralFoam solver (which is a compressible solver). I called this new solver rhoCentralParticleFoam This works well. But the problem is that the drag model in the original icoLagrangianFoam is a very simple constant drag model. I want to implement the standard drag model which is a function of particle Reynolds number based on the stokesian drag for spherical particles. Chapter 5 in the tutorial (Tutorial_icoLagrangianFoam_reviewed.pdf)describes how to implement this drag model. When I did these changes I get some compilation errors that I cannot comprehend. I admit that I don't know c++ and I am not able to figure out the exact problem. Can someone help me to fix these compilation errors ? I have attached a tar file which contains the codes I am using for this solver. If you just compile this code, you will be able to reproduce the errors. Please help. Thanks Vaidya |
|
April 6, 2010, 04:39 |
|
#2 |
Senior Member
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17 |
Dear sankarv,
you did not specify the version of openfoam you are using, so I'm not sure I do have the same compilation errors, but it is not that hard to read them. For example, during my compilation (with OF 1.6) I got this error in compiler output: IncompressibleCloud.C:118: error: no matching function for call to ' here's the function' candidates are: ' candidates functions'. It's most common compilation error I met, where I'm calling wrong number or wrong type of arguments. What you need to do is to look at the candidates (there may be more of them due to function overloading) and see what's wrong with your function parameters. Until you solve first error in output there's no reason to look for others. Sorry I do not have an answer to your compilation error. There's another question you may have consider. You have compressible flow, there is heat transfer, I guess, do the particles take part in that? If so, there might be a more clever way of implementing lagrangian particles into foam. It's the intermediate lagrangian class, which is quite versatile, for example drag calculation. You find it in $FOAM/src/lagrangian/intermediate and tutorial in FOAM/tutorial/lagrangian/rhoPisoTwinParcelFoam. You will find there solver and tutorial with 2 clouds. One is kinematic, one is thermo (can do all the kinematic magic + heat transfer). hope this helps matej |
|
April 6, 2010, 06:32 |
|
#3 |
New Member
sankarv
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
Dear Mr. Matej
Thank you very much for your reply. I am using version 1.5.x I will look into the first compilation error today. About your question on particles and heat transfer, I am not interested in the heat transfer to the particles. These are inert particles. I am only interested in using the correct drag models with 2 way coupling (from gas phase to particle phase and vice versa). I will look into the rhoPisoTwinParcelFoam solver today. Does this solver has injector ? I will let you know when I make some progress Thanks again Vaidya |
|
April 6, 2010, 16:58 |
|
#4 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Hello,
Matej's suggestion is correct and will save you some time because the drag laws are already implemented in kinematicCloud. The Lagrangian stack has been improved significantly in OF 1.5 and 1.6, making it easier to use with respect to what done in the original icoLagrangianFoam. You can select the InjectionModel ( http://foam.sourceforge.net/doc/Doxy...tionModel.html ) too (see the tutorial simplifiedSiwek, in kinematicCloud1Properties). Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
April 7, 2010, 13:23 |
|
#5 |
New Member
sankarv
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
Deat Matej & Alberto
Thank you very much for your suggestions. As per your recommendation, I used the lagrangian/intermediate cloud class and the it seems to be working well. I have a question about the injectionModel. In the kinematicCloudProperties, I could set ManualInjection or Coneinjection. ManualInjection, injects at only one instant (SOI) and then just evolves the particles. On the other hand coneinjector injects in a cone based on flow rate starting from an instant (SOI) for a certain "duration". For my problem, the particles are coming from a jet inlet, i,e they are released along the entire inlet patch, not just in a cone like in the coneinjector. They are also released continuously not just at one instant Can you tell me how I can do this ? Thanks Vaidya |
|
April 7, 2010, 13:46 |
|
#6 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
There is a patchInjection (check the doxygen link above).
Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
April 7, 2010, 15:48 |
|
#7 |
Member
Mihir
Join Date: Mar 2009
Posts: 40
Rep Power: 17 |
Sankarv
have you implemented the intermediate class in Rhocentral ? Could you share the file with me . Ive been trying to implement a lagrangian model since long and getting the same compiling error you posted. I havent been able to add the solidparticle class due to some issues with the Make folder :http://www.cfd-online.com/Forums/ope...-new-post.html . Maybe your help will save me some time and will be appreciated . |
|
April 7, 2010, 16:21 |
|
#8 |
New Member
sankarv
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
mihir,
Here it is ..Hope it helps. V |
|
April 10, 2010, 20:50 |
|
#9 |
New Member
sankarv
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
Alberto
Does the patchinjection work with OpenFoam 1.5.x (1) I downloaded the patchInjection.C and patchInjection.H (2) I created a new directory PatchInjection in src/lagrangian/intermediate/submodel/Kinematic/InjectionModel/ (3) I placed the files patchInjection.C and patchInjection.H in the diretory PatchInjection (4) I added the following lines in the code src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C #include "PatchInjection.H" makeInjectionModelType ( PatchInjection, KinematicCloud, basicKinematicParcel ); (5) I made the same changes in the codes src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.C From /src/lagrandian directory, I compiled using Allwmake (6) I get the following compilation error lnInclude/PatchInjection.C: In instantiation of ‘Foam::PatchInjection<Foam::KinematicCloud<Foam::b asicKinematicParcel> >’: parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C:57: instantiated from here lnInclude/PatchInjection.C:182: error: no type named ‘parcelType’ in ‘class Foam::KinematicCloud<Foam::basicKinematicParcel>’ lnInclude/InjectionModel.H: In static member function ‘static Foam::autoPtr<Foam::InjectionModel<CloudType> > Foam::InjectionModel<CloudType>::adddictionaryCons tructorToTable<InjectionModelType>::New(const Foam::dictionary&, CloudType&) [with InjectionModelType = Foam::PatchInjection<Foam::KinematicCloud<Foam::ba sicKinematicParcel> >, CloudType = Foam::KinematicCloud<Foam::basicKinematicParcel>]’: lnInclude/InjectionModel.H:129: instantiated from ‘Foam::InjectionModel<CloudType>::adddictionaryCon structorToTable<InjectionModelType>::adddictionary ConstructorToTable(const Foam::word&) [with InjectionModelType = Foam::PatchInjection<Foam::KinematicCloud<Foam::ba sicKinematicParcel> >, CloudType = Foam::KinematicCloud<Foam::basicKinematicParcel>]’ parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C:62: instantiated from here lnInclude/InjectionModel.H:119: error: cannot allocate an object of abstract type ‘Foam::PatchInjection<Foam::KinematicCloud<Foam::b asicKinematicParcel> >’ lnInclude/PatchInjection.H:68: note: because the following virtual functions are pure within ‘Foam::PatchInjection<Foam::KinematicCloud<Foam::b asicKinematicParcel> >’: lnInclude/InjectionModel.H:103: note: Foam::label Foam::InjectionModel<CloudType>::nParcelsToInject( Foam::scalar, Foam::scalar) const [with CloudType = Foam::KinematicCloud<Foam::basicKinematicParcel>] lnInclude/InjectionModel.H:217: note: Foam::vector Foam::InjectionModel<CloudType>:osition(Foam::la bel, Foam::scalar, const Foam:olyMeshInfo&) [with CloudType = Foam::KinematicCloud<Foam::basicKinematicParcel>] lnInclude/InjectionModel.H:225: note: Foam::vector Foam::InjectionModel<CloudType>::velocity(Foam::la bel, Foam::scalar, const Foam:olyMeshInfo&) [with CloudType = Foam::KinematicCloud<Foam::basicKinematicParcel>] lnInclude/InjectionModel.H:232: note: Foam::scalar Foam::InjectionModel<CloudType>::d0(Foam::label, Foam::scalar) const [with CloudType = Foam::KinematicCloud<Foam::basicKinematicParcel>] make: *** [Make/linux64GccDPOpt/makeBasicKinematicParcelInjectionModels.o] Error 1 I cannot figure out the issue. Can someone help ? Alberto, do you have any idea ? Thanks Vaidya |
|
April 11, 2010, 01:22 |
|
#10 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
It was introduced in the 1.6 release.
Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
April 11, 2010, 02:09 |
|
#11 |
Senior Member
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17 |
This will not work. You have to download 1.6. There were some changes like redefinition of lagrangian particles, where parcelType and ID were defined. You would need to reprogram the whole lagrangian class. It's much easier to download 1.6 version.
good luck matej |
|
April 17, 2010, 15:46 |
Patch Injection questions
|
#12 |
New Member
sankarv
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
Dear matej / alberto
I installed 1.6.x and and I now have a solver for running lagrangian particles in a compressible flow. I am little confused about the inputs for patch injection In the file constant/kinematicCloud1Properties PatchInjectionCoeffs { massTotal massTotal [ 1 0 0 0 0] 2.0e-4; patchName Jet_inlet; parcelBasisType mass ; parcelsPerSecond 100000000; SOI 0.000257; duration 0.005; volumeFlowRate constant 0.01; U0 (100.0 0 0); parcelPDF { pdfType RosinRammler; RosinRammlerPDF { minValue 10.0e-06; maxValue 100.0e-06; d (45.0e-06); n (0.5); } } } what does the following keywords mean ? (1) massTotal (2) parcelBasisType mass ; (3) parcelsPerSecond (4) volumeFlowRate I understand that massTotal is the total mass injected between SOI and SOI + duration. Similarly volume flow rate is the volume of liquid flow rate. What does the other 2 keywords mean ? Can you please explain ? Thanks Vaidya |
|
April 19, 2010, 04:18 |
|
#13 |
Senior Member
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17 |
Hi,
good to hear thinks are working. now to understand what the parameters means you better start to read the source code using doxygen. To find more, look here: http://foam.sourceforge.net/doc/Doxy...tionModel.html and here: http://foam.sourceforge.net/doc/Doxy...Injection.html good look/luck matej |
|
August 30, 2010, 14:06 |
|
#14 | |
New Member
Join Date: Jun 2009
Posts: 8
Rep Power: 17 |
Sanrakv
I managed to add intermediate class to rhoCentralFoam in 1.5 , the way you have done in rhoCentralLagintFoam. Howvwer I havent been succeffsul in compiling the same in 1.6 . I received the following compile error : Quote:
|
||
September 1, 2010, 18:03 |
|
#15 |
New Member
sankarv
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
I am not familiar with c++. So I am not sure how much I could help you with this. But by looking at the error message you posted, it looks like you are not including meshTools.h and reaEnvironmentalProperties.h in the options file of the make directory.
Please check that and see how if you can get it compiled |
|
September 1, 2010, 18:07 |
|
#16 |
New Member
Join Date: Jun 2009
Posts: 8
Rep Power: 17 |
Hey thanx
I actually solved the problem . You are right about the two files. I already included the "meshtools " directory . INstead of "readEnvironmentalProperties" , 1.6 invovled "readGravitationalAcceleration" . My code compiled smoothly. May I know which drag law are you using ? I am trying to compile a drag law based on the mean free path , which needs P , T variables. Do you know if i have to change arguments of the kinematic cloud ? |
|
September 1, 2010, 18:25 |
|
#17 | |
New Member
sankarv
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
Stateman,
Good to know that you solved the problem. I think I used the spherical drag law. I did not change the arguments of the kinematic cloud for this law.. Quote:
|
||
December 3, 2014, 20:41 |
|
#18 |
New Member
praveen kumar sharma
Join Date: Jun 2014
Posts: 17
Rep Power: 12 |
hi everyone,
I need to compile risingBubbleInterFoam but i got following error. Anyone know about that? SOURCE=risingBubbleInterFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/prandtl/OpenFOAM/OpenFOAM-2.3.0/src/transportModels -I/home/prandtl/OpenFOAM/OpenFOAM-2.3.0/src/transportModels/incompressible/lnInclude -I/home/prandtl/OpenFOAM/OpenFOAM-2.3.0/src/transportModels/interfaceProperties/lnInclude -I/home/prandtl/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/prandtl/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude -I/home/prandtl/OpenFOAM/OpenFOAM-2.3.0/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/risingBubbleInterFoam.o risingBubbleInterFoam.C:57:45: fatal error: readEnvironmentalProperties.H: No such file or directory #include "readEnvironmentalProperties.H" ^ compilation terminated. make: *** [Make/linux64GccDPOpt/risingBubbleInterFoam.o] Error 1 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
coupled solver for compressible flows | rean | Main CFD Forum | 0 | September 18, 2008 05:10 |
compressible, 2D NS solver? | john | Main CFD Forum | 2 | September 16, 2008 01:16 |
Can a compressible solver solve incompressible ? | jinwon park | Main CFD Forum | 17 | December 13, 2007 06:00 |
2-D Euler Solver for compressible flow in Matlab | Volkan | Main CFD Forum | 1 | October 28, 2007 02:40 |
Setting a B.C using UserFortran in 4.3 | tokai | CFX | 10 | July 17, 2001 17:25 |