Thanks for the warm welcome! 
The first draft of my proposal is finished now. Feedback is very welcome and feel free to point out any spelling or grammatic errors I made (english is not my first language
). One area where the my proposal holds back a bit is post-processing. Not sure if a paraview-only abbroach is the best way to go right now, but it’s what I had in mind while writing.
I wrote the proposal in google docs. Commenting rights are granted for all in possesion of the following link. I also copied the text into the post below which I will update once the proposal is finished.
https://docs.google.com/document/d/1mX34Hy00eTQ42R4eObHOVzElMbCpKAUYtMO_bwQWr8E/edit?usp=sharing
Proposal for GSoC 2017
FreeCAD Elmer-Integration
This proposal targets the “Elmer-Integration” project outlined in the “Google Summer of Code” article on the wiki (https://www.freecadweb.org/wiki/Google_Summer_of_Code). The project aims at an extensive integration of the elmer multiphysics solver into the FEM workbench of FreeCAD.
The article separates the task into three phases. The first two phases basically allow elmer to be used as a drop in replacement for calculix. The last (third) phase includes the addition of many new constraint types as well as a few more fundamental changes (e.g. support for multiphysics) to the FEM workbench. Not part of the project is the development of result objects for all types of simulations Elmer supports. Post-processing shall be done in paraview.
The article on the wiki already provides a very detailed description of the project and it’s scope. This proposal tries to present a more concrete description of the task and already provide some hints at possible implementation approaches. It also makes some assumptions about details left out in the wiki article. Following the brief outline of the project is a timeline for the official coding period of GSoC.
Project Outline
The Solver Object
To support the elmer solver a new solver object is required. It will mirror the calculix solver object in it’s basic usage. Both support steady state and transient simulations.
One key difference will be the support for multiphysics simulation. The solver object must allow the specification of multiple “sub” solvers in one analysis. Each of theses “sub” solver will be exposed to the user in the object tree and it’s individual configuration through the property editor and/or a task panel. This feature is not required until phase three of the project but it should be taken into account as soon as possible.
Constraint Objects
A big part of integrating the elmer solver will be the creation of many new constraint objects (especially for new, currently unsupported, types of simulations). This is also not required until phase three because phase one and two reuse constraint objects already used by calculix.
Much inspiration concerning interface design can be drawn from the ElmerGUI application. It already provides Qt-Dialogs for the configuration of all constraints supported by the elmer solver.
The timeline of GSoC won’t allow to support every constraint type elmer supports. It will largely depend on the set of supported types of simulations which is best decided by the FreeCAD community in the first month of GSoC.
Case Generation
An Elmer simulation is defined by one input file and the mesh scene. Those must be available in the folder in which the ElmerSolver program is executed.
- .sif (Solver Input File): Defines all aspects of the simulation (except mesh).
- mesh/ (Mesh of the scene): All meshes part of the scene in a special format only used by Elmer.
These will be generated in the same fashion it’s already done for the calculix solver. The Elmer project provides a program called ElmerGrid which is able to convert most mesh formats to the one understood by ElmerSolver. It will be used to export the mesh from FreeCAD.
Post-Processing
Post-Processing presents a very big challenge as there is very little that FreeCAD provides at the moment.
The article on the wiki explicitly states that paraview shall be used for postprocessing. To enable a convenient workflow a command could be added that starts paraview with the results from the active analysis.
To keep all information inside the FreeCAD Document (as opposed to the case directory of Elmer) a results object that holds the VTK data generated by the Elmer program sound be considered.
Timeline
After the accepted students are announced at May 4th the “Community Bonding Period” starts. This time will be used to present a more detailed description of the project to the community and FEM developer, discuss and refine it. Also I will be reading lots of FEM workbench code and contribute a little bit of documentation and probably small changes/fixes mainly to familiarize myself with the codebase and make it easier for other developers new to the FEM codebase.
Coding than officially begins at May 30. The final week in which students are supposed to submit their final work starts with August 21. These dates amount to roughly 12 weeks time to work on the project presented in this document.
Phase 1 outlined in the article on the wiki is already partially implemented in an unofficial fork. This code can be used to jumpstart the development.
Phase 1
Develop the Elmer solver object. Meshes shall be exported and the ElmerSolver executable called in the right manner in a valid Elmer simulation case directory.
Week 01/02: Assess the code that’s already available for Elmer-Integration, complete it, write missing documentation and automated tests.
Phase 2
Handle the complete set-up and execution for mechanical problems from within FreeCAD. After completion of Phase 2 the Elmer solver should be fully usable as an replacement of the calculix solver which will probably enable support from the community concerning testing.
Week 03: Generate a valid sif file with global solver settings.
Week 04/05: Add material information and gradually all mechanical constraints to the sif file generator.
Week 06: Provide a results object that holds the VTK post-processing data. Also add a shortcut to display the data in paraview and facilities to export the data to the file system.
Phase 3
Support multiphysics and more types of simulations. This requires modification of the solver object and addition of many constraint types.
Week 07/08: Adapt solver object (and sif file generation) to support multiphysics simulation (container of sub solver).
Week 09-11: Provide wide range of community selected constraints.
Week 12: Write eventually missing documentation, user manuals etc. and much testing.