CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

Errors message: ACCESS_VIOLATION

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

LinkBack Thread Tools Display Modes
Old   August 24, 2010, 08:32
Default Errors message: ACCESS_VIOLATION
New Member
Join Date: Aug 2010
Posts: 5
Rep Power: 9
whelk123 is on a distinguished road
Hello, I am trying to model the heat transfer within a hydrogen fuel cell and I keep getting the message ACCESS_VIOLATION when I try applying my UDF.
#include "udf.h"
Domain *d;
Thread *t;
real sum_diss=0.;
cell_t c;
d = Get_Domain(1);
DEFINE_SOURCE(sink_mass, c, t, dS, eqn)
real sink_mass;
return sink_mass;

DEFINE_SOURCE(energy_source, c, t, dS, eqn)
real energy_source;
return energy_source;
real step =RP_Get_Real("physical-time-step");
Domain *domain = Get_Domain(1);
int ID=2;
Thread *t =Lookup_Thread(domain, ID);
cell_t c;
double temper,P,hsmp,lnpeq,Peq, dxdt;

hsmp= C_UDMI(c,t, 1 )*(HsMmaxprim-hsurm)+hsurm;
C_UDMI(c,t,1 )=C_UDMI(c,t,1 )+C_UDMI(c,t,0)*step;

I have defined things but didnt think that was important. Can anyone please tell me what is wrong with this code!! It is fairly urgent!
Thank you for any help
whelk123 is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 42 May 14, 2012 20:48
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 12 September 17, 2007 17:48
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07

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