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

problem with C_VOF and C_UDSI

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

Like Tree2Likes
  • 2 Post By ap

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2004, 08:59
Default problem with C_VOF and C_UDSI
  #1
Paulina
Guest
 
Posts: n/a
Hi all,

I have written an UDF,( a part of which, attached below), in order to calculate the third moment "mom3" of the distribution of the drop diameters. I would like to calculate that moment as a C_UDSI(c,t,2), which should be calculate from a volume fraction of the second phase C_VOF(c,t,1)divided by constant value 0.523. The value of the C_VOF(c,t,1) should be taken from calculation, which have been made using Eulerian approaches - ASM model in Fluent 5.5 or Mixture model in Fluent 6.1.18.

DEFINE_ADJUST(usrfn,domain)

{

cell_t c;

Thread *t;

real mom3;

thread_loop_c(t,domain)

{

begin_c_loop(c,t)

{

C_UDSI(c,t,2) = C_VOF(c,t,1)/0.523;

mom3 = C_UDSI(c,t,2);

}

}

}

The UDF was interpreted and compiled succesfully, but the probem is that, I cann't take the values of the volume fraction of the second phase and substitude at the C_UDSI(c,t,2). And all the time I have got an error: "Segmentation violation"

Does any one have a suggestion?

Thanks in advance. Paulina
  Reply With Quote

Old   April 13, 2004, 11:14
Default Re: problem with C_VOF and C_UDSI
  #2
ap
Guest
 
Posts: n/a
The proper syntax of C_VOF in FLUENT 6 is:

C_VOF (cell, pt[n])

where pt is an array of pointers to threads and n is the thread index.

C_UDSI is used for user-defined scalars, and the proper syntax is

C_UDSI(cell, thread, name_of_scalar)

See UDF manual for further info.

Hi

ap
Arjun Jayakumar and utkunun like this.
  Reply With Quote

Old   April 16, 2004, 05:25
Default Re: problem with C_VOF and C_UDSI
  #3
Paulina
Guest
 
Posts: n/a
Dear Ap!

Thank you for your response.

I have read the UDF manual, but I can't find solution to my problem still.

Now I have changed my udf and after successful compiled, I got an error:

"Error: Set_THREAD_Variables: wta(real), Error Object: ((constant . 0) (profile " " " ")".

Below I attached two udfs, could you look at them and give me some advices?

DEFINE_ADJUST(usrfn, domain)

{ real vof; Thread **pt; Thread *thread; mp_thread_loop_c(thread,domain,pt) { cell_t cell; begin_c_loop_int(cell,thread) { vof = C_VOF(cell,pt[1])/0.523; C_UDSI(c,t,2) = vof; } end_c_loop_int(cell,thread) }

thread_loop_c (t,domain) { begin_c_loop (c,t) {

mom[1] = C_UDSI(c,t,0);

mom[2] = C_UDSI(c,t,1);

mom[3] = C_UDSI(c,t,2);

} end_c_loop (c,t) } }

I also have written the another udf, but the same message of the error has appeared:

DEFINE_ADJUST(usrfn, domain)

{ real vof; Thread *thread; Thread **pt = THREAD_SUB_THREAD(thread,1); begin_c_loop(c,pt[1]) { vof = C_VOF(c,pt[1])/0.523; C_UDSI(c,t,2) = vof; } end_c_loop(c,pt[1])

thread_loop_c (t,domain) { begin_c_loop (c,t) {

mom[1] = C_UDSI(c,t,0);

mom[2] = C_UDSI(c,t,1);

mom[3] = C_UDSI(c,t,2);

} end_c_loop (c,t) } }

Thanks for all sugestions Best regards Paulina
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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



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