Implicit Geometry Material¶
Introduction¶
The implicit geometry material defines the material distribution of the Time-Domain Magnetic Model through a level-set function \(\varphi(\mathbf{x})\) instead of through the mesh topology. The material combines two media, air and iron. The sign of the level-set function selects the medium at each point: air where \(\varphi < 0\), and iron with relative permeability \(\mu_r\) where \(\varphi > 0\).
Because the material interface is given implicitly by \(\varphi = 0\), the
geometry can be changed — moved, scaled, or reshaped — without re-meshing.
This makes the material well suited for shape and topology optimization of
magnetic devices and for parametric studies of geometric features. Use it with
adaptive mesh refinement along the interface (see
refine_along_interface).
Material¶
from mufem.electromagnetics.module.implicit_geometry import (
TimeDomainMagneticImplicitGeometryMaterial,
)
TimeDomainMagneticImplicitGeometryMaterial(
name: str,
marker: Marker,
phi: CffScalarVariableTrait,
relative_permeability_iron: float,
)
Args:
- name: Name of the material
- marker: Marker of the support volume on which the material is defined
- phi: The level-set function \(\varphi\), given as a scalar coefficient; air is assumed where \(\varphi < 0\), iron where \(\varphi > 0\)
- relative_permeability_iron: Relative magnetic permeability \(\mu_r\) of the
iron phase (default
1.0)
Example¶
import mufem
from mufem import Vol
from mufem.electromagnetics.module.implicit_geometry import (
TimeDomainMagneticImplicitGeometryMaterial,
)
# Level set of a cylinder of radius 0.05 m centered at the origin:
cff_phi = mufem.CffExpressionScalar("0.05^2 - (x^2 + y^2)")
material = TimeDomainMagneticImplicitGeometryMaterial(
"Cylinder", Vol.Everywhere, phi=cff_phi, relative_permeability_iron=1000.0
)
magnetic_model.add_materials([material])