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

Lagrangian Particles

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 9, 2010, 12:25
Default Lagrangian Particles
  #1
New Member
 
Sumit Sinha
Join Date: Mar 2009
Location: Champaign, ILLINOIS, U.S.A
Posts: 25
Rep Power: 7
forsumit is an unknown quantity at this point
Dear Fomers,

I have been trying to use the following tutorial for my case, where I am trying to track particles in grit chamber feeding system

http://www.tfd.chalmers.se/~hani/kur...m_reviewed.pdf

I have also attached the picture, the problem is that the simulation just stops after 12 seconds.

Initially I did not implement all the changes but when things did not work with injecting one particle every time step, I decided to implement the improvement suggested in Chap-5 of the tutorial, but I am getting stuck at the last step of 5.2 in the tutorial and my error is "transportProperties was not declared in this scope"

Can any one suggest me some thing?

Thanks,
Sumit
Attached Images
File Type: jpg Plot.jpg (39.1 KB, 95 views)
forsumit is offline   Reply With Quote

Old   April 29, 2010, 14:48
Default solution?
  #2
Member
 
foamWang's Avatar
 
Roro Wang
Join Date: Mar 2010
Location: Cambridge, MA, USA
Posts: 30
Rep Power: 7
foamWang is on a distinguished road
Hi Sumit,

Did you solve this problem?
I met the exactly the same one.

Please comment.

Thanks.

Roro

Quote:
Originally Posted by forsumit View Post
Dear Fomers,

I have been trying to use the following tutorial for my case, where I am trying to track particles in grit chamber feeding system

http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2009/AureliaVallier/Tutorial_icoLagrangianFoam_reviewed.pdf

I have also attached the picture, the problem is that the simulation just stops after 12 seconds.

Initially I did not implement all the changes but when things did not work with injecting one particle every time step, I decided to implement the improvement suggested in Chap-5 of the tutorial, but I am getting stuck at the last step of 5.2 in the tutorial and my error is "transportProperties was not declared in this scope"

Can any one suggest me some thing?

Thanks,
Sumit
foamWang is offline   Reply With Quote

Old   April 29, 2010, 15:10
Default
  #3
New Member
 
Sumit Sinha
Join Date: Mar 2009
Location: Champaign, ILLINOIS, U.S.A
Posts: 25
Rep Power: 7
forsumit is an unknown quantity at this point
Hello Roro,

Unfortunately I did not, I got busy with some other work.

But if both of us are having the same problem may be we need to tinker with the code, or else may be both of us are doing some thing identically wrong

If you come to find out some thing kindly let me know, may be we should make some noise and some one who has more experience with this solver will help us in resolving the problem.

Cheers,
Sumit
forsumit is offline   Reply With Quote

Old   April 29, 2010, 15:24
Smile Solved
  #4
Member
 
foamWang's Avatar
 
Roro Wang
Join Date: Mar 2010
Location: Cambridge, MA, USA
Posts: 30
Rep Power: 7
foamWang is on a distinguished road
Hi Sumit,

I got the answer from others. ( thanks Alberto)

In createFields.H, declare transportProperties object before the two added commands like this:

IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
scalar rho(readScalar(transportProperties.lookup("rho"))) ; //add
scalar mu(readScalar(transportProperties.lookup("mu"))); //add

I still met other errors, but would like to explore by myself first preassuming you dont have. Let's come back later.

Thanks.

Roro

Quote:
Originally Posted by forsumit View Post
Hello Roro,

Unfortunately I did not, I got busy with some other work.

But if both of us are having the same problem may be we need to tinker with the code, or else may be both of us are doing some thing identically wrong

If you come to find out some thing kindly let me know, may be we should make some noise and some one who has more experience with this solver will help us in resolving the problem.

Cheers,
Sumit
foamWang is offline   Reply With Quote

Old   April 29, 2010, 16:26
Default some addition
  #5
Member
 
foamWang's Avatar
 
