tidy3d.components.material.multi_physics.MultiPhysicsMedium#
- class MultiPhysicsMedium[source]#
Contains multiple multi-physical properties as defined for each solver medium.
- Parameters:
attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields,
attrsare mutable. For example, the following is allowed for setting anattrobj.attrs['foo'] = bar. Also note that Tidy3D` will raise aTypeErrorifattrscontain objects that can not be serialized. One can check ifattrsare serializable by callingobj.json().name (Optional[str] = None) – Medium name
optical (Union[Medium, AnisotropicMedium, PECMedium, PMCMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, FullyAnisotropicMedium, CustomMedium, CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomAnisotropicMedium, PerturbationMedium, PerturbationPoleResidue, LossyMetalMedium, Medium2D, AnisotropicMediumFromMedium2D, NoneType] = None) – Specifies optical properties.
heat (Union[FluidSpec, SolidSpec, SolidMedium, FluidMedium, NoneType] = None) – Specifies properties for Heat simulations.
charge (Union[ChargeConductorMedium, ChargeInsulatorMedium, SemiconductorMedium, NoneType] = None) – Specifies properties for Charge simulations.
Examples
- For silica (\(SiO_2\)):
>>> import tidy3d as td >>> SiO2 = td.MultiPhysicsMedium( ... optical=td.Medium(permittivity=3.9), ... charge=td.ChargeInsulatorMedium(permittivity=3.9), # redefining permittivity ... name="SiO2", ... )
For a silicon
MultiPhysicsMediumcomposed of an optical model from the material library and custom chargeSemiconductorMedium:>>> import tidy3d as td >>> default_multiphysics_Si = td.MultiPhysicsMedium( ... optical=td.material_library['cSi']['Green2008'], ... charge=td.SemiconductorMedium( ... N_c=2.86e19, ... N_v=3.1e19, ... E_g=1.11, ... mobility_n=td.CaugheyThomasMobility( ... mu_min=52.2, ... mu=1471.0, ... ref_N=9.68e16, ... exp_N=0.68, ... exp_1=-0.57, ... exp_2=-2.33, ... exp_3=2.4, ... exp_4=-0.146, ... ), ... mobility_p=td.CaugheyThomasMobility( ... mu_min=44.9, ... mu=470.5, ... ref_N=2.23e17, ... exp_N=0.719, ... exp_1=-0.57, ... exp_2=-2.33, ... exp_3=2.4, ... exp_4=-0.146, ... ), ... R=[ ... td.ShockleyReedHallRecombination( ... tau_n=3.3e-6, ... tau_p=4e-6 ... ), ... td.RadiativeRecombination( ... r_const=1.6e-14 ... ), ... td.AugerRecombination( ... c_n=2.8e-31, ... c_p=9.9e-32 ... ), ... ], ... delta_E_g=td.SlotboomBandGapNarrowing( ... v1=6.92 * 1e-3, ... n2=1.3e17, ... c2=0.5, ... min_N=1e15, ... ), ... N_a=0, ... N_d=0 ... ) ... )
- __init__(**kwargs)#
Init method, includes post-init validators.
Methods
__init__(**kwargs)Init method, includes post-init validators.
add_type_field()Automatically place "type" field with model name in the model field dictionary.
construct([_fields_set])Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
copy([deep, validate])Copy a Tidy3dBaseModel.
dict(*[, include, exclude, by_alias, ...])Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
dict_from_file(fname[, group_path])Loads a dictionary containing the model from a .yaml, .json, .hdf5, or .hdf5.gz file.
dict_from_hdf5(fname[, group_path, ...])Loads a dictionary containing the model contents from a .hdf5 file.
dict_from_hdf5_gz(fname[, group_path, ...])Loads a dictionary containing the model contents from a .hdf5.gz file.
dict_from_json(fname)Load dictionary of the model from a .json file.
dict_from_yaml(fname)Load dictionary of the model from a .yaml file.
from_file(fname[, group_path])Loads a
Tidy3dBaseModelfrom .yaml, .json, .hdf5, or .hdf5.gz file.from_hdf5(fname[, group_path, custom_decoders])Loads
Tidy3dBaseModelinstance to .hdf5 file.from_hdf5_gz(fname[, group_path, ...])Loads
Tidy3dBaseModelinstance to .hdf5.gz file.from_json(fname, **parse_obj_kwargs)Load a
Tidy3dBaseModelfrom .json file.from_orm(obj)from_yaml(fname, **parse_obj_kwargs)Loads
Tidy3dBaseModelfrom .yaml file.generate_docstring()Generates a docstring for a Tidy3D mode and saves it to the __doc__ of the class.
get_sub_model(group_path, model_dict)Get the sub model for a given group path.
get_submodels_by_hash()Return a dictionary of this object's sub-models indexed by their hash values.
get_tuple_group_name(index)Get the group name of a tuple element.
get_tuple_index(key_name)Get the index into the tuple based on its group name.
help([methods])Prints message describing the fields and methods of a
Tidy3dBaseModel.json(*[, include, exclude, by_alias, ...])Generate a JSON representation of the model, include and exclude arguments as per dict().
parse_file(path, *[, content_type, ...])parse_obj(obj)parse_raw(b, *[, content_type, encoding, ...])schema([by_alias, ref_template])schema_json(*[, by_alias, ref_template])to_file(fname)Exports
Tidy3dBaseModelinstance to .yaml, .json, or .hdf5 fileto_hdf5(fname[, custom_encoders])Exports
Tidy3dBaseModelinstance to .hdf5 file.to_hdf5_gz(fname[, custom_encoders])Exports
Tidy3dBaseModelinstance to .hdf5.gz file.to_json(fname)Exports
Tidy3dBaseModelinstance to .json fileto_static()Version of object with all autograd-traced fields removed.
to_yaml(fname)Exports
Tidy3dBaseModelinstance to .yaml file.tuple_to_dict(tuple_values)How we generate a dictionary mapping new keys to tuple values for hdf5.
update_forward_refs(**localns)Try to update ForwardRefs on fields based on this Model, globalns and localns.
updated_copy([path, deep, validate])Make copy of a component instance with
**kwargsindicating updated field values.validate(value)Attributes
- name#
- optical#
- heat#
- charge#
- __getattr__(name)[source]#
Delegate attribute lookup to inner media or fail fast.
- Parameters:
name (str) – The attribute that could not be found on the
MultiPhysicsMediumitself.- Returns:
The attribute value obtained from a delegated sub-medium when
nameis listed inDELEGATED_ATTRIBUTES. *Nonewhennameis explicitly ignored (e.g."__deepcopy__").- Return type:
Any
- Raises:
ValueError – If
nameis neither ignored nor in the delegation map, signalling that the caller may have intended to accessoptical,heat, orchargedirectly.
Notes
Only the attributes enumerated in the local
DELEGATED_ATTRIBUTESdict are forwarded. Extend that mapping as additional cross-medium shim behaviour becomes necessary.
- property heat_spec#
- __hash__()#
Hash method.