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

Will the UDF work??

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 27, 2001, 22:21
Default Will the UDF work??
  #1
H.S.Fang
Guest
 
Posts: n/a
Hi,all,

DEFINE_ADJUST(adjustfunction,domain) { /*扫描全场,修改速度场为对应函数场*/ thread_loop_c(t,domain) {begin_c_loop(c,t) {

C_U(c,t)=C_UDMI(c,t,4);

C_V(c,t)=C_UDMI(c,t,5);

C_U(c,t)=C_U(c,t)-ul;

C_V(c,t)=C_V(c,t)-vl; } end_c_loop(c,t) }

/*求个网格的函数梯度并存于网格内存变量中*/ thread_loop_c(t,domain) {begin_c_loop(c,t) {

C_UDMI(c,t,0)=C_DUDX(c,t);

C_UDMI(c,t,1)=C_DUDY(c,t);

C_UDMI(c,t,2)=C_DVDX(c,t);

C_UDMI(c,t,3)=C_DVDY(c,t); } end_loop_c(c,t) } /*再次扫描全场改变速度场为对应函数场*/ thread_loop_c(t,domain) {begin_c_loop(c,t) {

C_U(c,t)=C_H(c,t)-hl;

C_V(c,t)=C_YI(c,t,i)-cll; } end_c_loop(c,t) }

/*再次求个网格的函数梯度并存于网格内存变量中*/ thread_loop_c(t,domain) {begin_c_loop(c,t) {

C_UDMI(c,t,6)=C_DUDX(c,t);

C_UDMI(c,t,7)=C_DUDY(c,t);

C_UDMI(c,t,8)=C_DVDX(c,t);

C_UDMI(c,t,9)=C_DVDY(c,t); } end_loop_c(c,t) }

/*还*速度场*/ thread_loop_c(t,domain) {begin_c_loop(c,t) {

C_UDMI(c,t,4)=C_U(c,t);

C_UDMI(c,t,5)=C_V(c,t); } end_c_loop(c,t) } }

I will use C_UDMI(c,t,i)(i=0,1,2,3 6,7,8,9) in the DEFINE_SOURCE functions,will they work? Thanks!
  Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
Help Parallelizing UDF AndresC FLUENT 0 February 25, 2010 16:50
udf - c++ compiler does not work Matthias FLUENT 1 January 9, 2009 01:44
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01
UDF using c_face_loop(c,t,i) frederic FLUENT 2 April 1, 2000 22:42


All times are GMT -4. The time now is 09:06.