Click or drag to resize

EMBoundaryCondition Class

A wrapped EMBoundaryCondition class that allows for the definition of electromagnetic boundaries in FE models using the API.
Inheritance Hierarchy
SystemObject
  ema3d.Api.V26.Charging.BoundariesEMBoundaryCondition

Namespace: ema3d.Api.V26.Charging.Boundaries
Assembly: ema3d.Api.V26 (in ema3d.Api.V26.dll) Version: 0.0.0.0
Syntax
public sealed class EMBoundaryCondition

The EMBoundaryCondition type exposes the following members.

Properties
 NameDescription
Public propertyBoundaryGeometry The geometry the boundary is defined on.
Public propertyCoupledBoundaryType Type of coupling to use in coupled boundaries.
Public propertyDisplayName The EM Boundary's name in the sim tree in the UI.
Public propertyElectricPotential The scalar potential for the selected boundary.
Public propertyEMBoundaryType Boundary type for an electromagnetic boundary.
Public propertyMagneticPotential The magnetic vector potential for the selected boundary.
Public propertyNormalRoughnessFactor The normal roughness factor in Field Enhancement boundaries.
Public propertyTangentialRoughnessFactor The tangential roughness factor in Field Enhancement boundaries.
Public propertyVectorAxis The coordinate axis along which the vector potential is defined.
Top
Methods
 NameDescription
Public methodStatic memberCreate Creates a new EMBoundaryCondition object in the current document when provided a list of faces from the geometry.
Public methodDelete Deletes the electromagnetic boundary object.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Example
Python
from ema3d.Api.V26.Charging.Domain import ChargeDomain as ChargeDomain
from ema3d.Api.V26.Charging.Domain import ChargingEnvironment as ChargingEnvironment
from ema3d.Api.V26.Charging.Boundaries import EMBoundaryCondition as EMBoundaryCondition
from ema3d.Api.V26.Charging.Boundaries import EMBoundaryType as EMBoundaryType
from ema3d.Api.V26.Charging.Boundaries import CoupledBoundaryType as CoupledBoundaryType
from ema3d.Api.V26.Charging.Boundaries import VectorAxis as VectorAxis

document = Window.ActiveWindow.Document
_cd = ChargeDomain.GetInstance(document)
_cd.SwitchChargingOptions.SimulationType = ChargingEnvironment.Internal

# Create a geometry
result = BlockBody.Create(Point.Create(MM(-10), MM(-10), MM(0)), Point.Create(MM(10), MM(10), MM(20)), ExtrudeType.ForceAdd)

faces = GetRootPart().Bodies[0].Faces
faces_list = [f for f in faces]

# Create a coupled EM Boundary
# Pass faces as list of IDesignFaces to the constructor
_emb_c = EMBoundaryCondition.Create(faces_list[0:3], document)
_emb_c.EMBoundaryType = EMBoundaryType.Coupled
_emb_c.CoupledBoundaryType = CoupledBoundaryType.Independent
_emb_c.DisplayName = "My Coupled Boundary"

# Create a magnetic vector potential boundary
_emb_v = EMBoundaryCondition.Create(List[IDesignFace]([faces_list[5]]), document)
_emb_v.EMBoundaryType = EMBoundaryType.Vector
_emb_v.MagneticPotential = 100
_emb_v.VectorAxis = VectorAxis.All

# Change the selected boundaries
_emb_v.BoundaryGeometry = faces_list[4:]
See Also