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

Discharge hydrograph udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2014, 11:20
Default Discharge hydrograph udf
  #1
New Member
 
Burak EKMEKÇİ
Join Date: Mar 2013
Posts: 9
Rep Power: 13
burak_ekmekci is on a distinguished road
Hi guys ;

- How can ı create this udf (below)? and is it possible to create a udf for discharge, not velocity ?

between time =0 second, t=360 discharge=14
between t=360, t= 690 d=0.14444(x-360)+14
between t=690, t=1020 d=61.67-0.14444(x-690)
between t=1020, t=1320 d=14


thanks ...
burak_ekmekci is offline   Reply With Quote

Old   November 24, 2014, 17:50
Default
  #2
New Member
 
Burak EKMEKÇİ
Join Date: Mar 2013
Posts: 9
Rep Power: 13
burak_ekmekci is on a distinguished road
is there any comment or suggestion ?

I have created this codes that is below. it is working but there is a problem with increasing velocity. when time gets 360 s, velocity does not increase ? what might be problem ?

please help.

thanks.

#include "udf.h"



real Dt1=360;
real Dt2=330;
real Dt3=330;
real Dt4=360;


real Tevapfz1=0.182;
real Tevapfz2=0.182;
real Tevapfz3=0.4;
real Tevapfz4=0.182;
real Tevapfz5=0.182;


real A=360;
real B=0.182;

real c_time=0.0;
real aralik=0.0;


{
c_time=CURRENT_TIME;

if(c_time<Dt1)
{
A=0;
B=Tevapfz1;
aralik=1.0;
}

if((c_time<(Dt1+Dt2))&&(c_time>=Dt1))
{
A=(Tevapfz2-Tevapfz3)/(-Dt2);
B=(Tevapfz3*Dt1-Tevapfz2*(Dt1+Dt2))/(-Dt2);
aralik=2.0;
}

if((c_time<(Dt1+Dt2+Dt3))&&(c_time>=(Dt1+Dt2)))
{
A=(Tevapfz3-Tevapfz4)/(-Dt3);
B=(Tevapfz4*(Dt1+Dt2)-Tevapfz3*(Dt1+Dt2+Dt3))/(-Dt3);
aralik=3.0;
}

if((c_time<(Dt1+Dt2+Dt3+Dt4))&&(c_time>(Dt1+Dt2+Dt 3)))
{
A=0;
B=(Tevapfz5*(Dt1+Dt2+Dt3)-Tevapfz4*(Dt1+Dt2+Dt3+Dt4))/(-Dt4);
aralik=4.0;
}



printf("VELOCITY=%f\n\n", (A*CURRENT_TIME+B));
printf("ARALIK=%f\n\n", aralik);

}


DEFINE_PROFILE(evapfz_temp, thread, index)
{
real x[ND_ND];
real y;
face_t f;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
F_PROFILE(f, thread, index) = A*c_time+B;
}
end_f_loop(f, thread)

}
burak_ekmekci is offline   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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 06:12
Carona discharge - Eelectrostatic precipitator - UDF johnwinter Fluent UDF and Scheme Programming 4 February 29, 2012 14:58
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 22:14
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03


All times are GMT -4. The time now is 22:00.