Adding a computational electromagnetics workbench
Posted: Sun May 03, 2015 2:08 pm
Hi Guys,
I am an electrical engineer who has been using FreeCAD on an off for some time now as a user. The project is really cool! Professionally I do some electro -magnetics simulations. There is a FOSS (GPL) package developed by MIT called MEEP http://ab-initio.mit.edu/wiki/index.php/Meep which is quite fast and competent. However the geometry is defined in a script file using the Scheme language. Computed results from MEEP are output to the open data format HDF5.
I was thinking to add a Workbench to FreeCAD to support defining the simulation geometry for MEEP in FreeCAD. The idea would consist of the following steps:
- Create a new export type (.ctl) which exports the selected geometry to a scheme script for later execution by MEEP.
- Create read-capability of HDF5-datafiles to plot resulting field quantities in the 3D FreeCAD view after simulation finished.
To get this going nicely, some things needs to be implemented in FreeCAD:
- Support for electromagnetic material properties like dielectric constant and other stuff that MEEP supports to simulate.
- Support for some special materials and regions in FreeCAD like
* PML which is an artificial material used to define boundaries in FDTD simulations
* Bounding box
* Source and sink regions. I am not sure how these should be defined, but I was thinking maybe these can be derived from Part::Box since they always have that shape in MEEP.
- A settings dialog for the new workbench where some special settings used by MEEP can be defined.
How does the FreeCAD people feel about this? With the suggested approach, FreeCAD will not be linked to MEEP, but only use the MEEP binary. So far I managed to export some of the geometry to the .ctl-files and that seem to work well. I am now working not getting the Workbench up and running, but it would be great to get answers here on some questions that I think will pop up. In particular it would be nice to get some hint on defining these new materials I was discussing above. How should that be done? I know that there is some work on materials en FreeCAD, could these things fit to that?
Cheers,
Robert
I am an electrical engineer who has been using FreeCAD on an off for some time now as a user. The project is really cool! Professionally I do some electro -magnetics simulations. There is a FOSS (GPL) package developed by MIT called MEEP http://ab-initio.mit.edu/wiki/index.php/Meep which is quite fast and competent. However the geometry is defined in a script file using the Scheme language. Computed results from MEEP are output to the open data format HDF5.
I was thinking to add a Workbench to FreeCAD to support defining the simulation geometry for MEEP in FreeCAD. The idea would consist of the following steps:
- Create a new export type (.ctl) which exports the selected geometry to a scheme script for later execution by MEEP.
- Create read-capability of HDF5-datafiles to plot resulting field quantities in the 3D FreeCAD view after simulation finished.
To get this going nicely, some things needs to be implemented in FreeCAD:
- Support for electromagnetic material properties like dielectric constant and other stuff that MEEP supports to simulate.
- Support for some special materials and regions in FreeCAD like
* PML which is an artificial material used to define boundaries in FDTD simulations
* Bounding box
* Source and sink regions. I am not sure how these should be defined, but I was thinking maybe these can be derived from Part::Box since they always have that shape in MEEP.
- A settings dialog for the new workbench where some special settings used by MEEP can be defined.
How does the FreeCAD people feel about this? With the suggested approach, FreeCAD will not be linked to MEEP, but only use the MEEP binary. So far I managed to export some of the geometry to the .ctl-files and that seem to work well. I am now working not getting the Workbench up and running, but it would be great to get answers here on some questions that I think will pop up. In particular it would be nice to get some hint on defining these new materials I was discussing above. How should that be done? I know that there is some work on materials en FreeCAD, could these things fit to that?
Cheers,
Robert