CFD Online Logo CFD Online URL
Home > Forums > FLUENT

UDF: Problem to Incorporate PDE in BC ???

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

LinkBack Thread Tools Display Modes
Old   April 7, 2004, 10:40
Default UDF: Problem to Incorporate PDE in BC ???
Posts: n/a
Sponsored Links
To all Fluent Expert All Over the world,

I am facing problem to incorporate the PDE

C_V(c,t) = C_DVDY(c,t) + constant in my velocity inlet. There is not problem during interpretion. However, when i initiate it, the ACCESS VIOLATION warning appear.

Here is my UDF, can somebody point out my errors?

DEFINE_PROFILE(solute, thread, position) {

face_t f;

cell_t c;

Thread *t;

int i; begin_c_loop(c,t) {C_V(c,t,i) = C_DVDY(c,t) + 0.002 ;} end_c_loop(c,t)

begin_f_loop(f,t) {F_PROFILE(f, t, position) = C_V(c,t,i) ;} end_f_loop(f, t)


Thanks alot... especially To FJ, Thomas , ady

  Reply With Quote
Sponsored Links

Old   April 8, 2004, 06:06
Default Re: UDF: Problem to Incorporate PDE in BC ???
Posts: n/a
Hello, Your UDF is very confusing and it is not surprising you get an access violation message ...

1- go to read the documentation about how to use a DEFINE_PORFILE macro

2- C_V(c,t,i) does not exist ! what 'i' represents ??? also C_V(c,t,i) = C_DVDY(c,t) + 0.002 is confusing. C_V(c,t) and not C_V(c,t,i) is a macro which only allow to get the velocity at each cell center, nothing else. SO to do what you want to do you have to define a variable and write variable=C_DVDY(c,t) + 0.002 and then F_PROFILE(f, t, position) = variable

3- Then think about at which cell you need to get the data C_DVDY -> all the cells or just the adjacent next to your noudary condition ??? Obviously it is a the adjacent range of cells next to your BC. So you have to define a specific thread and cell ID for this range of cell which in your case *t=THREAD_TO(f,thread) and c=F_C0(f,thread).

Making these changes i am sure it is gonna work ... at least at the initiatilization. Good luck ! Thomas
  Reply With Quote


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF compiling problem in Flient 6.3 jeevan kumar FLUENT 3 June 29, 2017 19:00
UDF using problem, error happens-heip!! Michael FLUENT 1 December 9, 2008 08:51
UDF PROBLEM anant FLUENT 2 January 17, 2007 01:15
I have problem of UDF with turbulent premx source. Z FLUENT 0 February 16, 2005 04:34
UDF problem chiseung FLUENT 4 January 10, 2002 10:58

Sponsored Links

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