Let's make a Fluid Solver with Object Oriented Programming

Here is a Fluid Solver with Object Oriented Programming. I used Java to develop it because I wanted to display results in 3D, but I couldn't find good 3D library for C++ nor C# when I started it.

Here are some sample movies below. Click to see. Movie-2 and 3 go with heat effects by Boussinesq approximation.

Movie-1 Cavity Flow
Movie-2 A room with a air conditioner and hot floor heated by sun lay through window
Movie-3 Natural Convection

Let's go with Object Oriented Programming

I like Object Oriented Programming because it's smart. I think the idea of OOP is, write a code abstractly and generally as much as we can, so that we can use them widely at most.

For this Solver code, the classes for velocity ,,, pressure and temp are nicely done with OOP.

Here are some documents that show how I studied fluid dynamics, and how put it into code.

The theory of Fluid Dynamics

Numerical Calculations

Discretization

Boundary Condition

Object Oriented Programming

Home


Copyright(C) Since 2007 DeepDigital Co.,Ltd. All Rights Reserved.