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

Search Results

Register Blogs Community New Posts Updated Threads Search

Showing results 1 to 8 of 8
Search took 0.00 seconds.
Search: Posts Made By: blackmask
Forum: Fluent UDF and Scheme Programming July 26, 2013, 20:42
Replies: 23
Views: 4,415
Posted By blackmask
It happens if you the array initializer has more...

It happens if you the array initializer has more elements than the array declared

int r0[3] = {0, 1, 2, 3};

In the above example "r0" is an integer array of length three while the initializer...
Forum: Fluent UDF and Scheme Programming July 23, 2013, 04:30
Replies: 23
Views: 4,415
Posted By blackmask
#16 1) c array is zero-based so that the last...

#16
1) c array is zero-based so that the last index in the array is length of array minus one
2) you are right, I forget the (r - r0[i-1]) term

You can use

FLUID_THREAD_P
Forum: Fluent UDF and Scheme Programming July 22, 2013, 20:55
Replies: 23
Views: 4,415
Posted By blackmask
A linear interpolation could be implemented as...

A linear interpolation could be implemented as follows:

#include "udf.h"

real some_func(real r)
{
real vel;
real r0[] = {0.0, 0.02, 0.03, 0.20};
real v0[] = {25.0,...
Forum: Fluent UDF and Scheme Programming July 19, 2013, 21:02
Replies: 23
Views: 4,415
Posted By blackmask
Yes, you simply change F_PROFILE(f, thread,...

Yes, you simply change
F_PROFILE(f, thread, position) = v;to
F_PROFILE(f, thread, position) = some_func(r);where

real some_func(real r) {
real vel;
real r0[] = {0.0, 0.02, 0.03, 0.20};
real...
Forum: Fluent UDF and Scheme Programming July 19, 2013, 10:27
Replies: 23
Views: 4,415
Posted By blackmask
I took r as the distance between x and the origin...

I took r as the distance between x and the origin in my #4 post, i.e., r=|X-O|. But in fact r should be the length of projection of the vector <X-O> onto the (r, theta) plane, that's why x[2]...
Forum: Fluent UDF and Scheme Programming July 19, 2013, 10:16
Replies: 23
Views: 4,415
Posted By blackmask
Yes, and r = NV_MAG(x); should be replaced...

Yes, and
r = NV_MAG(x);
should be replaced by
r = sqrt(x[0]*x[0]+x[1]*x[1]);
I made a mistake in my previous post.
Forum: Fluent UDF and Scheme Programming July 19, 2013, 06:11
Replies: 23
Views: 4,415
Posted By blackmask
For simplicity, I assume that the velocity...

For simplicity, I assume that the velocity profile is piece-wise constant.


#include "udf.h"
DEFINE_PROFILE(inlet_axial_velocity, thread, position)
{
real orig[ND_ND] = {1.0, 2.0, 3.0};
real...
Forum: Fluent UDF and Scheme Programming July 19, 2013, 05:28
Replies: 23
Views: 4,415
Posted By blackmask
You can use the DEFINE_PROFILE macro.

You can use the

DEFINE_PROFILE

macro.
Showing results 1 to 8 of 8

 
Forum Jump

All times are GMT -4. The time now is 07:00.