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

CFD code structure (F90)

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 16, 2004, 21:47
Default CFD code structure (F90)
  #1
ma
Guest
 
Posts: n/a
I've read and written several CFD codes in Fortran, and come to know that the code structure is quite important as the code goes large. The commercial CFD codes may have a good structure but we have no chance to read them.

I am wondering how you guys construct your CFD code, particularly, TVD code for compressible reacting flow?

As for my self, several years ago, I put every thing in a single file and have a lot of "/common/...".

Later, I use a separte file, usually named PubVar.mod, to define public variables, and USE this module in the main code, which is a new attribute of Fortran 90.

Later, I found it is good to add another modue, usually named "GovEqu.mod" to encapsulate those related with governing equations, e.g., it may include subroutines like Get_Q(Q,p,T,u), Put_Q(Q,p,t,u), Get_E(Q,E), etc. The code sounds like having a "modular" structure.

Now I am going to add chemical reaction to such an existing code and have 3 options: (1) add to the main code (2) add to the GovEqu.mod (3) establish a new Chemistry.Mod

So what are your preference? Any discussion about how to improve a CFD code structure is welcome.

- ma
  Reply With Quote

 


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
CFD Code with Fortran murat Main CFD Forum 0 October 11, 2009 17:05
STRUCTURE OF CFD CODE MAB Main CFD Forum 5 August 10, 2008 03:47
Structure of CFD code Shyam Main CFD Forum 5 April 26, 2006 12:04
ASME CFD Symposium Chris Kleijn Main CFD Forum 0 August 22, 2001 06:41
user friendly cfd code waqar Main CFD Forum 19 August 18, 2000 16:31


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