|
[Sponsors] |
October 27, 2013, 06:27 |
udf_DEFINE ADJUST
|
#1 |
New Member
ahmady.a
Join Date: Oct 2013
Posts: 19
Rep Power: 12 |
hi
I want to investigate natural convection heat transfer of liquid in a square enclosure with acoustic cavitation. In order to model the effect of sound field,a prescribed periodic change pressure is imposed on liquid in the region with ultrasonic beam. Ps = PAcos[s(ًt+y/c)] for this purpose i writed below udf and I hooked adjust UDFs to my model: #include "udf.h" #define pi 3.1415 #define f 18000 #define v 1480 DEFINE_ADJUST(my_adjust,d) { Thread *t; real time; real xc[ND_ND]; real y; real pa=1e5; real s=2*pi*f; cell_t c; time = CURRENT_TIME; thread_loop_c(t,d) { begin_c_loop(c,t) { C_CENTROID(xc, c, t); if ((xc[0]> -0.005 && xc[0]<0.005) && (xc[1]> -0.05 && xc[1]< 0) ) { y =xc[1]; C_P(c,t)= pa*cos(s*(time+y/v)); } if ((xc[0]> -0.005 && xc[0]<0.005) && ( xc[1]== 0) ) { C_P(c,t)= pa*cos(s*time); } if ((xc[0]> -0.005 && xc[0]<0.005) && ( xc[1]== -0.05) ) { C_P(c,t)= pa*cos(s*(time-0.05/v)); } if ((xc[0]== -0.005) && (xc[1]<= 0)) { C_P(c,t)= 0; } if ((xc[0]== 0.005) && (xc[1]<= 0)) { C_P(c,t)= 0; } end_c_loop(c,t) } } } my solution not converge(Specially contiuity) with every change in under relaxtion factor. can anyone help me in regarding with above problem…. thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to export every data w.r.t time to txt file | jaho | CFX | 94 | August 25, 2015 09:45 |
How to adjust wall temperature | nutow | FLUENT | 0 | September 4, 2011 05:37 |
ADJUST udf | Jubs | FLUENT | 3 | February 12, 2007 06:00 |
adjust gradient temperature on the cylinder's wall | Konrad | FLUENT | 1 | August 28, 2006 07:16 |
How to adjust turbulent transport constants? | Wang | FLUENT | 0 | December 6, 2000 07:57 |