英语翻译#include"udf.h"#include"dpm.h"#include"surf.h"#include"random.h"#defineV_CROSS(a,b,r)\((r)[0] =(a)[1]*(b)[2] - (b)[1]*(a)[2],\(r)[1] =(a)[2]*(b)[0] - (b)[2]*(a)[0],\(r)[2] =(a)[0]*(b)[1] - (b)[0]*(a)[1])DEFINE_DPM_BC(bc_wall,p,thread,f,f_

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 21:08:54
英语翻译#include

英语翻译#include"udf.h"#include"dpm.h"#include"surf.h"#include"random.h"#defineV_CROSS(a,b,r)\((r)[0] =(a)[1]*(b)[2] - (b)[1]*(a)[2],\(r)[1] =(a)[2]*(b)[0] - (b)[2]*(a)[0],\(r)[2] =(a)[0]*(b)[1] - (b)[0]*(a)[1])DEFINE_DPM_BC(bc_wall,p,thread,f,f_
英语翻译
#include"udf.h"
#include"dpm.h"
#include"surf.h"
#include"random.h"
#defineV_CROSS(a,b,r)\
((r)[0] =(a)[1]*(b)[2] - (b)[1]*(a)[2],\
(r)[1] =(a)[2]*(b)[0] - (b)[2]*(a)[0],\
(r)[2] =(a)[0]*(b)[1] - (b)[0]*(a)[1])
DEFINE_DPM_BC(bc_wall,p,thread,f,f_normal,dim)
{
real normal[3];
real tan_1[3];
real tan_2[3];
real rel_vel[3];
realface_vel[3];
real alpha,beta,phi,cp,sp;
real rel_dot_n,vmag,vnew,dum;
real weber_in,weber_out;
int i,idim =dim;
boolean moving =(SV_ALLOCATED_P (thread,SV_WALL_GRID_V) &&
SV_ALLOCATED_P(thread,SV_WALL_V ) );
#if RP_2D
if(rp_axi_swirl)
{
real R =sqrt(p->state.pos[1]*p->state.pos[1] +
p->state.pos[2]*p->state.pos[2]);
if (R >1.e-20)
{
idim = 3;
normal[0] =f_normal[0];
normal[1] =(f_normal[1]*p->state.pos[1])/R;
normal[2] =(f_normal[1]*p->state.pos[2])/R;
}
else
{
for (i=0;i

英语翻译#include"udf.h"#include"dpm.h"#include"surf.h"#include"random.h"#defineV_CROSS(a,b,r)\((r)[0] =(a)[1]*(b)[2] - (b)[1]*(a)[2],\(r)[1] =(a)[2]*(b)[0] - (b)[2]*(a)[0],\(r)[2] =(a)[0]*(b)[1] - (b)[0]*(a)[1])DEFINE_DPM_BC(bc_wall,p,thread,f,f_
语言肯定是C 这个应该是.h头文件里面的 还有一些#if RP_2D #endif 预编译的语句
就看这部分 只体现了一些运算 参数都没有 真心读不出他想干什么 很多是计算公式吧
weber_out =0.6785*weber_in*exp(-0.04415*weber_in);
vnew = rel_dot_n* (1.0 + sqrt( weber_out /MAX( weber_in,DPM_SMALL )));
你最好结合文献去看 最好还有全部的代码
boolean moving =(SV_ALLOCATED_P (thread,SV_WALL_GRID_V) &&
SV_ALLOCATED_P(thread,SV_WALL_V ) ); // 这部分是判断流体是否运动吧?
下面一些 应该是position 的 3个状态定位
流体测试的代码?