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

DEFINE_PROFILE problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 20, 2005, 13:49
Default DEFINE_PROFILE problem
  #1
Giordano Bruno
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
  Reply With Quote

Old   February 2, 2005, 05:18
Default Re: DEFINE_PROFILE problem
  #2
Andrew Garrard
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.
  Reply With Quote

Old   February 2, 2005, 05:36
Default Re: DEFINE_PROFILE problem
  #3
Giordano Bruno
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
  Reply With Quote

Old   February 2, 2005, 05:47
Default Re: DEFINE_PROFILE problem
  #4
Andrew Garrard
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?
  Reply With Quote

Old   February 2, 2005, 06:00
Default Re: DEFINE_PROFILE problem
  #5
Giordano Bruno
Guest
 
Posts: n/a
Thank you I will work on your suggestion. Could I post you my UDS Diplay Contour???

Giordano Bruno
  Reply With Quote

Old   February 2, 2005, 06:03
Default Re: DEFINE_PROFILE problem
  #6
Andrew Garrard
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!
  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
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


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