Main Content

ElectromagneticModel

Electromagnetic model object

Since R2021a

    Domain-specific electromagnetic workflow is not recommended. New features might not be compatible with this workflow. For help migrating your existing code to the unified finite element workflow, see Migration from Domain-Specific to Unified Workflow.

    Description

    An ElectromagneticModel object contains information about an electromagnetic analysis problem: the geometry, material properties, electromagnetic sources, boundary conditions, and mesh.

    Creation

    To create a ElectromagneticModel object, use the createpde function and specify "electromagnetic" as its first argument.

    Properties

    expand all

    Type of electromagnetic analysis, specified as 'electrostatic', 'magnetostatic', 'harmonic', 'conduction', 'electrostatic-axisymmetric', 'magnetostatic-axisymmetric', or 'harmonic-axisymmetric'.

    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 description, specified as an AnalyticGeometry or DiscreteGeometry object.

    Material properties within the domain, specified as an object containing the material property assignments.

    Electromagnetic source within the domain or subdomain, specified as an object containing electromagnetic source assignments.

    Boundary conditions applied to the geometry, specified as an object containing the boundary condition assignments.

    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.

    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 for the solution, specified as a FEMesh object. You create the mesh using the generateMesh function. For a 3-D magnetostatic model, the mesh must be linear.

    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 PDESolverOptions Properties.

    Type of field for a harmonic analysis, specified as 'electric' or 'magnetic'.

    Object Functions

    geometryFromEdgesCreate 2-D geometry from decomposed geometry matrix
    geometryFromMeshCreate 2-D or 3-D geometry from mesh
    importGeometryImport geometry from STL or STEP file
    generateMeshCreate triangular or tetrahedral mesh
    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

    Examples

    collapse all

    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 History

    Introduced in R2021a

    expand all