You are on page 1of 1

/**************************************************************/

/* */
/* User-Defined Functions for sinusoidal temperature profile */
/* */
/**************************************************************/
#include "udf.h"

DEFINE_PROFILE(unsteady_temperature, thread, position)


{
face_t f;

real t = CURRENT_TIME;

begin_f_loop(f, thread)
{
if(t<=927)
F_PROFILE(f, thread, position) =
(21.23466+((13.77*927.108)/(927.108-0)))-((13.77/(927.108-0))*t) + 273.15;
if(t<=236953 && t>927)
F_PROFILE(f, thread, position) = 35.00539+273.15;
if(t<=257812 && t>236953)
F_PROFILE(f, thread, position) = (24.31869+((2.8*239734.368)/(257812.956-
239734.368)))-((2.8/(257812.956-239734.368))*t)+273.15;
if(t<=283385 && t>257812)
F_PROFILE(f, thread, position) = (21.6029+((0.276*260594.28)/(283385.628-
260594.28)))-((0.276/(283385.628-260594.28))*t)+273.15;
if(t<=344111 && t>283385)
F_PROFILE(f, thread, position) = (21.23466+((1.243*286630.524)/(344111.112-
286630.524)))-((1.243/(344111.112-286630.524))*t)+273.15;
if(t<=348283 && t>344111)
F_PROFILE(f, thread, position) = 20.0839+273.15;
if(t<=448747 && t>348283)
F_PROFILE(f, thread, position) = 19.8438+273.15;
}
end_f_loop(f, thread)
}

You might also like