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

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

 February 25, 2012, 06:16 [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 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.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18 gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11 piprus OpenFOAM Installation 22 February 25, 2010 14:43 hariya03 OpenFOAM Paraview & paraFoam 7 September 25, 2008 17:33 jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51

All times are GMT -4. The time now is 16:45.