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

UDF Errors

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

LinkBack Thread Tools Display Modes
Old   April 22, 2009, 06:00
Default UDF Errors
New Member
Join Date: Apr 2009
Posts: 7
Rep Power: 10
visuja is on a distinguished road
Sponsored Links
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
Sponsored Links


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
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
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

Sponsored Links

All times are GMT -4. The time now is 10:02.