simudo.physics package

Submodules

simudo.physics.electro_optical_process module

class simudo.physics.electro_optical_process.AbsorptionAndRadiativeRecombinationEOPMixin[source]

Bases: object

enable_radiative_recombination = True
get_generation_user(band)[source]

Call get_generation_optical() and get_radiative_recombination() and add together their results accordingly.

Only include the radiative recombination process if enable_radiative_recombination is true.

class simudo.physics.electro_optical_process.DarkEOPMixin[source]

Bases: object

get_alpha(photon_energy)[source]
class simudo.physics.electro_optical_process.ElectroOpticalProcess(**kwargs)[source]

Bases: simudo.util.setattr_init_mixin.SetattrInitMixin

This class exists to represent both electro-optical process and purely electronic (dark) processes, such as nonradiative recombination.

pdd

Instance of PoissonDriftDiffusion.

Type

PoissonDriftDiffusion

optical

Instance of Optical.

Type

Optical

pre_iteration_hook

Implement this method in order to run code before each PDD Newton iteration. Useful for processes that need procedural code (cannot be expressed as UFL form).

Type

callable

pre_first_iteration_hook

This method is called before the first PDD Newton iteration.

Type

callable

post_iteration_hook

This method is called after each PDD Newton iteration.

Type

callable

get_alpha(photon_energy)[source]

This method is called to get Beer-Lambert absorption coefficient alpha at a particular photon energy. Must return a UFL quantity on the PDD mesh, or None.

User class must implement this.

get_alpha_by_optical_field(optical_field)[source]

Exists as a separate method to make anisotropy possible.

By default just calls self.get_alpha.

get_band_generation_sign(band)[source]

As the generation process intensifies (e.g., light intensity increases), does band lose or gain more carriers?

The default implementation always returns None. User classes are expected to override this method.

Note: If you are implementing a two-band process, you almost certainly want to inherit from TwoBandEOPMixin.

Returns

sign – If the band participates in the process, returns +1 or -1 if it gains or loses carriers, respectively. Otherwise, return None.

Return type

object

get_generation(band)[source]
get_generation_optical(band)[source]

Compute carrier generation due to optical absorption, using absorption coefficient given by get_alpha_by_optical_field() and quantum yield given by get_quantum_yield().

get_generation_user(band)[source]

This method is called to get the generation contribution to band band. Must return a UFL quantity on the PDD mesh.

User class may override this. By default, this method just calls get_generation_optical().

Sign convention: The returned value is positive or negative if the band gains or loses carriers respectively.

This method will be called for every band in the system. You are strongly encouraged to use get_band_generation_sign() to determine whether the process causes a gain or a loss of carriers in band band, and whether the band participates in the process at all.

get_optical_generation(photon_energy)[source]

Override for luminescent coupling. By default returns zero.

get_optical_generation_by_optical_field(optical_field)[source]

Exists as a separate method to make anisotropy possible.

By default just calls self.get_optical_generation, and multiplies by solid_angle.

get_photon_flux_on_pdd_mesh(optical_field)[source]

Returns optical photon flux, adapted onto PDD mesh. Use this accessor instead of reaching inside optical.OpticalField yourself.

Parameters

optical_field (optical.OpticalField) – Optical field whose photon flux (clipped to be nonnegative) to get.

get_quantum_yield(photon_energy)[source]

Default quantum_yield=1.

get_quantum_yield_by_optical_field(optical_field)[source]

Exists as a separate method to make anisotropy possible.

By default just calls self.get_quantum_yield.

property mesh_util
post_iteration_hook = None
pre_first_iteration_hook = None
pre_iteration_hook = None
property unit_registry
class simudo.physics.electro_optical_process.NonOverlappingTopHatBeerLambert(**kwargs)[source]

Bases: simudo.physics.electro_optical_process.AbsorptionAndRadiativeRecombinationEOPMixin, simudo.physics.electro_optical_process.RadiativeEOPMixin, simudo.physics.electro_optical_process.TwoBandEOPMixin, simudo.physics.electro_optical_process.ElectroOpticalProcess

