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

2-d NS solver OO design ?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 27, 1999, 06:18
Default 2-d NS solver OO design ?
  #1
thampy
Guest
 
Posts: n/a
hi,

I'm designing a 2d NS solver using structured cartesian mesh using the object oriented approach. Could someone help me out with the design or give me some sort of a refernence to related work ?
  Reply With Quote

Old   June 28, 1999, 01:52
Default Re: 2-d NS solver OO design ?
  #2
John C. Chien
Guest
 
Posts: n/a
(1).I think there are many ways to write a program in the object-oriented approach. (2). The first thing you need is a working program. This is important because you need to have a program which can do something for you in the first place. In other word, you need to know how to write a program to solve a 2-D Navier-Stokes equations, with some boundary conditions and mesh in a conventional way first. (3). Once you have this part working, the next step is to identify the data and the subroutines. (4). In the subroutine, you perform operations on data to do different things, such as I/O, mathematical operations, logical operations, etc. At this point, you can define a class or classes with data and functions included to perform certain tasks. Then, in the main function, you can create some objects from the defined classes to solve your 2-D Navier-Stokes equations. (5). I think, if you write down a step-by-step operation of your 2-D Navier-Stokes solver in plane English, then you can replace it by "action" (performed by an object ) on "data" (the private data member) and turn the description into the OOP code. (6). One of the main purpose of using OOP appraoch is to protect the data ( by hiding the data inside the object as data member, so that functions of other objects can not easily access it.) (7). I don't think there is a universal approach to write OOP programs. If you can wrap the functions which operate on specific sets of data into a class definition, and try to carry out solver tasks by sending commands to these objects, then you have a working OOP program.
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A New Solver for Supersonic Combustion nakul OpenFOAM Announcements from Other Sources 19 February 27, 2024 10:44
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 12:34
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 15:08
JOB: Sr. Thermal/Mechanical Design Engineer Dee Dee Dial Main CFD Forum 0 April 1, 2003 19:49


All times are GMT -4. The time now is 11:20.