CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   piecewise functions in UDFs (https://www.cfd-online.com/Forums/fluent/63694-piecewise-functions-udfs.html)

zjbwow April 16, 2009 09:28

piecewise functions in UDFs
 
hi there

I want to load on the boundary a changing pressure which described by a piecewise function in the UDFs.


question is:how?:p


#include "udf.h"
DEFINE_PROFILE(unsteady_outlet, thread, position)
{
face_t f;
begin_f_loop(f, thread)
{
real t = RP_Get_Real("flow-time");
F_PROFILE(f, thread, position) =5.0e6*sin(10.*t);
}
end_f_loop(f, thread)
}


through the codes I can see how to set a continous formula but a piecewise function......no.

help,please.


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