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

Help: Steps to convert 2D to 3D code

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

Sponsored Links

LinkBack Thread Tools Display Modes
Old   October 13, 2009, 10:49
Default Help: Steps to convert 2D to 3D code
Senior Member
Join Date: Mar 2009
Posts: 136
Rep Power: 10
quarkz is on a distinguished road
Sponsored Links
Hi guys n gals,

I want to convert my 2D fractional step NS solver into a 3D one. I tried but make a mess of it.

I would like to start again but can someone with experience give me some guides or steps to follow?

I wonder if I should change the boundary condition to make it into a 3D lid driven cavity test to do some initial verification. My code is also parallel but I also have a serial version. I wonder if I should edit the serial one 1st or just do the parallel code in one go.

How to prevent the code changing into a debugging nightmare... ;-)

Thanks alot!
quarkz is offline   Reply With Quote
Sponsored Links

Old   October 23, 2009, 09:33
New Member
Nicholas F Camus
Join Date: Sep 2009
Location: London, England.
Posts: 21
Rep Power: 9
Killercam is on a distinguished road

Allways but always ammend the serial code first! As you rightly point out and no doubt know from experience debugging a parralell code can be a nightmare.

I take it you are using some simple cartesien, or spherically symmetric 2D mesh, which you parralellise in some way. The best way is not to try to ammend the 2d version per say, but right all new 3D routines based on the older 2D versions. Ammending existing subroutines is not the way to go, and you can end up creating rubbish and getting lost. Be structured and methodical using the routines from the 2D version where possible...

Hope this helps.

All the best and good luck.

Killercam is offline   Reply With Quote

Old   October 23, 2009, 23:32
Senior Member
Join Date: Mar 2009
Posts: 136
Rep Power: 10
quarkz is on a distinguished road
Hmm... thanks Killercam.

while I was waiting for a response, I decided to change my code to a semi 2d/3d one by adding a 3rd dimension such that v(x,y) = v(x,y,1). I thought this will enable me to do some check "halfway".

if it can't work, i'll use your suggestion, which is of cos a much safer way.
quarkz 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
Small 3-D code Zdravko Stojanovic Main CFD Forum 2 July 19, 2010 10:11
cfx does not give time steps in cfxpost.why.urgent prakash CFX 2 November 24, 2005 00:06
Convert Euler code to full N-S Soren Main CFD Forum 3 June 25, 2002 04:47

Sponsored Links

All times are GMT -4. The time now is 05:00.