B Field dump

Discussion about new features and development support

Moderator: thorsten

Post Reply
frankst
Posts: 32
Joined: Thu 21 Jul 2016, 11:36

B Field dump

Post by frankst » Tue 23 May 2017, 08:40

Good morning,

In my calculations in have some magnetic materials (mue>>1).
And the B field (magnetic flux density) is an important number for me.
At the moment I just dump the H field and "by hand" multiply with 4pi*1e-7*mue where necessary to get B.
But that is rather tedious.

Is there any more elegant way built into openEMS?
How much work would it be to add a B field dump to openEMS?

Cheers
Frank

thorsten
Posts: 1438
Joined: Mon 27 Jun 2011, 12:26

Re: B Field dump

Post by thorsten » Tue 23 May 2017, 20:12

Hi,

there is no elegant way built into openEMS yet. Sorry.
It should not be too hard to do, I will have a look.
But I cannot promise anything ;)

regards
Thorsten

frankst
Posts: 32
Joined: Thu 21 Jul 2016, 11:36

Re: B Field dump

Post by frankst » Wed 24 May 2017, 08:43

Hi Thorsten,

Thank you for trying to implement this.
Please let me know if I can be of any help.

Cheers
Frank

thorsten
Posts: 1438
Joined: Mon 27 Jun 2011, 12:26

Re: B Field dump

Post by thorsten » Sun 28 May 2017, 12:19

Hi Frank,

I have implemented a D- and B-field dump (electric- and magnetic flux density).
I gave it some rough testing but I would ask you to give it a more thorough test. Please let me know if you can do this...

Are you running on Linux? If yes, pull the latest git master branch and build. See "help AddDump" for how to use the new dump types.

If you are on Windows, let me know, then I will have to do a windows build...

regards
Thorsten

frankst
Posts: 32
Joined: Thu 21 Jul 2016, 11:36

Re: B Field dump

Post by frankst » Mon 29 May 2017, 08:39

Hi Thorsten,

Thank you for being so fast.
Unfortunately, I run openEMS on Windows.
Sorry for the extra work.

Cheers
Frank

thorsten
Posts: 1438
Joined: Mon 27 Jun 2011, 12:26

Re: B Field dump

Post by thorsten » Mon 29 May 2017, 17:49

Hi Frank,

no problem, I do the build for Windows on Linux of course. It sounds silly to cross-compile, but that way it is much much easier ;)

Here it is: http://openems.de/download/win64/openEM ... 133dea.zip

Have fun

Thorsten

frankst
Posts: 32
Joined: Thu 21 Jul 2016, 11:36

Re: B Field dump

Post by frankst » Tue 30 May 2017, 09:59

Hi Thorsten,

Thank you for the new version.
I made some first tests and they look good.
Your B field dump agrees within floating point precision with my own B field calculations from H field dumps.
There is only a considerable difference at the transition from one material to another (different mue).

Integrating B over the surface and comparing to the edge integral of the E field tells me that your dump is correct and my calculations is wrong.
I recognized that error before but have not made any effort to correct my calculations.
I guess it has to do field interpolation.
For my dumps I use node interpolation.

Cheers
Frank

frankst
Posts: 32
Joined: Thu 21 Jul 2016, 11:36

Re: B Field dump

Post by frankst » Thu 01 Jun 2017, 09:08

Hi Thorsten,

Regarding the observed differences at the material transitions, I think the answer is here:
http://openems.de/forum/viewtopic.php?f=3&t=405#p2315
Of course, I do not perform the same material averaging as you do.
Hence, my results assume different material properties then the ones used in the code.

By the way, the B field dump is really fine.
Thanks again!

Frank

thorsten
Posts: 1438
Joined: Mon 27 Jun 2011, 12:26

Re: B Field dump

Post by thorsten » Thu 01 Jun 2017, 18:06

Hi Frank,

yes the values will certainly differ at the material boundaries.
Inside openEMS the material averaging is quite complicated and the averaged material per direction (used for the FDTD coefficients) is being used to multiply onto the magnetic field and only then the interpolation for the field dump is performed.
In theory you could do it from Matlab/Octave, but that would be very difficult and would require a huge amount of deep knowledge about openEMS.

That said, differences at the boundaries are expected, but the internal B-field dump should be much more accurate...
From your comments I deduce that the values are correct for you.

regards
Thorsten

frankst
Posts: 32
Joined: Thu 21 Jul 2016, 11:36

Re: B Field dump

Post by frankst » Fri 02 Jun 2017, 16:54

Hi Thorsten,

Just to confirm:
All B field dumps that I obtained until now are within expectation (I do see some minor deviations, but those I address to insufficient meshing).
That means, I consider the B field dumps correct.

Cheers
Frank

Post Reply