Absorption or radiative recombination between src_band and dst_band. For absorption, src_band=VB and dst_band=CB, and vice versa for recombination.

Includes radiative recombination by default.

get_alpha(photon_energy)[source]

Return constant alpha, clipped by absorption bounds.

get_constant_alpha()[source]
get_radiative_recombination()[source]
name = 'beer_lambert'
class simudo.physics.electro_optical_process.NonOverlappingTopHatBeerLambertIB(**kwargs)[source]

Bases: simudo.physics.electro_optical_process.AbsorptionAndRadiativeRecombinationEOPMixin, simudo.physics.electro_optical_process.RadiativeEOPMixin, simudo.physics.electro_optical_process.TrapEOPMixin, simudo.physics.electro_optical_process.TwoBandEOPMixin, simudo.physics.electro_optical_process.ElectroOpticalProcess

Absorption between intermediate band and regular band.

Includes radiative recombination by default.

Based on [Strandberg2011].

get_alpha(photon_energy)[source]

This method is called to get Beer-Lambert absorption coefficient alpha at a particular photon energy. Must return a UFL quantity on the PDD mesh, or None.

User class must implement this.

get_constant_sigma_opt()[source]
get_radiative_pseudo_capture_coefficient()[source]

See eq:rad-u-form in doc/ib.lyx.

get_radiative_recombination()[source]
get_sigma_opt(photon_energy)[source]

Return constant sigma_opt, clipped by absorption bounds.

name = 'beer_lambert_IB'
class simudo.physics.electro_optical_process.NonRadiativeTrap(**kwargs)[source]

Bases: simudo.physics.electro_optical_process.DarkEOPMixin, simudo.physics.electro_optical_process.TrapEOPMixin, simudo.physics.electro_optical_process.TwoBandEOPMixin, simudo.physics.electro_optical_process.ElectroOpticalProcess

Shockley Read Hall trapping process. Typically, trap_band = IB. If you do not have an explicit Band object for the traps concentration, use SRHRecombination instead.

See doc/ib.lyx.

get_generation_user(band)[source]

This method is called to get the generation contribution to band band. Must return a UFL quantity on the PDD mesh.

User class may override this. By default, this method just calls get_generation_optical().

Sign convention: The returned value is positive or negative if the band gains or loses carriers respectively.

This method will be called for every band in the system. You are strongly encouraged to use get_band_generation_sign() to determine whether the process causes a gain or a loss of carriers in band band, and whether the band participates in the process at all.

name = 'nonradiative'
class simudo.physics.electro_optical_process.RadiativeEOPMixin[source]

Bases: object

Calculates properties involved in radiative processes, such as trapping or recombination.

Only works in non-degenerate condition exp((E_photon_min - mu_fi)/kT) >> 1. See [Strandberg2011], page 3, under Eq. 6.

get_absorption_bounds()[source]
get_strandberg_I()[source]
inside_absorption_bounds_conditional(E, value)[source]
class simudo.physics.electro_optical_process.SRHRecombination(**kwargs)[source]

Bases: simudo.physics.electro_optical_process.DarkEOPMixin, simudo.physics.electro_optical_process.TrapEOPMixin, simudo.physics.electro_optical_process.TwoBandEOPMixin, simudo.physics.electro_optical_process.ElectroOpticalProcess

SRH recombination. The destination band is the one losing carriers through recombination.

Typically, dst_band=CB and src_band=VB.

get_generation_user(band)[source]

This method is called to get the generation contribution to band band. Must return a UFL quantity on the PDD mesh.

User class may override this. By default, this method just calls get_generation_optical().

Sign convention: The returned value is positive or negative if the band gains or loses carriers respectively.

This method will be called for every band in the system. You are strongly encouraged to use get_band_generation_sign() to determine whether the process causes a gain or a loss of carriers in band band, and whether the band participates in the process at all.

