www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Eilmer4 - a Computational Fluid Dynamics code in D

reply Peter Jacobs <peterj mech.uq.edu.au> writes:
Eilmer is a simulation code for studying high-speed compressible 
flows.  Early versions were written in C and then C++.  Version 4 
is a complete rewrite in D, with Lua for configuration and 
run-time scripting.  Code and documentation may be found at 
http://cfcfd.mechmining.uq.edu.au/eilmer/

This note is principally to say thank you to all of the people 
who have made the D programming language and its ecosystem.  
Being mechanical engineers, we are occasional but serious 
programmers.  For a number of years, we struggled with C++ and a 
code base of growing complexity.  In 2014, we made a serious 
commitment to reworking the entire code into D. In mid-2017, the 
new code was complete enough for general use and it is currently 
being used in a fourth-year course on computational fluid 
dynamics.  The D programming language has enhanced our 
programming experience and, for that, we are grateful to the many 
people who have built the foundation upon which we build our flow 
simulation code.

Cheers,
Peter Jacobs and Rowan Gollan
Oct 06
next sibling parent reply Bastiaan Veelo <Bastiaan Veelo.net> writes:
On Friday, 6 October 2017 at 22:16:09 UTC, Peter Jacobs wrote:
 Eilmer is a simulation code for studying high-speed 
 compressible flows.  Early versions were written in C and then 
 C++.  Version 4 is a complete rewrite in D, with Lua for 
 configuration and run-time scripting.  Code and documentation 
 may be found at http://cfcfd.mechmining.uq.edu.au/eilmer/

 This note is principally to say thank you to all of the people 
 who have made the D programming language and its ecosystem.  
 Being mechanical engineers, we are occasional but serious 
 programmers.  For a number of years, we struggled with C++ and 
 a code base of growing complexity.  In 2014, we made a serious 
 commitment to reworking the entire code into D. In mid-2017, 
 the new code was complete enough for general use and it is 
 currently being used in a fourth-year course on computational 
 fluid dynamics.  The D programming language has enhanced our 
 programming experience and, for that, we are grateful to the 
 many people who have built the foundation upon which we build 
 our flow simulation code.

 Cheers,
 Peter Jacobs and Rowan Gollan
Congtatulations on a job well done. Your motivation for use of the D Programming Language is the same as ours. I found your paper describing the rewrite [1] very interesting, I think it deserves a more prominent mention here and on the usual news sites. Bastiaan [1] http://cfcfd.mechmining.uq.edu.au/eilmer/pdfs/T0316-eilmer-dlang-v2.pdf
Oct 06
parent Joakim <dlang joakim.fea.st> writes:
On Friday, 6 October 2017 at 23:49:33 UTC, Bastiaan Veelo wrote:
 On Friday, 6 October 2017 at 22:16:09 UTC, Peter Jacobs wrote:
 Eilmer is a simulation code for studying high-speed 
 compressible flows.  Early versions were written in C and then 
 C++.  Version 4 is a complete rewrite in D, with Lua for 
 configuration and run-time scripting.  Code and documentation 
 may be found at http://cfcfd.mechmining.uq.edu.au/eilmer/

 This note is principally to say thank you to all of the people 
 who have made the D programming language and its ecosystem.  
 Being mechanical engineers, we are occasional but serious 
 programmers.  For a number of years, we struggled with C++ and 
 a code base of growing complexity.  In 2014, we made a serious 
 commitment to reworking the entire code into D. In mid-2017, 
 the new code was complete enough for general use and it is 
 currently being used in a fourth-year course on computational 
 fluid dynamics.  The D programming language has enhanced our 
 programming experience and, for that, we are grateful to the 
 many people who have built the foundation upon which we build 
 our flow simulation code.

 Cheers,
 Peter Jacobs and Rowan Gollan
