|
[Sponsors] |
(DPM) Names for User Scalars (instead of Use Variable 0)? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 20, 2010, 07:27 |
(DPM) Names for User Scalars (instead of Use Variable 0)?
|
#1 |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
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!" |
|
April 20, 2010, 07:51 |
|
#2 |
Senior Member
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17 |
hi sega,
there is a macro called Set_User_Scalar_Name. Have a look in UDF-Manual chapter 3.2.8. cheers |
|
April 20, 2010, 08:09 |
|
#3 | |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
Quote:
I'm just using user variables from within the DPM-Model I access with Code:
P_USER_REAL(p,i)
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
||
April 20, 2010, 08:33 |
|
#4 |
Senior Member
Max
Join Date: Mar 2009
Posts: 133
Rep Power: 17 |
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 |
|
|
|
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 |