viscosity.c
来自「fluent培训教程中的udf例子和说明」· C语言 代码 · 共 42 行
C
42 行
/**************************************************************//* *//* User-Defined Functions for temperature-dependent viscosity *//* FLUENT 5.0 *//* *//* Author: Liz Marshall *//* Date: February 1998 *//* *//**************************************************************/#include "udf.h"DEFINE_PROPERTY(user_vis, cell, thread){ float temp, mu_lam; temp = C_T(cell, thread); {/* If the temperature is high, use a small, constant viscosity */ if (temp > 288.) mu_lam = 5.5e-3;/* Otherwise, use a profile to get higher viscosity values */ else if (temp >= 286. && temp <= 288.) mu_lam = 143.2135 - 0.49725 * temp; else mu_lam = 1.0;} return mu_lam;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?