Main Content

ElectromagneticSourceAssignment Properties

Electromagnetic source assignments

An ElectromagneticSourceAssignment object describes the source of an electromagnetic model. An ElectromagneticModel object contains a vector of ElectromagneticSourceAssignment objects in its Sources.SourceAssignments property.

Create electromagnetic source assignments for your model using the electromagneticSource function.

Properties

expand all

Geometric region type, specified as "Face" for a 2-D model or "Cell" for a 3-D model.

Data Types: char | string

Region ID, specified as a vector of positive integers. Find the face or cell IDs by using pdegplot with the FaceLabels or CellLabels name-value argument set to "on".

Data Types: double

Charge density, specified as a real number or a function handle. Use a function handle to specify a charge density that depends on the coordinates.

Data Types: double | function_handle

Current density, specified as a real number, a column vector, a function handle, or a ConductionResults object. Use a function handle to specify a current density that depends on the coordinates.

For magnetostatic analysis, the current density must be a real number for a 2-D model, a column vector of three elements for a 3-D model, a function handle for a 2-D or 3-D model, or a ConductionResults object for a 3-D model.

For harmonic analysis with the electric field type, the current density must be a column vector of two elements for a 2-D model, a column vector of three elements for a 3-D model, or a function handle for a 2-D or 3-D model. The toolbox multiplies the specified current density value by -i and by frequency.

For harmonic analysis with the magnetic field type, the current density must be a scalar for a 2-D model, a column vector of three elements for a 3-D model, or a function handle for a 2-D or 3-D model. The toolbox uses the curl of the specified current density.

Data Types: double | function_handle

Magnetization, specified as a column vector of two elements for a 2-D model, a column vector of three elements for a 3-D model, or a function handle. Use a function handle to specify a magnetization that depends on the coordinates.

Data Types: double | function_handle

Version History

Introduced in R2021a