Roro Wang
Join Date: Mar 2010
Location: Cambridge, MA, USA
Posts: 30
Rep Power: 7
foamWang is on a distinguished road
Hi,

I also change in createParticle.H
from
IncompressibleCloud cloud(vpi,U)
to
IncompressibleCloud cloud(vpi,U, rho, mu)

error message for googling:

IncompressibleCloudI.H:85: error: ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::IncompressibleCloud::volFrac() const’ is private
foamWang is offline   Reply With Quote

Old   April 30, 2010, 17:01
Thumbs up Thanks
  #6
New Member
 
Sumit Sinha
Join Date: Mar 2009
Location: Champaign, ILLINOIS, U.S.A
Posts: 25
Rep Power: 7
forsumit is an unknown quantity at this point
Hey Roro,

I am going to implement the changes and see how it goes.

Thanks a lot.

Sumit
forsumit is offline   Reply With Quote

Old   May 1, 2010, 12:26
Default
  #7
New Member
 
Sumit Sinha
Join Date: Mar 2009
Location: Champaign, ILLINOIS, U.S.A
Posts: 25
Rep Power: 7
forsumit is an unknown quantity at this point
Hey Roro,

Just wanted to confirm some thing, when you started working with icoLagrangianFoam incorporated in PISO frame for turbulence. Did your simulation also stop after a while??

This was my initial problem. The bad part is that the simulation keeps on going for some time and then it just hangs without any messages, hence no way of knowing (at least for me) where to start the debugging procedure.

After which, I thought of incorporating the modification in the code as suggested in the tutorial. I am not sure if this is the right way to go. I also want to ask after incorporating the modification what input files would we need to run the new pisoLagrangianFoam.

Thanks,
Sumit
forsumit is offline   Reply With Quote

Old   May 12, 2010, 14:55
Default
  #8
Member
 
foamWang's Avatar
 
Roro Wang
Join Date: Mar 2010
Location: Cambridge, MA, USA
Posts: 30
Rep Power: 7
foamWang is on a distinguished road
Hi Sumit,

Sorry for late reply. I just realized you replied my post.

Honestly, I keep updating the code and cannot remember all the places I changed. I should learn some systematic way to debug.

Anyway, I don't have problem on turbulence modeling.
I suggest you use pisofoam to finish a single phase run with similar boundary conditions first (with the same turbulence model. I am using dynamic mixed Smagorinsky, which was the best one I discovered so far.).

Thanks.

Roro



Quote:
Originally Posted by forsumit View Post
Hey Roro,

Just wanted to confirm some thing, when you started working with icoLagrangianFoam incorporated in PISO frame for turbulence. Did your simulation also stop after a while??

This was my initial problem. The bad part is that the simulation keeps on going for some time and then it just hangs without any messages, hence no way of knowing (at least for me) where to start the debugging procedure.

After which, I thought of incorporating the modification in the code as suggested in the tutorial. I am not sure if this is the right way to go. I also want to ask after incorporating the modification what input files would we need to run the new pisoLagrangianFoam.

Thanks,
Sumit
foamWang is offline   Reply With Quote

Old   May 12, 2010, 16:10
Default
  #9
New Member
 
Sumit Sinha
Join Date: Mar 2009
Location: Champaign, ILLINOIS, U.S.A
Posts: 25
Rep Power: 7
forsumit is an unknown quantity at this point
Hey Roro,

I just wanted to let you know that, I am using Piso foam and I was able to run the simulation without any particles. It's just that when the particles come in picture I have troubles.

Especially as I said the model just hangs without giving me any messages, If it diverges or does some thing I can still think about things to do. But, when there is no error messages it become tricky.

Thanks,
Sumit
forsumit is offline   Reply With Quote

Old   May 12, 2010, 16:18
Default
  #10
Member
 
foamWang's Avatar
 
Roro Wang
Join Date: Mar 2010
Location: Cambridge, MA, USA
Posts: 30
Rep Power: 7
foamWang is on a distinguished road
Sorry.

