|
[Sponsors] |
July 28, 2008, 12:00 |
Move particle in UDF
|
#1 |
Guest
Posts: n/a
|
Hello everybody,
I have a small (?) problem: I want to move DPM particles from certain regions of my domain to another part on some occasions. I try to write a UDF that manipulates P_POS(p). This seems to work well when I output particle position to the console or display particle tracks. However, if I loop over my particles at the end of each timestep, their position is returned as something else (i.e. continuing from where they were before I moved them). There seems to be some confusion about where the particles really are. This also leads to difficulties with boundary conditions etc. What I need to know is thus this: How do I change the particle position for real? Is there some storage macro that I can use? I can see there are things like P_STORAGE and SV_P defined in dpm.h but I really don't know how to use them right now. Thanks for any input, Henrik |
|
July 28, 2008, 16:35 |
Re: Move particle in UDF
|
#2 |
Guest
Posts: n/a
|
Henrik, use P_USER_REAL() hopefully, it will work.
|
|
July 29, 2008, 04:28 |
Re: Move particle in UDF
|
#3 |
Guest
Posts: n/a
|
Thank you very much for your fast reply!
However, I am not fully sure of how I could use P_USER_REAL? As far as I can see, that macro is used for the scalars associated with each computational parcel? So, how does that relate to the current particle position? Thank you very much in advance, Henrik |
|
July 29, 2008, 05:15 |
Re: Move particle in UDF
|
#4 |
Guest
Posts: n/a
|
In my opinion, you can store the intermediate values, position, in your case and then use the values stored in the P_USER_REAl to tetrieve later for updating. Its just like using an array. I am not usre if this can work, but you can make a short UDF with this and try.
|
|
July 29, 2008, 05:28 |
Re: Move particle in UDF
|
#5 |
Guest
Posts: n/a
|
Thank you again!
The problem seems to be that it does not matter when or where I change P_POS(p)... At the end of each time step, when particle positions are updated, they are advanced from their old positions anyhow. Meanwhile, the P_POS(p) macro continues to return the new positions. Very confusing. /Henrik |
|
July 29, 2008, 11:55 |
Re: Move particle in UDF
|
#6 |
Guest
Posts: n/a
|
can u do anything in the loop ? the particle positions are updated by the P_POS macro. but if you are looping in the same old cell, it will start all over again definitely, from the old place. thats true.. can you not do anything in the looping structure ? my initial idea of P_USER_REAL is not right, as this is a different problem. if i get any idea, i will surely get back.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to make domain move? | Zhang Yaohua | Phoenics | 2 | September 20, 2008 06:38 |
how to move a set of vertex | cthsieh | Siemens | 2 | September 5, 2007 21:18 |
Turn and move Coord0 | Aloise | CFX | 1 | December 18, 2006 13:01 |
Making something move, not the air | Cyril | FLUENT | 2 | January 30, 2006 08:40 |
Grid does'nt move!? | Sabe | Siemens | 4 | February 13, 2004 06:50 |