|
[Sponsors] |
October 12, 2010, 14:28 |
Acces to solver variables in UDF
|
#1 |
New Member
Grzegorz Kondora
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
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!!! |
|
October 12, 2010, 17:09 |
|
#2 |
New Member
Join Date: Sep 2010
Posts: 12
Rep Power: 16 |
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.
|
|
October 12, 2010, 17:18 |
|
#3 |
New Member
Grzegorz Kondora
Join Date: Oct 2010
Posts: 13
Rep Power: 16 |
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"); |
|
|
|
|
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 |