Could you give me more details about ḧangs¨?
I dont quite understand.

Thanks.

Roro

Quote:
Originally Posted by forsumit View Post
Hey Roro,

I just wanted to let you know that, I am using Piso foam and I was able to run the simulation without any particles. It's just that when the particles come in picture I have troubles.

Especially as I said the model just hangs without giving me any messages, If it diverges or does some thing I can still think about things to do. But, when there is no error messages it become tricky.

Thanks,
Sumit
foamWang is offline   Reply With Quote

Old   May 12, 2010, 17:08
Default
  #11
New Member
 
Sumit Sinha
Join Date: Mar 2009
Location: Champaign, ILLINOIS, U.S.A
Posts: 25
Rep Power: 7
forsumit is an unknown quantity at this point
That is the whole problem Roro, when I say hangs what I mean is that the simulation stops after 12 seconds and message in out file is "trying to move the particles" and nothing else.
You can see the plot that I presented in the beginning of this thread
forsumit is offline   Reply With Quote

Old   May 12, 2010, 17:19
Default
  #12
Member
 
foamWang's Avatar
 
Roro Wang
Join Date: Mar 2010
Location: Cambridge, MA, USA
Posts: 30
Rep Power: 7
foamWang is on a distinguished road
One thing I would suggest is
change in HardBallParticle.C from
updateProperties(deltaT,data,cellI,face());
to
updateProperties(dt,data,cellI,face()); //RQ Wang edited

You may change other things in the function of move.
I guess the problem is in that class.

Pls let me know whether the problem is solved or other issue arises.

Thanks.

Roro



Quote:
Originally Posted by forsumit View Post
That is the whole problem Roro, when I say hangs what I mean is that the simulation stops after 12 seconds and message in out file is "trying to move the particles" and nothing else.
You can see the plot that I presented in the beginning of this thread
foamWang is offline   Reply With Quote

Old   May 12, 2010, 18:41
Default
  #13
New Member
 
Sumit Sinha
Join Date: Mar 2009
Location: Champaign, ILLINOIS, U.S.A
Posts: 25
Rep Power: 7
forsumit is an unknown quantity at this point
Thanks a lot Roro, I will let you know how it goes, Let me ask you some thing else meanwhile. As far as my limited experience with openFOAM is concerned I think I am at stage where I am able to run things and make minor modifications based on some tutorial .

Let me ask you what has been your strategy in getting a handle around the umpteen number of solvers and other things that the software offers.

Thanks,
Sumit
forsumit is offline   Reply With Quote

Old   May 12, 2010, 21:58
Default
  #14
New Member
 
Sumit Sinha
Join Date: Mar 2009
Location: Champaign, ILLINOIS, U.S.A
Posts: 25
Rep Power: 7
forsumit is an unknown quantity at this point
Hey Roro,

This is how the simulation hangs.

Time = 11.8

Courant Number mean: 0.0125869 max: 0.235498
Moving Particles
26 Particles moved. 0 walls hit. 0 particles left the model.
I am at the end of evolve
DILUPBiCG: Solving for Ux, Initial residual = 0.000120558, Final residual = 2.27526e-07, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.000212698, Final residual = 2.95205e-07, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.000378498, Final residual = 5.44318e-07, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.00106836, Final residual = 9.31466e-05, No Iterations 5
DICPCG: Solving for p, Initial residual = 0.000165794, Final residual = 1.60982e-05, No Iterations 58
time step continuity errors : sum local = 1.44282e-09, global = -1.43116e-11, cumulative = 3.05453e-05
DICPCG: Solving for p, Initial residual = 7.84517e-05, Final residual = 7.70299e-06, No Iterations 49
DICPCG: Solving for p, Initial residual = 2.40704e-05, Final residual = 2.36162e-06, No Iterations 429
time step continuity errors : sum local = 2.11662e-10, global = -6.05362e-12, cumulative = 3.05453e-05
DILUPBiCG: Solving for epsilon, Initial residual = 0.000173315, Final residual = 4.12178e-07, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 0.000339063, Final residual = 4.69541e-07, No Iterations 1
ExecutionTime = 10425.3 s ClockTime = 10494 s

