CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Fatal error while initialize pressure inlet (https://www.cfd-online.com/Forums/fluent/106726-fatal-error-while-initialize-pressure-inlet.html)

mario__tr September 6, 2012 09:19

Fatal error while initialize pressure inlet
 
Hi,

I use this exemple code to define the density of a liquid :

/************************************************** ******************
Density and speed of sound UDFs for compressible liquid flows.
For use with pressure-based solver, for single phase, multiphase mixture
or cavitation models only.
Note that for density function, dp is the difference between a cell
absolute pressure and reference pressure.
************************************************** *******************/
#include "udf.h"
Release 12.0
c ANSYS, Inc. January 26, 2009 2-93
DEFINE Macros
#define BMODULUS 2.2e9
#define rho_ref 1000.0
#define p_ref 101325
DEFINE_PROPERTY(superfluid_density, c, t)
{
real rho;
real p, dp;
real p_operating;
p_operating = RP_Get_Real ("operating-pressure");
p = C_P(c,t) + p_operating;
dp = p-p_ref;
rho = rho_ref/(1.0-dp/BMODULUS);
return rho;
}
DEFINE_PROPERTY(sound_speed, c,t)
{
real a;
real p, dp,p_operating;
p_operating = RP_Get_Real ("operating-pressure");
p = C_P(c,t) + p_operating;
dp = p-p_ref;
a = (1.-dp/BMODULUS)*sqrt(BMODULUS/rho_ref);
return a;
}



I have a pressure inlet and when I try to initialize with the pressure inlet I receive this error message :


***************************************
Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f
*****************************************

Do you have any idea about what can cause this error?

Thanks

mario__tr September 6, 2012 09:44

oubivousley I did not put those 3 lines

Release 12.0
c ANSYS, Inc. January 26, 2009 2-93
DEFINE Macros

they are in my previous post just because I did a cut and past of the example in the udf fluent manual but this is not from my udf, in my udf I take off those line that are for the pagination of the manual.

But this is not the cause of the fatal error

ghost82 September 6, 2012 10:30

Hi, I had a similar problem using this udf to define speed of sound and density; the access violation error happens because fluent tries to access something that doesn't exist..
Try to initialize by manually set the values, don't "compute from"; same error should exist if you "compute from" in the reference values panel.
So initialize your domain without "compute from" and then set reference values.

Hope this works..
Daniele

mario__tr September 6, 2012 10:54

Hi,

I try to initialize without compute from. Just to make a test I let all the value to 0. When I start the simulation I get divergence in amg solver quite fast. But this may be because of my grid. I will try a better grid.

mario__tr September 6, 2012 14:46

Finally it did not work

mario__tr September 7, 2012 13:00

Finally I get my result, I just set correct limit and it work fine.

wacque October 9, 2012 00:16

Hi,

I seem to have similar problem when trying to define the density of water vapour using UDF for ideal gas as follows;

________________________________________
#include <udf.h>

DEFINE_PROPERTY (igl_density,c,t)

{
real Ftemp;
real rho;
real i,p,dp;

dp=C_P(c,t);
Ftemp=C_T(c,t);
rho=(dp*18)/(8.314*Ftemp)/1000;

return rho;

}

DEFINE_PROPERTY (sound_speed,c,t)

{
real a;
real p,dp;
real density;

dp=C_P(c,t);
density=C_R(c,t);
a=pow((dp/density),0.5);

return a;
}
_____________________________________

Any advice on this? Really appreciate it

mario__tr October 9, 2012 08:04

I solve the problem by adding a pressure a pressure in the ititial gauge pressure in pressure inlet. So the gauge total pressure was my 250psi, and the initial gauge pressure was 14,7psi.

I hope this will help you.

nkme2007 October 10, 2012 05:46

Hello All,

I want to do analysis of heat transfer from water flowing through pipes submerged inside concrete. I am modelling in GAMBIT and wish to analyse it on Ansys FLUENT.

Can anybody help me out, how to model and simulate?

Does any tutorials exist?


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