tidy3d.Graphene#
- class Graphene[source]#
Parametric surface conductivity model for graphene.
- 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,
attrs
are mutable. For example, the following is allowed for setting anattr
obj.attrs['foo'] = bar
. Also note that Tidy3D` will raise aTypeError
ifattrs
contain objects that can not be serialized. One can check ifattrs
are serializable by callingobj.json()
.mu_c (float = 0) – [units = eV]. Chemical potential in eV.
temp (float = 300) – [units = K]. Temperature in K.
gamma (float = 0.00041) – [units = eV]. Scattering rate in eV. Must be small compared to the optical frequency.
scaling (float = 1) – Scaling factor used to model multiple layers of graphene.
include_interband (bool = True) – Include interband terms, relevant at high frequency (IR). Otherwise, the intraband terms only give a simpler Drude-type model relevant only at low frequency (THz).
interband_fit_freq_nodes (Optional[List[Tuple[float, float]]] = None) – Frequency nodes for fitting interband term. Each pair of nodes in the list corresponds to a single Pade approximant of order (1, 2), which is optimized to minimize the error at these two frequencies. The default behavior is to fit a first approximant at one very low frequency and one very high frequency, and to fit a second approximant in the vicinity of the interband feature. This default behavior works for a wide range of frequencies; consider changing the nodes to obtain a better fit for a narrow-band simulation.
interband_fit_num_iters (NonNegativeInt = 100) – Number of iterations for optimizing each Pade approximant when fitting the interband term. Making this larger might give a better fit at the cost of decreased stability in the fitting algorithm.
Note
The model contains intraband and interband terms, as described in:
George W. Hanson, "Dyadic Green's Functions for an Anisotropic, Non-Local Model of Biased Graphene," IEEE Trans. Antennas Propag. 56, 3, 747-757 (2008).
Example
>>> graphene_medium = Graphene(mu_c = 0.2).medium
- __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
(**kwargs)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
Tidy3dBaseModel
from .yaml, .json, .hdf5, or .hdf5.gz file.from_hdf5
(fname[, group_path, custom_decoders])Loads
Tidy3dBaseModel
instance to .hdf5 file.from_hdf5_gz
(fname[, group_path, ...])Loads
Tidy3dBaseModel
instance to .hdf5.gz file.from_json
(fname, **parse_obj_kwargs)Load a
Tidy3dBaseModel
from .json file.from_orm
(obj)from_yaml
(fname, **parse_obj_kwargs)Loads
Tidy3dBaseModel
from .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
.interband_conductivity
(freqs)Numerically integrate interband term.
json
(*[, include, exclude, by_alias, ...])Generate a JSON representation of the model, include and exclude arguments as per dict().
numerical_conductivity
(freqs)Numerically calculate the conductivity.
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
Tidy3dBaseModel
instance to .yaml, .json, or .hdf5 fileto_hdf5
(fname[, custom_encoders])Exports
Tidy3dBaseModel
instance to .hdf5 file.to_hdf5_gz
(fname[, custom_encoders])Exports
Tidy3dBaseModel
instance to .hdf5.gz file.to_json
(fname)Exports
Tidy3dBaseModel
instance to .json fileto_yaml
(fname)Exports
Tidy3dBaseModel
instance 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])Make copy of a component instance with
**kwargs
indicating updated field values.validate
(value)Attributes
A pole-residue model for the interband term of graphene.
A Drude-type model for the intraband term of graphene.
Surface conductivity model for graphene.
attrs
- mu_c#
- temp#
- gamma#
- scaling#
- include_interband#
- interband_fit_freq_nodes#
- interband_fit_num_iters#
- property medium#
Surface conductivity model for graphene.
- property intraband_drude#
A Drude-type model for the intraband term of graphene.
- Returns:
A Drude-type model for the intraband term of graphene.
- Return type:
- property interband_pole_residue#
A pole-residue model for the interband term of graphene. Note that this does not include the intraband term, which is added in separately.
- Returns:
A pole-residue model for the interband term of graphene.
- Return type:
- numerical_conductivity(freqs)[source]#
Numerically calculate the conductivity. If this differs from the conductivity of the
Medium2D
, it is due to error while fitting the interband term, and you may try values ofinterband_fit_freq_nodes
different from its default (calculated) value.- Parameters:
freqs (List[float]) – The list of frequencies.
- Returns:
The list of corresponding conductivities, in S.
- Return type:
List[complex]
- interband_conductivity(freqs)[source]#
Numerically integrate interband term.
- Parameters:
freqs (List[float]) – The list of frequencies.
- Returns:
The list of corresponding interband conductivities, in S.
- Return type:
List[complex]
- __hash__()#
Hash method.