Time = 11.81

Courant Number mean: 0.0125872 max: 0.235497
Moving Particles



As you can see, Courant numbers and other residual is under control but the simulation doesn't go beyond this and I don't see any thing else in the error file. Please let me know if you have any idea

Thanks,
Sumit
forsumit is offline   Reply With Quote

Old   May 12, 2010, 23:13
Default
  #15
Member
 
foamWang's Avatar
 
Roro Wang
Join Date: Mar 2010
Location: Cambridge, MA, USA
Posts: 30
Rep Power: 7
foamWang is on a distinguished road
Hi Sumit,

It is very glad to share experience with others.
Doing research often means exploring alone.
I am very happy to see somebody is accompanying.

My strategy is usually like this:

OMG! some thing wrong!
First, dump a couple of lines in source code like

Info << "RoRo is stuck 1" << endl;
Info << "RoRo is stuck 2" << endl;

Run it again...
Depending on output, you may narrow your error to some specific lines.

Run again with more Info lines until you can target a specific command or class.

Guess what the code means and modify tentatively.

Most time it's a frustrating process. It looks like a detective novel.
Solve the mystery one by one.

If too blue, find the boss or some guy online to talk. Get idea. Test until you are good.

Believe all the things are worthwhile. Don't give up easily.

I am just first year phd student. A lot of things to learn. Hope we can become friends along the road.
-----------------------------------------

On the issue of the Moving particle. I suggest you to target the specific lines. Your info line may be in a loop running repeatedly forever.

If you can show where you are stuck in the source code, it's much easier to solve the problem. At least we have more information to solve.

Thanks.
Roro




Quote:
Originally Posted by forsumit View Post
Hey Roro,

This is how the simulation hangs.

Time = 11.8

Courant Number mean: 0.0125869 max: 0.235498
Moving Particles
26 Particles moved. 0 walls hit. 0 particles left the model.
I am at the end of evolve
DILUPBiCG: Solving for Ux, Initial residual = 0.000120558, Final residual = 2.27526e-07, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.000212698, Final residual = 2.95205e-07, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.000378498, Final residual = 5.44318e-07, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.00106836, Final residual = 9.31466e-05, No Iterations 5
DICPCG: Solving for p, Initial residual = 0.000165794, Final residual = 1.60982e-05, No Iterations 58
time step continuity errors : sum local = 1.44282e-09, global = -1.43116e-11, cumulative = 3.05453e-05
DICPCG: Solving for p, Initial residual = 7.84517e-05, Final residual = 7.70299e-06, No Iterations 49
DICPCG: Solving for p, Initial residual = 2.40704e-05, Final residual = 2.36162e-06, No Iterations 429
time step continuity errors : sum local = 2.11662e-10, global = -6.05362e-12, cumulative = 3.05453e-05
DILUPBiCG: Solving for epsilon, Initial residual = 0.000173315, Final residual = 4.12178e-07, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 0.000339063, Final residual = 4.69541e-07, No Iterations 1
ExecutionTime = 10425.3 s ClockTime = 10494 s

Time = 11.81

Courant Number mean: 0.0125872 max: 0.235497
Moving Particles



As you can see, Courant numbers and other residual is under control but the simulation doesn't go beyond this and I don't see any thing else in the error file. Please let me know if you have any idea

Thanks,
Sumit
foamWang is offline   Reply With Quote

Old   May 13, 2010, 15:00
Default
  #16
New Member
 
Sumit Sinha
Join Date: Mar 2009
Location: Champaign, ILLINOIS, U.S.A
Posts: 25
Rep Power: 7
forsumit is an unknown quantity at this point
Hey Roro,

Thanks for the inputs. I can sure use a friend as I go along . I am penultimate year PhD student, I usually works with hydrodynamic and water quality model. I was initiated to OpenFOAM a little while ago and have tried things on and off.

