问题描述:
英语翻译
#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_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
问题解答:
我来补答展开全文阅读