# User Defined Memory Problem

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 22, 2004, 07:02 User Defined Memory Problem #1 Melih Guest   Posts: n/a Hi everbody, I have a problem that may be a common problem for Fluent Users. I want to see pressure values of a wall by User Defined Memory at every iteration. The thing is that the pressure values are transfered to F_UDMI(t,f,0) in my UDF, but I can not see them in FLUENT. I mean, every values of F_UDMI(t,t,0) are zero in contour values windows in FLUENT. Here is the simple UDF that transfers pressure values to F_UDMI(t,f,0). Could you please tell me what is wrong with it? #include "udf.h" DEFINE_ADJUST(wall_pressure,domain) { face_t f; int ID = 8; /* Zone ID for wall zone */ Thread *t = Lookup_Thread(domain, ID); begin_f_loop(f, t) { F_UDMI(f,t,0) = F_P(f,t); Message("pressure %e\n",F_UDMI(f,t,0)); } end_f_loop(f, t) }

 May 24, 2004, 04:31 Re: User Defined Memory Problem #2 Andrew Garrard Guest   Posts: n/a I have had exactly the same problem with the UDMI macro and the good people at the fluent USC couldn't help me much. I had to use a "dirty trick" to get around this one. If you assign the value of the F_UDMI to the adjcent cell you should then be able to see it in, say, a contour or XY plot with in fluent. If you need help doing this I can help you out with the source code, but you seem to know what you are doing, so I will leave it for the moment. I hope this helps, happy coding.

 May 25, 2004, 04:20 Re: User Defined Memory Problem #3 ap Guest   Posts: n/a I had the same problem too. Maybe it's a bug of FLUENT. Hi ap

 May 25, 2004, 21:39 Re: User Defined Memory Problem #4 dp Guest   Posts: n/a Have had a similiar problem, and the bug seams to go away (if the same bug) by first viewing the udm with contours (should be all zeros), then run your udf and then replot. It appears that viewing the udm initializies it for use (atleast thats one interpretation).

 July 16, 2016, 06:47 problem regarding user defined memory #5 New Member   saad Join Date: May 2012 Posts: 6 Rep Power: 6 i am trying to calculate source term for X-momentum equation by calculating first the average temperature in a mixed convection case. I want to store the value of mean temperature using user defined memory and use this value to calculate source term in xmomentum equation. i have written the UDF mentioned below: #include "udf.h" DEFINE_ON_DEMAND(on_demand_calc) { real tavg; real temp,volume,vol_tot; Domain*d; Thread*t; int i; cell_t c; tavg = 0.; vol_tot = 0.; d = Get_Domain(1); thread_loop_c(t,d) { begin_c_loop(c,t) { volume = C_VOLUME(c,t); temp = C_T(c,t)-273.5; vol_tot += volume; tavg += temp*volume; } end_c_loop(c,t) tavg = tavg/vol_tot; } printf("Tavg = %g\n",tavg); printf("volume = %g\n",volume); printf("vol_tot = %g\n",vol_tot); printf("temp = %g\n",temp); thread_loop_c(t,d) { begin_c_loop(c,t) { C_UDMI(c,t,0) = tavg; } end_c_loop(c,t) } } DEFINE_SOURCE(mom_source,c,t,dS,eqn) { real x[ND_ND]; real source; C_CENTROID(x,c,t); source= 1.-5.33*(C_T(c,t)-C_UDMI(c,t,0)); dS[eqn]=0.; return source; } but i am getting zero value when i am trying to plot the user defined memory. please help me regarding this. Regards saad

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post prapanj ParaView 3 January 3, 2014 21:54 manuutin STAR-CD 5 October 14, 2009 05:29 pongup FLUENT 0 July 6, 2008 02:29 Ramadas CFX 2 August 21, 2007 09:19 Greg Perkins FLUENT 0 March 7, 2000 00:10

All times are GMT -4. The time now is 10:04.

 Contact Us - CFD Online - Top