get_tau(band)[source]
name = 'SRH'
tau_from_spatial = True
trap_band = None
class simudo.physics.electro_optical_process.TrapEOPMixin[source]

Bases: object

Calculates properties involved in trapping, such as u1, tau, etc.

trap_band

Band doing the trapping.

Type

Band

reg_band

Non-trap band. e.g. CB or VB.

Type

Band

classmethod easy_add_two_traps_to_pdd(pdd, name_prefix, top_band, bottom_band, trap_band, **kwargs)[source]
get_capture_coefficient(band=None)[source]

See [Shockley1952a] (3.5).

get_shockley_read_trap_generation(capture_coeff)[source]
get_sigma_th(band=None)[source]
get_tau(band=None)[source]
get_trap_concentration(band=None)[source]
get_trap_energy_level()[source]
get_trap_process_name(band)[source]
get_u1(band)[source]
get_v_th(band=None)[source]
reg_band
trap_spatial_get(name, band=None)[source]
class simudo.physics.electro_optical_process.TwoBandEOPMixin[source]

Bases: object

Convenience mixin representing a generation process across two bands.

Sign convention: As the generation process intensifies, the destination band gains more carriers. The source band may gain or lose carriers depending on its carrier type.

src_band

Source band (which may gain or lose a carrier depending on the sign).

Type

Band

dst_band

Destination band (which always gains a carrier).

Type

Band

get_band_generation_sign(band)[source]

Provides a non-trivial implementation of ElectroOpticalProcess.get_band_generation_sign() in the case of two active bands.

See TwoBandEOPMixin for the sign convention.

simudo.physics.heterojunction module

class simudo.physics.heterojunction.ThermionicHeterojunction(band: simudo.physics.poisson_drift_diffusion.Band, boundary: simudo.mesh.topology.FacetRegion)[source]

Bases: object

Thermionic emission heterojunction BC valid with parabolic bands in the Boltzmann approximation.

Parameters
  • band (Band) – Semiconductor band on which the BC is applied. Only MixedQflBand is currently supported.

  • boundary (FacetRegion) – Boundary on which to implement heterojunction boundary condition.

Notes

See V. Palankovski (2004), eq. 3.72 and K. Yang, J. R. East, G. I. Haddad, Solid State Electronics v.36 (3) p.321-330 (1993) K. Horio, H. Yanai, IEEE Trans. Elec. Devices v.37(4) p.1093-1098 (1990)

For a conduction band BC, band.spatial must have attribute “CB/vth” in the barrier region. Similarly for other bands.

Unlimited carrier flow from low to barrier region can be resolved, but due to precision issues, cannot resolve Delta_w producing carrier flows from barrier to low region with Delta_w larger than |ln(1e-16)| * kT in double precision

TODO: Add warning/comment that only works for nondegenerate bands

band: simudo.physics.poisson_drift_diffusion.Band
boundary: simudo.mesh.topology.FacetRegion
register()[source]

Apply boundary condition onto the band.

property vth

simudo.physics.material module

class simudo.physics.material.BadSimpleSiliconMaterial(**kwargs)[source]

Bases: simudo.physics.material.SimpleSiliconMaterial

Just an example of how to use inheritance to selectively modify properties of the superclass

get_dict()[source]

Construct dictionary of material parameters.

Returns

Dictionary where keys are add_rule() keys, and values are the values (expressions).

Return type

dict

name = 'badSi'
class simudo.physics.material.Material(**kwargs)[source]

Bases: simudo.util.setattr_init_mixin.SetattrInitMixin

Base material class.

Parameters
  • problem_data (problem_data.ProblemData, optional) – ProblemData instance (used to pull, for example, the temperature variable).

  • unit_registry (pint.UnitRegistry, optional) – Unit registry.

name

Material name.

Type

str, optional

dict
get_dict()[source]

Construct dictionary of material parameters.

Returns

Dictionary where keys are add_rule() keys, and values are the values (expressions).

Return type

dict

name = None
property pdd
register(name=None)[source]
property temperature
property unit_registry
class simudo.physics.material.SimpleSiliconMaterial(**kwargs)[source]

Bases: simudo.physics.material.Material

Very simple silicon material. No temperature dependences.

get_dict()[source]

Construct dictionary of material parameters.

Returns

Dictionary where keys are add_rule() keys, and values are the values (expressions).

Return type

dict

name = 'Si'

simudo.physics.optical module

class simudo.physics.optical.AbsorptionRangesHelper(**kwargs)[source]

Bases: simudo.util.setattr_init_mixin.SetattrInitMixin

Parameters
  • problem_data – Problem_data object.

  • inf_upper_bound – Upper bound on absorption to use instead of literal ‘inf’. By default 100 eV.

  • energy_unit – By default, eV.

property bands
property energy_unit
get_transition_bounds()[source]

Returns dictionary of (lower, upper) bounds for energy transitions. See get_transition_lower_bounds() for more.

get_transition_lower_bounds()[source]

Returns a dictionary of minimum transition lower bounds. The keys in the dictionary are frozensets {source_band_key, destination_band_key}.

property inf_upper_bound
property unit_registry
class simudo.physics.optical.Optical(**kwargs)[source]

Bases: simudo.physics.problem_data_child.DefaultProblemDataChildMixin, simudo.physics.poisson_drift_diffusion.GetToSaveMixin, simudo.util.setattr_init_mixin.SetattrInitMixin

Contains optical part of the problem. Note that unlike PDD, the optical fields are solved independent (self-consistently), so we do not have a big mixed space made up of all the photon flux fields.

Parameters
problem_data

Parent problem.

Type

ProblemData

mesh_data

Mesh data. Taken from problem_data if not specified.

Type

MeshData

fields

Dictionary of OpticalField objects.

Type

NameDict

spatial

Object managing boundary conditions and spatial quantities.

Type

spatial.Spatial

Phi_scale

This controls the scaling factor applied to light photon flux boundary conditions. This is particularly useful when doing a light ramp-up.

Type

dolfin.Constant

Phi_pddproj_space
Phi_scale
easy_add_field(key, photon_energy, direction, solid_angle=None)[source]
fields
get_to_save()[source]

Get dict of functions needed to restore a solution from file, or to save in a backtracking/adaptive solver.

The default implementation returns an empty NameDict.

Returns

NameDict of SaveItem.

Return type

NameDict

spatial
class simudo.physics.optical.OpticalField(**kwargs)[source]

Bases: simudo.util.setattr_init_mixin.SetattrInitMixin

A single optical field subproblem. This represents a scalar photon flux at a single wavelength and direction of propagation.

Parameters
  • optical (Optical) – Parent object.

  • key (str) – Name of optical field. Must be unique.

  • photon_energy (pint.Quantity) – Photon energy. Magnitude must be floating point constant.

  • direction (numpy.ndarray) – Direction of propagation. Must be a normalized vector.

  • solid_angle (float) – Solid angle spanned by this optical field. The sum of all solid angles at a given wavelength must sum up to 4\pi.

Phi

Photon flux field. This function is on the optical mesh.

Type

pint.Quantity wrapping dolfin.Function

alpha

Absorption/extinction coefficient. This quantity is on the optical mesh (and may be a result of a projection/interpolation from the PDD mesh).

Type

pint.Quantity wrapping expression

g

Additional generation (excluding -alpha*Phi). This quantity is on the optical mesh (and may be a result of a projection/interpolation from the PDD mesh).

Type

pint.Quantity wrapping expression

Phi_pddproj

Projected/interpolated version of Phi on the PDD mesh. To update the projection, call update_output().

Type

pint.Quantity of dolfin.Function

Phi_pddproj_clipped

Clipped version of Phi_pddproj that is always nonnegative.

Type

pint.Quantity wrapping expression

Notes

TODO: write down radiative transfer equation

Phi_pddproj
property Phi_pddproj_clipped
alpha
property function_subspace_registry
g
get_alpha_pdd_expr()[source]

This represents the extinction coefficient on the PDD mesh, as extracted from the poisson_drift_diffusion.ElectroOpticalProcess instances in electro_optical_processes.

get_g_pdd_expr()[source]

This represents the optical generation on the PDD mesh (excluding the loss through the extinction coefficient), as extracted from the poisson_drift_diffusion.ElectroOpticalProcess instances in electro_optical_processes.

get_subspace_descriptors_for_solution_space()[source]
property mesh_util
mixed_function_helper
property mixed_function_solution_object
property name
property pdd
property spatial
property unit_registry
update_input()[source]

Update input quantities (e.g. by projection onto optical mesh).

This updates alpha and g.

update_output()[source]

Update output quantities (e.g. by projecting onto PDD mesh).

This updates Phi_pddproj.

property vacuum_wavelength

Computes vacuum wavelength based on photon_energy. Can also be used to initialize that property, with the conversion being done automatically.

class simudo.physics.optical.OpticalFieldMSORTE(**kwargs)[source]

Bases: simudo.physics.optical1.OpticalFieldMSORTE, simudo.fem.function_space.WithSubfunctionsMixin, simudo.physics.optical.OpticalField, simudo.physics.poisson_drift_diffusion.GetToSaveMixin

get_essential_bcs()[source]
get_solution_function()[source]
get_to_save()[source]

Get dict of functions needed to restore a solution from file, or to save in a backtracking/adaptive solver.

The default implementation returns an empty NameDict.

Returns

NameDict of SaveItem.

Return type

NameDict

get_weak_form()[source]

simudo.physics.poisson_drift_diffusion module

class simudo.physics.poisson_drift_diffusion.Band(**kwargs)[source]

Bases: simudo.physics.poisson_drift_diffusion1.Band, simudo.fem.function_space.WithSubfunctionsMixin, simudo.physics.poisson_drift_diffusion.GetToSaveMixin, simudo.physics.poisson_drift_diffusion.TypicalFromPDDMixin, simudo.util.setattr_init_mixin.SetattrInitMixin

Represents a band where its carriers are at thermal equilibrium

with each other (such that a quasifermi level is well defined).

name

Name of this band. Must be unique among PoissonDriftDiffusion.bands as it is used as a key in that NameDict. By default simply an alias for key, so you do not need to set it.

Type

str

key

Unique key used to prefix subfunctions.

Type

str

pdd

Parent object.

Type

PoissonDriftDiffusion

u

Carrier density in this band.

qfl

Quasi-Fermi level, aka imref, of carriers in this band.

j

Current density through this band.

sign

Sign of the charge carriers; -1 for electrons, and +1 for holes.

mobility

Band mobility. By default taken from .spatial.

subdomain

Region name on which the band exists.

property g
get_essential_bcs()[source]
get_weak_form()[source]
property name
property phiqfl
phiqfl_to_u(phi_plus_qfl)[source]
qfl_to_u(qfl)[source]
subfunctions_info = ()
u_to_phiqfl(u)[source]
u_to_qfl(u)[source]
class simudo.physics.poisson_drift_diffusion.GetToSaveMixin[source]

Bases: object

get_to_save()[source]

Get dict of functions needed to restore a solution from file, or to save in a backtracking/adaptive solver.

The default implementation returns an empty NameDict.

Returns

NameDict of SaveItem.

Return type

NameDict

class simudo.physics.poisson_drift_diffusion.InitializeFromByAttributesMixin[source]

Bases: object

initialize_from(other, function_subspace_registry, **kwargs)[source]
class simudo.physics.poisson_drift_diffusion.IntermediateBand(**kwargs)[source]

Bases: simudo.physics.poisson_drift_diffusion.DegeneracyMixin, simudo.physics.poisson_drift_diffusion1.IntermediateBand, simudo.physics.poisson_drift_diffusion.Band

This represents an intermediate band with an energetically sharp density of states, where all number_of_states (N_I) states are concentrated at an energy level energy_level (E_I).

The number of carriers obeys Fermi-Dirac statistics. The defining relationship is therefore

u = N_I f_1\Big(s\cdot\big((w + q\phi) - E_I\big)/kT\Big)

where

Note that state degeneracy is handled through DegeneracyMixin.

number_of_states

Number of states in the intermediate band. The carrier concentration in this band can never be higher than this number. By default taken from spatial.

energy_level

Band energy level. By default inherited from DegeneracyMixin.energy_level.

use_constant_mobility

Use spatial variable "${band_name}/mobility0" as a constant mobility in the IB, neglecting the influence of filling fraction on the mobility. (default: False)

Type

bool

use_constant_mobility = False
class simudo.physics.poisson_drift_diffusion.MixedDensityNondegenerateBand(**kwargs)[source]

Bases: simudo.physics.poisson_drift_diffusion.InitializeFromByAttributesMixin, simudo.physics.poisson_drift_diffusion.MixedDensityBandMixin, simudo.physics.poisson_drift_diffusion.NondegenerateBand

class simudo.physics.poisson_drift_diffusion.MixedPoisson(**kwargs)[source]

Bases: simudo.physics.poisson_drift_diffusion.InitializeFromByAttributesMixin, simudo.physics.poisson_drift_diffusion.MixedMethodPoissonMixin, simudo.physics.poisson_drift_diffusion.Poisson

class simudo.physics.poisson_drift_diffusion.MixedQflBandMixin[source]

Bases: simudo.physics.poisson_drift_diffusion1.MixedQflBand

Mixed method for the drift-diffusion and continuity equations using quasi-fermi level and current density as the dynamical variables.

get_essential_bcs()[source]
get_to_save()[source]
get_weak_form()[source]
initialize_from_attributes = ('qfl', 'j')
mixedqfl_base_w
mixedqfl_debug_fill_from_boundary = True
mixedqfl_debug_fill_thresholds = (0.0, 0.0)
mixedqfl_debug_fill_with_zero_except_bc = False
mixedqfl_debug_quad_degree_g = 8
mixedqfl_debug_quad_degree_super = 20
mixedqfl_debug_use_bchack = False
mixedqfl_drift_diffusion_heterojunction_bc_term
mixedqfl_drift_diffusion_heterojunction_facet_region
property mixedqfl_drift_diffusion_jump_dS
class simudo.physics.poisson_drift_diffusion.MixedQflIntermediateBand(**kwargs)[source]

Bases: simudo.physics.poisson_drift_diffusion.InitializeFromByAttributesMixin, simudo.physics.poisson_drift_diffusion.MixedQflBandMixin, simudo.physics.poisson_drift_diffusion.IntermediateBand

class simudo.physics.poisson_drift_diffusion.MixedQflNondegenerateBand(**kwargs)[source]

Bases: simudo.physics.poisson_drift_diffusion.InitializeFromByAttributesMixin, simudo.physics.poisson_drift_diffusion.MixedQflBandMixin, simudo.physics.poisson_drift_diffusion.NondegenerateBand

class simudo.physics.poisson_drift_diffusion.NondegenerateBand(**kwargs)[source]

Bases: simudo.physics.poisson_drift_diffusion1.NondegenerateBand, simudo.physics.poisson_drift_diffusion.Band

This represents a nondegenerate band obeying Boltzmann statistics (instead of Fermi-Dirac as it would be for a proper degenerate band), with an effective density of states effective_density_of_states (N_0) at an energy level energy_level (E_0).

The defining relationship is

u = N_0 \exp\Big[s\cdot\big(E_0 - (w + q\phi)\big) / kT\Big]

where

effective_density_of_states

Band effective density of states. By default taken from spatial.

energy_level

Band effective energy level. By default taken from spatial.

property effective_energy_level

In a nondegenerate band, by default the energy_level is assumed to include degeneracy effects, so this just returns that attribute.

class simudo.physics.poisson_drift_diffusion.Poisson(**kwargs)[source]

Bases: simudo.physics.poisson_drift_diffusion1.Poisson, simudo.fem.function_space.WithSubfunctionsMixin, simudo.physics.poisson_drift_diffusion.GetToSaveMixin, simudo.util.setattr_init_mixin.SetattrInitMixin, simudo.physics.poisson_drift_diffusion.TypicalFromPDDMixin

Base class for Poisson part of the problem. You should instead look at one of the subclasses, such as MixedPoisson.

key

Unique key used to prefix subfunctions.

Type

str

pdd

Parent object.

Type

PoissonDriftDiffusion

phi

Electrostatic potential.

Type

pint.Quantity

E

Electric field.

Type

pint.Quantity

rho

Charge density.

Type

pint.Quantity

thermal_equilibrium_phi

Electrostatic potential at thermal equilibrium (i.e. when all qfls are equal to zero).

Type

pint.Quantity

property at_thermal_equilibrium
get_to_save()[source]

Get dict of functions needed to restore a solution from file, or to save in a backtracking/adaptive solver.

The default implementation returns an empty NameDict.

Returns

NameDict of SaveItem.

Return type

NameDict

key = 'poisson'
property permittivity
thermal_equilibrium_phi
class simudo.physics.poisson_drift_diffusion.PoissonDriftDiffusion(**kwargs)[source]

Bases: simudo.physics.problem_data_child.DefaultProblemDataChildMixin, simudo.physics.poisson_drift_diffusion.GetToSaveMixin, simudo.util.setattr_init_mixin.SetattrInitMixin

Parameters
problem_data

Parent problem.

Type

ProblemData

mesh_data

Mesh data. Taken from problem_data if not specified.

Type

MeshData

bands

Dictionary of band objects.

Type

NameDict

poisson

Poisson part of the problem.

Type

Poisson

electro_optical_processes

Dictionary of ElectroOpticalProcess instances, including dark generation/recombination mechanisms like SRH.

Type

NameDict

mesh_util

PDE utilities, many of which are (needlessly) mesh-specific.

Type

MeshUtil

mixed_function_helper

Mixed function and related registry.

Type

MixedFunctionHelper

add_band(cls, kwargs)[source]

Instantiate and add band. You probably want to use easy_add_band() instead.

bands
easy_add_band(name, band_type=None, sign='auto', subdomain=None)[source]

Shortcut for instantiating and adding a band.

Parameters
  • name (str) – Name of the band.

  • band_type (str or class or None) –

    Can be a string, or a band class (inheriting from Band). If it is a string, it serves as an alias as defined below:

    If None, the type will be deduced from the band name:

    • ”CB”, “VB” -> “nondegenerate”

    • ”IB” -> “intermediate”

  • sign (+1, -1, None, or "auto") –

    The sign of the charge carrier for this band (negative for electrons, positive for holes).

    • If “auto”, the sign will be deduced from the name of the band.

    • If None, the sign keyword argument will not be passed to be band object constructor.

  • subdomain (topology.CellRegion) – Subset of the domain where the band exists.

Returns

band – Band object.

Return type

Band

easy_add_electro_optical_process(cls, **kwargs)[source]
easy_add_electrostatic_potential_BC(facet_region, value)[source]
easy_auto_pre_solve(parameters=None)[source]
easy_create_newton_solver()[source]
electro_optical_processes
get_essential_bcs()[source]
get_solution_function()[source]
get_subproblem_children()[source]
get_subspace_descriptors_for_solution_space()[source]

Used by self.mixed_function_helper to build the mixed function space.

get_to_save()[source]

Get dict of functions needed to restore a solution from file, or to save in a backtracking/adaptive solver.

