|
[Sponsors] |
February 2, 2009, 05:30 |
P_INIT_POS(p)[i]
|
#1 |
Guest
Posts: n/a
|
Hello everybody...
Does anybody know the exact meaning of this Macro..? The explanation in the UDF manual is not quite clear to me. Do i address to the Cell (position) a particle is in? I'm writing a UDF, that should give me the position of the Cell my atomizer is currently in (Airblast). Because i'm moving it in space. I tried it with P_CELL.. and i'm getting weird results.. Thanks... |
|
August 21, 2014, 03:42 |
|
#2 |
Member
Georgy
Join Date: Apr 2011
Location: Russia
Posts: 32
Rep Power: 15 |
Hi Patrick!
Did you find description of P_INIT_POS(p)[i]? How to use it? Thank you! |
|
August 21, 2014, 09:01 |
|
#3 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26 |
P_INIT_POS(p) contains the initial position of particle p.
Initial here means really initial. In the beginning of the simulation. This position will never change during the simulation. P_POS(p) contains the current position of particle p. This keeps changing during the calculation because your particle keeps moving. P_POS0(p) contains the position of the particle where it entered the current cell (mesh cell). If the particle is still in the first cell, it will be the same as P_INIT_POS. Once the particle has traveled to a different cell, P_POS0 will always be located on a cell boundary. How to use it: that question is unanswerable, it depends on what you want to do. That is like asking "how do I use the number 3". You use P_INIT_POS(p) if you do something for which the initial position of the particle is important. How you use it, depends 100% on your goal. |
|
August 21, 2014, 09:04 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26 |
Or, for an easier explanation:
On the 'passport' of a particle: P_INIT_POS is the birthplace of a particle. P_POS0 is where the particle last crossed a border. P_POS is the place where the particle now lives. |
|
August 23, 2014, 08:43 |
|
#5 |
Member
Georgy
Join Date: Apr 2011
Location: Russia
Posts: 32
Rep Power: 15 |
pakk, thank you very much for the detailed explanation! Now, it is clear to me!
|
|
|
|