Congtatulations on a job well done. Your motivation for use of the D Programming Language is the same as ours. I found your paper describing the rewrite [1] very interesting, I think it deserves a more prominent mention here and on the usual news sites. Bastiaan [1] http://cfcfd.mechmining.uq.edu.au/eilmer/pdfs/T0316-eilmer-dlang-v2.pdf
I like how you have setup instructions and docs on your site. Two relevant quotes from the paper: "With the recent maturing of the programming language D as a good alternative to C++ for statically-checked, natively-compiled code, we have taken the opportunity to rebuild our simulation code. The D programming language provides the conveniences of Python, the run-time performance of C++ and the ability to be directly linked to C language libraries. It appears that we can have it all and we can have it now. One good example of where the rebuild has resulted in significant improvements is the viscous-flux calculation code. In the C++ code, about 2500 lines were used, and this had the extra complication of requiring the M4 preprocessor to produce the actual C++ code (of length 5580 lines) that was given to the compiler. The new D language code amounts to 733 lines." "Conclusion We have spent much of a year building a new compressible flow simulation code from scratch, in a relatively new language. So far, our experience with the D programming language has been positive, with a fairly capable simulation code being constructed with a few months of effort by two people. Together with some code redesign, the D programming language has allowed the construction of a code base that is much simpler than its C++ predecessor but is just as fast." Mike, want to stick this on proggit and HN?
Oct 06
prev sibling next sibling parent reply user1234 <user1234 12.ie> writes:
On Friday, 6 October 2017 at 22:16:09 UTC, Peter Jacobs wrote:
 Eilmer is a simulation code for studying high-speed 
 compressible flows.  Early versions were written in C and then 
 C++.  Version 4 is a complete rewrite in D, with Lua for 
 configuration and run-time scripting.  Code and documentation 
 may be found at http://cfcfd.mechmining.uq.edu.au/eilmer/

 [...]

 Cheers,
 Peter Jacobs and Rowan Gollan
After reading the pdf i have a question: Is LUA scripting too complex to be replaced by, let's say, pure D code, following a compile-time interface (i.e a duck type) ? I understand that existing LUA scripts must still be supported but since D is also known for its good speed of compilation perhaps the whole thing could be recompiled from scratch for a particular set of new scripts.
Oct 07
parent Peter Jacobs <peterj mech.uq.edu.au> writes:
On Saturday, 7 October 2017 at 09:29:42 UTC, user1234 wrote:
 On Friday, 6 October 2017 at 22:16:09 UTC, Peter Jacobs wrote:
 Eilmer is a simulation code for studying high-speed 
 compressible flows.  Early versions were written in C and then 
 C++.  Version 4 is a complete rewrite in D, with Lua for 
 configuration and run-time scripting.  Code and documentation 
 may be found at http://cfcfd.mechmining.uq.edu.au/eilmer/

 [...]

 Cheers,
 Peter Jacobs and Rowan Gollan
After reading the pdf i have a question: Is LUA scripting too complex to be replaced by, let's say, pure D code, following a compile-time interface (i.e a duck type) ? I understand that existing LUA scripts must still be supported but since D is also known for its good speed of compilation perhaps the whole thing could be recompiled from scratch for a particular set of new scripts.
We did consider having the entire application in pure D code, however, we find that Lua is an easier configuration language for our users, who are mostly non-coders. Peter J.
Oct 09
prev sibling parent Martin Nowak <code dawg.eu> writes:
On Friday, 6 October 2017 at 22:16:09 UTC, Peter Jacobs wrote:
 This note is principally to say thank you to all of the people 
 who have made the D programming language and its ecosystem.  
 Being mechanical engineers, we are occasional but serious 
 programmers.  For a number of years, we struggled with C++ and 
 a code base of growing complexity.  In 2014, we made a serious 
 commitment to reworking the entire code into D. In mid-2017, 
 the new code was complete enough for general use and it is 
 currently being used in a fourth-year course on computational 
 fluid dynamics.  The D programming language has enhanced our 
 programming experience and, for that, we are grateful to the 
 many people who have built the foundation upon which we build 
 our flow simulation code.
Thanks for the kind words. Indeed D seems to be at a sweet spot for scientific computation.
Oct 07