Hi
I've tried to compile icoL
Hi
I've tried to compile icoLagrangianFoam, but when I do wmake I get the following error message: schairer@schairer-desktop:~/OpenFOAM/schairer-.5/run_execute/IcoLagrangianFoam$ wmake icoLagrangianFoam Making dependency list for source file icoLagrangianFoam.C could not open file particle.H for source file icoLagrangianFoam.C Making dependency list for source file HardBallParticle.C could not open file particle.H for source file HardBallParticle.C Making dependency list for source file IncompressibleCloud.C could not open file particle.H for source file IncompressibleCloud.C SOURCE=icoLagrangianFoam.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/schairer/OpenFOAM/OpenFOAM-1.5/src/cfdTools/incompressible -I/home/schairer/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/schairer/OpenFOAM/OpenFOAM-1.5/src/lagrangian/basic/lnInclude -I/home/schairer/OpenFOAM/OpenFOAM-1.5/src/cfdTools/general/lnInclude -I/home/schairer/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/schairer/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/schairer/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/icoLagrangianFoam.o In file included from icoLagrangianFoam.C:43: HardBallParticle.H:40:22: error: particle.H: No such file or directory In file included from icoLagrangianFoam.C:43: HardBallParticle.H:56: error: expected template-name before '<' token HardBallParticle.H:56: error: expected `{' before '<' token HardBallParticle.H:56: error: expected unqualified-id before '<' token icoLagrangianFoam.C:126: error: expected `}' at end of input make: *** [Make/linuxGccDPOpt/icoLagrangianFoam.o] Error 1 The error message starts with complaining that the file particle.H isn't found. I can't find it either, it doesn't seem to be in the icoLagrangianFoam directory. I use OpenFoam 1.5 and downloaded icoLagrangianFoam using the link given in the openfoamWiki. Could someone please help me to solve this problem? Cheers, Sara |
Hi Sara!
Please post your fil
Hi Sara!
Please post your files in the make directory, maybe there's the problem... |
Hi Ivan
The files in the make
Hi Ivan
The files in the make directory look like this: Make/files icoLagrangianFoam.C HardBallParticle.C IncompressibleCloud.C EXE = $(FOAM_USER_APPBIN)/icoLagrangianFoam Make/Options EXE_INC = \ -I$(LIB_SRC)/cfdTools/incompressible \ -I$(LIB_SRC)/OpenFOAM/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/cfdTools/general/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = -lfiniteVolume \ -llagrangian Make/linucGccDPOpt/dependencies dependencies up to date Make/linucGccDPOpt/dependencyFiles DEPENDENCIES = \ icoLagrangianFoam.dep\ HardBallParticle.dep\ IncompressibleCloud.dep Make/linucGccDPOpt/dontIncludeDeps - empty file - Make/linucGccDPOpt/files # 1 "files" # 1 "<built-in>" # 1 "<command-line>" # 1 "files" icoLagrangianFoam.C HardBallParticle.C IncompressibleCloud.C EXE = $(FOAM_USER_APPBIN)/icoLagrangianFoam Make/linucGccDPOpt/filesMacros EXE = $(FOAM_USER_APPBIN)/icoLagrangianFoam Make/linucGccDPOpt/includeDeps - empty file - Make/linucGccDPOpt/localObjectFiles LOCAL_OBJECTS = \ icoLagrangianFoam.o\ HardBallParticle.o\ IncompressibleCloud.o Make/linucGccDPOpt/objectFiles OBJECTS = \ $(OBJECTS_DIR)/icoLagrangianFoam.o\ $(OBJECTS_DIR)/HardBallParticle.o\ $(OBJECTS_DIR)/IncompressibleCloud.o Make/linucGccDPOpt/options # 1 "options" # 1 "<built-in>" # 1 "<command-line>" # 1 "options" EXE_INC = -I$(LIB_SRC)/cfdTools/incompressible -I$(LIB_SRC)/OpenFOAM/lnInclude -I$(LIB_SRC)/lagrangian/basic/lnInclude -I$(LIB_SRC)/cfdTools/general/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = -lfiniteVolume -llagrangian Make/linucGccDPOpt/sourceFiles SOURCE = \ icoLagrangianFoam.C\ HardBallParticle.C\ IncompressibleCloud.C Sorry for posting them all separately, I don't know how to do it all together. Thanks for looking at them. Sara |
Me again
I just realized that
Me again
I just realized that icoLagrangianFoam doesn't work with OpenFoam 1.5 which is the one I use. So that's probably the reason why it doesn't work for me. |
I have corrected the errors in
I have corrected the errors in order to use it on 1.5
http://www.file-upload.net/download-...m-1.5.zip.html The website upload does'nt work on my computer. I use this solver to create a rhoPorousSimpleLagrangianFoam which give the position of particule hiting a filter. I am actually trying to make a model allowing only small particles to go by, and increasing the wall porosity bit by bit along with the number of molecules clinging on it. It is very easy to understand what icoLagrangian does, but i have a lot of difficulties to modify it. |
@ Florian:
How can I set icoL
@ Florian:
How can I set icoLagrangianFoam to implement a massless particles model? In my application I just need a lagrangian tracking of particles that do not interact with nothing, but only carry with them a random number value... |
Hi Ivan
The density parame
Hi Ivan
The density parameter in the file cloudProperties means kg/m^3. I think you have just to chose "density = 0". |
There actually has been a vers
There actually has been a version of icoLagrangianFoam that is working with 1.5 in the SVN, I just never announced it and didn't update the Wiki-page (which I now did)
Nevertheless: be aware that the type of particles used in this solver does not reflect the state-of-the-art in 1.5. For that have look at the particle solvers that can be found in $FOAM_TUTORIALS or the demo-solver Hakan published here http://openfoamwiki.net/index.php/Co...idParticleFoam Bernhard |
Florian,
if I put density to
Florian,
if I put density to 0, are there any other interactions between the particles? Because I need just a lagrangian tracking without any interactions, I want that my particles only travel on the streamlines... |
Hi Bernhard
Thanks a lot, I m
Hi Bernhard
Thanks a lot, I managed to compile icoLagrangianFoam now. I've tried to work it out but I'm kind of stuck: could you please explain what the expressions in "injection" are? thres center vel0 vel1 d0 d1 tStart tEnd I guess center is the place where the particles are injected, d is the diameter and tStart to tEnd the period over which particles are injected. vel1 is the velocity. But what is vel0 since it's a scalar? And what are r0 and thres? Would be nice if you could give me a short explanation. Thanks, Sara |
In this solver there is no int
In this solver there is no interaction between the particles
Massless particles will follow exatly the stream's lines. thres (i think particule injection by step) center (center of the sphere of injection) r0 (radius of the sphere of injection) vel0, vel1 (in the solver vel=tmp*vel1+vel0 with tmp a vector) vel0 is vmin d0, d1 (in the solver d=random*d1+d0) d0 is the dmin tStart (start time of injection) tEnd (start end of injection) |
Hi Florian
Thanks for your an
Hi Florian
Thanks for your answer. Your explanations concerning vel0, vel1, d0, d1, tStart and tEnd sound good to me. However I don't think that thres can be the number of particles injected per time step. Thres is set to 0.2 in the cavity example. And however I change it in my file, the number of particles stays the same. What do you mean by "shpere of injection"? That the particles are injected forming a sphere? Anyway, it doesn't work for me. Sometimes when I change r0 from 0 to nonzero there's no particle injected ( but there was when r0 was 0). I'm really confused about this. Has anyone some experience with this solver and can give me a hint what I'm missing here? Cheers, Sara |
Hi, Sara
In the code the im
Hi, Sara
In the code the implementation is : pos = td.consProps().center_+tmp*td.constProps().ro_ tmp = (random().vect01()-vect(0.5,0.5,0.5))*2 In a easier langage the position of the particule is : pos = center + (a random vector) * ro Are you sure that the sphere is completely include in your mesh. thres appears just before scalar prop=random().scalar01(); if(prop<td.constProps().thres_) { (..) addparticule(ptr); } I think thres=1 mean injection each step thres=0.2 means that the probability of injection during a step is 20%. Florian |
Hi Sara,
I have modified i
Hi Sara,
I have modified icoLagrangianFoam previously to inject a number of particles in each time step (I think by default it only injects one). I have attached two modified files (hopefully they still are compatible) you will need to add a line "nParts 10;" to the injection section of the cloudProperties dictionary, and a recompile is required of course. http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif IncompressibleCloud.H http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif IncompressibleCloud.C Also, florian is correct with the threshold. If you set thresh to 1, you'll get nParts every step. Otherwise you may not always get a particle injected. I hope this helps. Cheers, Andrew |
Hi Again,
I attached the w
Hi Again,
I attached the wrong files. (They're for 1.4.1). Here are the correct files. http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif HardBallParticle.H http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif HardBallParticle.C http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif IncompressibleCloud.C Cheers, Andrew |
hi,
Andrew King : I tried to
hi,
Andrew King : I tried to put these files for OpenFOAM1.5 in icoLagrangianFoam but there were some failures related to density (which is because in icoLagrangianFoam density was defined in HardBallparticle class whereas in these files it is done in constantProperties class) also there was failure of constProp function (which is not at all defined in icoLagrangianFoam). I tried to modify but my C++ knowledge is very limited as when i solved these problems something else started failing? Please help me out? thanks florian about thres and sphere of injection ,I was searching for it. there is still one question regarding these dimensions... blockMeshdict we provide a multiplying factor on top 'converttoMetres' the dimesions given for injection are the absolute values in metres(dimesion of domain per say)or even these dimension will be multiplied by the factor mentioned in blockmeshdict thanks in advance sachin |
blockmesh has an influence onl
blockmesh has an influence only on mesh files during the mesh generation (file contain in Constant/polymesh).
You must specify initial value (velocity.. ) in the defauts units. |
hi all,
Thanks florian,
I ha
hi all,
Thanks florian, I have 2 more questions 1. I wanted to know the actual equation (if anyone can provide me some ref document it would be helpful) we are solving in the term relax, coeff in hardBallParticle from icoLagrangianFoam , so that i can understand whether i need to add few more terms in that calculation. 2. where and how are we calculating smoment_ thanks in advance sachin |
Hi Sachin!
@1: that relax-s
Hi Sachin!
@1: that relax-stuff is just a reformulation of the naive U_new = U_old+dt * dragForce/m (explicit Euler) in a way that makes sure that U_new will not exceed the gas-velocity for too large deltaT @2: That is just the momentum source for the gas (which is the negative sum of the momentum changes all the particles are seeing) Bernhard |
hi all,
Thanks Bernhard
I w
hi all,
Thanks Bernhard I would like to add thermal effect for drag force calculation and eventually to the momentum change in particle....so would like to know where are the calculation for smoment_ is done so that i can add these term...smoment_ is actually defined just above tsource calculation where it is used then where are the calculations for smoment_ done thanks in advance sachin |
hi all,
Thanks Bernhard
I w
hi all,
Thanks Bernhard I would like to add thermal effect for drag force calculation and eventually to the momentum change in particle....so would like to know where are the calculation for smoment_ is done so that i can add these term...smoment_ is actually defined just above tsource calculation where it is used then where are the calculations for smoment_ done thanks in advance sachin |
Parallel processing hangs-icoLagrangianFoam
Hello All,
I am Suraj. I am trying to integrate Lagrangian particle tracking with interFoam (OpenFOAM-1.5). The code icoLagrangianFoam (written for OpenFOAM-1.5) was really very helpful. Now, I am ready with my code but it does not work very well in parallel :( . I added some more physical variables apart from U (ie, pd and rho) to the code and changed the equations of motion. What the code does is that it runs in parallel for some time steps and after that it just does not do anything, as if it is in an infinite loop. It also does not respond to the changes made to controlDict. Is that an MPI issue? Is it common for particle codes (I did not see decomposeParDict in any of Lagrangian code tutorials)? It would be very helpful to have your suggestion on this. Another thing I saw in the code was the time step passed to the the HardBallParticle::updateProperties(...) function (ie the line updateProperties(deltaT,data,cellI,face()); ) . I think it should be dt, as defined in HardBallParticle::move(...) function. Thanks, Regards, Suraj Deshpande |
Quote:
One word of warning: I'm not planing to port the solver to OF 1.6 as starting with 1.5 there are example solvers that use lagrangian particles in the distribution. The 1.5-version of icoLagrangianFoam was just a straight port from the 1.4.1-version and didn't use the new particle classes. Could you be more specific on the topic "hangs": what is the last output (that would help to tell in which phase the problem occurs)? Have you ever run a debug-version of the code? Some problems come to light when running one (if you do any serious development you should have one) Does this always happen or only with certain decompositions? Try some different decompositions Quote:
Bernhard |
Dear Bernhard,
I am using OpenFOAM-1.5. I am making changes to the standard interFoam solver that came with it. I have not used the debug version of the code. The code stops while moving the particles. To be more precise, it stops at the statement: this->move(td) in IncompressibleCloud.C . I have seen this happen with larger (about half a million cells) cases; smaller 2D cases do not stop. Also, interestingly, the case hangs at different times for different number of decompositions (it hangs much earlier for cases decomposed into large number of subdomains eg 32 and does not hang at all for single processor cases, no matter how big the case is). This is what leads me into thinking if this is a problem with inter-processor communication in my code. This is what I see in the log: Courant Number mean: 0.0022608 max: 0.166463 Moving Particles 529 Particles moved. 0 walls hit. 0 particles left the model. 1 particles injected. Time = 4.0672 MULES: Solving for gamma Liquid phase volume fraction = 0.517803 Min(gamma) = -2.17137e-09 Max(gamma) = 1 MULES: Solving for gamma Liquid phase volume fraction = 0.517803 Min(gamma) = -1.04872e-10 Max(gamma) = 1 DICPCG: Solving for pd, Initial residual = 0.00124773, Final residual = 4.05203e-05, No Iterations 3 DICPCG: Solving for pd, Initial residual = 0.000151898, Final residual = 6.90998e-06 , No Iterations 6 DICPCG: Solving for pd, Initial residual = 3.09272e-05, Final residual = 9.78173e-08 , No Iterations 43 time step continuity errors : sum local = 3.48316e-10, global = -7.79987e-11, cumulat ive = 3.38557e-09 ExecutionTime = 538.01 s ClockTime = 541 s Courant Number mean: 0.00226081 max: 0.167813 Moving Particles ...... hangs here :confused: Also, there are times when the the number of particles crossing processor patch goes astronomically high (3-4Million) for number of droplets as small as 150. I am not sure if this an issue too... Thanks, Suraj |
Quote:
Pout << something << endl; statements (especially the stuff concerning parallelization) to find what might be the problem Bernhard |
Thanks Bernhard,
I will try this and let you know if I see something interesting. Thanks again, Regards, Suraj Deshpande |
Hi Bernhard,
I used the Pout statements as you suggested. I think I have a problem in Cloud<HardBallParticle>::move(TrackingData& td) of Cloud.C. The code stops at the statement "combineReduce(allNTrans, combineNsTransPs());" . I will try to see what this function does. Any suggestions? Thanks, Suraj Deshpande |
Quote:
Which version of 1.5 are you using (unpatched, 1.5.x or something in between)? (I think there was a fix sometime it affected parallel running of dieselFoam which might have been the same problem) Bernhard |
Hello OpenFoamer:
I wish all of you are enjoying the life now. I am implementing a model in the icoLagrangianFoam which can solve the sub-micro particles. I need to generate the random number. I try to use the class random().scalar01() in the HardBallParticle::updateProperties, but it is pity that there is some error as following: HardBallParticle.C:181: error: request for member 'scalar01' in 'random()', which is of non-class type 'long int' who can give me some hint on it? |
Hello OpenFoamer:
I wish all of you are enjoying the life now. I am implementing a model in the icoLagrangianFoam which can solve the sub-micro particles. I need to generate the random number. I try to use the class random().scalar01() in the HardBallParticle::updateProperties, but it is pity that there is some error as following: HardBallParticle.C:181: error: request for member 'scalar01' in 'random()', which is of non-class type 'long int' who can give me some hint on it? |
Quote:
Any help will be appraciated. |
Quote:
BTE: the way you call it will probably always give you the same number - but I would have to look at the implementation to be 100% sure |
Quote:
|
All times are GMT -4. The time now is 01:56. |