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

[Very urgent] How to write a C Source File For 3D fully developed

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2012, 06:16
Default [Very urgent] How to write a C Source File For 3D fully developed
  #1
New Member
 
Join Date: Feb 2012
Posts: 1
Rep Power: 0
evolutionf33 is on a distinguished road
I really need help to get my project started.

Image here : http://postimage.org/image/yavkje2zv/

My 3d case is quite simple as shown in the image.
It's a cubical geometry, velocity inlet at the front and pressure at the back.
My geometry is 200micrometer*200micrometer*1000micrometer.
What I wanted to do is to have 3d fully developed velocity profile at the entrance.
The maximum velocity varies from 6.6m/s to 0.0006m/s for each case.
I have searched through the forum and google about it.
But I found that there are many different F_PROFILE equations.
I'm not sure which equation suits mine the best.

I found the following C Source File below. Can anyone edit it to suit my case and tell me which part should I edit to change the velocity? Thank you very much.

/************************************************** *********************
UDF for parabolic velocity profile at inlet boundary
************************************************** **********************/
#include"udf.h"
DEFINE_PROFILE(inlet_x_velocity, thread, position) /* inlet x velocity = name of the x velocity */
{
real x[ND_ND]; /* this will hold the position vector */
real y,z;
face_t f; /* f = all the cell faces on the boundary*/
begin_f_loop(f,thread) /* thread = given boundary zone, defined automatically when the UDF is hooked to inlet boundary, the macro begin_f_loop is applied to all the cell faces*/
{
F_CENTROID(x, f, thread); /* the coordinates of the face centroid accessed by F_CENTROID */
z= x[2];
F_PROFILE(f, thread, position) = 1.73-((15-y)*(15-y)*1.73/(30*30)); /* return velocity is assigned through F_PROFILE */
}
end_f_loop(f, thread)
}

Last edited by evolutionf33; March 1, 2012 at 06:30.
evolutionf33 is offline   Reply With Quote

Reply


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
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
[OpenFOAM] ParaView 33 canbt open OpenFoam file hariya03 ParaView 7 September 25, 2008 18:33
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51


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