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

Looping Problem??

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2004, 05:03
Default Looping Problem??
  #1
KKLAU
Guest
 
Posts: n/a
To all fluent Experts,

I am facing a problem to pass the looping value to the F_PROFILE. I am trying to pass the C_U(c,t)[adjacent velocity value] to my BC. But it cant... I try to check the C_U(c,t) value using printf before the F_PROFILE, it is ok. So i equal it will an variable z. Then, i pass the z to the F_PROFILE. Error starts happen. The F_PROFILE value is different from the z value. May i know what were the errors that i made???

Here is my UDF:

#include "udf.h"

DEFINE_PROFILE(solute, thread, position)

{ face_t f; cell_t c = F_C0(f,thread); Thread *t = THREAD_T0(thread); real z;

begin_f_loop(c,thread) { z = C_U(c,t); //check with - printf("%15e",z); F_PROFILE(f, thread, position) = z; end_f_loop(c,thread) } }

Note: I can't change the begin_f_loop(c,thread) to begin_f_thread(f,thread) since this will make all the the C_U(c,t) value change to constant value(why??).

Thanks alot.

From KKLAU
  Reply With Quote

Old   June 5, 2004, 05:48
Default Re: Looping Problem??
  #2
Rob Hart
Guest
 
Posts: n/a
Well, as it stands you never assign a value to f, so there is no way this UDF is going to work.

I'm not quite clear what you are trying to achieve here, but you probably should loop with begin_f_loop(f,thread), and then *inside* the loop, have c = F_CO(f,thread) etc.

Could you explain better what you are trying to do?

Rob
  Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with interFoam; Wave/wiggle alpha1 behavior JonW OpenFOAM 10 February 4, 2023 07:27
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


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