Skip to content

Material

fdtdx.materials.Material

Bases: ExtendedTreeClass

Represents an electromagnetic material with specific electrical and magnetic properties.

This class stores the fundamental electromagnetic properties of a material for use in electromagnetic simulations.

Parameters:

Name Type Description Default
permittivity float

The relative permittivity (dielectric constant) of the material, which describes how the electric field is affected by the material. Higher values indicate greater electric polarization in response to an applied electric field.

required
permeability float

The relative permeability of the material, which describes how the magnetic field is affected by the material. Higher values indicate greater magnetic response to an applied magnetic field. Defaults to 1.0 (non-magnetic material).

required
electric_conductivity float

The electrical conductivity of the material in siemens per meter (S/m), which describes how easily electric current can flow through it. Higher values indicate materials that conduct electricity more easily. Defaults to 0.0 (perfect insulator).

required
magnetic_conductivity float

The magnetic conductivity, or magnetic loss of the material. This is an artificial parameter for numerical applications and does not represent an actual physical unit, even though often described in Ohm/m. The naming can be misleading, because it does not actually describe a conductivity, but rather an "equivalent magnetic loss parameter". Defaults to 0.0.

required
Source code in src/fdtdx/materials.py
@extended_autoinit
class Material(ExtendedTreeClass):
    """
    Represents an electromagnetic material with specific electrical and magnetic properties.

    This class stores the fundamental electromagnetic properties of a material for use
    in electromagnetic simulations.

    Args:
        permittivity (float): The relative permittivity (dielectric constant) of the material,
            which describes how the electric field is affected by the material. Higher values
            indicate greater electric polarization in response to an applied electric field.

        permeability (float, optional): The relative permeability of the material, which
            describes how the magnetic field is affected by the material. Higher values
            indicate greater magnetic response to an applied magnetic field.
            Defaults to 1.0 (non-magnetic material).

        electric_conductivity (float, optional): The electrical conductivity of the material in siemens
            per meter (S/m), which describes how easily electric current can flow through it.
            Higher values indicate materials that conduct electricity more easily.
            Defaults to 0.0 (perfect insulator).

        magnetic_conductivity (float, optional): The magnetic conductivity, or magnetic loss of the material.
            This is an artificial parameter for numerical applications and does not represent an actual physical unit,
            even though often described in Ohm/m. The naming can be misleading, because it does not actually describe
            a conductivity, but rather an "equivalent magnetic loss parameter".
            Defaults to 0.0.
    """

    permittivity: float
    permeability: float = 1.0
    electric_conductivity: float = 0.0
    magnetic_conductivity: float = 0.0

    @property
    def is_magnetic(self) -> bool:
        if isinstance(self.permeability, complex):
            return True
        return not math.isclose(self.permeability, 1.0)

    @property
    def is_electrically_conductive(self) -> bool:
        return not math.isclose(self.electric_conductivity, 0.0)

    @property
    def is_magnetically_conductive(self) -> bool:
        return not math.isclose(self.magnetic_conductivity, 0.0)