FreeCAD for ElectroMagnetics

About the development of the FEM module/workbench.

Moderator: bernd

ediloren
Posts: 210
Joined: Wed May 08, 2013 9:23 pm
Location: Italy
Contact:

Re: FreeCAD for ElectroMagnetics

Post by ediloren »

Let me address another point here, and ask for opinions. After browsing here and there, definitely I can make use of the triangle mesh structure as per Juergen suggestion. However I have a main concern here. I need to associate some data to the object surfaces and/or to the mesh. I see that this topic was touched many times in the Forum, but I found no satisfactory answer.

I could define another class, that has a mesh, or a part, as a member. But this is not exactly the answer I am looking for. What's your best suggestion for having a new class with additional properties? I know from previous discussions, as I said, that simple inhereditance is not simple as it may seem. I think this topic can be of broader interest, so I am not restricting it to my specific case.

Thanks
Enrico
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: FreeCAD for ElectroMagnetics

Post by jriegel »

One thing you can do is to add classes which point to the face/edge/vertex. Its the same like Constraints in the FEM workbench. They have a Property LinkSubShape which points on a Object (BRep) and on a special sub-shape (e.g. Face).
I this additional classes you can transport additional data and create dialogs for editing.

See the FEM module MechanicalAnalysis.py for an example how to enrich the FreeCAD data model...
Stop whining - start coding!
Jacquard
Posts: 2
Joined: Sun Aug 10, 2014 3:51 am

Re: FreeCAD for ElectroMagnetics

Post by Jacquard »

Hi, (And sorry for write my first post here).

There is a program called PUMA-EM which solves EM-equation. It's written in Python and for plotting uses gmsh. (but it's really hard to use for entering the simulation params by editing a text file). The license its GPLv2.

Due to it's written in python mainly maybe it can be used in the project that ediloren has in mind.
ediloren
Posts: 210
Joined: Wed May 08, 2013 9:23 pm
Location: Italy
Contact:

Re: FreeCAD for ElectroMagnetics

Post by ediloren »

Yes I'm aware about PUMA-EM; however, this is not exactly what I had in mind:

1) the code is for field calculation, while here I am going for a code capable to extract parasitics (L, C, R)

2) the code is only for Linux, and not multi-platform Win + Linux as FreeCAD is

3) we also should keep in mind the level of integration we want here; PUMA-EM is GPL, so it can only be used as an external tool, since FreeCAD is (and will stay) LGPL.

4) my primary goal is to integrate with the tools we distribute at FastFieldSolvers. Some are completely free, others are not (after all, we are a commercial company.. hope no shame about that :oops: )

There exist however many different free codes. Once the basics are set up, nothing prevents extending the workbench to many other usages.

Enrico
Jacquard
Posts: 2
Joined: Sun Aug 10, 2014 3:51 am

Re: FreeCAD for ElectroMagnetics

Post by Jacquard »

Hi ediloren (Enrico)

a) I think that the Electromagnetics (EM) module, should be both field and parasitics calculus. Let me explain: if this project only focus on field calculus, people who want a to calc parasitics, they won't use freecad. On the other hand it's the contrary, and the same result.

b) I prefer not to enter on speculation that if it should compete with comercial products. I'm just saying that this module would be open in order to let students (and specialists), who only needs for one or two quick calculations (and, if they want a better calcs they could go to commercial such as a long list).
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: FreeCAD for ElectroMagnetics

Post by jriegel »

The main work is to integrate the application specific editors, dialogs and user interaction. What solver you use is easy to exchange.
Stop whining - start coding!
User avatar
klopsigniew
Posts: 3
Joined: Mon Sep 01, 2014 2:40 pm

Re: FreeCAD for ElectroMagnetics

Post by klopsigniew »

ediloren thank you for directing me to this thread, at first I failed to see that you have started it.

I am a developer of commercial FDTD solver named QuickWave. We need a better scenario editor for our simulator. That is why I am experimenting with FreeCAD code for last few months.

Our simulator is for Windows only and none signs suggest that it will change in the near future (unfortunately).
We plan to create an utility for configuring simulation scenarios. Results visualization is handled by the simulation software. Support for viewing saved simulation data in FreeCAD will be added later.

Our software has an internal scripting language used for geometry description. At the beginning we will analyze structures designed in FreeCAD and then describe them with our own language. In the future we will have to integrate FDTD masher into FreeCAD module. So far I have not found any opensource structured Cartesian mesher, most probably we will create our own simple mesher from scratch.

There are few opensource FDTD solvers available. Adding support for them will make my FDTD module usable without commercial software. However I have none experience in any of those solvers, so I cannot decide which will be used. Suggestions are welcome.
Post Reply