B Field dump
Moderator: thorsten
B Field dump
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
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
Re: B Field dump
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
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
Re: B Field dump
Hi Thorsten,
Thank you for trying to implement this.
Please let me know if I can be of any help.
Cheers
Frank
Thank you for trying to implement this.
Please let me know if I can be of any help.
Cheers
Frank
Re: B Field dump
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
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
Re: B Field dump
Hi Thorsten,
Thank you for being so fast.
Unfortunately, I run openEMS on Windows.
Sorry for the extra work.
Cheers
Frank
Thank you for being so fast.
Unfortunately, I run openEMS on Windows.
Sorry for the extra work.
Cheers
Frank
Re: B Field dump
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
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
Re: B Field dump
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
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
Re: B Field dump
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
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
Re: B Field dump
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
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
Re: B Field dump
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
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