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

UDF get the variables of specified B.C

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Andrew Garrard

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2004, 09:16
Default UDF get the variables of specified B.C
  #1
David
Guest
 
Posts: n/a
Hi, I want to know how to use UDF macro to get the values of coordinates and variables of the mesh nodes in the specified B.C.? for example,I want to get all the mesh nodes' coordinats & Static Pressure of some boundary faces,How to get and export them?thanks.
  Reply With Quote

Old   February 6, 2004, 14:31
Default Re: UDF get the variables of specified B.C
  #2
Andrew Garrard
Guest
 
Posts: n/a
This is actually pretty simple. There should be alot of helpful information in the Fluent 6 UDF manual. What is it that you want to do with these variables, print them to screen? If so you probably want something like this: DEFINE_PROFILE(coord_press, t, i)

{

fact_t f;

begin_f_loop(f, t)

{

real x[ND_ND];

F_CENTROID(x, f, t);

printf("\nface=%d, x-coord=%g, y-coord=%g, press=%g", f, x[0], x[1], C_P(f,t));

}

I haven't compiled or tested it, I did it on the fly, so there are probably a couple of mistakes, but you will probably want to customize it yourself depending on what you are trying to do with the UDF
seucj likes this.
  Reply With Quote

Old   February 6, 2004, 14:32
Default Re: UDF get the variables of specified B.C
  #3
Andrew Garrard
Guest
 
Posts: n/a
Sorry, you will need an end_f_loop(c,t) in there as well.
  Reply With Quote

Old   February 6, 2004, 22:05
Default Re: UDF get the variables of specified B.C
  #4
David
Guest
 
Posts: n/a
thank you Andrew.I am not very familiar with the UDF. I need the nodes's coordinates and variables,not the centroid,so whether the macro should be F_P(f,t)? But F_P(f,t) can not return the nodes' coordinates. How to solve this problem? And I want to export the nodes' coordinates & variables to a data file. I have used a UDF to define the B.C. profile,and whether this TWO UDFs should be writted in one file or two seperated files,and if the latter, how to compile them?thank u.
  Reply With Quote

Old   February 8, 2004, 23:15
Default Re: UDF get the variables of specified B.C
  #5
FJ
Guest
 
Posts: n/a
Hi,

F_P(f, t) shows static pressure of a specified face . Node coordintes are defined as NODE_X() and NODE_Y(), NODE_Z() , but there are just coordinate not any values on nodes in Fluent ,so nobody can get static pressure and temperature etc via UDF. (I think that when you select the Node-Based solver in Fluent , maybe you can get it).

The only thing you can get the node value of pressure ,you have to use a default export function(i.e. File-Export-Profile). This export data becomes node value.

Thank you

-- FJ
  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
UDF to record FLUENT Solver variables... mariachi Fluent UDF and Scheme Programming 11 September 24, 2019 01:07
UDF to record FLUENT solver variables... mariachi FLUENT 1 February 3, 2010 23:18
Urgent! Help on UDF to set B.C. of 3rd type Ray Hong FLUENT 0 December 28, 2005 20:35
UDF variables F1, y / problem with UDF Fabian FLUENT 6 June 2, 2003 11:22
About UDF of Inlet and Periodic B.C. JI Lucheng FLUENT 2 December 28, 2001 20:18


All times are GMT -4. The time now is 10:59.