Elmer Integration (GSoC) - Activity Log
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Elmer Integration (GSoC) - Activity Log
Hi everyone,
in this topic I will post regular (at least weekly) updates about progress and news on the elmer integration gsoc project. My proposal for this project is avaliable on google docs: https://docs.google.com/document/d/1mX3 ... sp=sharing.
Currently I'm trying to find similar projects that could help me out as well as making contatct with the elmer community. Also I'm reading lot's of source code and experiment with differnt ways of exporting/importing the mesh scene for elmer. The first post will follow soon, so stay tuned
in this topic I will post regular (at least weekly) updates about progress and news on the elmer integration gsoc project. My proposal for this project is avaliable on google docs: https://docs.google.com/document/d/1mX3 ... sp=sharing.
Currently I'm trying to find similar projects that could help me out as well as making contatct with the elmer community. Also I'm reading lot's of source code and experiment with differnt ways of exporting/importing the mesh scene for elmer. The first post will follow soon, so stay tuned
My GSoC Devlog: ceeli.github.io/gsoc
-
- Veteran
- Posts: 2764
- Joined: Mon Feb 27, 2012 5:31 pm
Re: Elmer Integration (GSoC) - Activity Log
Not being very familiar with FEM I was wondering what a multiphysics workbench with Elmer would bring to the table so I took the opportunity to attend a COMSOL webinar. COMSOL being a commercial product and I am now looking forward to Elmer integration.
If you are interested in what commercial multiphysics software has to offer COMSOL offer some interesting Webinars at https://www.comsol.com/events/webinars. Might be worth checking some for ideas for the Elmer workbench.
If you are interested in what commercial multiphysics software has to offer COMSOL offer some interesting Webinars at https://www.comsol.com/events/webinars. Might be worth checking some for ideas for the Elmer workbench.
Re: Elmer Integration (GSoC) - Activity Log
Hi everyone,
The first "week" of coding is over and my first activity log overdue.
So what have I been up to? Yesterday I already ran my first simulation from within FreeCAD. Today I did a little polishing work, improved error handling and so on. I also created a small demo video for you guys to show off what I accomplished till now:
Most of whats happend in the video should be quite straight foreword. One new thing I created is the free text input because phase 1 of the elmer integration project doesn't include support for FreeCADs constraint objects. Right now the free text input (for the SIF file) is prepolulated with a SIF text that replicates the CalculiX fem demo (showen in the video) but the .Text property can be changed to hold every arbitrary string. Whats missing is a editor inside FreeCAD but that shouldn't be difficult to implement and I plan to do so on tuesday next week. On monday I plan to implement futher tests and fix a few known (to me xD) bugs.
As soon as the code is "ready" I will "publish" it on https://github.com/drhooves/FreeCAD.git elmer_integration. I expect this to happen on wednesday next week (including the GUI).
The first "week" of coding is over and my first activity log overdue.
So what have I been up to? Yesterday I already ran my first simulation from within FreeCAD. Today I did a little polishing work, improved error handling and so on. I also created a small demo video for you guys to show off what I accomplished till now:
Most of whats happend in the video should be quite straight foreword. One new thing I created is the free text input because phase 1 of the elmer integration project doesn't include support for FreeCADs constraint objects. Right now the free text input (for the SIF file) is prepolulated with a SIF text that replicates the CalculiX fem demo (showen in the video) but the .Text property can be changed to hold every arbitrary string. Whats missing is a editor inside FreeCAD but that shouldn't be difficult to implement and I plan to do so on tuesday next week. On monday I plan to implement futher tests and fix a few known (to me xD) bugs.
As soon as the code is "ready" I will "publish" it on https://github.com/drhooves/FreeCAD.git elmer_integration. I expect this to happen on wednesday next week (including the GUI).
My GSoC Devlog: ceeli.github.io/gsoc
Re: Elmer Integration (GSoC) - Activity Log
There is one but I don't know where it's implemented. In the FEM prefs under the Calculix tab there is an option to use the internal one or specify an external one.
Cool video.
"fight the good fight"
Re: Elmer Integration (GSoC) - Activity Log
Great video! Please keep producing more of those!
Have a look at the macro editor of freecad, it might be usable/modificable to edit your sif file...
Have a look at the macro editor of freecad, it might be usable/modificable to edit your sif file...
Re: Elmer Integration (GSoC) - Activity Log
Sorry for asking off-topic: Is there a straightforward way to use the macro editor within python?
I once had a similar problem and after some trying I just used the stringlist property editor, but this is obviously not optimal.
@m42kus: nice video!
Best wishes
Johannes
Re: Elmer Integration (GSoC) - Activity Log
Hey,
Unfortunately I was sick the last few days and didn't get as much done as I planned. Because of this the GUI (for FreeText) will take me one or two days longer than expected. Today I added a new test and also improved the handling of external calls to ElmerGrid and ElmerSolver.
There are a few different examples of editors, but none fits my usecase. The macro and calculix editor both operate directly on files and not document objecs. The spreadsheet editor may be a better example because it operates on document objects. As far as I can tell right now I have to subclass MDIView and embed a QPlainTextEdit into it. If there is an easier way please let me know
Unfortunately I was sick the last few days and didn't get as much done as I planned. Because of this the GUI (for FreeText) will take me one or two days longer than expected. Today I added a new test and also improved the handling of external calls to ElmerGrid and ElmerSolver.
There are a few different examples of editors, but none fits my usecase. The macro and calculix editor both operate directly on files and not document objecs. The spreadsheet editor may be a better example because it operates on document objects. As far as I can tell right now I have to subclass MDIView and embed a QPlainTextEdit into it. If there is an easier way please let me know
My GSoC Devlog: ceeli.github.io/gsoc
Re: Elmer Integration (GSoC) - Activity Log
Indeed there is currently no python way to open a macro editor.
However the code that opens it is fairly simple (src/Gui/DlgMacroExecuteImp.cpp, L289), one could easily add some FreeCADGui.openMacroEditor(filepath) function. @ma42kus if that is useful to you, tell me and I'll add it. But that would add maybe a lot of hassle, you'll need to save your text to a temp file, then watch that file for changes... It might be easier to stick to your current way.
BTW, in Path there is a quick-and-dirty text editor too, that even does syntax highlighting. Might be useful to you... src/Mod/Path/PathScripts/PathInspect.py
However the code that opens it is fairly simple (src/Gui/DlgMacroExecuteImp.cpp, L289), one could easily add some FreeCADGui.openMacroEditor(filepath) function. @ma42kus if that is useful to you, tell me and I'll add it. But that would add maybe a lot of hassle, you'll need to save your text to a temp file, then watch that file for changes... It might be easier to stick to your current way.
BTW, in Path there is a quick-and-dirty text editor too, that even does syntax highlighting. Might be useful to you... src/Mod/Path/PathScripts/PathInspect.py
Re: Elmer Integration (GSoC) - Activity Log
I'm really sorry, my question is off-topic again
Is it possible to add for these type of tasks a new property (e.g. PropertySourceCode) which has a property editor with syntax highlighting? I think such a property could at least be useful for all the FEM guys who implement their own solver since they have to prepare a script file at some point in the solution process for communication with the solver.
Is it possible to add for these type of tasks a new property (e.g. PropertySourceCode) which has a property editor with syntax highlighting? I think such a property could at least be useful for all the FEM guys who implement their own solver since they have to prepare a script file at some point in the solution process for communication with the solver.
Re: Elmer Integration (GSoC) - Activity Log
I don't know if you need more but there is already a generic open function that will open a Python editor when opening a py file or script.However the code that opens it is fairly simple (src/Gui/DlgMacroExecuteImp.cpp, L289), one could easily add some FreeCADGui.openMacroEditor(filepath) function. @ma42kus if that is useful to you, tell me and I'll add it. But that would add maybe a lot of hassle, you'll need to save your text to a temp file, then watch that file for changes... It might be easier to stick to your current way.
Code: Select all
FreeCADGui.open("file.fcmacro")