|
[Sponsors] |
April 4, 2001, 04:36 |
Is this UDF correct?
|
#1 |
Guest
Posts: n/a
|
Hi all,
I am a novice in C programming, I wrote the following in an attempt to generate a two layer flow in my domain. But when I try to compile it, fluent keeps giving me error msg. Not sure what is wrong. Can anybody help? Thanx. #include "udf.h" DEFINE_PROPERTY(cell_density, cell, threads) { real density; real grid_y = NODE_Y(c,t); if (grid_y<0.81) density = 998; else density = 968; return density; } Regards, JJ |
|
April 4, 2001, 05:27 |
Re: Is this UDF correct?
|
#2 |
Guest
Posts: n/a
|
try grid_y = NODE_Y(cell,threads);
|
|
April 6, 2001, 08:08 |
Re: Is this UDF correct?
|
#3 |
Guest
Posts: n/a
|
Hi Greg,
Thanx for your help, tried it and I was able to compile it. But I am still stuck cos when I try to initialize the flow, I obtain the following error msg "2ldensity.cpp:6: macro `NODE_Y' used with too many (2) args" 2ldensity is the name of the UDF. May I know what can be done? Thanx in advance. JJ |
|
April 8, 2001, 19:54 |
Re: Is this UDF correct?
|
#4 |
Guest
Posts: n/a
|
Actually you'd be better to use C_CENTROID to determine the location of the cell centroid. Check this out in the udf manual.
Greg |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF and text commands | David | FLUENT | 3 | June 27, 2022 00:10 |
UDF to record FLUENT Solver variables... | mariachi | Fluent UDF and Scheme Programming | 11 | September 24, 2019 01:07 |
how can I correct the udf? | happyrabbit | FLUENT | 9 | January 28, 2011 10:50 |
UDF to record FLUENT solver variables... | mariachi | FLUENT | 1 | February 3, 2010 23:18 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |