tidy3d.Graphene#

class Graphene[source]#

Parametric surface conductivity model for graphene.

Parameters:
  • 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__(**data)#

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Methods

coerce_numpy_scalars_for_model(data)

coerce numpy scalars / size-1 arrays to native Python scalars, but only for fields whose annotations allow scalars.

construct([_fields_set])

copy([deep, validate, update])

Return a copy of the model.

dict(*[, include, exclude, by_alias, ...])

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.

find_paths(target_field_name[, ...])

Finds paths to nested model instances that have a specific field, optionally matching a value.

find_submodels(target_type)

Finds all unique nested instances of a specific Tidy3D model type within this model.

from_file(fname[, group_path, lazy, on_load])

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, **model_validate_kwargs)

Load a Tidy3dBaseModel from .json file.

from_orm(obj)

from_yaml(fname, **model_validate_kwargs)

Loads Tidy3dBaseModel from .yaml file.

generate_docstring([show_default_args, ...])

Generates a docstring for a Tidy3D model.

get_sub_model(group_path, model_dict)

Get the sub model for a given group path.

get_submodels_by_hash()

Return a mapping {hash(submodel): [field_path, ...]} for every nested Tidy3dBaseModel inside this model.

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, ...])

model_construct([_fields_set])

model_copy(*[, update, deep])

model_dump(*[, mode, include, exclude, ...])

model_dump_json(*[, indent, ensure_ascii, ...])

model_json_schema([by_alias, ref_template, ...])

model_parametrized_name(params)

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialise private attributes.

model_rebuild(*[, force, raise_errors, ...])

Try to rebuild the pydantic-core schema for the model.

model_validate(obj, *[, strict, extra, ...])

model_validate_json(json_data, *[, strict, ...])

model_validate_strings(obj, *[, strict, ...])

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 file

to_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 file

to_static()

Version of object with all autograd-traced fields removed.

to_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)

updated_copy([path, deep, validate])

Make copy of a component instance with **kwargs indicating updated field values.

validate(value)

Attributes

interband_pole_residue

A pole-residue model for the interband term of graphene.

intraband_drude

A Drude-type model for the intraband term of graphene.

medium

Surface conductivity model for graphene.

model_computed_fields

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra

Get extra fields set during validation.

model_fields

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

mu_c

temp

gamma

scaling

include_interband

interband_fit_freq_nodes

interband_fit_num_iters

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:

Drude

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:

PoleResidue

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 of interband_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]