# Should I use the RMS, the peak, or the instantaneous value to specify sources for electromagnetic fields?

 Solution Number: 878 Title: Should I use the RMS, the peak, or the instantaneous value to specify sources for electromagnetic fields? Platform: All Platforms Applies to: AC/DC Module, RF Module, Acoustics Module, Batteries & Fuels Cells Module Versions: All versions Categories: Physics Keywords: Testing log feature

## Problem Description

Should I use the RMS, the peak, or the instantaneous value to specify sources for electromagnetic fields? How can I specify the phase angle?

## Solution

The COMSOL Multiphysics formulation uses complex fields when solving time-harmonic problems. This means that the electric field E is given as

where is the complex electric field that you are entering, is the angular frequency, is time, and is the imaginary unit.

Whenever you specify a source field you can input a complex number `Ec`, where `abs(Ec)` is the peak value, and `real(Ec)` gives you the instantaneous value at .

This goes not only for the electric field, but for any time-harmonic input to your model. 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:

`sqrt(2)*exp(j*30*pi/180)`.

### Disclaimer

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.