|
[Sponsors] |
March 7, 2013, 12:31 |
variable in C_UDMI
|
#1 |
Member
Indrajit
Join Date: Nov 2012
Posts: 33
Rep Power: 13 |
Hey,
I am using a udf where I need to pass a variable to a function. To check if correct value is passed to my function I am storing the value of the variable in a UDMI as : C_UDMI( c,t,4) = 3.1415927; for example. However when I try to plot the countours of user defined memory 4 , I see that the value at the cell is just half of the desired value, 1.57 in this case. I am not able to understand the reason for this. Please help... Regards, Indrajit |
|
March 8, 2013, 02:51 |
|
#2 |
Senior Member
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 16 |
Hi
I can comment on this issue only after looking your UDF. Instead of storing the value of variable in memory, you can define it through "#define pi 3.14". This will solve your problem. Best wishes! |
|
March 8, 2013, 04:16 |
|
#3 | |
Member
Indrajit
Join Date: Nov 2012
Posts: 33
Rep Power: 13 |
Quote:
Thanks for your attention!! Actually my variable changes at every time step. Hence I cannot define it as a constant. I think that when a variable is assigned to a C_UDMI the contours are plotted such that the sum value in that cell equals the assigned value of the variable. Hence my maximum value in the contour is half of variable value but when I compute the maximum value in Report-> Volume integral--> Sum, it gives me the variable value!! What do you feel?? Regards, Indrajit |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFoam-1.6-ext Allwmake compilation error - one last barrier | Pat84 | OpenFOAM Installation | 15 | July 25, 2012 21:49 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 09:14 |
error in COMSOL:'ERROR:6164 Duplicate Variable' | bhushas | COMSOL | 1 | May 30, 2008 04:35 |
Env variable not set | gruber2 | OpenFOAM Installation | 5 | December 30, 2005 04:27 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 20:09 |