Materials#

class pyedb.grpc.database.definition.materials.Materials(edb: pyedb.Edb)#

Bases: object

Manages EDB methods for material management accessible from Edb.materials property.

Overview#

add_material

Add a new material.

add_conductor_material

Add a new conductor material.

add_dielectric_material

Add a new dielectric material in library.

add_djordjevicsarkar_dielectric

Add a dielectric using the Djordjevic-Sarkar model.

add_debye_material

Add a dielectric with the Debye model.

add_multipole_debye_material

Add a dielectric with the Multipole Debye model.

duplicate

Duplicate a material from the database.

delete_material

.deprecated: pyedb 0.32.0 use delete instead.

delete

Remove a material from the database.

update_material

Update material attributes.

load_material

Load material.

material_property_to_id

Convert a material property name to a material property ID.

load_amat

Load materials from an AMAT file.

iterate_materials_in_amat

Iterate over material description in an AMAT file.

read_materials

Read materials from an AMAT file.

read_syslib_material

Read a specific material from syslib AMAT file.

update_materials_from_sys_library

Update material properties from syslib AMAT file.

syslib

Get the project sys library.

materials

Get materials.

Import detail#

from pyedb.grpc.database.definition.materials import Materials

Property detail#

property Materials.syslib#

Get the project sys library.

Returns:
str

Syslib path.

property Materials.materials: dict[str, Material]#

Get materials.

Returns:
Dict[str, Material]

Materials dictionary.

Attribute detail#

Materials.default_conductor_property_values#
Materials.default_dielectric_property_values#

Method detail#

Materials.__contains__(item)#
Materials.__getitem__(item)#
Materials.add_material(name: str, **kwargs) Material#

Add a new material.

Parameters:
namestr

Material name.

Returns:
Material

Material object.

Materials.add_conductor_material(name, conductivity, **kwargs) Material#

Add a new conductor material.

Parameters:
namestr

Name of the new material.

conductivitystr, float, int

Conductivity of the new material.

Returns:
Material

Material object.

Materials.add_dielectric_material(name, permittivity, dielectric_loss_tangent, **kwargs) Material#

Add a new dielectric material in library.

Parameters:
namestr

Name of the new material.

permittivitystr, float, int

Permittivity of the new material.

dielectric_loss_tangentstr, float, int

Dielectric loss tangent of the new material.

Returns:
Material

Material object.

Materials.add_djordjevicsarkar_dielectric(name, permittivity_at_frequency, loss_tangent_at_frequency, dielectric_model_frequency, dc_conductivity=None, dc_permittivity=None, **kwargs) Material#

Add a dielectric using the Djordjevic-Sarkar model.

Parameters:
namestr

Name of the dielectric.

permittivity_at_frequencystr, float, int

Relative permittivity of the dielectric.

loss_tangent_at_frequencystr, float, int

Loss tangent for the material.

dielectric_model_frequencystr, float, int

Test frequency in GHz for the dielectric.

Returns:
Material

Material object.

Materials.add_debye_material(name, permittivity_low, permittivity_high, loss_tangent_low, loss_tangent_high, lower_freqency, higher_frequency, **kwargs) Material#

Add a dielectric with the Debye model.

Parameters:
namestr

Name of the dielectric.

permittivity_lowfloat, int

Relative permittivity of the dielectric at the frequency specified for lower_frequency.

permittivity_highfloat, int

Relative permittivity of the dielectric at the frequency specified for higher_frequency.

loss_tangent_lowfloat, int

Loss tangent for the material at the frequency specified for lower_frequency.

loss_tangent_highfloat, int

Loss tangent for the material at the frequency specified for higher_frequency.

lower_freqencystr, float, int

Value for the lower frequency.

higher_frequencystr, float, int

Value for the higher frequency.

Returns:
Material

Material object.

Materials.add_multipole_debye_material(name, frequencies, permittivities, loss_tangents, **kwargs) Material#

Add a dielectric with the Multipole Debye model.

Parameters:
namestr

Name of the dielectric.

frequencieslist

Frequencies in GHz.

permittivitieslist

Relative permittivities at each frequency.

loss_tangentslist

Loss tangents at each frequency.

Returns:
Material

Material object.

Examples

>>> from pyedb import Edb
>>> edb = Edb()
>>> freq = [0, 2, 3, 4, 5, 6]
>>> rel_perm = [1e9, 1.1e9, 1.2e9, 1.3e9, 1.5e9, 1.6e9]
>>> loss_tan = [0.025, 0.026, 0.027, 0.028, 0.029, 0.030]
>>> diel = edb.materials.add_multipole_debye_material("My_MP_Debye", freq, rel_perm, loss_tan)
Materials.duplicate(material_name, new_material_name) Material#

Duplicate a material from the database.

Parameters:
material_namestr

Name of the existing material.

new_material_namestr

Name of the new duplicated material.

Returns:
Material

Material object.

Materials.delete_material(material_name)#

.deprecated: pyedb 0.32.0 use delete instead.

Parameters:
material_namestr

Name of the material to delete.

Materials.delete(material_name) bool#

Remove a material from the database.

Returns:
bool
Materials.update_material(material_name, input_dict)#

Update material attributes.

Materials.load_material(material: dict)#

Load material.

Materials.material_property_to_id(property_name)#

Convert a material property name to a material property ID.

Parameters:
property_namestr

Name of the material property.

Returns:
Any
Materials.load_amat(amat_file) bool#

Load materials from an AMAT file.

Parameters:
amat_filestr

Full path to the AMAT file to read and add to the Edb.

Returns:
bool
Materials.iterate_materials_in_amat(amat_file=None)#

Iterate over material description in an AMAT file.

Parameters:
amat_filestr

Full path to the AMAT file to read.

Yields:
dict
Materials.read_materials(amat_file) dict[str, Material]#

Read materials from an AMAT file.

Parameters:
amat_filestr

Full path to the AMAT file to read.

Returns:
dict

{material name: dict of material properties}.

Materials.read_syslib_material(material_name) dict[str, Material]#

Read a specific material from syslib AMAT file.

Parameters:
material_namestr

Name of the material.

Returns:
dict

{material name: dict of material properties}.

Materials.update_materials_from_sys_library(update_all: bool = True, material_name: str | list = None)#

Update material properties from syslib AMAT file.