CFD Online Logo CFD Online URL
Home > Forums > Fluent UDF and Scheme Programming

[UDF] Segmentation violation

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

LinkBack Thread Tools Display Modes
Old   April 23, 2009, 22:23
Default [UDF] Segmentation violation
New Member
Join Date: Apr 2009
Posts: 7
Rep Power: 8
visuja is on a distinguished road
Hi folks,

I am working on simulating flow through a HPLC column. The solid matrix geometry is constructed by importing CT scans of the solid phase. I have been able to succesfully simulate steady state flows in my model.

Now I am working on simulating a pulse on the steady state flow. This involves unsteady state simulation using species transport. I have written a UDF to simulate a pulse at my inlet boundary at t = t0. The other boundary condition is to have species mass fraction gradient at the outlet = 0. This is where I face a few problems. My geometry consists of about 1 million unstructured tet cells.

I separate the cells immediately adjacent to the outlet boundary using Adapt/Boundary into a new fluid zone. I now want to set the conc gradient in this zone = 0.

Here is the UDF that I use for both the inlet pulse as well as for outlet zero conc gradient:

#include "udf.h"
face_t f;
real time = CURRENT_TIME;
if (time == 1)
F_PROFILE(f,t,i) = 0.1;
F_PROFILE(f,t,i) = 0.0;
cell_t c;
Domain *d;
Thread *t;
int ID = 17;
d = Get_Domain(1);
t = Lookup_Thread(d,ID);
if (!Data_Valid_P())
C_YI_G(c,t,0)[0] = 0.0;
C_YI_G(c,t,0)[1] = 0.0;
C_YI_G(c,t,0)[2] = 0.0;

I hook udf concgrad to my outlet boundary under the Species tab. The problem is when I load the case file (with UDFs already hooked), and then load the steady state data file, I receive a Segmentation Violation. I also believe that to make C_YI_G available in a pressure based solver (which is what I use), I need to type: (rpsetvar species/save-gradients? #t) in the text-interface. However, this does not make any difference.

Could someone kindly guide me how to go about setting my outlet boundary condition?

Thanks and Regards,
Vivek Vasudevan
visuja 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 remove the error:FLUENT received a fatal signal (SEGMENTATION VIOLATION). Conan FLUENT 5 November 26, 2015 07:28
Segmentation Violation Corentin FLUENT 1 February 13, 2011 02:07
segmentation violation wasan FLUENT 0 December 23, 2008 12:37
Segmentation Violation Axel FLUENT 2 May 26, 2006 12:16

All times are GMT -4. The time now is 15:04.