|
[Sponsors] |
June 5, 2004, 06:03 |
Looping Problem??
|
#1 |
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 |
|
June 5, 2004, 06:48 |
Re: Looping Problem??
|
#2 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with interFoam; Wave/wiggle alpha1 behavior | JonW | OpenFOAM | 10 | February 4, 2023 08:27 |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 05:43 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 15:52 |