Main Content

Electromagnetics

Solve problems that model electric and magnetic fields

Solve PDEs that model static and time-harmonic electric and magnetic fields. A typical programmatic workflow for solving an electromagnetic problem includes these steps:

  • Create a special electromagnetic model container for an electrostatic, magnetostatic, or harmonic analysis.

  • Define a geometry and mesh it.

  • Assign electromagnetic properties of the material, such as relative permittivity, relative permeability, and conductivity.

  • Specify charge density, current density, and magnetization within the geometry.

  • Specify voltage, magnetic potential, surface current density, and an electric or magnetic field on the boundaries.

  • Specify absorbing boundary conditions.

  • Solve and plot results, such as the resulting electric or magnetic potentials, fields, and flux densities.

Magnetic potential plot in color with the equipotential lines as contours and the magnetic field as arrows

Functions

expand all

createpdeCreate model
electromagneticPropertiesAssign properties of material for electromagnetic model
electromagneticSourceSpecify current density, charge density, and magnetization for electromagnetic model
electromagneticBCApply boundary conditions to electromagnetic model
solveSolve structural analysis, heat transfer, or electromagnetic analysis problem
assembleFEMatricesAssemble finite element matrices
interpolateElectricPotentialInterpolate electric potential in electrostatic or DC conduction result at arbitrary spatial locations
interpolateElectricFieldInterpolate electric field in electrostatic or DC conduction result at arbitrary spatial locations
interpolateElectricFluxInterpolate electric flux density in electrostatic result at arbitrary spatial locations
interpolateMagneticPotentialInterpolate magnetic potential in magnetostatic result at arbitrary spatial locations
interpolateMagneticFieldInterpolate magnetic field in magnetostatic result at arbitrary spatial locations
interpolateMagneticFluxInterpolate magnetic flux density in magnetostatic result at arbitrary spatial locations
interpolateHarmonicFieldInterpolate electric or magnetic field in harmonic result at arbitrary spatial locations
interpolateCurrentDensityInterpolate current density in DC conduction result at arbitrary spatial locations
pdeplotPlot solution or mesh for 2-D problem
pdeplot3DPlot solution or surface mesh for 3-D problem
pdegplotPlot PDE geometry
pdemeshPlot PDE mesh
pdevizCreate and plot PDE visualization object
findElectromagneticPropertiesFind electromagnetic material properties assigned to geometric region
findElectromagneticSourceFind electromagnetic source assigned to geometric region
findElectromagneticBCFind electromagnetic boundary conditions assigned to geometric region

Live Editor Tasks

Visualize PDE ResultsCreate and explore visualizations of PDE results in the Live Editor

Objects

ElectromagneticModelElectromagnetic model object
ElectrostaticResultsElectrostatic solution and derived quantities
MagnetostaticResultsMagnetostatic solution and derived quantities
HarmonicResultsHarmonic electromagnetic solution
ConductionResultsDC conduction solution

Properties

ElectromagneticMaterialAssignment PropertiesElectromagnetic material properties assignments
ElectromagneticSourceAssignment PropertiesElectromagnetic source assignments
ElectromagneticBCAssignment PropertiesElectromagnetic boundary condition assignments
PDESolverOptions PropertiesAlgorithm options for solvers
PDEVisualization PropertiesPDE visualization of mesh and nodal results

Topics

Electrostatic and Magnetostatic Problems

Electromagnetic Equations