The default implementation returns an empty NameDict.

Returns

NameDict of SaveItem.

Return type

NameDict

get_weak_form()[source]
initialize_from(other_pdd)[source]
property kT

Shortcut for k_B T, where k_B is the Boltzmann constant, and T is the temperature (temperature).

mixed_function_helper
property mixed_function_space
poisson
spatial
property temperature

Temperature as taken from spatial.

class simudo.physics.poisson_drift_diffusion.SaveItem(**kwargs)[source]

Bases: simudo.util.setattr_init_mixin.SetattrInitMixin

file_save = True
name = None
solver_save = False
value = None

simudo.physics.problem_data module

class simudo.physics.problem_data.ProblemData(**kwargs)[source]

Bases: simudo.util.setattr_init_mixin.SetattrInitMixin

Parameters
  • goal (str) – Represents the goal of this problem. Must be "local charge neutrality", "thermal equilibrium", or "full" (representing full coupled solution).

  • unit_registry (pint.UnitRegistry) – Unit registry to use.

  • mesh_data (MeshData) – Mesh data to use by default in PoissonDriftDiffusion and Optical.

pdd

Poisson and electronic transport.

Type

PoissonDriftDiffusion

optical

Optics.

Type

Optical

function_space_cache
function_subspace_registry
property goal_abbreviated

return abbreviated goal, for logging tag purposes

optical
pdd

simudo.physics.problem_data_child module

class simudo.physics.problem_data_child.DefaultProblemDataChildMixin[source]

Bases: object

property function_space_cache
property function_subspace_registry
property mesh_data
mesh_util
property unit_registry

simudo.physics.steppers module

exception simudo.physics.steppers.NewtonBailoutException[source]

Bases: Exception

class simudo.physics.steppers.NonequilibriumCoupledConstantStepper(**kwargs)[source]

Bases: simudo.fem.adaptive_stepper.ConstantStepperMixin, simudo.physics.steppers.NonequilibriumCoupledStepper

class simudo.physics.steppers.NonequilibriumCoupledStepper(**kwargs)[source]

Bases: simudo.fem.adaptive_stepper.AdaptiveStepper

Adaptively solve a coupled poisson-drift diffusion-optical problem.

The optical problem can be solved self-consistently with the drift-diffusion problem.

Parameters
  • solution (ProblemData) – Solution on which to operate. This solution object will be progressively re-solved at each of the target parameter values.

  • selfconsistent_optics (bool) – If True, the optical problem will be re-solved at every Newton iteration, allowing for problems where optical absorption and carrier concentrations are interdependent.

  • output_writer (OutputWriter) – If output_writer is a string, it is used as a filename to be passed to the default OutputWriter object. If output_writer is an object inherited from OutputWriter, this object will be used instead. If None, then no output is written. Output will be written after each target_value is solved.

to_save_objects
user_make_solver(solution)[source]
user_solver(solution, parameter)[source]

This user-defined method must re-solve solution using parameter value parameter.

Must return boolean indicating whether the solver succeeded.

class simudo.physics.steppers.OpticalIntensityAdaptiveStepper(**kwargs)[source]

Bases: simudo.physics.steppers.NonequilibriumCoupledConstantStepper

Adaptively increase the optical intensity by increasing optical.Optical.Phi_scale.

constants
parameter_target_values
parameter_unit
step_size = 1e-30
update_parameter_failure_factor = 0.2
update_parameter_success_factor = 3
class simudo.physics.steppers.VoltageStepper(**kwargs)[source]

Bases: simudo.physics.steppers.NonequilibriumCoupledConstantStepper

Starting from an existing solution, which may be at thermal equilibrium or with previously applied bias of illumination, ramp the bias at one or more contacts.

step_size = 0.1
update_parameter_failure_factor = 0.5
update_parameter_success_factor = 1.5
user_apply_parameter_to_solution(solution, parameter_value)[source]

Module contents