How does COMSOL Multiphysics handle complex-valued numbers and problems in the frequency domain?
Should I use the RMS, the peak, or the instantaneous value to specify sources in models being solved in the frequency domain, such as electromagnetic or acoustic models?
How can I specify the phase angle?
The COMSOL Multiphysics formulation uses complex fields when solving time-harmonic problems in electromagnetics, acoustics, and structural mechanics, or any other physics where the Frequency Domain study type is being used. For example, when solving electromagnetic problems, one is often solving for the electric field:
where is the complex electric field that you are entering, is the angular frequency, is time, and is .
Whenever you specify a source field you can input a complex number (a phasor) such as
abs(Ec) is the peak value, and
real(Ec) gives you the instantaneous value at .
This applies for any time-harmonic input. So, to define for instance an external current density, a magnetic field, an acoustic pressure, or an electric potential, with an RMS value of 1 and a phase angle of 30°, enter the expression:
The following functions are useful when dealing with complex-valued numbers:
real() Returns the real component of the argument.
imag() Returns the imaginary component of the argument.
abs() Returns the magnitude of the complex-valued argument.
arg() Returns the phase.
conj() Returns the complex conjugate.
Browse by CategoryError Messages (62)
Structural Mechanics (3)
Fluid Dynamics (1)
ALE / Parameterized Geometry (1)
Product Information (1)
User Models (1)
COMSOL makes every reasonable effort to verify the information you view on this page. Resources and documents are provided for your information only, and COMSOL makes no explicit or implied claims to their validity. COMSOL does not assume any legal liability for the accuracy of the data disclosed. Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark details.