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

variable in C_UDMI

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 7, 2013, 12:31
Default variable in C_UDMI
  #1
Member
 
Indrajit
Join Date: Nov 2012
Posts: 33
Rep Power: 3
IndrajitW is on a distinguished road
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
IndrajitW is offline   Reply With Quote

Old   March 8, 2013, 02:51
Default
  #2
Senior Member
 
Mahesh
Join Date: Jun 2009
Posts: 114
Rep Power: 7
mvee is on a distinguished road
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!
mvee is offline   Reply With Quote

Old   March 8, 2013, 04:16
Default
  #3
Member
 
Indrajit
Join Date: Nov 2012
Posts: 33
Rep Power: 3
IndrajitW is on a distinguished road
Quote:
Originally Posted by mvee View Post
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!
Hi Mahesh,
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
IndrajitW is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


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 10:14
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas Main CFD Forum 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


All times are GMT -4. The time now is 08:27.