The 2014 code-a-thon was a 24 hour exercise where a group of students worked to put together a fully functional Eulerian hydrodynamics code. In particular we were interested in a code that could handle multiple materials. The motivation for the nuclear engineering students is that many of them had experience with Lagrangian hydrodynamics methods in a graduate course on radiation-hydrodynamics, and exposure to Eulerian hydrodynamics was missing from their experience. Also, last year the students had so much fun at the code-a-thon they wanted to do it again. This year our chief code architect was Andrew Till and his vision was the binding force in the organization of the pre-event coordination.
In 2013 we tried to do a straight 24 hour exercise. That experience taught us that this year it should be two 12 hour days. At one point this year, someone asked why not just one 24 block and the unanimous answer was “You must not have been here last year.” The actual reason is that at about 3am in the morning debugging code is more stressful and less effective than we could have imagined.
Like 2013, we are using C++ as the programming language for the code. Most students had experience with C++, though some learned on-the-fly. This year we used the object-oriented paradigm, as opposed to last year where we (overly) used templates. Also this year, test-driven development was a point of emphasis. Our technical expert from Los Alamos National Laboratory, Gabriel Rockefeller introduced this concept to the students, and several were quite enamored with the idea.
Another feature that people assigned themselves to teams before the event. These teams discussed ahead of time the structure of the their code, including designing any classes or functions they would need. Most groups used the class-generator produced by one of the participants, Jonathan Madsen.
The code, named meh (multi-material Eulerian hydrodynamics), was designed to be a 3-D code that could handle an arbitrary number of materials. The code as of now only handles materials that have a gamma-law equation of state. We also base the mixed-material equation of state on pressure-temperature equilibrium in a cell.
In terms of the physics/numerics in the code, we used HLL and HLLC for the Riemann solvers (a good reference, and one we used, is the book by Toro-Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction). For time integration we used Runge-Kutta time integration, and our implementation can use an arbitrary (explicit) Butcher tableaux. Our spatial scheme is discontinuous Galerkin finite elements (though we only support P0 elements with slope reconstruction at present).
For development we used subversion for version control (partially because our department already has an svn server set up), Cmake for our build system (thanks again to Jonathan Madsen). The code was also designed to break work into blocks that could be sized to the available cache on a given machine.
For all the best laid plans, we did not get a complete code that solved the Euler equations. However, all was not lost: the code worked in that each piece of the code, boundary conditions, Runge-Kutta time integrator, Riemann solver, EOS, etc. could all talk to each other and run a time step. Each piece was not tested fully in the integrated code, but each could at least talk to each other. Over the next semester, we plan on bringing it all together and I will report on the findings here.
The participants were, in no particular order,
Don Bruss, Andrew Till, Alex Long, Jonathan Madsen, Bruno Turcksin, Damien Lebrun-Grandie, Akansha Kumar, Vischal Patel, Daniel Holladay, Taylor Lane, Michael Hackemack, Marco Delchini, Peter Maginot, Ryan McClarren, and Gabriel Rockefeller.