CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   OpenFOAM Under a Lesser GPL (LGPL) License (

hjasak February 8, 2011 19:45

OpenFOAM Under a Lesser GPL (LGPL) License
Over the last couple of years, I have been in touch with a number of people who have in private discussion raised the issue of OpenFOAM under a GNU Lesser General Public License

I understand that the terms of GPL in some very specific situations may be too limiting, eg. when the software is used and developed by formal or informal consortia.

The intention of public release of OpenFOAM has always been to "free up" the software as much as possible, because it lives only by its user and developer community. As an author of a substantial amount of code, I think we need to review the limitations of GPL and consider a license change and allow people to use it in the way originally intended. The first step is to establish how much of a problem we are actually dealing with.

Here is a question for you: does the GPL license currently cause you trouble (which kind)? Would a LGPL release benefit you in a substantial way or allow you to do things that you cannot currently do?

Looking forward to your (public) response,


l_r_mcglashan February 9, 2011 08:08

If this change were made, what is the incentive (other than goodwill) for anybody to release their source code? LGPL permits people to sell their own software (and hide their source code) that links to the LGPL software, whereas GPL doesn't allow this, correct?

Surely this is only a problem for the development of OF in the CFD community if there are other CFD libraries that proprietary software developers could use instead of OF? I'm not aware of any very good LGPL alternatives. I would see it as not a 'limitation of the GPL' but as a limitation that proprietary developers place upon themselves in not wanting to share their source code.

Also, how do you change a GPL to a LGPL? I imagine there are a lot of issues with that.

hjasak February 9, 2011 08:18

Incentive = Good Will. I would like to get as many people as possible to use the software as possible, and in as many ways as they could imagine.

Also, there is a series of industrial partners in the community who want to push their work into Universities for collaborative research after a funded development projects, and I think this is a commendable thing to do.

If you are worried about Ansys selling OpenFOAM - based software, I think it is clear to everyone this will not happen. However, if you look at a consultancy company looking to sell their expertise, this makes it easier to set up NDA-s etc without arguing the details of GPL with lawyers (internally) and decide to release whenever they feel like it (or not, as the case may be). I don't think it is right to bind people on what they do with their work, as opposed to the community contributions that are already there.

As a matter of record, I personally don't mind either way, because either GPL or LGPL does not limit me at all in what I am doing.

A change of license is quite easy - what we need is an agreement of authors.

So, do I count you as "for" or "against"?


l_r_mcglashan February 9, 2011 08:37

I'll put my thick hat on. Why does the GPL prevent the following:


Also, there is a series of industrial partners in the community who want to push their work into Universities for collaborative research after a funded development projects, and I think this is a commendable thing to do.
To actually answer your question: This would not affect me at all at the moment (I do like to sit on fences though). I would defer to whatever the code authors want to do. If anything my main objection is that I just like to read source code :eek:, and I may have nightmares that OF could morph into a semi-commercial code where you have to pay to have the nice extra bits.

hjasak February 9, 2011 08:45

Well, that is precisely the point: I think this kind of sharing is a perfectly legitimate thing to do under the existing GPL license but I am constantly having to explain this. People are worried that University partners would feel free to further distribute the code and I think this can be controlled by a simple NDA agreement. However, I would like to be certain.

Apparently LGPL solves the problem beyond reasonable doubt and I "don't see why we should not oblige". I am asking the question to make sure another can of worms does not open somewhere along the way...

Thank you for the input,


aerothermal February 9, 2011 13:58

Hello Hrvoje Jasak,

See the GPL FAQ

From the same site, about NDA, two different points


Does the GPL allow me to distribute copies under a nondisclosure agreement?
No. The GPL says that anyone who receives a copy from you has the right to redistribute copies, modified or not. You are not allowed to distribute the work on any more restrictive basis.

If someone asks you to sign an NDA for receiving GPL-covered software copyrighted by the FSF, please inform us immediately by writing to

If the violation involves GPL-covered code that has some other copyright holder, please inform that copyright holder, just as you would for any other kind of violation of the GPL.


Does the GPL allow me to develop a modified version under a nondisclosure agreement?
Yes. For instance, you can accept a contract to develop changes and agree not to release your changes until the client says ok. This is permitted because in this case no GPL-covered code is being distributed under an NDA.

You can also release your changes to the client under the GPL, but agree not to release them to anyone else unless the client says ok. In this case, too, no GPL-covered code is being distributed under an NDA, or under any additional restrictions.

The GPL would give the client the right to redistribute your version. In this scenario, the client will probably choose not to exercise that right, but does have the right.
About credits,


I want to get credit for my work. I want people to know what I wrote. Can I still get credit if I use the GPL?
You can certainly get credit for the work. Part of releasing a program under the GPL is writing a copyright notice in your own name (assuming you are the copyright holder). The GPL requires all copies to carry an appropriate copyright notice.
about personal changes to the code,


Does the GPL require that source code of modified versions be posted to the public?
The GPL does not require you to release your modified version, or any part of it. You are free to make modifications and use them privately, without ever releasing them. This applies to organizations (including companies), too; an organization can make a modified version and use it internally without ever releasing it outside the organization.

But if you release the modified version to the public in some way, the GPL requires you to make the modified source code available to the program's users, under the GPL.

Thus, the GPL gives permission to release the modified program in certain ways, and not in other ways; but the decision of whether to release it is up to you.
about source code requests of your personal or company in-house version,


If I know someone has a copy of a GPL-covered program, can I demand he give me a copy?
No. The GPL gives him permission to make and redistribute copies of the program if he chooses to do so. He also has the right not to redistribute the program, if that is what he chooses.
Therefore, I think your questions are already answered by Free Software Foundation. The GPL already cover the cases you mentioned as well as it does not allow any closed (unwanted) version to appear.



kev4573 February 9, 2011 14:05

I think the move to LGPL would be a good thing, but I work in industry so I see benefits in keeping my code 'mine'. There are companies out there that support the open community dev model, maybe because they are more interested in CFD results, not so much in selling a software product. In general I think this move would help strengthen OF because ultimately there would be more funding overall going towards some kind of OF development, even if some of it is proprietary. The concern that someone might have to pay for a OF dependent module/program is well taken, but that new program may have never existed if some company did not pay for the development. If that module is priced right and fills the need of a customer, what's wrong with that?

hjasak February 9, 2011 14:19

Thanks for that aerothermal,

This is precisely what I had in mind and I know this is covered by GPL as you correctly quote. It is even better to have it spelt out at the Forum. I only wish the lawyers would read what you quoted :)


