CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Lagrangian particle (https://www.cfd-online.com/Forums/openfoam/63947-lagrangian-particle.html)

holzmichel April 24, 2009 08:13

Lagrangian particle
 
Hello all,

can someone explain me what the number after the lagrangian position (x y z) n means, please. I have tried to find out the meaning but I come to no solution :confused:.

Thanks

Michél

niklas April 24, 2009 12:59

It is the normal of the plane that the parcel moves in for 2D wedge simlations.

holzmichel April 27, 2009 02:55

thank you for the answer

niklas April 27, 2009 07:11

actually, i was wrong.

its the cell number of the cell it is currently in.
the vectors are all written last.

holzmichel April 27, 2009 08:51

well. are you sure? because i played with the number and the particles start every time at the same position but has different movements properties.

holzmichel April 27, 2009 10:35

ok. you are right.
but where can i found the function for this?

niklas April 28, 2009 05:49

Quote:

Originally Posted by holzmichel (Post 214347)
ok. you are right.
but where can i found the function for this?

src/lagrangian/basic/Particle/Particle.H

holzmichel April 28, 2009 06:40

thank you again

wikstrom May 4, 2009 04:43

kinematicCloud, a different question on lagrangian particles
 
1 Attachment(s)
Hi,

I want to trace passive particles through a steady state RANS-solution, and have written a simple code using kinemaitcCloud. Seems to work well at first, but as the time steps march on, the clock time for each time step increases immensely. What might be the reason to this behaviour? Sure, as the particles enter further into the solution the flow speed increases, but not tremendously so. See the attached graph showing how clock time increases with time steps. Number of parcels are ~1e4 and the case size is about 2M cells from snappyHexMesh.

Cheers
Niklas

gschaider May 5, 2009 05:39

Hi Niklas!

Quote:

Originally Posted by wikstrom (Post 215045)
I want to trace passive particles through a steady state RANS-solution, and have written a simple code using kinemaitcCloud. Seems to work well at first, but as the time steps march on, the clock time for each time step increases immensely. What might be the reason to this behaviour? Sure, as the particles enter further into the solution the flow speed increases, but not tremendously so. See the attached graph showing how clock time increases with time steps. Number of parcels are ~1e4 and the case size is about 2M cells from snappyHexMesh.

First question: does the number of particles stay constant during the simulation? (I guess you already checked for that). If for instance injected particles get trapped in some cavity and won't leave the system that would explain the increase

Does the time spent in the lagrangian solver increase or in the other parts? To find an answer to things like that I use this extension:
http://www.cfd-online.com/Forums/ope...profiling.html
If you prefer to use valgrind (like Henry suggested in that thread) I'd suggest that you restart from one of the later timesteps (where the calculation-time already exploded) because callgrind multiplies the time a run needs(at least for me, but maybe I'm using it wrong).

If the number of particles in the system doesn't increase and the lagrangian part is the one that eats up the CPU-time then I guess the reason is that the time-step during the lagrangian calculation becomes very small (either because particles have to travel through very small cells or because particles often pass zones were the velocity relative to the gas is high) but that is just a guess

Bernhard

wikstrom May 5, 2009 09:07

kinematicCloud
 
Thank you Bernhard for the answer!

The answer probably lies in small local time steps as the particles enter the 'interesting region'. To be realistic, sadly, I will not have the time to profile the solver; It was years since I used Valgrind I'm afraid...

again, Thank you.

N.

wikstrom May 5, 2009 09:47

Callgrind
 
Oh, it does not look that hard to use :-) I'll try it.

N.


All times are GMT -4. The time now is 19:58.