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

(DPM) Names for User Scalars (instead of Use Variable 0)?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2010, 07:27
Default (DPM) Names for User Scalars (instead of Use Variable 0)?
  #1
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Hello World.

I'm using a total number of 41 User Defined Scalars in my DPM-Iteration.

Is there a way to give these variables some other names than "User Variable 0" or "User Variable 23"?


This would be very usefull for (first) the distinction and (second) for the plots I'm plotting.

Any ideas?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   April 20, 2010, 07:51
Default
  #2
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17
coglione is on a distinguished road
hi sega,
there is a macro called Set_User_Scalar_Name. Have a look in UDF-Manual chapter 3.2.8.
cheers
coglione is offline   Reply With Quote

Old   April 20, 2010, 08:09
Default
  #3
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Quote:
Originally Posted by coglione View Post
hi sega,
there is a macro called Set_User_Scalar_Name. Have a look in UDF-Manual chapter 3.2.8.
cheers
Hm, looks like this macro works only for "real" User Defined Scalars (UDS).
I'm just using user variables from within the DPM-Model I access with
Code:
P_USER_REAL(p,i)
I think this is not the same.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   April 20, 2010, 08:33
Default
  #4
Senior Member
 
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17
coglione is on a distinguished road
I don't know, you have to try it out. However, if your intention is to make your code more readable for yourself, you might use enum to correlate a name with a specific index like this:

enum
{
myscalar
yourscalar
...
}
P_USER_REAL(p,myscalar) would then be equivalent to P_USER_REAL(p,0)

cheers
coglione 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
Variable names for mass flux for a recirculating-outlet boundary condition BRNN Fluent UDF and Scheme Programming 7 September 4, 2018 14:49
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 05:35
VARIABLE NAMES Alejandro A CFX 2 August 17, 2006 10:47
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 05:27
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 20:36.