aerothermal February 9, 2011 14:21

Yes. Those quotes are not my interpretation but FSF as published in their site. It clarifies what FSF understands about their own license. However, what lawyers and judges would understand about the GPL application and limits in each country is unpredictable. :)

braennstroem February 9, 2011 16:16

Hi Kevin,
than we have in a couple of years 3-4 different OpenFOAM versions with a lot of modules for which everyone has to pay, not only the industry but students as well. So there will be no difference to other commercial codes anymore... except that you have a base code, which is the current version, but any futher improvement will not be in this free version anymore...

Best Regards!

kev4573 February 9, 2011 17:11

Hi Fabian, yes I understand switching to LGPL would allow a change in the development paradigm, however it would not enforce a change in the current one. Community driven contributions could remain in the open, but companies would also have a motivation to develop innovative programs/modules. I do recognize your concern in any case and understand it is an important perspective.

hjasak February 9, 2011 17:41

Just to confirm - I do not expect the mode of operation of Wikki to change: development and release cycle of the source code remains the same. The message from our current projects is that most of our project partners do not wish to limit the contributions because then they have to maintain and support them in house. The benefit from open source development model is clear.

However, there are organisations that are not allowed to play like this (think eg. nuclear industry) and some protection may be needed.

I understand your concern and it is a valid point. BTW, I am as keen as you are to see contributions from as many people as possible, especially the Summer School alumni! :)


wyldckat February 9, 2011 19:42

Greetings to all!

Uhm, one thing that didn't seem to me to being made clear in this thread is what LGPL really allows... so, by my limited experience with Qt - when Nokia purchasing Trolltech, it allowed them to change their open source licensing from GPL to LGPL - what would happen with OpenFOAM going LGPL is something like this:
  • The LGPL would only be applicable starting from a new version, for example OpenFOAM 1.8 and its derivatives/forks, because changing a license on the code should not be legally applicable retroactively.
  • Any changes made to the code in OpenFOAM itself are still bound by the same terms as nowadays with GPL - whatever you change in the core code or make a derivative (for example "icoFoam with Temperature"), it's still bound by the license and if you sell the binaries to a client/customer, you cannot restrain the client from demanding the source code, for a price no greater than the one paid for the binaries.
  • If a new library boundary is created, it's bound to the LGPL if its code is too much based on LGPL code. Ditto for solvers and utilities in OpenFOAM.
  • The major change would be that strictly new code (or like Qt, if less than 5% of the code is from the LGPL, i.e. headers and stuff), can be closed source! For example, a GUI with integrated solver code and utilities that use OpenFOAM's libraries, would be fine as closed source, as long it's not a copy-paste of the existing solvers and utilities.
  • If a new library that creates a new type of boundary condition, mesh manipulation, viscosity model, etc... it can be closed source if its code is not based on an existing library... well, building blocks aside that is.

