# Help: Steps to convert 2D to 3D code

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

 October 13, 2009, 10:49 Help: Steps to convert 2D to 3D code #1 Senior Member   TWB Join Date: Mar 2009 Posts: 105 Rep Power: 7 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!

 October 23, 2009, 09:33 #2 New Member   Nicholas F Camus Join Date: Sep 2009 Location: London, England. Posts: 21 Rep Power: 6 Quarkz, 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. Nick

 October 23, 2009, 23:32 #3 Senior Member   TWB Join Date: Mar 2009 Posts: 105 Rep Power: 7 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.

 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 RajeshAero Main CFD Forum 5 November 10, 2011 05:48 Zdravko Stojanovic Main CFD Forum 2 July 19, 2010 10:11 prakash CFX 2 November 23, 2005 23:06 Soren Main CFD Forum 3 June 25, 2002 04:47

All times are GMT -4. The time now is 13:14.