CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Help: ACCESS VIOLATION, strange behaviour

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 3, 2012, 03:55
Default Help: ACCESS VIOLATION, strange behaviour
  #1
Senior Member
 
ghost82's Avatar
 
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 918
Rep Power: 15
ghost82 will become famous soon enough
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;
}
When I set the simulation parameters everything works fine.

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
Attached Images
File Type: png cylinder.png (8.6 KB, 3 views)

Last edited by ghost82; June 3, 2012 at 05:49.
ghost82 is online now   Reply With Quote

Old   June 3, 2012, 05:50
Default
  #2
Senior Member
 
ghost82's Avatar
 
Daniele
Join Date: Oct 2010
Location: Italy
Posts: 918
Rep Power: 15
ghost82 will become famous soon enough
I must initialize before computing reference values from inlet..now it works.
Daniele
ghost82 is online now   Reply With Quote

Old   October 26, 2012, 02:46
Default URgent
  #3
New Member
 
farhan akthar
Join Date: Oct 2012
Posts: 1
Rep Power: 0
fluency is on a distinguished road
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
fluency is offline   Reply With Quote

Reply

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
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 07:29
strange pressure behaviour with symmetricPlane boudary condition - interFoam duongquaphim OpenFOAM Running, Solving & CFD 10 August 20, 2013 14: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 17:31
Access violation - Help please AlwaysLearning FLUENT 3 August 22, 2006 12:21


All times are GMT -4. The time now is 11:13.