|
[Sponsors] |
May 20, 2012, 03:45 |
Get Pressure and Velocity at point
|
#1 |
Member
Vitaly
Join Date: Jan 2012
Posts: 32
Rep Power: 14 |
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 |
|
May 21, 2012, 15:23 |
|
#2 |
Member
Join Date: Jun 2011
Posts: 48
Rep Power: 15 |
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! |
|
May 21, 2012, 20:33 |
|
#3 |
Member
Vitaly
Join Date: Jan 2012
Posts: 32
Rep Power: 14 |
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 |
|
May 22, 2012, 06:50 |
|
#4 |
Senior Member
|
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. Last edited by sbaffini; May 22, 2012 at 06:52. Reason: Adding some details |
|
May 22, 2012, 08:26 |
|
#5 |
Member
Join Date: Jun 2011
Posts: 48
Rep Power: 15 |
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! |
|
May 22, 2012, 11:00 |
|
#6 |
Member
Vitaly
Join Date: Jan 2012
Posts: 32
Rep Power: 14 |
Yes, I will look through them! Thanks a lot!
|
|
April 23, 2013, 20:39 |
|
#7 |
New Member
Simon
Join Date: Dec 2012
Location: Colorado
Posts: 16
Rep Power: 13 |
Could this also be done with CFD-Post?
|
|
April 25, 2013, 11:39 |
|
#8 |
New Member
Simon
Join Date: Dec 2012
Location: Colorado
Posts: 16
Rep Power: 13 |
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.
|
|
December 28, 2014, 21:58 |
Velocity at a given point locations
|
#9 |
New Member
Deepak
Join Date: Dec 2014
Posts: 1
Rep Power: 0 |
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 |
|
April 11, 2017, 07:46 |
|
#10 | |
New Member
Join Date: Sep 2011
Posts: 15
Rep Power: 15 |
Quote:
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 . |
||
May 26, 2017, 03:07 |
|
#11 |
New Member
shefali
Join Date: May 2017
Posts: 5
Rep Power: 9 |
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. |
|
May 26, 2017, 23:12 |
|
#12 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66 |
go to file solution data export
|
|
January 26, 2020, 23:06 |
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 |
Quote:
Is there a UDF line command to get the Velocity at a specific X,Y location? Did you find the UDF which is working? |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Difficulty in calculating angular velocity of Savonius turbine simulation | alfaruk | CFX | 14 | March 17, 2017 07:08 |
Neumann pressure BC and velocity field | Antech | Main CFD Forum | 0 | April 25, 2006 03:15 |
Variables Definition in CFX Solver 5.6 | R P | CFX | 2 | October 26, 2004 03:13 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |