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

UDF can't run

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 24, 2017, 23:17
Post UDF can't run
  #1
New Member
 
slyan
Join Date: Mar 2017
Posts: 4
Rep Power: 9
slyan0913 is on a distinguished road
Error:
E:\ANSYS\ANSYSI~1\v145\fluent\fluent14.5.0\win64\2 ddp\fl1450s.exe 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

who meet this error same as me? I just add an UDF for PBM model.

DEFINE_PB_GROWTH_RATE(growth_rate, cell, thread,d_1)
{
/* d_1 can be used if size-dependent growth is needed */
/* When using SMM, only size-independent or linear growth is allowed */
real G, w;

real P,solute_mass_frac,solubility;

//Thread *tc = THREAD_SUPER_THREAD(thread); /*obtain mixture thread */
//Thread **pt = THREAD_SUB_THREADS(tc); /* pointer to sub_threads */
Thread *pt = THREAD_SUB_THREAD(thread,0);

solute_mass_frac = C_YI(cell,pt,0); /* mass fraction of solute in primary phase (solvent) */

P = C_P(cell,pt); /* Pressure of primary phase in Pa */

solubility = 9.708*P/1.e6+1.4;/* Solubility Law relating equilibrium solute mole fraction to pressure,S:g/kg,P:MPa*/

w=solubility/(solubility+1000);

if (solute_mass_frac < w)
{
G = 0.;
}
else
{
G = 9.04206e-16*exp(w/0.00327)+6.1679e-5;
}
return G;
}


This is my UDF, who can tell me why?
slyan0913 is offline   Reply With Quote

Reply

Tags
pbm model udf


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
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 05:18
Fluent Radiation/porous media Schmitt pierre-Louis FLUENT 26 September 1, 2016 11:29
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 07:12
I need UDF help. S.Whitney FLUENT 0 October 15, 2007 12:29
Please help me run UDF code for source Suga FLUENT 1 February 3, 2006 04:40


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