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

UDF: Problem to Incorporate PDE in BC ???

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 7, 2004, 10:40
Default UDF: Problem to Incorporate PDE in BC ???
  #1
KKLAU
Guest
 
Posts: n/a
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

From KKLAU
  Reply With Quote

Old   April 8, 2004, 06:06
Default Re: UDF: Problem to Incorporate PDE in BC ???
  #2
thomas
Guest
 
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 http://www.fluentusers.com/fluent61/...udf/node71.htm

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

Reply

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 2 February 25, 2009 01:43
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


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