CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Move particle in UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2008, 12:00
Default Move particle in UDF
  #1
Henrik
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

  Reply With Quote

Old   July 28, 2008, 16:35
Default Re: Move particle in UDF
  #2
fluent_urs
Guest
 
Posts: n/a
Henrik, use P_USER_REAL() hopefully, it will work.
  Reply With Quote

Old   July 29, 2008, 04:28
Default Re: Move particle in UDF
  #3
Henrik
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

  Reply With Quote

Old   July 29, 2008, 05:15
Default Re: Move particle in UDF
  #4
fluent_urs
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.

  Reply With Quote

Old   July 29, 2008, 05:28
Default Re: Move particle in UDF
  #5
Henrik
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
  Reply With Quote

Old   July 29, 2008, 11:55
Default Re: Move particle in UDF
  #6
fluent_urs
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.

  Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 02:51.