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

Get Pressure and Velocity at point

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 14
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: 14
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: 14
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: 2,152
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
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, 628 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: 14
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: 14
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: 13
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: 13
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, 20: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

Old   April 11, 2017, 06:46
Smile
  #10
New Member
 
Join Date: Sep 2011
Posts: 15
Rep Power: 14
djing is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
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.
Hello dear colleague ,

Thank you for the help , I would like to ask you if you know any macro which can be used in order to give the values of velocity in each cell center of the inlet boundary condition ?
the calculation of the velocity will be imposed by an equation that i already have and it should be inside a loop that give me the possibility to apply this equation for each cell of the inlet boundary condition , actualy i found many loop in Fluent UDF user Guid ' Fludf ' so please wich loop should we use in order to resolve this probleme ?
I will be very grateful if you can help me ...

Thank you .
djing is offline   Reply With Quote

Old   May 26, 2017, 02:07
Default
  #11
New Member
 
shefali
Join Date: May 2017
Posts: 5
Rep Power: 8
nishi is on a distinguished road
Hello,

I am modelling solidification model in fluent. I have very less knowledge of fluent though.
Could anyone please help me,I want a file containing y,z coordinates of all cell centroids and corresponding liquid fraction at each point.
nishi is offline   Reply With Quote

Old   May 26, 2017, 22:12
Default
  #12
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,672
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by nishi View Post
Hello,

I am modelling solidification model in fluent. I have very less knowledge of fluent though.
Could anyone please help me,I want a file containing y,z coordinates of all cell centroids and corresponding liquid fraction at each point.
go to file solution data export
LuckyTran is offline   Reply With Quote

Old   January 26, 2020, 22:06
Default Please Help!! I need to get velocities at points which is not at nodes (2D)
  #13
New Member
 
Rai Shigeta
Join Date: Dec 2019
Posts: 4
Rep Power: 6
raishigeta is on a distinguished road
Quote:
Originally Posted by sbaffini View Post
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.
I need to write a UDF that will read a point coordinate from a table and provide me with Velocity(u and v) 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 at a specific X,Y location?

Did you find the UDF which is working?
raishigeta is offline   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
Difficulty in calculating angular velocity of Savonius turbine simulation alfaruk CFX 14 March 17, 2017 06:08
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 05:13


All times are GMT -4. The time now is 07:15.