CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

problem of udf with material property

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   April 1, 2014, 08:53
Default problem of udf with material property
New Member
Join Date: Feb 2014
Posts: 14
Rep Power: 11
france is on a distinguished road
hello everyone,Recently I come up with some problems in my master project.I write a udf for my simulation model.The udf main use to define density and viscosity.At the same time,I run the model in parallel way.When I set well all the parameters and initialization,the fluent software will automatic close. And sometimes it can successfully initialization ,but run to the first step the fluent software close.The error information almost can't see.So I don't know what the problem with my project.I guess that it must be the property udf have some problems.
Here I paste my udf .Hope someone can help me. Thanks very much in advance.
#include "udf.h"
#define BMODULUS 1.1e9
#define rho_ref 870.0
#define p_ref 101325.0
#if !RP_HOST
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;
#if !RP_HOST
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 = sqrt((BMODULUS-dp)/rho_ref);
return a;

#define f1 5.1e-9
#define f2 2.3e-8
#define f3 -1.16
#if !RP_HOST
real tt,p,kv,p_operating;
p_operating = RP_Get_Real ("operating-pressure");
return kv;
france is offline   Reply With Quote

Old   April 4, 2014, 07:51
Join Date: Jul 2013
Posts: 80
Rep Power: 11
upeksa is on a distinguished road
I think that your problem is that you use the function "pow" but you don't include "math.h"

If still don't work:

żDo other UDF work in you computer?

In that case, I would change your formulation of "operating-pressure", I guess it comes from a scheme code and maybe that is what is not working.

Yot can try something like:

#define p_operating RP_Get_Real("operating-pressure")

at the begining of the code instead.

upeksa is offline   Reply With Quote

Old   May 27, 2014, 09:08
Smile have your problems been solved?
New Member
Join Date: Jul 2012
Posts: 25
Rep Power: 12
yuanmengyuan1989 is on a distinguished road
my UDF are similar with yours. but i met the Initialization 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: ()
do you know the reason ?
yuanmengyuan1989 is offline   Reply With Quote


udf density viscosity

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Mesh UDF problem kornetka Fluent UDF and Scheme Programming 4 July 25, 2013 07:54
a problem of property UDF!I need help hw0076 Fluent UDF and Scheme Programming 2 August 29, 2012 23:28
UDF compiling problem in Flient 6.3 jeevan kumar FLUENT 2 February 25, 2009 01:43
UDF using problem, error happens-heip!! Michael FLUENT 1 December 9, 2008 08:51
UDF variables F1, y / problem with UDF Fabian FLUENT 6 June 2, 2003 11:22

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