Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

B field in frequency domain which modulus to trust ?

Please login with a confirmed email address before reporting spam

Hello,

Following Edgar J. Kaiser I have tried to simulate thin metallic layers in the presence of a (filament) coil in frequency domain using the Transition Boundary Condition (TBC) to avoid meshing thin layers. When running the attached mph file, I obtain a B field with complex valued components. If, at a given point, I look at the quantities mf.normB and sqrt(real(mf.Bx)*real(mf.Bx)+real(mf.By)*real(mf.By)+real(mf.Bz)*real(mf.Bz)) as a function of the applied frequency, they diverge when the frequency increases as can be seen in the attached saved table with the following columns: frequency, mf.normB, mf.Bx, mf.By, mf.Bz, sqrt(real(mf.Bx)*real(mf.Bx)+real(mf.By)*real(mf.By)+real(mf.Bz)*real(mf.Bz)), real(mf.Bx), real(mf.By), real(Mf.Bz) Which one should be trusted (if the problem is correctly set) ?

Thanks a lot for any help,

Gilles



2 Replies Last Post 2022年12月16日 GMT-5 02:34
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 2022年12月15日 GMT-5 02:37

The reason for the discrepancy is that you have large imaginary parts of the field for higher frequencies. Your expression using real() gives the norm of B at phase=0.

For a scalar complex-valued variable, v = a + b*i, you are presenting a, while the built-in norm gives sqrt(a^2+b^2). The latter is what you usually would be interested in: the amplitude.

For a complex-valued vector, it is more complicated to take the norm, since the phase angle may differ between the vector components. The norm varies over the period (that is, with the phase angle) in a non-trivial manner. The built-in normB variable can be viewed in two ways:

  • As a kind of worst case approximation where the same phase is assumed for all three vector components.
  • As the temporal RMS of the magnitude of the field, but multiplied by a factor sqrt(2).

The actual maximum value of the norm of B over the whole period is also possible to compute. The expression is lengthy:

sqrt(0.5*(BX^2+BY^2+BZ^2+sqrt(BX^2*(BX^2+cos(2*(PX-PY))*BY^2+cos(2*(PX-PZ))*BZ^2)+BY^2*(cos(2*(PX-PY))*BX^2+BY^2+cos(2*(PY-PZ))*BZ^2)+BZ^2*(cos(2*(PX-PZ))*BX^2+cos(2*(PY-PZ))*BY^2+BZ^2))))

Here BX is the amplitude of the X-component of the field, and PX is the corresponding phase angle.

-------------------
Henrik Sönnerlind
COMSOL
The reason for the discrepancy is that you have large imaginary parts of the field for higher frequencies. Your expression using *real()* gives the norm of *B* at phase=0. For a scalar complex-valued variable, *v* = *a* + *b*\**i*, you are presenting *a*, while the built-in norm gives sqrt(*a*^2+*b*^2). The latter is what you usually would be interested in: the amplitude. For a complex-valued vector, it is more complicated to take the norm, since the phase angle may differ between the vector components. The norm varies over the period (that is, with the phase angle) in a non-trivial manner. The built-in normB variable can be viewed in two ways: - As a kind of worst case approximation where the same phase is assumed for all three vector components. - As the temporal RMS of the magnitude of the field, but multiplied by a factor sqrt(2). The actual maximum value of the norm of B over the whole period is also possible to compute. The expression is lengthy: sqrt(0.5\*(BX^2+BY^2+BZ^2+sqrt(BX^2\*(BX^2+cos(2\*(PX-PY))\*BY^2+cos(2\*(PX-PZ))\*BZ^2)+BY^2\*(cos(2\*(PX-PY))\*BX^2+BY^2+cos(2\*(PY-PZ))\*BZ^2)+BZ^2\*(cos(2\*(PX-PZ))\*BX^2+cos(2\*(PY-PZ))\*BY^2+BZ^2)))) Here BX is the amplitude of the X-component of the field, and PX is the corresponding phase angle.

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 2022年12月16日 GMT-5 02:34

Hello,

Thanks a lot for your detailed answer. I naively thought that using phaser was only a trick to solve the problem more eaislly and that one would then only take real parts of the field components. Now I better see how this works. Many thanks for your explanations,

Gilles

Hello, Thanks a lot for your detailed answer. I naively thought that using phaser was only a trick to solve the problem more eaislly and that one would then only take real parts of the field components. Now I better see how this works. Many thanks for your explanations, Gilles

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.