CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Simulation with UDF for species mass fraction and velocity profile

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By litterfree

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 18, 2011, 05:19
Default Simulation with UDF for species mass fraction and velocity profile
  #1
New Member
 
Join Date: Apr 2011
Location: Italy
Posts: 9
Rep Power: 15
virgy is on a distinguished road
Hi
I want to simulate a simple pipe (radius= 0.0005 m) in 3D. The inlet has 2 boundary conditions written with UDF:
-the first boundary condition is the parabolic profile of velocity
- the second one is a parabolic profile of mass fraction of a species without reaction along the pipe.

I calculate the velocity with UDF (it works) and I save it in a file .dat.
After Fluent has calculated it, I keep the file .dat with the profile of velocity, I turn off the Navier-Stokes model and I activate the species model (I'd like to separate Navier-Stokes model and species model because it reduces the the time of simulation).
The UDF for the mass fraction is correctly interpreted by Fluent, I can select my UDF profile in species mass fraction boundary condition, but when I press the button "calculate" I receive this message: "FLUENT received fatal signal (ACCESS_VIOLATION)".

Does anybody know what to do? Can I give two different UDF in this way? Is there anything wrong in my UDF?



My UDF for mass fraction of a species is here:



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

DEFINE_PROFILE (indop, thread, nv)
{
face_t f;
real x;
real y;
real n[ND_ND];
real coeff = 0.01;
real r = 0.0005;
real r2 = (pow((r),2));

begin_f_loop (f,thread)
{
F_CENTROID(n,f,thread);
x=n[0];
y=n[1];

F_YI(f,thread,nv)= coeff-(coeff/r2) * ( (pow((x),2))+(pow((y),2)) );
}
end_f_loop (f,thread)
}


Thanks a lot,
Virgy
virgy is offline   Reply With Quote

 


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message: Insufficient Catalogue Size Paresh Jain CFX 32 February 3, 2021 03:37
Multiple floating objects CKH OpenFOAM Running, Solving & CFD 14 February 20, 2019 09:08
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
Define mass fraction for -ve velocity inlet/outlet KKLAU FLUENT 1 June 14, 2004 14:23


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