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

How can I allocate user defined memory?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 13, 2010, 02:34
Default How can I allocate user defined memory?
  #1
Senior Member
 
MASOUD
Join Date: Mar 2009
Posts: 102
Rep Power: 17
MASOUD is on a distinguished road
Hi;
I'm wondering if anybody can help me resolve the following issue:

How can I allocate a UDM to J_L in the following code?


=====================


#include "udf.h"
#include "mem.h"

static real CARB_COND=140;
static real SOURCE;
static real B;
static real J_L;

DEFINE_SOURCE(ENERGY_SOURCE_ELECTROLYTE,c,t,dS,eqn )
{
B=NV_MAG(C_UDSI_G(c,t,1));
J_L=B*CARB_COND;

/*SOURCE=pow(J_L,2)/CARB_COND;*/
SOURCE=0;

dS[eqn]=0;

return SOURCE;
}
=============================
MASOUD is offline   Reply With Quote

Old   November 20, 2014, 02:12
Default
  #2
New Member
 
Join Date: Sep 2009
Posts: 19
Rep Power: 16
tinhtt is on a distinguished road
You can store it in user defined memory C_UDMI(c,t,0):
C_UDMI(c,t,0) = J_L;

But the memory must be defined first in: Define -> User-Defined -> Memory
tinhtt 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
Lenovo C30 memory configuration and discussions with Lenovo matthewe Hardware 3 October 17, 2013 10:23
Solver does not allocate all memory. Why? sakurabogoda CFX 12 February 7, 2013 04:17
user defined turbulence model manuutin STAR-CD 5 October 14, 2009 05:29
Gradient of a User defined Variable Ramadas CFX 2 August 21, 2007 09:19
Naming User Defined Scalars Greg Perkins FLUENT 0 March 6, 2000 23:10


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