Electromagnetic model object
ElectromagneticModel object contains
information about an electromagnetic analysis problem: the geometry, material properties,
electromagnetic sources, boundary conditions, and mesh.
To create a
ElectromagneticModel object, use the
createpde function and specify
"electromagnetic" as its first
AnalysisType — Type of electromagnetic analysis
Type of electromagnetic analysis, specified as
To change an electromagnetic analysis type, assign a new type to
model.AnalysisType. Ensure that all other properties of the model
are consistent with the new analysis type.
Geometry — Geometry description
Geometry description, specified as an
MaterialProperties — Material properties within domain
object containing material property assignments
Material properties within the domain, specified as an object containing the material property assignments.
Sources — Electromagnetic sources within the domain or subdomain
object containing heat source assignments
Electromagnetic source within the domain or subdomain, specified as an object containing electromagnetic source assignments.
BoundaryConditions — Boundary conditions applied to geometry
object containing boundary condition assignments
Boundary conditions applied to the geometry, specified as an object containing the boundary condition assignments.
VacuumPermittivity — Permittivity of vacuum for entire model
Permittivity of vacuum for the entire model, specified as a number. This value must be consistent with the units of the model. If the model parameters are in the SI system of units, then the permittivity of vacuum must be 8.8541878128E-12.
VacuumPermeability — Permeability of vacuum for entire model
Permeability of vacuum for the entire model, specified as a number. This value must be consistent with the units of the model. If the model parameters are in the SI system of units, then the permeability of vacuum must be 1.2566370614E-6.
Mesh — Mesh for solution
Mesh for the solution, specified as a
FEMesh object. See
FEMesh Properties. You create the mesh using the
generateMesh function. For a 3-D magnetostatic model, the mesh must be
SolverOptions — Algorithm options for PDE solvers
Algorithm options for the PDE solvers, specified as a
PDESolverOptions object. The properties of a
PDESolverOptions object include absolute and relative tolerances
for internal ODE solvers, maximum solver iterations, and so on. For details, see
FieldType — Type of field for harmonic analysis
'electric' (default) |
Type of field for a harmonic analysis, specified as
|Create 2-D geometry from decomposed geometry matrix|
|Create 2-D or 3-D geometry from mesh|
|Import geometry from STL or STEP file|
|Create triangular or tetrahedral mesh|
|Assign properties of material for electromagnetic model|
|Specify current density, charge density, and magnetization for electromagnetic model|
|Apply boundary conditions to electromagnetic model|
|Solve structural analysis, heat transfer, or electromagnetic analysis problem|
Create Electromagnetic Model
Create a model for electrostatic analysis.
emagE = createpde("electromagnetic","electrostatic")
emagE = ElectromagneticModel with properties: AnalysisType: "electrostatic" Geometry:  MaterialProperties:  Sources:  BoundaryConditions:  VacuumPermittivity:  Mesh: 
Create an axisymmetric model for magnetostatic analysis. An axisymmetric model simplifies a 3-D problem to a 2-D problem using symmetry around the axis of rotation.
emagMA = createpde("electromagnetic","magnetostatic-axisymmetric")
emagMA = ElectromagneticModel with properties: AnalysisType: "magnetostatic-axisymmetric" Geometry:  MaterialProperties:  Sources:  BoundaryConditions:  VacuumPermeability:  Mesh: 
Create a model for harmonic analysis.
emagH = createpde("electromagnetic","harmonic")
emagH = ElectromagneticModel with properties: AnalysisType: "harmonic" Geometry:  MaterialProperties:  Sources:  BoundaryConditions:  VacuumPermittivity:  VacuumPermeability:  Mesh:  FieldType: "electric"
Create a model for DC conduction analysis.
emagDC = createpde("electromagnetic","conduction")
emagDC = ElectromagneticModel with properties: AnalysisType: "conduction" Geometry:  MaterialProperties:  BoundaryConditions:  Mesh: 
Version HistoryIntroduced in R2021a
R2022b: DC conduction analysis and permanent magnets
The programmatic workflow for a DC conduction analysis enables you to analyze stationary current distribution in conductors due to applied voltage.
You can also specify magnetization using the
electromagneticSource function to account for materials generating their own
magnetic fields in a magnetostatic analysis workflow.
R2022a: Harmonic analysis
The programmatic workflow for a harmonic electromagnetic analysis enables you to set up, solve, and analyze time-harmonic Maxwell’s equations (the Helmholtz equation).
R2021b: Electrostatic and magnetostatic analysis for 3-D models
The programmatic workflow for electrostatic and magnetostatic analyses now enables you to set up, solve, and analyze 3-D problems in addition to previously supported 2-D problems.