HighFrequency.assign_material
Description
Assigns a material to selected regions of the computational domain, allowing different parts of the model to have their own electromagnetic properties.
Each region is identified by a domain ID defined in the mesh. A material can be shared by multiple regions, and different materials can be assigned to different regions of the same model.
Assigning a material to a region that already has one replaces its previous assignment.
Syntax
obj
obj A
HighFrequency object
representing the configured electromagnetic model.
obj.assign_material(material, domain)
obj.assign_material(material, domain) Assigns the specified material
to a mesh domain.
Input Arguments
material
Material whose electromagnetic properties are applied to the selected regions.
domain
int | list[int]
Mesh domain IDs identifying the regions to which the material is assigned.
Examples
substrate = Dielectric(
name="substrate",
epsilon_r=4.2,
loss_tangent=0.02
)
model.assign_material(substrate, domain=[2, 3])
Errors / Exceptions
Error / Exceptions List
tanager:modelmessage: InvalidDomainType - Condition
A domain ID is not an integer.
ResolutionSpecify integer mesh domain IDs.
tanager:modelmessage: DuplicateDomains - Condition
The same domain ID appears more than once in a single assignment.
ResolutionRemove duplicate domain IDs from the input list.