Wednesday 20 February 2008

Open source EM simulator, a difficult task

Ideally the open source software QUCS should integrate an Electromagnetic Simulator to be complete.
But the task is not as easy as it seems by just putting available open source libraries to the Qucs platform.

I described below the main directions to start such an project.

1) The core of the EM simulator /the EM engine(s)

The core of EM simulator is separate from the rest of the QUCS program

For more stability one task one program is better.

The core engine should work on the Maxwell's equation using appropriate methods.

The most general methods are FEM and FDTD, then MoMs and TLM ...

And the use of the correct method is depending of the problem to solve.

Here is a list of main methods used for EM simulator and their possible simulators:

- Finite Element Method (FEM):


Commercially use by:

  • Ansoft HFSS

And available source:


- Finite Difference Time Domain (FDTD):

Commercially use by:

  • CST Microwave Studio (3D)

And available source:

Method of Moments (MoM):

Commercially use by:

  • Ansoft Designer (2.5D),
  • some NEC based programs
And available source:

- Eigenmode solvers:

Commercially use by:

  • CST Microwave Studio
  • Ansoft HFSS
- Finite Integration method:

Commercially use by:

  • MAFIA

- Transmission Line Matrix:

Available source:

  • yatpac(open source) C++ lib (GPL) (www.yatpac.org) Good for EM simulation at microstrip line level.



2) Parallel computing or distributed computing.

Available source:

other solver


3) Management tools

“git” may be good but I don't know any repository servers which use it.

so SVN would be a more popular choice (like on sourceforge).


4) Compiler related

For the core autoconf/automake seems to be the way to do it.

Cmake may also be an option.


5) The Graphical interface

to be with QT (qt3 or qt4)

Could use the openGL lib of QT or mesa library (http://www.mesa3d.org/ )

Also We could use something like “paraview” http://www.paraview.org/New/index.html for the graphic in 3D, which also has QT support.


6) Conclusion

My first conclusion would be to start on GetFEM or MEEP to understand well their possibilities and limits.
Then as EM simulator are deeply link to space geometry we will need to integrate it with an openGL interface.

I will try to update this link along the way.
Thanks
and long live QUCS...

14 comments:

Anonymous said...

I suppose we need it that way:

1) read in data (e.g. from gds)
2) visualize data and add other information (e.g. height info)
3) mesher
4) solving the PDE's (e.g. for EM or thermal problems)
5) save result data in whatever format
6) visualize and/or extract result data

Each of the tasks can be separated and can be considered a task to accomplish. I agree to look first for existing implementations, then consider writing glue code.

Fredy said...

Thanks Stefan,
This is a nice way to implement it.

Anonymous said...

Found an GPL automatic mesher:

http://pdnmesh.sourceforge.net/

Probably useful...

Fredy said...

I just had a quick look at pdnmesh
it uses FEM, but it seems that it is only good for 2D simulation.
(could solve already many EM problems)
it is program in C, I would prefer C++ .
Still a good package.
thanks

feldmaus said...

I did read the Tutorial Chapter 2.1 for Poisson Equation.
This Program seems to notice on 2D Problems only.

Fredy said...

Another open source program I looked at is FreeFEM++ http://www.freefem.org/ff++/
It is a very good FEM engine under c++. I find a bit difficult to understand the way they handle Helmholtz equation as the use their own notations and simplifications. Look at example 3.10 of their doc.

They say on the site that they are working on a 3D solution. (now a 2D)
2D is already a good start to work with. (2D derivative over x and y simplifies the calculation compare to the 3D derivative over x, y, z )

feldmaus said...

I read the freefem3d and maybe post some
Questions and Impressions next Days. :-)

feldmaus said...

Good morning all,

I am in need of some Answers and no further Questions, so
please answer this Questions as simple as you can.
Mathemaical examples are welcome.

I will write some Docu for the EM.

What is PDE ?
What is the Definition of the FEM ?
What is Domain ?
What is Fictious Domain ?

@Fredy
What is the difference between freeFEM++ and freeFEM3D ?

Some more Questions later. :-)

Regards Marku

Fredy said...

What is PDE ?
Partial Diferential equation
you need to solve PDE in order to get the solution of the electromagnetic vectors.

What is the Definition of the FEM ?
Finite Element Method, meshing technique. please have a look at the book Numerical techniques in electromagnetic from Sadiku


What is Domain ?
you can solve the problem in dif domain frequency domain, time domain. In some case you may need Fourrier transform to go between the two.

What is Fictious Domain ?
not sure


What is the difference between freeFEM++ and freeFEM3D ?
You tell me? I used freeFEM++ until now not freeFEM3D, where did you see freeFEM3D

Anonymous said...

freeFEM3D is on the same side as freeFEM++. If you use Debian, you can just install it by
apt-get install freefem3d

I didn't get any Grafics to run with
freefem3d, but it works in the console.
Under /usr/share/doc/freefem3d/
is the Docu with some Pictures in the Docu and example Problems.
But the Docu was a little bit confusing.

feldmaus said...

Here comes a new Question.

In the Docu from freeFEM3D, Page 11:
I don't understand the Problem.
We want to find (u,v)?
Should this be a Vector [u,v] ?
What does "in O" means ?
Does this mean in the Domain 0 ?
What does "on %DELTA O" means ?
Is that dO ?
Than this means a small Piece of that
Domain ?

Sorry i only know the German Words.

feldmaus said...

Are you Alive Fredy ?
I am thinking about the Page 11 on the Docu, and i think i am understanding a little bit, but i am not sure.

There is a File which describes an 3d Object, this file will be loaded.
With this file/Information it will be then created a Poisson Equation which is important if you want to describe an electrical Field for the 3d Object.

Regards Markus

Anonymous said...

freefem++ and freefem3D are two different packages, Freefem++ is easier to use by trying the examples.
I tried it under windows and when I went to linux I though freefem3D will be similar but it is not.

And installing freefem++ under linux needs to use ./configure, make ....
you also have to load the correct libraries.

Anonymous said...

I think an EM simulator is not a difficult task, because, there is yatpac, a complete EM simulator, developed by the TU munich. (Meep is a good alternative but it will take some years until it is ready an it is not so good for transmission lines.) But it is very difficult to simulate such stuff as skin effect of transmission lines. So the first thing to do, is to complete the transmission lines by means of the book „Transmission Line Design Handbook“ from Brian C. Wadell. Then we have to do:
1. Found a developer group.
2. Make yatsim fit for autoconf.
3. Create an interface between yatsim (core engine of yatpac) and qucs. A documentation of the yatsim interface is available.
4. Complete the documentation of the source-code of yatsim, so that a change of the source code is possible.
All other possibilies will take a very long time and need very good specialists for numeric solutions.