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

multiphase, define profile

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 11, 2020, 15:37
Default multiphase, define profile
  #1
Member
 
mohammadreza
Join Date: Feb 2020
Posts: 31
Rep Power: 6
mohammadreza_hj is on a distinguished road
Hi everybody,

I have a question that I'm stuck in it; I asked this question at the end of the last thread that I made, but because I'm in a hurry (deadlines) and I thought that because the discussion's getting long, nobody answered. So I ask it again here.

I want to catch the VOF of the phases on the wall by a defined profile. Is there any macro for this purpose, and with what data accessing and looping macro?

I send my code here, so if you can help me, I will be appreciated. but when I apply my code, the fluent crashes out as soon as I initialize the solution. (image attache)

DEFINE_PROFILE(heatflux_slip_shoulder_W, t, i)
{
/*Domain *d=Get_Domain(1);*/
int phase_domain_index = 0; /* primary phase index is 0 */
Thread *tm = THREAD_SUPER_THREAD(t);
Thread *subthread = THREAD_SUB_THREAD(tm,phase_domain_index);
double p[ND_ND]; /* this will hold the position vector */
double x, y, r, qslip, sigma, tav_stick, tav_fric, temp, Vx, Vy, Vz, V_W, V_T, VF;
double w = 1120;
double pi = 3.1415927;
double U = 0.002;
double press = 50000000;
double delta = 0.65;
double etta = 0.7;
double heat_ratio = 0.6383;
double Rshol = 0.0075;
double fric ;
double Rpin = 0.0025;
face_t f;
/*thread_loop_f(f, d)*/
{
begin_f_loop(f,t)
{
VF =F_VOF(f,subthread);
F_CENTROID(p, f, t);
x = p[0];
y = p[1];
r = sqrt((x*x) + (y*y));
temp = F_T(f,t);if ((297.<=temp)&&(temp<=273.))
{
sigma_6 = 325.80263157895 + (-0.171052631578952 * temp);
sigma_5 = 282.355263157897 + (-0.0921052631578974*temp);
}
...(and some conditions like above)...

if ((297.<=temp)&&(temp<=855.))
fric = 0.383752244165171 + (-0.000448833034111311 * temp);
else
fric = 0;

tav_6 = sigma_6*1000000/1.732;
tav_5 = sigma_5*1000000/1.732;
tav = VF * tav_6 + (1 - VF ) * tav_5;
qslip = ((pi*w*r/30) - (U*y/r)) * ((etta * (1 - delta) * tav) + (delta * fric * press));

F_PROFILE(f, t, i) = heat_ratio * qslip;
}
end_f_loop(f,t)
}
Attached Images
File Type: jpg Screenshot (520).jpg (121.8 KB, 8 views)
mohammadreza_hj is offline   Reply With Quote

Old   December 12, 2020, 03:02
Default
  #2
Member
 
mohammadreza
Join Date: Feb 2020
Posts: 31
Rep Power: 6
mohammadreza_hj is on a distinguished road
my headers is :

#include "udf.h"
#include "mem.h"
#include "sg.h"
#include "sg_mphase.h"
#include "flow.h"
#include "metric.h"
mohammadreza_hj is offline   Reply With Quote

Reply


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
Hydrogen storage by metal hydride longbk FLUENT 12 August 1, 2023 21:13
Multiphase - Define pressure for 1 phase melona FLUENT 1 March 15, 2020 13:15
Unsteady Boundary Profile with data file Arianna FLUENT 34 July 29, 2019 17:35
An odd ERROR mdakbari Fluent UDF and Scheme Programming 7 April 4, 2016 05:30
multiphase define perry FLUENT 4 June 7, 2005 10:57


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