Main Content


Solve problems that model electric and magnetic fields

Solve PDEs that model 2-D static electric and magnetic fields. A typical programmatic workflow for solving an electromagnetic problem includes the following steps:

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

  • Define a 2-D geometry and mesh it.

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

  • Specify charge or current density within the geometry.

  • Specify voltage or magnetic potential values on the boundaries.

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


expand all

createpdeCreate model
electromagneticPropertiesAssign properties of material for electromagnetic model
electromagneticSourceSpecify current density or charge density for electromagnetic model
electromagneticBCApply boundary conditions to electromagnetic model
solveSolve heat transfer, structural analysis, or electromagnetic analysis problem
assembleFEMatricesAssemble finite element matrices
interpolateElectricPotentialInterpolate electric potential in electrostatic result at arbitrary spatial locations
interpolateElectricFieldInterpolate electric field in electrostatic 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
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


ElectromagneticModelElectromagnetic model object
ElectrostaticResultsElectrostatic solution and derived quantities
MagnetostaticResultsMagnetostatic solution and derived quantities


ElectromagneticMaterialAssignment PropertiesElectromagnetic material properties assignments
ElectromagneticBCAssignment PropertiesBoundary condition for electromagnetic model
ElectromagneticSourceAssignment PropertiesElectromagnetic source assignments
PDEVisualization PropertiesPDE visualization of mesh and nodal results


Electrostatic and Magnetostatic Problems

Electrostatic Potential in Air-Filled Frame

Find the electric potential in an air-filled annular quadrilateral frame.

Magnetic Field in Two-Pole Electric Motor

Find the static magnetic field induced by the stator windings in a two-pole electric motor.

Minimal Electric Potential

Find the minimal electric potential by solving a nonlinear elliptic problem.

Electromagnetic Equations

Electrostatics and Magnetostatics

Partial differential equations for electrostatics and magnetostatics problems.