CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Help: Steps to convert 2D to 3D code

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2009, 10:49
Default Help: Steps to convert 2D to 3D code
  #1
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19
quarkz is on a distinguished road
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

Old   October 23, 2009, 09:33
Default
  #2
New Member
 
Nicholas F Camus
Join Date: Sep 2009
Location: London, England.
Posts: 21
Rep Power: 16
Killercam is on a distinguished road
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
Killercam is offline   Reply With Quote

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

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
Debugging Unsteady 2-D Panel Method Code: Wake Modeling RajeshAero Main CFD Forum 5 November 10, 2011 05: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 23, 2005 23:06
Convert Euler code to full N-S Soren Main CFD Forum 3 June 25, 2002 04:47


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