I have used fluent in the past, but would like to learn openFOAM in a better way.

How abt you? What is your research all about?

Take Care,
Sumit
forsumit is offline   Reply With Quote

Old   May 13, 2010, 15:59
Default
  #17
Member
 
foamWang's Avatar
 
Roro Wang
Join Date: Mar 2010
Location: Cambridge, MA, USA
Posts: 30
Rep Power: 7
foamWang is on a distinguished road
Hi Sumit,

Cool. I am also in water quality/hydradynamics/coastal engineering field!

I am studying how dredged material release in coast or land reclaimation problem now. We are addressing how to minimize the turbidity of release.

Anyway, today I met the problem of "hang" in my case.
I think that's the problem of the parallelization.
Is your particles stuck at the boundary of the processes?

I can avoid this problem by running on single process.
We definitely need to address the bugs in parallel later.

At present, I found some processor patch is ok, but some are not. They stop the simulations.

Pls check it and keep in touch.

Thanks.

Roro

Quote:
Originally Posted by forsumit View Post
Hey Roro,

Thanks for the inputs. I can sure use a friend as I go along . I am penultimate year PhD student, I usually works with hydrodynamic and water quality model. I was initiated to OpenFOAM a little while ago and have tried things on and off.

I have used fluent in the past, but would like to learn openFOAM in a better way.

How abt you? What is your research all about?

Take Care,
Sumit
foamWang is offline   Reply With Quote

Old   October 13, 2010, 09:29
Default
  #18
New Member
 
Join Date: Mar 2010
Posts: 13
Rep Power: 7
spej is on a distinguished road
Hi Foamers,

I have the same problem with the stop of writing data in my output-file. I tried the way of RoRo with the lines, but get no results at the moment. Has anyone solved the problem?

regards

Last edited by spej; October 14, 2010 at 09:26.
spej is offline   Reply With Quote

Old   October 14, 2010, 09:32
Default
  #19
New Member
 
Join Date: Mar 2010
Posts: 13
Rep Power: 7
spej is on a distinguished road
I believe i find an endless loop in the move-function. I compare the hardballpartilce-synatx and the solidparticle-syntax. In the solidparticle move function there is an extra if-case:

if (onBoundary() && td.keepParticle)
{
if (isType<processorPolyPatch>(pbMesh[patch(face())]))
{
td.switchProcessor = true;
}
}

this if-instruction is missing in the hardballparticle.c. Could this be the reason for the endless loop?
spej is offline   Reply With Quote

Old   October 14, 2010, 12:45
Default
  #20
Member
 
foamWang's Avatar
 
Roro Wang
Join Date: Mar 2010
Location: Cambridge, MA, USA
Posts: 30
Rep Power: 7
foamWang is on a distinguished road
Could you target any specific command line in "move" class?

I didn't add the "if" command as you stated, but still solved this problem.

Since I made too many other modifications, I don't remember where to further edit. Please remind me.

Thanks.

Roro

Quote:
Originally Posted by spej View Post
I believe i find an endless loop in the move-function. I compare the hardballpartilce-synatx and the solidparticle-syntax. In the solidparticle move function there is an extra if-case:

if (onBoundary() && td.keepParticle)
{
if (isType<processorPolyPatch>(pbMesh[patch(face())]))
{
td.switchProcessor = true;
}
}

this if-instruction is missing in the hardballparticle.c. Could this be the reason for the endless loop?
foamWang 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
Lagrangian material particles bramv101 STAR-CCM+ 3 October 24, 2011 08:31
Sampling tool for Lagrangian particles sankarv OpenFOAM 1 July 1, 2010 11:34
Mapping Lagrangian particles gschaider OpenFOAM Bugs 1 April 1, 2009 05:05
Creating Lagrangian particles for postprocessing hjasak OpenFOAM Post-Processing 6 July 2, 2008 10:59
lagrangian particles allan CD-adapco 1 August 18, 2004 05:01


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