Introduction
I want to ask for a lot of advice on a new programming project that I am about to start on my own. I am going to be very precise in what I would like to fulfill and what my basic requirements are. Therefore, this will be a long question. Please carry me.
I am going to divide the question into five sections:
- Real problem
- Simulation problem
- Requirements and Preferences
- Additional Information
- Consultation Request List
1. The real problem
Skyscrapers and large bridges suffer from dynamic wind loads. This means that if improperly designed, they can collapse due to wind fluctuations (this really happened in 1940: http://www.youtube.com/watch?v=3mclp9QmCGs ). To properly design such structures, analysis and modeling require efficient cracking software.
2. The problem of modeling
There are many programs that can either simulate fluid flows or structural mechanics. Many of them have already been developed for over 30 years and are proven and mature technologies. Therefore, writing a multiphysics program that can simultaneously simulate fluid flow and structural mechanics from scratch is unreasonable. First of all, it will take you years of development before you reach maturity, and itβs very difficult to enter a world that is more than 30 years old dependent on specific software. But more importantly ... why recreate when you can reuse it? Instead of pursuing a monolithic approach, I prefer a partitioned approach where I can reuse existing simulation software.
In a partitioned approach, I will use the X software to model the flows, and I will use the Y software to model the structures. Then I will write my own communication algorithm, which establishes the connection between X and Y and uses them to simulate a multiphase problem (for example, wind vibrations of skyscrapers or bridges). The reason I use X and Y, rather than the actual names of the programs, is because X and Y should be black boxes. In no case will my communication algorithm depend on the implementation of X and Y. The algorithm will depend only on the output of X and Y. Thus, the end user can choose which one of X or Y is available to them, or when X or Y are capable of doing what the end user wants to achieve.
Since I want to use a partitioned approach with a black box, the X software knows nothing about Y and vice versa. But how can I simulate the deformation of a bridge without knowing anything about the surrounding air flow and how do I know how the surrounding air flow is disturbed by the structure without knowing anything about its deformation? The answer is simple: start with a hunch and use an iterative approach to converge to the right solution. However, this approach is very expensive. To reduce computational cost, the communication algorithm can be written in a smart way using very efficient technologies, so as not to be discussed here. All I would like to say is that it requires heavy linear algebra algebra.
3. Requirements and Preferences
What do I need to do:
- Establish a connection between third-party open source software or proprietary software.
- perform heavy crunch number (linear algebra)
- visualize results (2D / 3D graphics and animation)
- provides an interactive environment for analysis and development.
- create an intuitive graphical user interface
I want my software to be:
- open source
- cross platform
- extensible through scripts and / or shared libraries
What I will use:
- C ++ for heavy crunching numbers
- CPython for programming logic
- NumPy / SciPy for some crunch in CPython
- Matplotlib for visualizing results in CPython
4. Additional information
Data:
- one-person project at startup if the company succeeds
- The main OS is a KDE-based Linux distribution.
Business model:
- Free software and basic documentation.
- Paid services and detailed documentation.
5. List of recommendations
I want to do all the number-crunching in C ++ by writing many functions that individually perform only a tiny task. The logic of the program should be contained in the CPython package, which performs the entire simulation, relying on C ++ functions to execute the crunch. The C ++ / CPython algorithm should be extended with scripts written in CPython (using NumPy, SciPy, SymPy, and Matplotlib) to generate and visualize the results from the original numerical data. I want to be able to do parallel computing, and I need to communicate with several third-party open source software and proprietary software.
To accomplish all this, I will need a whole bunch of existing libraries / packages / technologies, etc. And for all the relevant issues, I know what I can use, but I donβt know what I should use. The best solution is, as always, to try everything and see what works best. However, if an experienced user can get rid of some of the most unlikely candidates, I will gladly receive his or her advice, suggestion, pro / con list on:
- Bonding C ++ and CPython (e.g. CTypes, SIP, SWIG, etc.).
- C ++ library of linear algebra with crunching (e.g. Armadillo, Eigen, PETSc, etc.).
- GUI development library (e.g. Qt, GTK, wxWidgets, etc.).
- Software communications and parallel computing (e.g. MPICH, OpenMPI, OpenMP, etc.).
- CPython 2.7.x or CPython 3.x
NOTE. I have summarized some of the options above, but they are only exemplary, not limitations. I am open to everyone as long as it is written in C, C ++, Fortran or Python. Also, I do not expect an answer in all five categories listed above from one person. Let community knowledge take care of this.
I thank all participants and wish you all the best in your own endeavors.