 UDF for transient fully developed laminar profile at inlet?

• 43 Views
• Last Post 27 February 2019
• Topic Is Solved
BeginerModel posted this 26 February 2019

Hi All.

I have created a UDF which varies the inlet velocity with time, however I need the inlet to have fully developed flow as well. So currently the model develops the flow across the "pipe" and the boundary layer etc inside my model which is costing my a large amount of computing power and other problems. I have seen the UDF's for creating a laminar parabolic profile, but am unsure how to combine the two together. Here is my current UDF:

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

CoronaryVelocity.c

UDF for specifying a fourier fitted velocity boundary condition

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

#include "udf.h"

float a0 =     0.1564;

float a1 =     -0.03045;

float b1 =     0.007764;

float a2 =      0.0242;

float b2 =     0.03948;

float a3 =     -0.01151;

float b3 =     -0.008163;

float a4 =    0.009875;

float b4 =   0.003343;

float a5 =    -0.01003;

float b5 =     0.002862;

float a6 =    0.006133;

float b6 =   -0.0007519;

float a7 =   0.001413;

float b7 =     0.001232;

float a8 =     -0.003654;

float b8 =   -0.000137;

float w =       7.858;

{

face_t f;

real t = CURRENT_TIME;

{

F_PROFILE(f, thread, position) = a0 + a1*cos(t*w) + b1*sin(t*w) +

a2*cos(2*t*w) + b2*sin(2*t*w) + a3*cos(3*t*w) + b3*sin(3*t*w) +

a4*cos(4*t*w) + b4*sin(4*t*w) + a5*cos(5*t*w) + b5*sin(5*t*w) +

a6*cos(6*t*w) + b6*sin(6*t*w) + a7*cos(7*t*w) + b7*sin(7*t*w) +

a8*cos(8*t*w) + b8*sin(8*t*w);

}

}

I want a simple parabolic profile using that function. Where do I start?

Thanks

abenhadj posted this 26 February 2019

Why not applying the parabolic profile by knowing the inlet geometry. Does the magnitude varies over time but the profiles remain laminar?

Best regards,

Amine

BeginerModel posted this 26 February 2019

The inlet is essentially a circle, and whilst the magnitude varies, the flow is always laminar.

abenhadj posted this 26 February 2019

Okay then provide a power law profile based on the center-line position and the radius. Let the magniute be function of time.

Here an example:

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

vprofile.c

UDF for specifying steady-state velocity profile boundary condition

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

#include "udf.h"

{

real x[ND_ND]; /* this will hold the position vector */

real y;

face_t f;

{

y = x;

F_PROFILE(f, thread, position) = 20. - y*y/(.0745*.0745)*20.;

}

}

Best regards,

Amine

BeginerModel posted this 27 February 2019

For anyone looking at this later, I have figured it out.

{

real x[ND_ND];

real y;

real z;

real t = CURRENT_TIME;

face_t f;

{

y = x;

z = x;

}

}

abenhadj posted this 27 February 2019

Mark thìs as solved.

Best regards,

Amine Close 