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

2-d NS solver OO design ?

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

LinkBack Thread Tools Display Modes
Old   June 27, 1999, 05:18
Default 2-d NS solver OO design ?
Posts: n/a

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, 00:52
Default Re: 2-d NS solver OO design ?
John C. Chien
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


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
A New Solver for Supersonic Combustion nakul OpenFOAM Announcements from Other Sources 18 February 19, 2013 08:48
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 11: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 14:08
JOB: Sr. Thermal/Mechanical Design Engineer Dee Dee Dial Main CFD Forum 0 April 1, 2003 18:49

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