CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Open source CFD code development, possible? (

Dr. Yazid Bindar July 5, 2000 04:09

Open source CFD code development, possible?
Dear all CFD users, developers and gurus

I believe that many people works on CFD based on each interest. Yes, commercial CFD's are exiting to answer the people expectation to their faced problems. However, CFD commercial codes are now quite expensive. The annual license fee tends to increase.

It crosses in my mind, with various competences in CFD of the people meeting in this CFD user online, can we pull these valuable resources to start developing open source CFD codes?. This idea is adopted from the way of the Linux developed? Every one can contribute to develop it starting from standard structure that has been agreed upon.

Let's me hear from you all about this idea (of course not new idea).

Thank you,

Pei-Ying Hsieh July 5, 2000 08:36

Re: Open source CFD code development, possible?
Hi, Dr. Bindar:

I think this is a great idea. However, documentation of the code will be a big task. There are several CFD codes (with source code) posted on the internet, such as featflow, Overture,...etc.. It is not that easy to understand the code from the documents. And, it is not that easy to get help, so, the learning curve of these codes are much steeper than those of the commercial codes. I think this obstacle must be overcome.

-- my 2 cents opinion.

Pei-Ying Hsieh, Ph.D.

Sun July 5, 2000 22:17

Re: Open source CFD code development, possible?
I think it is a pretty good idea. I am sure there are a lot of people like me who would like to get involved in an open source CFD project. These codes would be useful for many people, students in particular. Maybe it'll do for CFD codes what linux did for operating systems.

John C. Chien July 5, 2000 23:53

Re: Open source CFD code development, possible?
(1). I just want to say that professors in cfd field have been developing cfd codes with their students for the last 30 years. (2). The code development effort also has been used to apply for grants to do research with their students. (3). Some codes later on became commercial codes. (4). Between professors and students, this is practical for obvious reasons. (5). For those professors who are doing research in cfd, it should not be a problem in writing cfd codes, himself, with students, and among researchers in other research labs. (6). This is what I have seen in US in the last 30 years. (7). In other words, professors in cfd, and students in cfd always seem to be able to access the codes they need. (8). Because of the relationship between the professor and the students, somehow they were able to obtain financial support and also produce creative programs in the past. So, that relationship perhaps is the most important factors in education, with the cfd codes as the by-products. (9). So, I would suggest that in this open source cfd code development, the goal must be defined clearly first. (10). I am assuming that professors in cfd have the experience and the responsibility to control the quality of their students in cfd.

Yazid Bindar July 8, 2000 01:16

Re: Open source CFD code development, possible?
It is interesting to read all comments about open source CFD code development.

I understand that developing method, solver, mathematical models, numerical models, programming, visualization, user interfaces, and experiments in CFD field are very painfull works, financially heavy tasks, and so on. At first stage of CFD developement, says starting 30 years ago, every thing was academically exiting and commercially remote.

Now, commercial CFD codes are booming. Look at the biblioraphy list, contribution of people to the that CFD code are very real. One big question, do those people get any financial benefit? Are developed methematical model or methods protected?. If not commercial CFD companies almost pull all commercial benefits.

It will be different from 10 years ago. What ever you develop, its commercialization is not in place yet.

If some one or a group develop a model or solver or other in which this is published in Journals as scientific contribution, this model or solver is very easyly incorporated by commercial CFDs to their CFD codes. As a benefit, this will improve the features of their commercial codes. You have spent funding to your research work, some body else takes the financial benefit. Even you have to pay the license if you use this commercial code.

Based on the arguments above, does the open source CFD code development present the fairness?

Nice to hear from you all about this topic?

John C. Chien July 8, 2000 02:08

Re: Open source CFD code development, possible?
(1). I think, you are looking at the financial aspect of commercial cfd codes. (2). And I was simply trying to say that there have been code development by the professors, their students and colleagues in the cfd field. And many codes have eventually become commercial cfd codes. (3). At the same time, those cfd codes developed by the government agencies, such as NASA, DOE laboratories, DOD laboratories, or any government laboratories, eventually become available to the taxpayers(citizen). So, a huge number of codes are actually available for free (except handling and material cost, I think). (4). So, it is perfectly all right to create another or another series of cfd codes, and then make the codes available for free. (5). The only concern is the financial part. I mean the time involved. This is especially true if the project involved by one of the contributor is under the government support. Then it is going to be difficult to ship it across the national border. I would say professors in most countries receive grant from their government to do cfd research. And one of the requirement is to publish the paper or the thesis. So I would say, under this condition, it is going to be difficult to share freely across the national border. (It is not impossible though). (6). On the other hand, I don't think that many professors are doing computer operating system research under government grant. (7). On the other hand, many commercial cfd code vendors used to be professors, engineers worked for a company under government contracts. So, they are not outsiders like businessman. They have to sell the code to make a living. And I have long figured out that selling commercial cfd code is not a good trade for me. (8). Now, if you don't have to worry about your job, and you are willing to share the code with others, then I think, it will be practical to develop this open source code. So, that is still a financial problem. (9). So, all in all, the question is whether it is practical without worrying about the financial support. (10). One such possibility is to have the financial support from some private institutions. (11). In some countries, the teaching position is nearly permanent. But in most other countries, the young professor has to publish papers to stay alive. And the open source code project probably is not going to be attractive in that respect. (12). Currently, I don't have any fixed opinion on this kind of idea. It all depends on whether they will have the free time to work on the project without worrying about their jobs.

vijay pargaonkar July 8, 2000 10:35

Re: Open source CFD code development, possible?
Yes sir,

The same idea was growing in my mind. I will support this idea against any odd like rules, country border bariers, documentation problem, maintaining modules etc.

I do agree with the problems foresighted. Good to foresight a problems.

Any free software is going to face these problems. Is it ok with you all, if we learn the history of LINUX and other free softwares. Their steps may be of great help to us. If anybody has already studied this please guide others.( I have attended the lecture of LINUX developer and studied the history.Yes, They are facing problem of documentation. But, I have studied how they are tackling this problem.)

Please contact me on my email id for more details about myself and the codes I have developed uptill now.

pargaonkar vijay

John C. Chien July 8, 2000 12:37

Re: Open source CFD code development, possible?
(1). I used to write my own cfd codes. And I will be developing more in the future. (2). But in the last few years, I have been using someone's codes, most of the time, the commercial cfd codes. (3). These codes are free on the company computer systems to the company users, and the users are paid by the company to use these codes. (4). But even under these ideal environment, in order to obtain useful solutions, the users must have advanced degree to know how to model and simulate the flow problem. The users must also constantly talk to the support engineers of various vendors, if he is using pre-processor, solver, and the post-processor from different vendors. The phone calls, FAX, and e-mail are all free to the users, including the technical support from the software vendors. (5). Then I have to ask a question: Are we getting a reliable solution to our fluid dynamic design and analysis problem? The answer is "NOT AT ALL". I am not saying that the solutions obtained so far are useless. Actually, these solutions have been very useful to provide additional guidance in design and analysis. But, the sucess of using the cfd approach depends on the user, not on the code.(6). Now, suppose that there is this "future xxx-cfd free code" available, and I can download it from the Internet, can I still get the paid job in using it? It is possible only if the company put only this code on the company computer system. (7). And then where do I get the technical support when I run into problems? I guess, all of these information will be available on Internet and free for download. But still, I have to do it and read it. That will impact greatly on my schedule, unless I can get the answer on the phone right away. (8). So, pretending that these commercial cfd codes are now free to everybody on Internet, and can be downloaded freely, including the source codes, "Is it going to make the problem solving life easier?" The answer to it is obviously "NO". Because, the ability to obtain a good solution depends on the users' training, experience, and understanding of the problem to be solved. It does not depend on whether the code is free or not. I would not use a commercial cfd code myself if I have to pay for the license fee and technical support myself. (9). In other words, commercial cfd codes are already free to the direct users. (10). And if we actually make the commercial cfd codes free on Internet, how many users will actually use these codes? I would say "Only CFD researchers and experts will likely be using these codes", which represents only very small portion of the population. (something like endangered species)(11). So, in summary, based on my personal experience in using the commercial cfd codes in recent years, all I can say is: "the ability to solve a cfd problem depends solely on the users background, and support engineers background. The particular code used, and whether it is free or expensive, have little impact on the quality of the solution at all". (12). A free code to a non-professional is just like a suicide mission, exciting!!! or mission impossible. For a research project, it is acceptable. In the place where I work, there is no such thing as research and development work. (13). That is why I said, if you don't have to worry about your job, a project to develop a free cfd code is always practical. Asking millions of people to use this free cfd code, is a dream. For me, cfd is a way to support my job. It is not something high on my priority.

Jonas Larsson July 8, 2000 12:40

Re: Open source CFD code development, possible?
I think that the key to get this kind of project going is that you have one or a few really dedicated people managing it. If you look on the succefull freeware projects (Linux, apache, php, latex, ... ) most have been managed by one or a few key persons that have had full authority to decide what goes into the official version and what should not go in. You also need something to start with - preferably a half-working code and at least strict coding guidelines etc. Another must is a good "virtual development site" including a CVS repository, mailing lists/discussion forums, documentation etc. If you don't run it yourself you can use something like I'd be happy to help out here at CFD Online if I can be of any assistance.

Hua Zhou July 9, 2000 00:46

Re: Open source CFD code development, possible?
That's really a great idea, I hope in the future while we read academic journals, I can find 'codes is available on request' etc. evenif they need to be paid. because this means we can save much time and pay more attension on new ideas, not repeated others' work according to their papers. that will be more efficent. at least, we can make a library of basic methods, like Boldwin-Lomax, k-e model, predictor-corrector method etc.

vijay pargaonkar July 9, 2000 08:17

Re: Open source CFD code development, possible?
Dear all,

I have already designed a website. Hence, I can create online disscussion forums etc. on the site. No problem for working it out.

Only one problem is there. I have to rely on web site providers for hosting. If any of the dedicated person from CFD group has access or even account in his institute. I can work out the forum in his account.

Professors from good institute have such accounts on unix servers. They have authority to create more accounts. Can anybody provide me such account? I will take care to design the website for this purpose.

Thanx all for your positive responce. pargaonkar vijay

Yazid Bindar July 10, 2000 03:48

Re: Open source CFD code development, possible?
Dear all

More, more comments on this topic have been posted. The majority look up as a hope. Some gave precaution review on this topic.

Commercial CFDs give what you want to display. Many companies are so exiting with that. Commercial CFD's will be active in implementing what ever new models and methods were published.

Publishing the work using commercial CFD might be considered as no new information except for problem analysis its, not of course the numerical method or model development. Starting from the scratch, the CFD codes seems to be as a local exiting but not as global achievement. Many peoples have been doing on the CFD development without any intention to go to commercial. Eventhough, there is, but it might be only parsial work. Commercial CFDs need to offer full features of problems. If you publish your work, and of course, your work be easily implemented by commercial CFD's.

People who are developing CFD's on varities of engineering problems and are not having commercial intention can gather togother to be open each other, here It is my code, what is your code, can they be joined togother to produce a non-commercial CFD code and open source. For example, if I have a CFD code which is capable of computing -three dimensional fluid flow, -combustion, and radiation -porous media flow on all regimes but it is limited only to -cartesian coordinate, -structure grid, -line by line matrix solver, -steady state problem, -no visualization of the results, -very primitive way of code writting, -simple user friendly interface -no Multigrid solver I keep only on my self and I can publish based on that code, I am sure that I would not be able to go on the speed of commercial codes. Why don't we open it, let's be improved it for all benefits. With this, one can publish anything using the available code which is free and open to be modified by every one. As you know you can not publish any work using commercial CFD's if you don't have the authorization to use it. The commercial codes are very prevelege to people who can afford it, not to people who are expert on (it is not enough).

That's all today. Hopely more comments will be posted.

Yazid Bindar

Kai Kang July 12, 2000 09:56

Re: Open source CFD code development, possible?
Unfortunately this is exactly like the questions asked on Linux website:

Dare Microsoft make their Windows code public?

Answer is: NO.

Why: 1. It is not necessary, a lot of people/company are already buying/license the WindowsOS already and they understand the money they paid will help make the code better and the user easier.

2. Without a doubt, some of the code in windowsOS must be originated from Macintosh or Unix windows-like OSes. What do you expect MS to face if they open their source code, copycat?? What about those numerical algorithms/iterative methods then...

3. It is also not that there are no open source CFD code, instead, there many specialized code exist on the internet.

4. Different from Linux, which is just an OS, anybody pass the Computer Science OS courses will have a good idea about it. What about CFD, is there anybody who understands the maths and physics of all the CFD applications from gas-dynamics to combustion to multiphase flows, etc. That makes it even more difficult for maintainance of the code.

John C. Chien July 12, 2000 11:11

Re: Open source CFD code development, possible?
(1). I like the answers here. (2). In the item-4, I think, it is important to recognize that most cfd problems are still PhD level dissertation topics. Although it is possible to define the limited scope from the begining to cover only well-known problems. In other words, the open source cfd code try to solve some limited problems, with variable models from participants of the project. (3).For item-3, I would say that there are numerous cfd codes available, but they normally don't come with all the instructions. It costs money to write the report. (4).For item-2, this can be a problem. In most cases, cfd programs are written based on some other utility codes developed by some other companies. Sometimes, it is a simple editor, and sometimes it is a graphical library, or a system library. To have all working elements combined in the open source code, it is likely that all of these utility codes must be re-invented. (not a bad idea though) (5). For item-1, from the user point of view, I don't mind using a free software. If the price is right and affordable, most of the time I buy my own personal copy. In the past, since I develop cfd codes, there's no need to buy commercial cfd codes. And I also have access to other cfd codes in the workplace. So, I don't think the cost of a cfd code is in anyway related to the quality of the code at all. When the method is selected, there is not much one can do to improve it without changing the algorithm. (if the code uses the upwind method, paying more or raising the price, is not going to improve the solution quality).

Jens Wyrwa July 13, 2000 09:33

Re: Open source CFD code development, possible?
Dear Yazid Bindar,

I appreceate your initiative for a GPL(open source) CFD-software very much.

Do you know about the MOUSE Project, that was started by the Institute of Combustion and Gasdynamics at the University of Duisburg in Germany ? They published their Software under the GNU general public license and welcome contributions. I intend to write some code for it.

But this shows, that someone starting such a project must make decisions, concerning data-structure, software-layout, algorithms etc. (which could be unappropriate). An open scource software project can only develop from special to general. You must start somewhere and this startingpoint must be interesting enough for others to join in. So recognize the support here, and have a try. Good Luck!

As mentioned previously on this topic, scientists write CFD-codes since decades and publish on the behaviour of their algorithms. (and a huge lot of it disappeared in the drawers)

So I think it is a question of good scientific habits. If the code is published, everybody who is expert enough can check your calculations. If the source-code is not published, the findings of the research stay doubtfull. Nobody will get funding for a research project with the reason: "I would like to re-write an existing code just to check whether the results of XY are correct". Reading literature on CFD reveals that often even not all details of the algorithms are published, so that no exact reproduction of the code is possible. (and you all know some of the tricks to beautify CFD-results, don't you?). So I welcome your initiative also, because it could better the scientific habits in this field.

Yazid Bindar July 14, 2000 00:37

Re: Open source CFD code development, possible?
Dear Mr. Jens Wyrwa and all

I am very glad to hear from you that the topic which is being discussed has been implemented by the MOUSE project you mentioned. We don't have to start with the new one to establish open sourse CFD code development. It should be implementable if the MOUSE project is extended to cover this spectrum of CFD code development?. What do you think? Can the MOUSE project take the lead?

I intend to contribute in Radiation, combustion, chemical reaction modelling, and flow in porous media.

Let's hear from other, whether this can be realistically developed together or could be unrealistic ?

John C. Chien July 14, 2000 02:18

Re: Open source CFD code development, possible?
(1). It is fairly straight forward to write a cfd program. (2). Program main (3). call geogrid (4). call bcs, (5). call datain , (6). call control, (7) call solver, (8). call display. (9). call loop. (10). In sub geogrid, call cadgeo, call grid, call display. (11). In sub datain, call prop. (12). In sub control, call tmstep, call relax. (13). In sub solver,call equ(n), call turbmod, call exmodel, etc... (14). In sub display, call dispgeo, call dispgrid, call dispsol, (15). This is about what a cfd program needs, including everything. (16). Naturally, for problems like reacting flows, radiations, multi-phase flows, special treatment and formulation are required. But then, not everybody needs those versions at the same time. (17). The issue is really whether one will have the time to get the subroutine done or not. And the person in charge must have knowledge about all aspect of the program. Ideally, he is the one who will get the structure or the prototype created first. So, it works more or less like a professor and a group of students, where the professor lay down the plan and the original code structure and prototype, and the student create additional parts, or exchangable parts. (18). Currently, I don't have any plan and time to touch such kind of project.

clifford bradford July 14, 2000 16:25

Re: Open source CFD code development, possible?
if the question is simply "is it possible?" then yes it is possible. an open source code could be developed by basing it on a publicly available code or existing standards. so for example the code specification would say that the code should write output in Tecplot files (for example) and read grids from X, Y, or Z grid generator. all this is simple once we're dealing only with file formats but what about more important basic things like is the code to be structured or unstructured if unstructured what kind of elements/cells are to be used tetrahedra or hexahedra or both. should the code be FVM, FEM, or FDM. what if any kinds of parallel machines should the code run on. most importantly what language should the code be written in. in fact this is the issue that separates us the most from the LINUX community since most if not all OS developers (ie computer scientists) use C/C++ and the compatibility between the two is good. unfortunately we'd have the three headed dragon of C/C++ and Fortran (which one?). it is possible to code in multiple languages but it's more pain than it's worth. i suppose if i were asked i'd say F90 would be the best choice (even though my loyalties are to C) because it the most popular language for us CFDers and the F77 people can learn it relatively easily (the C programmers would have to bite the bullet. but F90 is easy if you know C). even then there would be more computational issues such as what types of data structures are to be used, what is the standard for subroutines and functions (I like the MATLAB approach where the arguments to a function are never changed in the function) also should functions be preferred over subroutines. these are only a few questions to be answered about the technical issues. in concluding though i'd like to say that such an effort would be worth it not only to the developers but the CFD community as a whole because a high quality usable code could be produced by perhaps 30 experienced programmers in the space of about 6 months and the cost would be quite small. moreover the troubleshooting and validation would be spread throughout the CFD community. the code would also give CFD researchers a code to form the basis for implementation of new turbulence models, inviscid flux schemes, time integration approaches, and numerical methods (multigrid etc) and by making these available to the CFD community to add to the code they could be evaluated in the open and would also allow the researchers to properly instruct the CFD community on the correct use of the code. so no longer would you hear things like "I can't get Jameson's Multigrid scheme to work" etc. users could use whatever parts of the code they want. so for example a/c designers could mix and match parts to get a fast steady state euler code while mechanical engineers could have a preconditioned, unsteady turbulent NS code for pump design. this would be tied together by several main routines for handling the grid, flow variables etc and perhaps a simple GUI for easy configuration of the code.

one thing to be recalled is that LINUX started with one man who wanted his own OS. nothing stops progress like comittees that's probably why so many codes out there have been written by one or two people

clifford bradford July 14, 2000 16:30

Re: Open source CFD code development, possible?
one way is to simply put your code out there and invite people to modify/improve it as they please. this how LINUX grew. the internet allows this to be done easily all you need do is require that new versions of the code be documented with you (for example) and also be made available

Vijay Pargaonkar July 16, 2000 09:30

Re: Open source CFD code development, possible?
Dear all,

Good to know that MOUSE project is currently going on.

Whosoever is in contact with the developers, please connect me with them.My email id is given above.

I will be happy to contribute to that project. I can code for chemically reacting flows and transient codes based on MOC (Method of Characteristics).

If the software already have these things coded I would like to work on the GUI part of it. I can work well in VC++.

Thanks for bringing up this issue. pargaonkar vijay

All times are GMT -4. The time now is 09:29.