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

Search Results

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

Showing results 1 to 12 of 12
Search took 0.00 seconds.
Search: Posts Made By: HenrikS
Forum: Fluent UDF and Scheme Programming March 14, 2017, 01:41
Replies: 39
Views: 15,290
Posted By HenrikS
Hi, The code in question will introduce two...

Hi,

The code in question will introduce two Define-on-Demand functions:
set_wall_dist_udm0
reset_udm0
that use the user-defined memory location 0 to store the wall distances.

The second...
Forum: Fluent UDF and Scheme Programming March 20, 2015, 03:38
Replies: 39
Views: 15,290
Posted By HenrikS
There's an undocumented macro called that might...

There's an undocumented macro called that might be useful (see below). However, I wouldn't recommend using something like this unless you know what you're doing. The safest bet is probably to define...
Forum: Fluent UDF and Scheme Programming January 9, 2015, 03:56
Replies: 39
Views: 15,290
Posted By HenrikS
I don't think that these macros were ever covered...

I don't think that these macros were ever covered by the manual. I just had a look in the source files for Fluent 15.0.7 and all of the following are there still:
C_WALL_DIST(c,t)...
Forum: Fluent UDF and Scheme Programming January 8, 2015, 05:22
Replies: 39
Views: 15,290
Posted By HenrikS
That error message most probably tells you that...

That error message most probably tells you that C_WALL_DIST(c,t) has not been assigned a value (so that you receive an access violation when you try to retrieve it). I haven't worked with this macro...
Forum: Fluent UDF and Scheme Programming April 2, 2009, 06:18
Replies: 39
Views: 15,290
Posted By HenrikS
You do not need to specify an expression for dS,...

You do not need to specify an expression for dS, you can set it to 0.0. If you have convergence issues, consider adding an expression for dS. As I understand it, dS should then be the derivative with...
Forum: Fluent UDF and Scheme Programming April 2, 2009, 03:42
Replies: 39
Views: 15,290
Posted By HenrikS
Yes, according to threads.h: THREAD_F_WALL...

Yes, according to threads.h:

THREAD_F_WALL = 3,

so those should be the same.
Forum: Fluent UDF and Scheme Programming April 1, 2009, 08:23
Replies: 39
Views: 15,290
Posted By HenrikS
Hmm... BOUNDARY_FACE_THREAD_P(t) expands to a...

Hmm... BOUNDARY_FACE_THREAD_P(t) expands to a function that returns TRUE if Thread *t is a boundary face thread. I don't know for sure, maybe this would also include inlets and outlets. Then maybe...
Forum: Fluent UDF and Scheme Programming April 1, 2009, 08:11
Replies: 39
Views: 15,290
Posted By HenrikS
How about begin_c_loop(c, t) { dist =...

How about

begin_c_loop(c, t)
{
dist = 0.0;
c_face_loop(c, t, n)
{
if (BOUNDARY_FACE_THREAD_P(C_FACE_THREAD(c,t,n)))
{
dist = C_WALL_DIST(c,t);
Forum: Fluent UDF and Scheme Programming April 1, 2009, 07:58
Replies: 39
Views: 15,290
Posted By HenrikS
You would also have to add some kind of check to...

You would also have to add some kind of check to see whether the current cell is next to a boundary, if you are only interested in boundary cells (which seems the case in your first post).
Forum: Fluent UDF and Scheme Programming April 1, 2009, 07:56
Replies: 39
Views: 15,290
Posted By HenrikS
It was quite some time ago since I worked with...

It was quite some time ago since I worked with wall distances in UDFs, but I seem to remember that the distance between a cell centre and the nearest wall should be available in C_WALL_DISTANCE(c,t)....
Forum: Fluent UDF and Scheme Programming April 1, 2009, 07:07
Replies: 39
Views: 15,290
Posted By HenrikS
In your code, you calculate "dist" for every cell...

In your code, you calculate "dist" for every cell next to a wall boundary. My guess is that you want to use this value for some purpose elsewhere in your code. Now, there is a macro called...
Forum: Fluent UDF and Scheme Programming April 1, 2009, 06:37
Replies: 39
Views: 15,290
Posted By HenrikS
I think your code will do what you want, yes. If...

I think your code will do what you want, yes. If you have any problems with
if(THREAD_TYPE(tf) == THREAD_F_WALL)
you might consider using
if (BOUNDARY_FACE_THREAD(tf))
although I guess they would...
Showing results 1 to 12 of 12

 
Forum Jump

All times are GMT -4. The time now is 05:49.