FLUENT UDF案例一 您所在的位置:网站首页 fluent速度入口udf FLUENT UDF案例一

FLUENT UDF案例一

2023-07-24 08:56| 来源: 网络整理| 查看: 265

下面是一个怎样在 UDF 中应用方程的例子UDFs 的功能由主要的DEFINE 宏 the leading DEFINE macro 来定义此处 DEFINE_PROFILE 宏用来表示下面的代码旨在给求解器提供边界的分布信息profile information at boundaries 书中将在以后部 分讨论其它的DEFINE 宏

/************************************************/ /*udfexample.c*/ /*UDF for specifying a steady-state velocity profile boundary condition*/ /*****************************************************/ #include"udf.h" DEFINE_PROFILE(inlet_x-velocity, thread, index) { real x[ND_ND];/*this will hold the position vector*/ real y; face_t f; begin_f_loop(f, thread) { F_CENTROID(x, f, thread); y=x[1]; F_PROFILE(f, thread, index)=20.-y*y/(.0745*.0745)*20.; } end_f_loop(f,thread) }


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有