CFD Online Logo CFD Online URL
Home > Forums > General Forums > Main CFD Forum

please help me to correct my code

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

LinkBack Thread Tools Display Modes
Old   June 1, 2010, 18:40
Default please help me to correct my code
Join Date: Feb 2010
Location: Baku
Posts: 50
Rep Power: 9
Ardalan is on a distinguished road
I've written a finite volume code to solve 2d incompressible navier stokes equations on a flat plate.
rhi-chow interpolation is used to overcome pressure- velocity decoupling
so the code uses a collocated scheme and simple algorithm for pressure and upwind for convection terms and central for diffusion
the boundary conditions are as follows:
- no slip velocity at the wall
- at the leading edge of flat plate v=0, u=1
- zero velocity normal gradient at the other two boundaries
- zero normal gradient for pressure correction equation at all boundaries

the solution procedure which I have used is as follows:
initial values: u=0.5, v=0.01, p=0
in each pressure correction iteration firstly momentum equations are solved in this way:
firstly the mass fluxes across cell faces are computed using the values of previous iteration and momentum interpolations. SOR algorithm solves the algebraic equations then the mass fluxes are updated using the new velocities. this process continues till achieving a convergence for momentum equations.
then the resulting velocity values are used to solve pressure correction equation and the velocities and pressure are corrected

unfortunately after 3 pressure correction iteration the code diverges (the convergence criteria approaches infinity)
can anyone help me? I'm confused and I don't know what is wrong!
I can send the code to anyone who wants to help.
Ardalan is offline   Reply With Quote

Old   June 2, 2010, 18:32
Join Date: Feb 2010
Location: Baku
Posts: 50
Rep Power: 9
Ardalan is on a distinguished road
I've run a steady flow simulation but the solution doesn't converge. The pressure seems to oscillate and not stable during the run. Some friends suggest me to run the transient simulation and see if it helps.
Can anybody explain to me why transient simulation may give a better converged solution in this case?
Ardalan 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
Debugging Unsteady 2-D Panel Method Code: Wake Modeling RajeshAero Main CFD Forum 5 November 10, 2011 06:48
correct UDF code for unsteady pressure boundary James W FLUENT 0 November 2, 2005 12:38
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 15:56
What is the Better Way to Do CFD? John C. Chien Main CFD Forum 54 April 23, 2001 08:10
own Code vs. commercial code Bernhard Mueck Main CFD Forum 10 February 16, 2000 11:07

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