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

Get Pressure and Velocity at point

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 20, 2012, 02:45
Default Get Pressure and Velocity at point
  #1
Member
 
Vitaly
Join Date: Jan 2012
Posts: 32
Rep Power: 5
Vitaly is on a distinguished road
Hello,

I may have a basic question.

I need to write a UDF that will read a point coordinate from a table and provide me with Velocity Magnitude and Pressure values at that point. That point might not be at a node, so fluent would have to interpolate.

Is there a UDF line command to get the Velocity Magnitude and Pressure at a specific X,Y,Z location?

Thanks,

Vitaly
Vitaly is offline   Reply With Quote

Old   May 21, 2012, 14:23
Default
  #2
Member
 
Join Date: Jun 2011
Posts: 48
Rep Power: 6
eishinsnsayshin is on a distinguished road
I've never done this kind of thing using a UDF. In FLUENT I would typically do this via journal file(s). Lets say you have an excel sheet table of x,y,and z locations in your domain that you want to track the pressure/velocity at. The idea would be to create a bunch of point surfaces, then to create monitors for each of these surfaces. In excel I would start a new sheet and write in a column of cells the TUI command that would go into FLUENT to create a point surface. For example it might go something like this (as a text, so you will probably use the "concatenate" command in excel):
/surface/point-surface point-01 1.5 2.2 8.9
Where the "point-01" would be the desired name of your point, and the following 3 numbers are the xyz coordinates.

You could do this for all your points in a single column in excel. This would get saved as a .txt file then a .jou file and read into fluent to create all of your points. You could alternately bypass excel if you only have a few points and type that TUI input directly into fluent as a whole or step by step. for example, just type /surface into fluent and hit enter to see the list of options within that menu, then type point-surface and hit enter, etc.

Next you would need to set up a surface monitor for all your points you just created by using a different TUI command. For example:

/solve/monitors/surface/set-monitor/point-01/"Area-Weighted Average" pressure point-01 () no no yes staticpressuremonitor.mfr-01 1

You personally would have to go through fluent command by command to make sure that the command above would work for your specific case and your specific version of fluent. For example you might not want to save the monitor file as a ".mfr" file, and you might want velocity instead of pressure, etc.

You could do this in excel the same way as the point surface creation described above, or, if you don't have a lot of points, just type the TUI command into fluent directly.

So that's what I would do but I'm sure there's other ways to do it. That might get you started in the right direction.

Hope this idea helps!
eishinsnsayshin is offline   Reply With Quote

Old   May 21, 2012, 19:33
Default
  #3
Member
 
Vitaly
Join Date: Jan 2012
Posts: 32
Rep Power: 5
Vitaly is on a distinguished road
Dear Eishinsnsayshin,

Thank You for the lengthy reply. That is definitely an option for me to try. I have a cloud that consists of thousands of points, so obviously I am trying to avoid doing anything non-automated.

Thanks again!

Vitaly
Vitaly is offline   Reply With Quote

Old   May 22, 2012, 05:50
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 531
Blog Entries: 14
Rep Power: 17
sbaffini will become famous soon enough
This is a very recurring topic. I admit it, i never had to do that, however it turns out that i have some material (UDFs) on this. With the premise that i share it with you WITHOUT ANY WARRANTY as I AM NOT THE AUTHOR of these UDFs and I NEVER USED THEM, you can try to figure out which one is better suited to your case (find them attached). Also, consider that much of them are similar if not identical, i put them all together as some may have subtle differences... just in case.

Actually, could you then share the UDF which you find is working, if any? Thanks

Edit: When you get the cell containing your point (as this is the main issue in the attached UDFs), you can use the locel cell value or use the gradient in this cell and interpolate linearly to the point from the centroid of the cell.
Attached Files
File Type: zip udf.zip (12.2 KB, 187 views)

Last edited by sbaffini; May 22, 2012 at 05:52. Reason: Adding some details
sbaffini is offline   Reply With Quote

Old   May 22, 2012, 07:26
Default
  #5
Member
 
Join Date: Jun 2011
Posts: 48
Rep Power: 6
eishinsnsayshin is on a distinguished road
My way of doing it using a journal file might not be the best way to go in your case now that I think of it. If you have thousands of points, maybe a UDF is the better way to go but I have no idea how to do it. If you had say just a few hundred (I've done around 300 pts before to get wake profiles), the journal method might be simpler, but with thousands, the solution will take forever to run, not to mention you will get a .mfr or .mon file for each point. These files can be combined to a single file using a script or something but yea I don't know; it will still output all those files....If you're dealing with that many, better to not use journals.

Maybe others have suggestions out there!
eishinsnsayshin is offline   Reply With Quote

Old   May 22, 2012, 10:00
Default
  #6
Member
 
Vitaly
Join Date: Jan 2012
Posts: 32
Rep Power: 5
Vitaly is on a distinguished road
Yes, I will look through them! Thanks a lot!
Vitaly is offline   Reply With Quote

Old   April 23, 2013, 19:39
Default
  #7
New Member
 
Simon
Join Date: Dec 2012
Location: Colorado
Posts: 16
Rep Power: 4
Roark is on a distinguished road
Could this also be done with CFD-Post?
Roark is offline   Reply With Quote

Old   April 25, 2013, 10:39
Default
  #8
New Member
 
Simon
Join Date: Dec 2012
Location: Colorado
Posts: 16
Rep Power: 4
Roark is on a distinguished road
I used CFD-Post to do this. It is very easy to make "session" files, which will probe a point given XYZ coordinates and write the flow field variables into a spreadsheet.
Roark is offline   Reply With Quote

Old   December 28, 2014, 21:58
Default Velocity at a given point locations
  #9
dcp
New Member
 
Deepak
Join Date: Dec 2014
Posts: 1
Rep Power: 0
dcp is on a distinguished road
Hi,

Sorry for digging this old thread but have we found the UDF/ CFD-post method in fluent to get the interpolated velocity values for huge number of location points provided in excel/csv file?

Thanks,
dcp
dcp 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
Difficulty in calculating angular velocity of Savonius turbine simulation alfaruk CFX 8 December 3, 2013 17:51
Neumann pressure BC and velocity field Antech Main CFD Forum 0 April 25, 2006 02:15
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 02:13
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


All times are GMT -4. The time now is 12:21.