So, if the nuke people:
  • decide to create a radiation-isotopic RANS solver that clearly is based on buoyantSimpleRadiationFoam - then we're sorry but its bound by the LGPL.
  • change/fix something in the core OpenFOAM code, which is some critical bug/detail that has been dangling since the dawn of OpenFOAM - it's LGPL bound.
  • create a solver from scratch (not counting the building blocks of the usual OpenFOAM solver) that uses OpenFOAM libraries and might even do some shell calls to other OpenFOAM utilities and solvers - that solver can be closed source.
  • create a fancy digital dashboard with control and prediction software that uses OpenFOAM libraries for the simulation part - the dashboard application/suite can be closed source, aside from OpenFOAM code/libraries/apps.

So, pretty much the usual scenario that closed source is applicable with LGPL code is for using the LGPL libraries, so OpenFOAM would then act as a direct library add-on to the application.

The only major problem I can try to predict is the future need to prove that a certain new application or new library is bound or not to the LGPL, since the only ways to prove would be to:
  • examine the closed source code.
  • reverse engineer (disassemble) the binaries of alleged non-LGPL code.
And as you might know, reverse engineering is not allowed in most closed source applications, which is something that a GPL'ed OpenFOAM can clearly avoid right from the start!

The one issue that I can't remember is if libraries (without LGPL code in them) contributed by the community for OpenFOAM would then be automatically be bound to LGPL or if they could be GPL'ed.

Either way, OpenFOAM with LGPL would indeed come in handy sooner or later ;)

Best regards,

madad2005 February 10, 2011 06:12

I tend to agree with kev4573. As a company, if you are paid to develop software by someone else, that other person normally will own 100% of the code and can do what they want with it. Passing the source code over is therefore normally part of the contract. However, if you wish to develop new software internally as part of PV funding, then the last thing you want is to later on have to sell the software AND pass on the source code. Although NDA's can assist here, they are not bulletproof and if your code ends up out in the wild, your code (if people want it) can spread very quickly through illegal channels with no financial reward for your efforts as a company. As far as I see it, LGPL would allow you to continue working with the OF libraries as normal, but you remove the risk of illegal distribution of your software.

Note that in the above I am talking about using OpenFOAM as a software library. Most of the popular software libraries such as Boost, Qt, and VTK allow you to work in this way. I don't see why OpenFOAM can't? Nothing is stopping people from continuing to contribute code for free, if they want. I also think the horror scenario of having to pay for all the best libraries is probably a bit far-fetched.

Anyway, I am for the switch to LGPL. It would certainly make OpenFOAM a viable option for commercial companies.

hjasak February 10, 2011 06:21

Actually, my plan is slightly different. The starting point for LGPL would be foam2.3.2 of December 2004 (= OpenFOAM-1.0). This covers all important library functionality and everything you need to write modern FOAM applications. This is now (thanks, Mark) a matter of public record and all author signatures, history, development line from mid 1990-s etc are available.

Analysis of the code show that this covers approx 70% of the existing functionality of the -Extend line, with the remaining 30% split half-half between community (+ me) and OpenCFD. In the worst case, the basic point for LGPL would be fairly decent.

If we decide to move this way, I would speak to Henry to cover the complete code as it stands today with LGPL and since this is a more "relaxed" license than plain GPL, we should not really have a problem.

The real points are:
- is this worth doing? There is effort involved and I don't fancy wasting my time unless there is a good reason and the community approves
- are there some traps that I cannot see, in terms of commercial repackaging?
- are there legal obstacles I need to resolve (this is something I will investigate myself)

Let's carry on talking,


egp February 11, 2011 07:41

I think the LGPL would be a good thing, too. The viral aspect of the GPL is what causes us problems.

I have projects where the sponsors demand that we protect the solvers and libraries (e.g., foamedOver) that we develop. However, we would like to share our code with organizations approved by the sponsor. Right now, we are in an unclear position due to ITAR restrictions, which means that we can't give the source code to anyone. Therefore, we are effectively frozen.

The problem with this is that the sponsor may force us to leave the OF community on these projects, and develop a new CFD code from scratch. From this perspective, I think it is more of a net positive to adopt the LGPL and keep the community growing with a widely open core distribution (OpenCFD and OpenFOAM-extend project) and then have a mish-mash of open, restricted, and for-sale custom solvers, libraries, and utilities.


aerothermal February 11, 2011 08:46

Dear Prof. Eric,

Is it possible to pass from GPL to LGPL at the current moment?

Other point is that you may need to open a organization or new holding company to joint your project partners. Therefore, you all will be under the same umbrella, i.e., the code will not be distributed outside the walls but inside the same organization.

