Henrik Sönnerlind
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
2 years ago
15.12.2022, 02:37 GMT-5
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
16.12.2022, 02:34 GMT-5
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