-
-
May 28, 2024 at 4:38 amVijay AdhiSubscriber
I'm working on the design of a pressure-fed LO2 and LNG rocket engine. I've been using Fluent to estimate the heat flux for an ablative-cooled engine. I was able to solve all the compilation errors for my UDF.
I'm attaching my boundary conditions and mesh. My model is axisymmetric and I have a fluid-solid domain in my problem, so all my methods are second order. But I keep getting this error whenever I run my calculations.
"Divergence detected in AMG solver. temporarily reducing Courant number to 0.5 and trying again..."
Is there a problem with my mesh? I've used a multi-zone and face mesh with 15 inflation layers.
I've tried all the methods I know to simplify the problem, my mesh quality is fairly good. I still keep getting the same error(The actual mesh is much more refined, the picture quality is quite poor)
I'm attaching my UDF below:
#include "udf.h"#define pi 3.14159ÂDEFINE_PROFILE(Boun_cond,t,i)Â{Âreal x[ND_ND];Âreal rt, dt, At, vis, Cp, Pr, Pc, Tc, gamma, Cstar,Cstareff, g, r, A, M, Mnew, N1, N2, N3, Taw, Thotgas,T,hgas,func, ffunc, fCO2, fH2O, Le, qrad, qCO2, qH2O, P, mdot,kt;Âface_t f;Âint k,NI;Ârt=0.015085; /* m    */vis=0.000075018; /*Kg/m-s  */Cp=2328.6; /*J/Kg-K  */Pr=0.6552;Pc=2500000; /*Pa */Tc=3235; /*K */gamma=1.20;Cstar=1855.4; /*m/s */Cstareff = 0.92;kt = 0.2662; /*W/mK */ÂNI=1000;Âdt=rt*2;At=pi*pow(rt,2);ÂfCO2=0.10511; /*Mole fraction of CO2 */fH2O=0.46300; /*Mole fraction of H2O */mdot = 0.987; /*Mass flow rate of exhaust */Âbegin_f_loop(f,t)Â{ÂF_CENTROID(x,f,t);r=sqrt(pow(x[0],2)+pow(x[1],2));A=pi*pow(r,2);Le=0.6*2*r;Â/*For combustion chamber */Âif (x[0]<0.06604)Â{ÂM=0;P=Pc/pow((1+(gamma-1)*pow(M,2)/2),(gamma/(gamma-1)));T=Tc/(1+(gamma-1)/2*pow(M,2));Taw=Tc*((1+pow(Pr,0.33)*((gamma-1)/2)*pow(M,2))/(1+((gamma-1)/2)*pow(M,2)));Thotgas=T+0.9*(Tc*pow(Cstareff,2)-T);hgas=0.01975*pow(k,0.18)*pow((mdot*Cp),0.82)/pow((2*r),1.82)*pow((Thotgas/(F_T(f,t))),0.35);Â/*Radiation heat transfer       */ÂqCO2 = 5.74*pow((P*fCO2*r/(pow(10,5))),0.3)*pow((F_T(f,t)/100),3.5);qH2O = 4*pow((P*fH2O*r/(pow(10,5))),0.3)*pow((F_T(f,t)/100),3.5);Âqrad=qCO2+qH2O;Â}ÂÂ/*For subsonic region          */Âif (x[0]<0 && x[0]>=0.06604)Â{Âfor (k=1;k<=NI;k++){if (k==1)M=0.05;elseM=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=Pc/pow((1+(gamma-1)*pow(M,2)/2),(gamma/(gamma-1)));T=Tc/(1+(gamma-1)/2*pow(M,2));Taw=Tc*((1+pow(Pr,0.33)*((gamma-1)/2)*pow(M,2))/(1+((gamma-1)/2)*pow(M,2)));Thotgas=T+0.9*(Tc*pow(Cstareff,2)-T);hgas=0.01975*pow(k,0.18)*pow((mdot*Cp),0.82)/pow((2*r),1.82)*pow((Thotgas/(F_T(f,t))),0.35);Â/*Radiation heat transfer       */ÂqCO2 = 5.74*pow((P*fCO2*r/(pow(10,5))),0.3)*pow((F_T(f,t)/100),3.5);qH2O = 4*pow((P*fH2O*r/(pow(10,5))),0.3)*pow((F_T(f,t)/100),3.5);Âqrad=qCO2+qH2O;Â}ÂÂ/*For Supersonic region*/Âif (x[0]>=0)Â{Âfor (k=1;k<=NI;k++){if (k==1)M=5;elseM=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=Pc/pow((1+(gamma-1)*pow(M,2)/2),(gamma/(gamma-1)));T=Tc/(1+(gamma-1)/2*pow(M,2));Taw=Tc*((1+pow(Pr,0.33)*((gamma-1)/2)*pow(M,2))/(1+((gamma-1)/2)*pow(M,2)));Thotgas=T+0.9*(Tc*pow(Cstareff,2)-T);hgas=0.01975*pow(k,0.18)*pow((mdot*Cp),0.82)/pow((2*r),1.82)*pow((Thotgas/(F_T(f,t))),0.35);Â/*Radiation heat transfer       */ÂqCO2 = 5.74*pow((P*fCO2*r/(pow(10,5))),0.3)*pow((F_T(f,t)/100),3.5);qH2O = 4*pow((P*fH2O*r/(pow(10,5))),0.3)*pow((F_T(f,t)/100),3.5);Âqrad=qCO2+qH2O;Â}ÂF_PROFILE(f,t,i)=(hgas*(Taw-F_T(f,t))+qrad);}Âend_f_loop(f,t)Â} -
July 2, 2024 at 2:30 pmRobForum Moderator
Check the IF statements and that the various equations return a sensible value for all conditions.Â
-
- The topic ‘Heat flux estimation for a LOX LCH4 rocket engine using UDF’ is closed to new replies.
- error udf
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Diesel with Ammonia/Hydrogen blend combustion
- Fluent fails with Intel MPI protocol on 2 nodes
- Non-Intersected faces found for matching interface periodic-walls
- Encountering Error in Heterogeneous Surface Reaction
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Cyclone (Stairmand) simulation using RSM
- How to obtain axial and tangential velocity in CFX-post?
-
1131
-
468
-
460
-
225
-
201
© 2024 Copyright ANSYS, Inc. All rights reserved.