|
[Sponsors] |
June 3, 2012, 04:55 |
Help: ACCESS VIOLATION, strange behaviour
|
#1 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26 |
Hi all,
I'm noticing a strange behaviour, which I cannot explain to myself: my case is very simple, as you can see from the attached file (3d simulation). A cylinder with wall as bottom and side surfaces and a pressure outlet at the top. Next I compiled this udf, which compiles and load fine, to take into accout water compressibility and custom sound speed (directly taken from fluent guide): Code:
#include "udf.h" #define BMODULUS 2.2e9 #define rho_ref 998.2 #define p_ref 101325.0 #define p_operating 101325.0 DEFINE_PROPERTY(water_density, c, t) { real rho; real p, dp; 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 = C_P(c,t) + p_operating; dp = p-p_ref; a = (1.-dp/BMODULUS)*sqrt(BMODULUS/rho_ref); return a; } However, if I change the bottom wall boundary condition to inlet velocity or pressure inlet, when setting reference values (computing from inlet), fluent gives an ACCESS VIOLATION error. I cannot understand why..can anybody help me? Daniele PS: I'm using fluent 14.0 with sp1 Last edited by ghost82; June 3, 2012 at 06:49. |
|
June 3, 2012, 06:50 |
|
#2 |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 26 |
I must initialize before computing reference values from inlet..now it works.
Daniele |
|
October 26, 2012, 03:46 |
URgent
|
#3 |
New Member
farhan akthar
Join Date: Oct 2012
Posts: 1
Rep Power: 0 |
HI,
I'm getting the access violation error while trying to initialise my case.. I'm trying to simulate droplet impact on flat surface and ve written an UDF for dynamic contact angle.. the udf is as follows #include udf.h #include mem.h #include metric.h #define vis 0.001 #define st 0.073 #define theta_adv 105 #define theta_rec 95 DEFINE_PROFILE(dymanic_contact, thread, index) { face_t f; real vcl,b; begin_f_loop(f, thread) { cell_t c0= F_c0(f,thread); if(C_VOF(c0,thread)==0.5) vcl= C_V(c0, thread); } If(vcl>0) { b=0.07133; ca=vis*vcl/st; a=ca+b; F_PROFILE(dynamic_angle,thread,index)=acos(1-(2*tanh(5.16*(a/(1+(1.31*a^0.99)))^0.706))); } elseif { b=0.05304; ca=vis*(-vcl)/st; a=ca+b; F_PROFILE(dynamic_angle,thread,index)=acos(1-(2*tanh(5.16*(a/(1+(1.31*a^0.99)))^0.706))); } } Kindly help |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
specified shear at wall - temperature gradient - UDF - access violation error | senD | Fluent UDF and Scheme Programming | 9 | September 18, 2014 08:29 |
strange pressure behaviour with symmetricPlane boudary condition - interFoam | duongquaphim | OpenFOAM Running, Solving & CFD | 10 | August 20, 2013 15:00 |
Strange behaviour when using LienCubicKE and NonlinearKEShih | hani | OpenFOAM Running, Solving & CFD | 20 | March 6, 2013 11:06 |
UDF Access violation | therandomestname | FLUENT | 0 | April 15, 2011 18:31 |
Access violation - Help please | AlwaysLearning | FLUENT | 3 | August 22, 2006 13:21 |