Creating New Solver: For particle-laden compressible jets
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:
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.
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
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
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).
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 ?
There is a patchInjection (check the doxygen link above).
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 .
Here it is ..Hope it helps.
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
(5) I made the same changes in the codes
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>::position(Foam::la bel, Foam::scalar, const Foam::polyMeshInfo&) [with CloudType = Foam::KinematicCloud<Foam::basicKinematicParcel>]
lnInclude/InjectionModel.H:225: note: Foam::vector Foam::InjectionModel<CloudType>::velocity(Foam::la bel, Foam::scalar, const Foam::polyMeshInfo&) [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 ?
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.
Patch Injection questions
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
massTotal massTotal [ 1 0 0 0 0] 2.0e-4;
parcelBasisType mass ;
volumeFlowRate constant 0.01;
U0 (100.0 0 0);
what does the following keywords mean ?
(2) parcelBasisType mass ;
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 ?
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
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 :
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
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 ?
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..
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
make: *** [Make/linux64GccDPOpt/risingBubbleInterFoam.o] Error 1
|All times are GMT -4. The time now is 05:57.|