bernd wrote: ↑Thu Jul 23, 2020 9:01 am
No do not replace something in the sif after the sif was writer by elmer writer. This would not be a hack, this would be a haaaack.
If these values will not change like the vakuum permitivity you could just hard code them in elmer writer. As we had the constants before I moved them out of the writer in a gerneric FEM constants module. This would be not smart, but it would be a start and it is more a workaround than a hack. If they do change we could add the most common ones to the elmer writer.
How does this sounds?
The idea of search and replace came up because the solver-framework checks on export if all essential elements like a definition of the material are present. So, simply exporting a standard material and replacing it afterwards was the first thought..... yes its a haaaaack
BUT, now I see it a bit more openly ... a combination of Bernds and Peters comments is maybe the best solution. Yes, like the element for vacuum permittivity we need 'generic' or 'free text input' elements for the equation(s), the boundary-condition(s), the body-force(s), material(s) and so on which override the usual .sif element creation.
Each of this elements simply has a text field where the 'experienced' user can input the needed information for e.g. the BC. The basic test if all required types of information mesh, equation, material are present can still happen. If the information inserted into the free-text-input wrong than Elmer will complain.
But this way one can still use Freecad to create a complete model with all benefits from mesh-creation and bc-asignment while holding all important information (as text) without haaaacking around and getting an undefined state where nobody knows what was changed by whom and when.
If we see that some of the text-blocks are used oftener than we can create a extra Gui element and writer section for it.
EDIT: BTW: this would instantaneously make all tutorial examples work with FreeCAD