CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

the udf compiled by Johnson&Jackson wall boundary conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2023, 02:51
Default the udf compiled by Johnson&Jackson wall boundary conditions
  #1
New Member
 
ding shengxian
Join Date: Mar 2023
Location: A beautiful village town
Posts: 1
Rep Power: 0
Ding xiansheng is on a distinguished road
According to the udf compiled by Johnson&Jackson wall boundary conditions, in the calculation of gas-solid two-phase flow in fluent, it always diverges. Can you show us the reason,thank you very much

#include "udf.h"
#include "sg_vof.h"
#include "sg_mphase.h"
#include "flow.h"
#include "mem.h"
#include "metric.h"
#define VOF_SF_MAX 0.63
#define SPE_COE 0.001
#define E_ss 0.9
#define E_w 0.8
#define mu_w 0.5

DEFINE_PROFILE(wall_shear_x, t, i)
{
cell_t c0;
face_t f;
Thread *t0 = THREAD_T0(t);
real wall_shear, goss;
real rho_s, vof_s, temp_s, p_sum, p_k, p_f;
real u_x, u_y, u_z, u_slip;
if (!Data_Valid_P()) return;
begin_f_loop(f, t)
{
c0 = F_C0(f, t);
u_x = C_U(c0, t0);
u_y = C_V(c0, t0);
u_z = C_W(c0, t0);
rho_s = C_R(c0, t0);
vof_s = C_VOF(c0, t0);
temp_s = C_GT(c0, t0);
p_sum = C_GP(c0, t0);
u_slip = sqrt(u_x*u_x + u_y*u_y + u_z*u_z);
goss = (1.0 - 7.0*vof_s / 16.0) / pow(1.0 - vof_s / VOF_SF_MAX, 2.0);
p_k = vof_s*rho_s*temp_s + 2.0*rho_s*(1.0 + E_ss)*vof_s*vof_s*goss*temp_s;
p_f = p_sum - p_k;
wall_shear = sqrt(3.0*temp_s)*M_PI*SPE_COE*rho_s*goss*vof_s*u_x / (6.0*VOF_SF_MAX) + mu_w*p_f*u_x / u_slip;
F_PROFILE(f, t, i) = wall_shear;
}
end_f_loop(f, t)
}

DEFINE_PROFILE(wall_shear_y, t, i)
{
cell_t c0;
face_t f;
Thread *t0 = THREAD_T0(t);
real wall_shear, goss;
real rho_s, vof_s, temp_s, p_sum, p_k, p_f;
real u_x, u_y, u_z, u_slip;
if (!Data_Valid_P()) return;
begin_f_loop(f, t)
{
c0 = F_C0(f, t);
u_x = C_U(c0, t0);
u_y = C_V(c0, t0);
u_z = C_W(c0, t0);
rho_s = C_R(c0, t0);
vof_s = C_VOF(c0, t0);
temp_s = C_GT(c0, t0);
p_sum = C_GP(c0, t0);
u_slip = sqrt(u_x*u_x + u_y*u_y + u_z*u_z);
goss = (1.0 - 7.0*vof_s / 16.0) / pow(1.0 - vof_s / VOF_SF_MAX, 2.0);
p_k = vof_s*rho_s*temp_s + 2.0*rho_s*(1.0 + E_ss)*vof_s*vof_s*goss*temp_s;
p_f = p_sum - p_k;
wall_shear = sqrt(3.0*temp_s)*M_PI*SPE_COE*rho_s*goss*vof_s*u_y / (6.0*VOF_SF_MAX) + mu_w*p_f*u_y / u_slip;
F_PROFILE(f, t, i) = wall_shear;
}
end_f_loop(f, t)
}

DEFINE_PROFILE(wall_shear_z, t, i)
{
cell_t c0;
face_t f;
Thread *t0 = THREAD_T0(t);
real wall_shear, goss;
real rho_s, vof_s, temp_s, p_sum, p_k, p_f;
real u_x, u_y, u_z, u_slip;
if (!Data_Valid_P()) return;
begin_f_loop(f, t)
{
c0 = F_C0(f, t);
u_x = C_U(c0, t0);
u_y = C_V(c0, t0);
u_z = C_W(c0, t0);
rho_s = C_R(c0, t0);
vof_s = C_VOF(c0, t0);
temp_s = C_GT(c0, t0);
p_sum = C_GP(c0, t0);
u_slip = sqrt(u_x*u_x + u_y*u_y + u_z*u_z);
goss = (1.0 - 7.0*vof_s / 16.0) / pow(1.0 - vof_s / VOF_SF_MAX, 2.0);
p_k = vof_s*rho_s*temp_s + 2.0*rho_s*(1.0 + E_ss)*vof_s*vof_s*goss*temp_s;
p_f = p_sum - p_k;
wall_shear = sqrt(3.0*temp_s)*M_PI*SPE_COE*rho_s*goss*vof_s*u_z / (6.0*VOF_SF_MAX) + mu_w*p_f*u_z / u_slip;
F_PROFILE(f, t, i) = wall_shear;
}
end_f_loop(f, t)
}

DEFINE_PROFILE(q_flux, t, i)
{
cell_t c0;
face_t f;
Thread *t0 = THREAD_T0(t);
real u_x, u_y, u_z;
real vof_s, temp_s, rho_s;
real goss, u_slip;
real q_w, q_w_1, q_w_2;
if (!Data_Valid_P()) return;
begin_f_loop(f, t)
{
c0 = F_C0(f, t);
vof_s = C_VOF(c0, t0);
rho_s = C_R(c0, t0);
temp_s = C_GT(c0, t0);
u_x = C_U(c0, t0);
u_y = C_V(c0, t0);
u_z = C_W(c0, t0);
u_slip = sqrt(u_x*u_x + u_y*u_y + u_z*u_z);
goss = (1.0 - 7.0*vof_s / 16.0) / pow(1.0 - vof_s / VOF_SF_MAX, 2.0);
q_w_1 = sqrt(3.0*temp_s)*M_PI*SPE_COE*rho_s*goss*vof_s*u_s lip*u_slip / (6.0*VOF_SF_MAX);
q_w_2 = sqrt(3.0*temp_s)*M_PI*rho_s*goss*vof_s*(1.0 - E_w*E_w)*temp_s / (4.0*VOF_SF_MAX);
q_w = q_w_1 - q_w_2;
F_PROFILE(f, t, i) = q_w;
}
end_f_loop(f, t)
}
Ding xiansheng is offline   Reply With Quote

Reply

Tags
johnson & jackson, udf, wall boundary condition


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
Table bounds warnings at: END OF TIME STEP CFXer CFX 4 July 16, 2020 23:44
Centrifugal fan j0hnny CFX 13 October 1, 2019 13:55
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 07:30


All times are GMT -4. The time now is 23:21.