If you need to distribute to more other organizations, you will have the option to include them as partners in the organization as the project grows.

It is just an idea and, it is good to say, that it needs a review your lawyer by your country laws.



wyldckat February 11, 2011 13:14

Greetings to all!

I picked up on this on OpenCFD's Twitter:

This means that a LGPL version of the original FOAM will not be legally able to get code updates directly from OpenFOAM. If code extraction is made from "-dev" and "-extend" for the LGPL version, will require that it should only be the parts not related to OpenFOAM's original version.
But I suppose this was already being taken into account ;)

Best regards,

alberto February 11, 2011 18:16


this kind of re-licensing is not possible. OpenFOAM (the release from OpenCFD) is included in OpenFOAM-extend. As consequence, you cannot re-license at all without their consent, even in case of a formal fork. You would also need approval from all those who contributed lines of code. OpenCFD just clarified they do not mean to change the license, which I personally approve.

Now some answer to previous comments:

@kevin, the "industry" can happily develop the code complying with GPL. They are not required to distribute it, and they can ask for money for their developments, if they want to, providing the code to their customers only. It is perfectly legal, and alsocommon.

@Eric Paterson
: I work in the US too, and I do not understand why ITAR (International Traffic Arms Regulations for those who are not familiar with them) should affect your use of OpenFOAM. Your code foamedOver is, if I understand it properly, the implementation of over-set grids in OpenFOAM, which is not a new technology, and not a strategical military achievement. There is a wide literature on the topic, specific symposiums, so the information is out there. I can understand restrictions on the simulation cases, which, btw, do not fall under GPL at all, since they do not link (that's key factor in establishing what is affected by GPL due to propagation!) to OpenFOAM code.
This said, the GPL does require anywhere you have to make the code public. This is a frequent misunderstanding of the license. It simply requires that, if you distribute the code to someone, that someone has the right of receiving a copy of the source code and of modifying it granted to him, not to everybody in the world. A lawyer with some experience in software licensing could clarify this very quickly. Additionally, if your sponsor approves the recipients of your software, at that point it is only a question of avoiding leaks, which would not be solved by a license anyway or re-writing the code.

And finally, my opinion: :cool:

LGPL would simply give the power to those who did not develop OpenFOAM to use it for commercial purposes in their own software, without giving anything back. I believe OpenFOAM owes its success to its quality, its transparency, and the lack of licensing fees. If closed-source developments will be allowed, OpenFOAM will become a commercial code, with licensing fees, closed interfaces and formats, unexplained differences between one release and the other, which is exactly what OpenFOAM users want to avoid. In other words, it won't make anybody "more free", it just looks so. Take a look at all the companies who already offer support for OpenFOAM or GUI's for it. They will feel authorized to include their customized developments of codes directly in the closed release, leading to a very confusing panorama (what works with what?).

An idea to avoid ambiguities about licensing and the GPL is to create a document similar to what the FSF created, maybe having it reviewed by a lawyer. This could be useful especially to those who do consultancy work, to show companies and customers what are the actual requirements of the GPL, if they have concerns, and to give them more competent answers.


hjasak February 11, 2011 18:16

That is actually quite good and clear - I thought OpenCFD would keep pretending it is "all their work" and I'm happy to see myself proven wrong. It seems this problem is getting easier the longer I look at it, which is nice.

This is what we can do (still does not mean that we need to do it):
  • rebase foam2.3.2 under LGPL (or any other license of choice). Based on this we can re-introduce all author signatures and attribute the software authorship, contributions etc. as needed (before 2004, it was all quite straightforward because we had Nabla Ltd with proprietary software and documentation). This would become the LGPL base.
  • for the -Extend line, we have a full list of contributors, who can be contacted to see how they feel about their software. Based on this, we can attribute either GPL or LGPL on individual contributions, depending on what individual authors decide.
  • layer up the LGPL straight onto the base: this creates the LGPL layer (library, solvers, tutorials etc.).
  • add a second layer of GPL-licensed software on top, which is clearly out of bounds for people who need LGPL. This would cover all contributions available now.
  • make sure that all new contributors express their preference and act accordingly.
In this way, we have clarity and software layout represents reality of a 20-year development process and the phases that FOAM went through. It will also be clear who contributed what and how the code evolved.

I may need to read up on distribution, since it may have be in two packs, but that's not a problem. Nowadays, it all sits in binary distros or rpm packages anyway...

I think this is really neat because, as Fabian says, all nice-to-use features we have now remain GPL and cannot be lost. At the same time, LGPL folks can pursue their projects from the base up, being careful not to dip into the GPL layer above.

Have a good weekend everyone,


All times are GMT -4. The time now is 19:07.