CFD Training - Simulation of flow around a building using ANSYS (P1/3)

Описание к видео CFD Training - Simulation of flow around a building using ANSYS (P1/3)

This training demonstrates how to:
- create a geometry of an isolated building from scratch;
- create the surrounding computational domain;
- generate a fully-structured grid wit local refinements near the building walls and ground;
- prepare the simulation settings in ANSYS Fluent including a user-defined function (UDF) for inlet logarithmic profiles of a neutral atmospheric boundary layer.

The UDF is given below (it needs to be saved as a C-language ".c" file and be interpreted in ANSYS Fluent):
--------------------------------------------------------------------------------------------------------------
#include "udf.h"
/* BOUNDARY PROFILES FOR WIND SPEED Uref = 5 m/s */
/* ROUGHESS LENGTH yo = 0.03 m */

real v = 5;
real uf = 0.361;
real yo = 0.03;


/* CALCULATION OF THE PROFILE FOR HORIZONTAL WIND SPEED */

DEFINE_PROFILE(vel, thread, nv) /* function name, thread and variable number */
{
face_t f;
real x[ND_ND];

begin_f_loop (f,thread)
{
F_CENTROID(x,f,thread);
F_PROFILE(f,thread,nv) = (uf/(0.42))*log((x[2]+yo)/yo);
}
end_f_loop(f,thread)
}

/* CALCULATION OF THE PROFILE FOR TURBULENT KINETIC ENERGY */

DEFINE_PROFILE(tke, thread, nv) /* function name, thread and variable number */
{
face_t f;
real x[ND_ND];

begin_f_loop (f,thread)
{
F_CENTROID(x,f,thread);
F_PROFILE(f,thread,nv) = 3.33*(uf*uf);
}
end_f_loop(f,thread)
}


/* CALCULATION OF THE PROFILE FOR TURBULENCE DISSIPATION RATE */

DEFINE_PROFILE(eps, thread, nv) /* function name, thread and variable number */
{
face_t f;
real x[ND_ND];

begin_f_loop (f,thread)
{
F_CENTROID(x,f,thread);
F_PROFILE(f,thread,nv) = (uf*uf*uf)/(0.42*(yo+x[2]));
}
end_f_loop(f,thread)
}


DEFINE_PROFILE(Cs,t,i)
{
face_t f;
begin_f_loop(f,t)
{
F_PROFILE(f,t,i) = 2.5;
}
end_f_loop(f,t)
}
--------------------------------------------------------------------------------------------------------------

Комментарии

Информация по комментариям в разработке