|
[Sponsors] |
January 20, 2005, 13:49 |
DEFINE_PROFILE problem
|
#1 |
Guest
Posts: n/a
|
Hello to all Fluent users,
I'm trying to define UDS Neumann BCs on internal surfaces (double side wall) between two fluid zones with different diffusivities values through this code, but the results are not significant... !!!! Please give a look... DEFINE_PROFILE(flux_a, t, i) { face_t f; begin_f_loop(f, t) { cell_t c0; Thread *tc0; c0=F_C0(f, t); tc0=F_C0_THREAD(f, t); cell_t c1; Thread *tc1; c1=F_C1(f, t); tc1=F_C1_THREAD(f, t); real grad; real dn; real x0[ND_ND]; real x1[ND_ND]; C_CENTROID(x0,c0, tc0); C_CENTROID(x1,c1, tc1); dn=fabs(x1[2]-x0[2]); grad=((C_UDSI(c1, tc1, 0)-C_UDSI(c0, tc0, 0))/dn); real D; D=(2*C_UDSI_DIFF(c0, tc0, 0)*C_UDSI_DIFF(c1, tc1, 0))/(C_UDSI_DIFF(c1, tc1, 0)+C_UDSI_DIFF(c0, tc0, 0)); real flux; flux=-D*grad; F_PROFILE(f ,t, i)=flux; } end_f_loop(f, t) } DEFINE_PROFILE(flux_b, t, i) { face_t f; begin_f_loop(f, t) { cell_t c0; Thread *tc0; c0=F_C0(f, t); tc0=F_C0_THREAD(f, t); cell_t c1; Thread *tc1; c1=F_C1(f, t); tc1=F_C1_THREAD(f, t); real grad; real dn; real x0[ND_ND]; real x1[ND_ND]; C_CENTROID(x0,c0, tc0); C_CENTROID(x1,c1, tc1); dn=fabs(x1[2]-x0[2]); grad=((C_UDSI(c0, tc0, 0)-C_UDSI(c1, tc1, 0))/dn); real D; D=(2*C_UDSI_DIFF(c0, tc0, 0)*C_UDSI_DIFF(c1, tc1, 0))/(C_UDSI_DIFF(c1, tc1, 0)+C_UDSI_DIFF(c0, tc0, 0)); real flux; flux=D*grad; F_PROFILE(f ,t, i)=flux; } end_f_loop(f, t) } Thanks in advance for your response! Giordano Bruno |
|
February 2, 2005, 05:18 |
Re: DEFINE_PROFILE problem
|
#2 |
Guest
Posts: n/a
|
What exactly is not significant about them about them? I have retyped the code out and I can't see any errors.
|
|
February 2, 2005, 05:36 |
Re: DEFINE_PROFILE problem
|
#3 |
Guest
Posts: n/a
|
Hi Andrew,
when I link this code's part I obtain costant value along z directions in the subdomain...maybe is it due to my Fluent version 6.0.20??? Thank for your attention!!! Giordano Bruno |
|
February 2, 2005, 05:47 |
Re: DEFINE_PROFILE problem
|
#4 |
Guest
Posts: n/a
|
I'm sorry, but I am not sure that I can help you much more. When I am trying to understand why code isn't working I create a corse grid of whatever I am modeling and then add Message lines in key places to work out exactly what is going wrong, maybe that can help you de-bug it.
Also, you might want to consider using teh C_UDSI_G macro? |
|
February 2, 2005, 06:00 |
Re: DEFINE_PROFILE problem
|
#5 |
Guest
Posts: n/a
|
Thank you I will work on your suggestion. Could I post you my UDS Diplay Contour???
Giordano Bruno |
|
February 2, 2005, 06:03 |
Re: DEFINE_PROFILE problem
|
#6 |
Guest
Posts: n/a
|
Sure, I don't know if I will get around to doing much with it though as I am a little busy this week. Aren't we all!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 04:43 |
Gambit - meshing over airfoil wrapping (?) problem | JFDC | FLUENT | 1 | July 11, 2011 05:59 |
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 |