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

Segmentation Violation

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 26, 2006, 09:55
Default Segmentation Violation
  #1
Axel
Guest
 
Posts: n/a
Hello Guys, I want to obtain a coefficient diffusion value with the following UDF code:

__________________________________________________

#include "udf.h" #include "sg.h" #include "mem.h"

DEFINE_ON_DEMAND(cor_diff) {

Domain *d;

Domain *sd;

Thread *t, *tc0;

face_t f;

cell_t c;

int ID =6;

real diff1[3];

real fra_mas[3], dens=0.;

real A[ND_ND],ds,es[ND_ND],A_by_es,dr0[ND_ND],dr1[ND_ND];

d = Get_Domain(1);

sd = Get_Domain(2);

t = Lookup_Thread(sd,ID);

begin_f_loop(f,t) {

tc0 = THREAD_T0(t);

c = F_C0(f,t);

INTERIOR_FACE_GEOMETRY(f,tc0,A,ds,es,A_by_es,dr0,d r1);

diff1[0] = C_DIFF_EFF(c,tc0,0);

dens = C_R(c,tc0);

fra_mas[0] = F_YI(c,tc0,0);

C_UDMI(c,t,0) = dens*diff1[0]*fra_mas[0]*dr0[0]*2; } end_f_loop(f,t) }

_________________________________________

but after I have compiled this function and run as "execute on demand" I obtain the error "segmentation violation"... Which error I have made? Thank you for your answers.

Axel

  Reply With Quote

Old   May 26, 2006, 11:19
Default Re: Segmentation Violation
  #2
Swarup
Guest
 
Posts: n/a
Please check whether you are trying to access something which does not exist as yet. You may be knowing, this is a common error when you try to access a memory that does not exist!

Swarup.
  Reply With Quote

Old   May 26, 2006, 12:16
Default Re: Segmentation Violation
  #3
Axel
Guest
 
Posts: n/a
I noted that when I consider the face loop (also with nothing inside it) there is this error... I am trying to use an other loop...
  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
Segmentation violation louiza FLUENT 15 January 9, 2014 13:57
Segmentation Violation Corentin FLUENT 1 February 13, 2011 02:07
Defining Multiphase by text and by gui = different result and Segmentation Violation RPJones FLUENT 0 June 9, 2009 16:24
segmentation violation wasan FLUENT 0 December 23, 2008 12:37
SEGMENTATION VIOLATION Arif FLUENT 3 May 27, 2003 08:24


All times are GMT -4. The time now is 08:59.