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

Error: receveid a fatal signal

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2017, 16:16
Default Error: receveid a fatal signal
  #1
New Member
 
MATTEO CELONE
Join Date: Feb 2017
Posts: 1
Rep Power: 0
MatteoCelone is on a distinguished road
I'm trying to test a heat flux profile in the wall using an udf code, but when I interpreted the udf it appeard a message of N2 definition shadows previous definition, and it doesnt work, giving me another heat flux. My problem is a cooling channel in a rocket chamber and has a complex heat flux distribution.
the udf code is this:
#include "udf.h"
# define pi (3.14159)
DEFINE_PROFILE(Boun_Cond, t, i)
{
real x[ND_ND]; /* this will hold the position vector */
real rt, dt, At, vis, Cp, Pr, Pc, Tc, gamma, Cstar, g, r, A, M, Mnew, N1, N2, N3, Taw, sigma, hgas,
func, ffunc, fCO2, fH2O, Le, qrad, qCO2, qH2O, P, Pcr;
face_t f;
int k,NI,a;
rt=0.1; /* m */
vis=0.00010863; /* kg/m-s */
Cp=2083.3; /* J/kg-K */
Pr=0.63;
Pc=6000000; /* Pa */
Pcr=61.18297; /* kg/cm2 */
Tc=3570.44; /* K */
gamma=1.146;
Cstar=1804.7; /* m/s */
NI=100000;
dt=rt*2;
At=pi*pow(rt,2);
fCO2=0.11917; /* Mole Fraction of CO2 */
fH2O=0.31769; /* Mole Fraction of H2O */
begin_f_loop(f,t)
{

F_CENTROID(x,f,t);
r=sqrt(pow(x[a],2)+pow(x[1],2));
A=pi*pow(r,2);
Le=0.6*2*r;
/* For Combustion Region */
if (x[0]<0.28)
{
M=0;
P=Pcr/pow((1+(gamma-1)*pow(M,2)/2),(gamma/(gamma-1)));
Taw=Tc*((1+pow(Pr,0.33)*((gamma-1)/2)*pow(M,2))/(1+((gamma-1)/2)*pow(M,2)));
sigma=pow((0.5*F_T(f,t)/Tc*(1+(gamma-1)*
pow(M,2)/2)+0.5),-0.68)*pow((1+(gamma-1)*pow(M,2)/2),-0.12);
hgas=0.026*pow(vis/dt,0.2)*Cp*pow(Pc/Cstar,0.8)*pow(At/A,0.9)*
sigma/pow(Pr,0.6);
/* Radiation Heat Transfer */
qCO2=4.0705*pow((P*fCO2*Le),1/3)*(pow((Taw/100),3.5)-
pow((F_T(f,t)/100),3.5));
qH2O=4.0705*pow(P*fH2O,0.8)*pow(Le,0.6)*
(pow((Taw/100),3)-pow((F_T(f,t)/100),3));
qrad=qCO2+qH2O;
}
/* For Subsonic Region */
if (x[0]<0 && x[0]>=0.28)
{
for(k=1;k<=NI;k++)
{
if(k==1)
M=0.05;
else if (k!=1)
M=Mnew;
N1=2/(gamma+1);
N2=(gamma+1)/(2*(gamma-1));
N3=1+(gamma-1)*pow(M,2)/2;
func=pow(N1,N2)*pow(N3,N2)/M-A/At;
ffunc=-pow(N1,N2)*pow(N3,N2)*pow(M,-2)+
pow(N1,N2)*N2*pow(N3,N2-1)*(gamma-1);
Mnew=M-func/ffunc;
if(fabs(Mnew-M)<0.01)
break;
}
P=Pcr/pow((1+(gamma-1)*pow(M,2)/2),(gamma/(gamma-1)));
Taw=Tc*((1+pow(Pr,0.33)*((gamma-1)/2)*pow(M,2))/
(1+((gamma-1)/2)*pow(M,2)));
sigma=pow((0.5*F_T(f,t)/Tc*(1+(gamma-1)*
pow(M,2)/2)+0.5),-0.68)*pow((1+(gamma-1)*pow(M,2)/2),-0.12);
hgas=0.026*pow(vis/dt,0.2)*Cp*pow(Pc/Cstar,0.8)*pow(At/A,0.9)*
sigma/pow(Pr,0.6);
/* Radiation Heat Transfer */
qCO2=4.0705*pow((P*fCO2*Le),1/3)*(pow((Taw/100),3.5)-
pow((F_T(f,t)/100),3.5));
qH2O=4.0705*pow(P*fH2O,0.8)*pow(Le,0.6)*
(pow((Taw/100),3)-pow((F_T(f,t)/100),3));
qrad=qCO2+qH2O;
}
/* For Supersonic Region */
if (x[0]>=0)
{
for(k=1;k<=NI;k++)
{
if(k==1)
M=20;
else
M=Mnew;
N1=2/(gamma+1);
N2=(gamma+1)/(2*(gamma-1));
N3=1+(gamma-1)*pow(M,2)/2;
func=pow(N1,N2)*pow(N3,N2)/M-A/At;
ffunc=-pow(N1,N2)*pow(N3,N2)*pow(M,-2)+
pow(N1,N2)*N2*pow(N3,N2-1)*(gamma-1);
Mnew=M-func/ffunc;
if(fabs(Mnew-M)<0.01)
break;
}
P=Pcr/pow((1+(gamma-1)*pow(M,2)/2),(gamma/(gamma-1)));
Taw=Tc*((1+pow(Pr,0.33)*((gamma-1)/2)*pow(M,2))/
(1+((gamma-1)/2)*pow(M,2)));
sigma=pow((0.5*F_T(f,t)/Tc*(1+(gamma-1)*
pow(M,2)/2)+0.5),-0.68)*pow((1+(gamma-1)*pow(M,2)/2),-0.12);
hgas=0.026*pow(vis/dt,0.2)*Cp*pow(Pc/Cstar,0.8)*pow(At/A,0.9)*
sigma/pow(Pr,0.6);
/* Radiation Heat Transfer */
qCO2=4.0705*pow((P*fCO2*Le),1/3)*(pow((Taw/100),3.5)-
pow((F_T(f,t)/100),3.5));
qH2O=4.0705*pow(P*fH2O,0.8)*pow(Le,0.6)*
(pow((Taw/100),3)-pow((F_T(f,t)/100),3));
qrad=qCO2+qH2O;
}
F_PROFILE(f,t,i) = (hgas*(Taw - F_T(f,t))+qrad);
}
end_f_loop(f,t)
}
MatteoCelone 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
[ImmersedBoundary] About the moving immersed boundary tutorial: icoDyMIbFoam+movingCylinderInChannelIco wyldckat OpenFOAM Community Contributions 25 September 14, 2021 17:15
fluentError: received a fatal signal (Segmentation fault). thomaszhangjing Fluent UDF and Scheme Programming 11 January 13, 2021 09:37
FLUENT received fatal signal (ACCESS_VIOLATION) osamaghani FLUENT 2 March 31, 2012 16:15
FLUENT received fatal signal (ACCESS_VIOLATION) Saikiran FLUENT 3 March 17, 2011 07:02
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 15:16


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