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

Acces to solver variables in UDF

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 12, 2010, 14:28
Arrow Acces to solver variables in UDF
  #1
New Member
 
Grzegorz Kondora
Join Date: Oct 2010
Posts: 13
Rep Power: 15
kondora is on a distinguished road
Hi all,

How to access solver variables (like boundary conditions setting - for example: defined volume fraction for phase of ID 5 for the velocity inlet zone of ID 4) in UDF? I know that I can easily access scheme variables defined, but how to access this specific setting on boundary zone? Thanks in advance!!!
kondora is offline   Reply With Quote

Old   October 12, 2010, 17:09
Default
  #2
New Member
 
Join Date: Sep 2010
Posts: 12
Rep Power: 15
csmith_PADT is on a distinguished road
You could use a UDF macro known as DEFINE_PROFILE(), in which you can specify a profile for a boundary zone. In your case, you could create the profile for the volume fraction on the velocity inlet zone. There is a decent example of how to do this in the Fluent UDF manual.
csmith_PADT is offline   Reply With Quote

Old   October 12, 2010, 17:18
Default
  #3
New Member
 
Grzegorz Kondora
Join Date: Oct 2010
Posts: 13
Rep Power: 15
kondora is on a distinguished road
Ok, thanks. But I'm trying to create an UDF that will be universal, i.e. does not require modifying from the user side. I pretty sure that it is possible to access given settings in FLUENT since those variables are accessed by the solver as well somehow. For example zone name may be accessed by THREAD_NAME(c) while looping over particular domain and thread... Another way to access settings is to use scheme variables, it should have following form: in FLUENT | (%rpgetvar '/bc/wall-ID/phase-ID/vof) | or in UDF | RP_Get_Real("/bc/wall-ID/phase-ID/vof"); |
kondora is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 22:38
UDF to define variables orlik FLUENT 0 March 11, 2010 12:15
Pressure gradient in UDF for density based solver matzb FLUENT 0 February 22, 2010 07:34
FLUENT variables for the use in UDF sega Fluent UDF and Scheme Programming 2 January 19, 2010 04:41
Accessing Solver data for UDF CFDtoy FLUENT 7 April 13, 2006 17:52


All times are GMT -4. The time now is 05:22.