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


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

LinkBack Thread Tools Display Modes
Old   August 21, 2009, 05:00
New Member
Sourav Mondal
Join Date: Aug 2009
Posts: 1
Rep Power: 0
Sourav_Dwaipayan is on a distinguished road
Basically we are trying to solve a problem on UF. But the main problem arises with the following UDF code when we interpret it.
In the UDF we are trying to sum up the previous cell value and the next cell value in reference to the current cell.

#include "udf.h"
int i ,id = 2;
real flux, Cbulk = 1, k = 7.85*pow(10,-6);
real conc_solids, rho;
face_t f;
cell_t c;
Domain *d = Get_Domain(1);
Thread *t = Lookup_Thread(domain, id);
real timestep = RP_Get_Real("physical-time-step");
if (CURRENT_TIME>timestep)


rho = ((C_R(F_C0(f,t),THREAD_T0(t)+C_R(F_C1(f,t),THREAD_ T1(t))) / 2.0);

conc_solids = rho * (C_YI(F_C0(f,t),THREAD_T0(t),i)+C_YI(F_C1(f,t),THR EAD_T1(t),i));

flux = k*log(conc_solids/Cbulk);

printf("Current Time = %g:Flux = %g:Membrane Concentration = %g:density = %g",CURRENT_TIME, flux,conc_solids,rho);

We are trying to skip the first iteration with this condition (CURRENT_TIME>timestep).

But when get ACCESS_VIOLATION error when the solver goes for the iteration either with NITA or with Frozen Flux method for the second time step.

Please give us some valuable ideas and solution in this regard at the earliest possible. We are in deep trouble with the UDF.

Last edited by Sourav_Dwaipayan; August 21, 2009 at 05:32.
Sourav_Dwaipayan 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
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
Compiling problems with hello worldC fw407 OpenFOAM Installation 21 January 6, 2008 18:38
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31

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