Skip to content

device

PV_Circuit_Model.device

Device

Bases: CircuitGroup

Wrapper class for CircuitGroup

Devices behave like CircuitGroups but are treated as atomic units during + and | operations to prevent subgroup flattening.

Parameters:

Name Type Description Default
subgroups Sequence[CircuitComponent]

Child components or groups.

required
connection str

"series" or "parallel" connection type.

'series'
location Optional[Sequence[float]]

XY location for layout.

None
rotation float

Rotation in degrees.

0
name Optional[str]

Optional name for lookup.

None

Returns:

Name Type Description
Device

The constructed device.

Example
from PV_Circuit_Model.device import Device
from PV_Circuit_Model.circuit_model import R
device = Device([R(1.0), R(2.0)], connection="series")

from_circuitgroup(comp, **kwargs) classmethod

Create a Device from an existing CircuitGroup.

This preserves the subgroup structure and connection type.

Parameters:

Name Type Description Default
comp CircuitGroup

Source group to wrap.

required
**kwargs Any

Forwarded to Device initialization.

{}

Returns:

Name Type Description
Device Device

New device with the same structure.

Example
from PV_Circuit_Model.device import Device
from PV_Circuit_Model.circuit_model import series, R
group = series(R(1.0), R(2.0))
device = Device.from_circuitgroup(group)
device.connection

Cell

Bases: Device

Solar cell device built from circuit subgroups.

Wraps a diode branch and optional series resistor with geometry and irradiance/temperature handling.

__init__(subgroups, connection='series', area=1, location=None, rotation=0, shape=None, name=None, temperature=25, Suns=1.0)

Initialize a solar cell device.

Computes geometry extents and prepares diode branches and sources.

Parameters:

Name Type Description Default
subgroups Sequence[CircuitComponent]

Child components for the cell.

required
connection str

"series" or "parallel" connection type.

'series'
area float

Active area multiplier.

1
location Optional[Sequence[float]]

XY location for layout.

None
rotation float

Rotation in degrees.

0
shape Optional[ndarray]

Polygon vertices for layout.

None
name Optional[str]

Optional name for lookup.

None
temperature float

Temperature in Celsius.

25
Suns float

Irradiance multiplier.

1.0

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.area

copy_values(cell2)

Copy temperature and diode branch parameters from another cell.

This performs a shallow parameter copy without altering topology.

Parameters:

Name Type Description Default
cell2 Cell

Source cell with matching structure.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
a = make_solar_cell()
b = make_solar_cell()
a.copy_values(b)
a.temperature == b.temperature

set_Suns(Suns)

Set irradiance multiplier and update current sources.

This updates CurrentSource scaling and caches.

Parameters:

Name Type Description Default
Suns float

Irradiance multiplier.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.set_Suns(2.0)
cell.Suns

set_temperature(temperature)

Set temperature for the cell and its components.

This updates diode thermal voltages and currents.

Parameters:

Name Type Description Default
temperature float

Temperature in Celsius.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.set_temperature(35)
cell.temperature

JL()

Return light-generated current density (J_L).

This sums the IL values of all CurrentSource elements.

Returns:

Name Type Description
float float

Current density (A/cm^2 equivalent).

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.JL()

IL()

Return total light-generated current (I_L).

This scales current density by the cell area.

Returns:

Name Type Description
float float

Total current in amperes.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.IL()

set_JL(JL, Suns=1.0, temperature=25)

Set reference light current density for the primary source.

This updates the first non-defect CurrentSource reference values.

Parameters:

Name Type Description Default
JL float

Reference current density.

required
Suns float

Reference irradiance multiplier.

1.0
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.set_JL(0.05)
cell.JL()

set_IL(IL, Suns=1.0, temperature=25)

Set reference light current using total current.

This converts total current to current density using area.

Parameters:

Name Type Description Default
IL float

Total light current.

required
Suns float

Reference irradiance multiplier.

1.0
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.set_IL(0.2)
cell.IL()

J0(n)

Return saturation current density for diodes with factor n.

Excludes intrinsic silicon and photon coupling diodes.

Parameters:

Name Type Description Default
n float

Ideality factor.

required

Returns:

Name Type Description
float float

Saturation current density.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.J0(n=1)

J01()

Return saturation current density for n=1 diodes.

This is a convenience wrapper around J0(n=1).

Returns:

Name Type Description
float float

Saturation current density.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.J01()

J02()

Return saturation current density for n=2 diodes.

This is a convenience wrapper around J0(n=2).

Returns:

Name Type Description
float float

Saturation current density.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.J02()

PC_J0(n)

Return photon-coupling diode saturation current density.

This sums photon coupling diodes with the given ideality factor.

Parameters:

Name Type Description Default
n float

Ideality factor.

required

Returns:

Name Type Description
float float

Saturation current density.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.PC_J0(n=1)

PC_J01()

Return photon-coupling diode saturation current density for n=1.

This is a convenience wrapper around PC_J0(n=1).

Returns:

Name Type Description
float float

Saturation current density.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.PC_J01()

PC_I0(n)

Return photon-coupling diode saturation current (area-scaled).

This scales the current density by the cell area.

Parameters:

Name Type Description Default
n float

Ideality factor.

required

Returns:

Name Type Description
float float

Saturation current in amperes.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.PC_I0(n=1)

PC_I01()

Return photon-coupling diode saturation current for n=1.

This is a convenience wrapper around PC_I0(n=1).

Returns:

Name Type Description
float float

Saturation current in amperes.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.PC_I01()

I0(n)

Return saturation current for diodes with factor n.

This scales the current density by the cell area.

Parameters:

Name Type Description Default
n float

Ideality factor.

required

Returns:

Name Type Description
float float

Saturation current in amperes.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.I0(n=1)

I01()

Return saturation current for n=1 diodes.

This is a convenience wrapper around I0(n=1).

Returns:

Name Type Description
float float

Saturation current in amperes.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.I01()

I02()

Return saturation current for n=2 diodes.

This is a convenience wrapper around I0(n=2).

Returns:

Name Type Description
float float

Saturation current in amperes.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.I02()

set_J0(J0, n, temperature=25)

Set saturation current density for the first matching diode.

This updates reference values and rescales for temperature.

Parameters:

Name Type Description Default
J0 float

Saturation current density.

required
n float

Ideality factor.

required
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.set_J0(1e-14, n=1)
cell.J01()

set_J01(J0, temperature=25)

Set saturation current density for n=1 diodes.

This is a convenience wrapper around set_J0.

Parameters:

Name Type Description Default
J0 float

Saturation current density.

required
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.set_J01(1e-14)
cell.J01()

set_J02(J0, temperature=25)

Set saturation current density for n=2 diodes.

This is a convenience wrapper around set_J0.

Parameters:

Name Type Description Default
J0 float

Saturation current density.

required
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.set_J02(1e-9)
cell.J02()

set_I0(I0, n, temperature=25)

Set saturation current for the first matching diode.

This converts to current density before calling set_J0.

Parameters:

Name Type Description Default
I0 float

Saturation current in amperes.

required
n float

Ideality factor.

required
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.set_I0(2e-14, n=1)
cell.I01()

set_I01(I0, temperature=25)

Set saturation current for n=1 diodes.

This is a convenience wrapper around set_I0.

Parameters:

Name Type Description Default
I0 float

Saturation current in amperes.

required
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.set_I01(2e-14)
cell.I01()

set_I02(I0, temperature=25)

Set saturation current for n=2 diodes.

This is a convenience wrapper around set_I0.

Parameters:

Name Type Description Default
I0 float

Saturation current in amperes.

required
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=2.0)
cell.set_I02(2e-9)
cell.I02()

set_PC_J0(J0, n, temperature=25)

Set photon-coupling diode saturation current density.

This updates the first matching photon-coupling diode.

Parameters:

Name Type Description Default
J0 float

Saturation current density.

required
n float

Ideality factor.

required
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(J01_photon_coupling=1e-14)
cell.set_PC_J0(1e-14, n=1)
cell.PC_J01()

set_PC_J01(J0, temperature=25)

Set photon-coupling diode saturation current density for n=1.

This is a convenience wrapper around set_PC_J0.

Parameters:

Name Type Description Default
J0 float

Saturation current density.

required
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(J01_photon_coupling=1e-14)
cell.set_PC_J01(1e-14)
cell.PC_J01()

set_PC_I0(I0, n, temperature=25)

Set photon-coupling diode saturation current.

This converts to current density before calling set_PC_J0.

Parameters:

Name Type Description Default
I0 float

Saturation current in amperes.

required
n float

Ideality factor.

required
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(J01_photon_coupling=1e-14, area=2.0)
cell.set_PC_I0(2e-14, n=1)
cell.PC_I01()

set_PC_I01(I0, temperature=25)

Set photon-coupling diode saturation current for n=1.

This is a convenience wrapper around set_PC_I0.

Parameters:

Name Type Description Default
I0 float

Saturation current in amperes.

required
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(J01_photon_coupling=1e-14, area=2.0)
cell.set_PC_I01(2e-14)
cell.PC_I01()

specific_Rs_cond()

Return specific series conductance.

Uses the configured series resistor when present.

Returns:

Name Type Description
float float

Specific series conductance.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rs=0.1)
cell.specific_Rs_cond()

Rs_cond()

Return series conductance scaled by area.

This scales the specific conductance by cell area.

Returns:

Name Type Description
float float

Series conductance.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rs=0.1, area=2.0)
cell.Rs_cond()

specific_Rs()

Return specific series resistance.

This is the inverse of specific series conductance.

Returns:

Name Type Description
float float

Specific series resistance.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rs=0.1)
cell.specific_Rs()

Rs()

Return series resistance scaled by area.

This is the inverse of series conductance.

Returns:

Name Type Description
float float

Series resistance.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rs=0.1, area=2.0)
cell.Rs()

set_rev_breakdown_V(V)

Set reverse breakdown voltage for the reverse diode.

This updates the reverse diode and invalidates IV caches.

Parameters:

Name Type Description Default
V float

Breakdown voltage shift.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.set_rev_breakdown_V(5.0)

set_specific_Rs_cond(cond)

Set specific series conductance.

Updates the series resistor if present.

Parameters:

Name Type Description Default
cond float

Specific series conductance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rs=0.1)
cell.set_specific_Rs_cond(20.0)
cell.specific_Rs_cond()

set_Rs_cond(cond)

Set series conductance scaled by area.

This converts to specific conductance before updating.

Parameters:

Name Type Description Default
cond float

Series conductance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rs=0.1, area=2.0)
cell.set_Rs_cond(10.0)
cell.Rs_cond()

set_specific_Rs(Rs)

Set specific series resistance.

This converts to conductance before updating.

Parameters:

Name Type Description Default
Rs float

Specific series resistance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rs=0.1)
cell.set_specific_Rs(0.05)
cell.specific_Rs()

set_Rs(Rs)

Set series resistance scaled by area.

This converts to specific resistance before updating.

Parameters:

Name Type Description Default
Rs float

Series resistance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rs=0.1, area=2.0)
cell.set_Rs(0.2)
cell.Rs()

specific_shunt_cond()

Return specific shunt conductance.

This sums shunt resistors in the diode branch.

Returns:

Name Type Description
float float

Specific shunt conductance.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rshunt=1e6)
cell.specific_shunt_cond()

shunt_cond()

Return shunt conductance scaled by area.

This scales the specific shunt conductance by area.

Returns:

Name Type Description
float float

Shunt conductance.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rshunt=1e6, area=2.0)
cell.shunt_cond()

specific_shunt_res()

Return specific shunt resistance.

This is the inverse of specific shunt conductance.

Returns:

Name Type Description
float float

Specific shunt resistance.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rshunt=1e6)
cell.specific_shunt_res()

shunt_res()

Return shunt resistance scaled by area.

This is the inverse of shunt conductance.

Returns:

Name Type Description
float float

Shunt resistance.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rshunt=1e6, area=2.0)
cell.shunt_res()

set_specific_shunt_cond(cond)

Set specific shunt conductance on the first non-defect resistor.

Only the first matching resistor is updated.

Parameters:

Name Type Description Default
cond float

Specific shunt conductance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rshunt=1e6)
cell.set_specific_shunt_cond(1e-5)
cell.specific_shunt_cond()

set_shunt_cond(cond)

Set shunt conductance scaled by area.

This converts to specific conductance before updating.

Parameters:

Name Type Description Default
cond float

Shunt conductance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rshunt=1e6, area=2.0)
cell.set_shunt_cond(1e-5)
cell.shunt_cond()

set_specific_shunt_res(Rsh)

Set specific shunt resistance.

This converts to conductance before updating.

Parameters:

Name Type Description Default
Rsh float

Specific shunt resistance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rshunt=1e6)
cell.set_specific_shunt_res(2e6)
cell.specific_shunt_res()

set_shunt_res(Rsh)

Set shunt resistance scaled by area.

This converts to specific resistance before updating.

Parameters:

Name Type Description Default
Rsh float

Shunt resistance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(Rshunt=1e6, area=2.0)
cell.set_shunt_res(2e6)
cell.shunt_res()

set_shape(wafer_format='M10', half_cut=True)

Update the cell shape and area from a wafer format.

This updates both the polygon and the area attribute.

Parameters:

Name Type Description Default
wafer_format str

Format key in wafer_formats.

'M10'
half_cut bool

If True, use half-cut geometry.

True

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell()
cell.set_shape(wafer_format="M10", half_cut=True)
cell.shape is not None

from_circuitgroup(comp, **kwargs) classmethod

Create a Cell from an existing CircuitGroup.

This preserves subgroup structure and connection type.

Parameters:

Name Type Description Default
comp CircuitGroup

Source group to wrap.

required
**kwargs Any

Forwarded to Cell initialization.

{}

Returns:

Name Type Description
Cell Cell

New cell with the same structure.

Example
from PV_Circuit_Model.device import Cell
from PV_Circuit_Model.circuit_model import series, R
group = series(R(1.0), R(2.0))
cell = Cell.from_circuitgroup(group, area=1.0)

Module

Bases: Device

Module composed of multiple cells or cell groups.

__init__(subgroups, connection='series', location=None, rotation=0, name=None, temperature=25, Suns=1.0)

Initialize a module.

Collects cell references and applies initial conditions.

Parameters:

Name Type Description Default
subgroups Sequence[CircuitComponent]

Child components/groups.

required
connection str

"series" or "parallel" connection type.

'series'
location Optional[Sequence[float]]

XY location for layout.

None
rotation float

Rotation in degrees.

0
name Optional[str]

Optional name for lookup.

None
temperature float

Temperature in Celsius.

25
Suns float

Irradiance multiplier.

1.0

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell, Module
module = Module([make_solar_cell() for _ in range(60)], connection="series")
module.connection

set_Suns(Suns)

Set irradiance on all cells in the module.

This delegates to each Cell's set_Suns method.

Parameters:

Name Type Description Default
Suns float

Irradiance multiplier.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell, Module
module = Module([make_solar_cell() for _ in range(60)], connection="series")
module.set_Suns(2.0)
module.cells[0].Suns

set_temperature(temperature)

Set temperature on all elements in the module.

This updates diode parameters and cached values.

Parameters:

Name Type Description Default
temperature float

Temperature in Celsius.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import make_solar_cell, Module
module = Module([make_solar_cell() for _ in range(60)], connection="series")
module.set_temperature(35)
module.temperature

from_circuitgroup(comp, **kwargs) classmethod

Create a Module from an existing CircuitGroup.

This preserves subgroup structure and connection type.

Parameters:

Name Type Description Default
comp CircuitGroup

Source group to wrap.

required
**kwargs Any

Forwarded to Module initialization.

{}

Returns:

Name Type Description
Module Module

New module with the same structure.

Example
from PV_Circuit_Model.device import make_solar_cell, Module
cell = make_solar_cell()
circuit_group = cell*60
from PV_Circuit_Model.device import Module
module = Module.from_circuitgroup(circuit_group)

set_interconnect_resistors(interconnect_conds=None)

set half-string resistors conductance.

Uses the module's aux["interconnect_conds"] when available.

Parameters:

Name Type Description Default
interconnect_conds list[float] | float | None

conductance value(s) to apply.

None
Example
from PV_Circuit_Model.device import make_module, make_solar_cell
cells = [make_solar_cell() for _ in range(60)]
module = make_module(cells, num_strings=3, num_cells_per_halfstring=20)
module.set_interconnect_resistors()

ByPassDiode

Bases: ReverseDiode

Reverse diode used as a module bypass element.

Parameters:

Name Type Description Default
I0 float

Saturation current.

1e-15
n float

Ideality factor.

1
V_shift float

Breakdown voltage shift.

0
max_I Optional[float]

Maximum current density for IV ranges.

None
tag Optional[str]

Optional identifier.

None
temperature float

Temperature in Celsius.

25

Returns:

Name Type Description
ByPassDiode

The constructed bypass diode.

Example
from PV_Circuit_Model.device import ByPassDiode
diode = ByPassDiode(I0=1e-12, n=1.0)

MultiJunctionCell

Bases: Device

Stacked multi-junction cell with optional series resistance.

Combines multiple Cell instances in series with shared geometry.

__init__(subcells=None, Rs=0.1, location=None, rotation=0, name=None, temperature=25, Suns=1.0)

Initialize a multi-junction cell.

Builds subgroup structure from subcells when not provided.

Parameters:

Name Type Description Default
subcells Optional[List[Cell]]

List of cell subcomponents.

None
Rs float

Specific series resistance used when building subgroups.

0.1
location Optional[Sequence[float]]

XY location for layout.

None
rotation float

Rotation in degrees.

0
name Optional[str]

Optional name for lookup.

None
temperature float

Temperature in Celsius.

25
Suns Union[float, Sequence[float]]

Irradiance multiplier(s).

1.0

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)

set_Suns(Suns)

Set irradiance on each subcell.

Accepts either a single value or per-cell list.

Parameters:

Name Type Description Default
Suns Union[float, Sequence[float]]

Single value or per-cell list.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.set_Suns(2.0)

set_JL(JL, Suns=1.0, temperature=25)

Set reference current density for each subcell.

Accepts either a single value or per-cell list.

Parameters:

Name Type Description Default
JL Union[float, Sequence[float]]

Single value or per-cell list.

required
Suns float

Reference irradiance multiplier.

1.0
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.set_JL(0.05)

set_IL(IL, Suns=1.0, temperature=25)

Set reference current for each subcell.

Accepts either a single value or per-cell list.

Parameters:

Name Type Description Default
IL Union[float, Sequence[float]]

Single value or per-cell list.

required
Suns float

Reference irradiance multiplier.

1.0
temperature float

Reference temperature in Celsius.

25

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.set_IL(0.1)

set_temperature(temperature)

Set temperature for all subcells.

This updates diode thermal voltages and sources.

Parameters:

Name Type Description Default
temperature float

Temperature in Celsius.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.set_temperature(35)
mj.temperature

specific_Rs_cond()

Return specific series conductance.

Uses the series resistor when present.

Returns:

Name Type Description
float float

Specific series conductance.

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.specific_Rs_cond()

Rs_cond()

Return series conductance scaled by area.

This scales the specific conductance by area.

Returns:

Name Type Description
float float

Series conductance.

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.Rs_cond()

specific_Rs()

Return specific series resistance.

This is the inverse of specific series conductance.

Returns:

Name Type Description
float float

Specific series resistance.

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.specific_Rs()

Rs()

Return series resistance scaled by area.

This is the inverse of series conductance.

Returns:

Name Type Description
float float

Series resistance.

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.Rs()

set_specific_Rs_cond(cond)

Set specific series conductance.

Updates the series resistor if present.

Parameters:

Name Type Description Default
cond float

Specific series conductance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.set_specific_Rs_cond(20.0)
mj.specific_Rs_cond()

set_Rs_cond(cond)

Set series conductance scaled by area.

This delegates to set_specific_Rs_cond.

Parameters:

Name Type Description Default
cond float

Series conductance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.set_Rs_cond(10.0)
mj.Rs_cond()

set_specific_Rs(Rs)

Set specific series resistance.

This converts to conductance before updating.

Parameters:

Name Type Description Default
Rs float

Specific series resistance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.set_specific_Rs(0.05)
mj.specific_Rs()

set_Rs(Rs)

Set series resistance scaled by area.

This converts to conductance before updating.

Parameters:

Name Type Description Default
Rs float

Series resistance.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
cell = make_solar_cell()
mj = MultiJunctionCell(subcells=[cell.clone(),cell.clone()], Rs=0.1)
mj.set_Rs(0.2)
mj.Rs()

from_circuitgroup(comp, **kwargs) classmethod

Create a MultiJunctionCell from a CircuitGroup.

Computes effective series resistance when possible.

Parameters:

Name Type Description Default
comp CircuitGroup

Source group to wrap.

required
**kwargs Any

Forwarded to MultiJunctionCell initialization.

{}

Returns:

Name Type Description
MultiJunctionCell MultiJunctionCell

New multi-junction cell instance.

Raises:

Type Description
NotImplementedError

If connection is not "series" or types mismatch.

Example
from PV_Circuit_Model.device import MultiJunctionCell, make_solar_cell
from PV_Circuit_Model.circuit_model import series, R
cell = make_solar_cell()
group = cell*3 + R(0.1)
mj = MultiJunctionCell.from_circuitgroup(group)

set_Suns(circuit_group, suns)

Set irradiance scaling for all current sources in a group.

This updates each CurrentSource with the new Suns multiplier.

Warning

This function is monkey-patched onto CircuitGroup at import time.

Parameters:

Name Type Description Default
circuit_group CircuitGroup

Group to update.

required
suns float

Irradiance multiplier to apply.

required

Returns:

Type Description
None

None

Example
from PV_Circuit_Model.device import set_Suns, Cell_
cell = Cell_()
set_Suns(cell, suns=2.0)
cell.findElementType("CurrentSource")[0].Suns #2

Dbypass(*args, **kwargs)

This is a shorthand constructor for :class:ByPassDiode.

draw_cells(self, display=True, show_names=False, colour_bar=False, colour_what='Vint', show_module_names=False, fontsize=9, min_value=None, max_value=None, title='Cells Layout', colormap=cm.plasma)

Draw cell polygons with optional color mapping.

Supports individual cells, circuit groups, or lists of devices. When display=False, it returns geometry and value arrays without plotting.

Warning

This function is monkey-patched onto CircuitGroup at import time.

Parameters:

Name Type Description Default
self Union[CircuitGroup, Cell, List[Any]]

Target object(s) to draw.

required
display bool

If True, render a matplotlib figure.

True
show_names bool

If True, annotate each cell with its name.

False
colour_bar bool

If True, show a colorbar when plotting.

False
colour_what Optional[str]

Metric to color by (e.g., "Vint").

'Vint'
show_module_names bool

If True, annotate module names.

False
fontsize int

Font size for labels.

9
min_value Optional[float]

Min color scale value.

None
max_value Optional[float]

Max color scale value.

None
title str

Figure title.

'Cells Layout'
colormap Any

Matplotlib colormap.

plasma

Returns:

Type Description
Tuple[List[ndarray], List[Any], List[float], List[float], List[float]]

Tuple[List[np.ndarray], List[Any], List[float], List[float], List[float]]: shapes, names, Vints, EL_Vints, Is.

Example
from PV_Circuit_Model.device_analysis import Module_
module = Module_()
_ = draw_cells(module, display=False)

wafer_shape(L=1, W=1, ingot_center=None, ingot_diameter=None, format=None, half_cut=True)

Generate a wafer polygon and area.

Supports rectangular or ingot-trimmed shapes and standard formats.

Parameters:

Name Type Description Default
L float

Wafer length.

1
W float

Wafer width.

1
ingot_center Optional[Sequence[float]]

Circle center for trimming.

None
ingot_diameter Optional[float]

Circle diameter for trimming.

None
format Optional[str]

Wafer format key from wafer_formats.

None
half_cut bool

If True, apply half-cut geometry.

True

Returns:

Type Description
Dict[str, Any]

Dict[str, Any]: Dictionary with keys "shape" (np.ndarray) and "area".

Example
from PV_Circuit_Model.device import wafer_shape
shape_area = wafer_shape(format="M10", half_cut=True)

make_solar_cell(Jsc=0.042, J01=1e-14, J02=2e-09, Rshunt=1000000.0, Rs=0.0, area=1.0, shape=None, breakdown_V=-10, J0_rev=1e-13, J01_photon_coupling=0.0, Si_intrinsic_limit=True, **kwargs)

Create a default solar cell circuit model.

Builds a diode network with source, shunt, and optional series elements.

Parameters:

Name Type Description Default
Jsc float

Short-circuit current density.

0.042
J01 float

Saturation current density for n=1 diode.

1e-14
J02 float

Saturation current density for n=2 diode.

2e-09
Rshunt float

Shunt resistance.

1000000.0
Rs float

Series resistance.

0.0
area float

Active area.

1.0
shape Optional[ndarray]

Polygon vertices for layout.

None
breakdown_V float

Reverse breakdown voltage (positive magnitude).

-10
J0_rev float

Reverse diode saturation current density.

1e-13
J01_photon_coupling float

Photon coupling diode J01 value.

0.0
Si_intrinsic_limit bool

If True, add intrinsic Si diode.

True
**kwargs Any

Extra parameters for intrinsic diode.

{}

Returns:

Name Type Description
Cell Cell

Constructed solar cell instance.

Example
from PV_Circuit_Model.device import make_solar_cell
cell = make_solar_cell(area=1.5)

make_module(cells, num_strings=3, num_cells_per_halfstring=24, halfstring_resistor=0.02, I0_rev=1e-12, butterfly=False)

Create a module from a list of cells.

Cells are arranged into strings and optional butterfly layout.

Parameters:

Name Type Description Default
cells List[Cell]

Flat list of cells to place into strings.

required
num_strings int

Number of parallel strings.

3
num_cells_per_halfstring int

Cells per half-string.

24
halfstring_resistor float

Series resistor per half-string.

0.02
I0_rev float

Reverse diode saturation current.

1e-12
butterfly bool

If True, use butterfly layout.

False

Returns:

Name Type Description
Module Module

Constructed module instance.

Example
from PV_Circuit_Model.device import make_module, make_solar_cell
cells = [make_solar_cell() for _ in range(60)]
module = make_module(cells, num_strings=3, num_cells_per_halfstring=20)

make_butterfly_module(cells, num_strings=3, num_cells_per_halfstring=24, halfstring_resistor=0.02, I0_rev=1e-12)

Create a butterfly-layout module from a list of cells.

This is a convenience wrapper around make_module.

Parameters:

Name Type Description Default
cells List[Cell]

Flat list of cells to place into strings.

required
num_strings int

Number of parallel strings.

3
num_cells_per_halfstring int

Cells per half-string.

24
halfstring_resistor float

Series resistor per half-string.

0.02
I0_rev float

Reverse diode saturation current.

1e-12

Returns:

Name Type Description
Module Module

Constructed module instance.

Example
from PV_Circuit_Model.device import make_butterfly_module, make_solar_cell
cells = [make_solar_cell() for _ in range(120)]
module = make_butterfly_module(cells, num_strings=3, num_cells_per_halfstring=20)
module.connection

get_cell_col_row(self, fuzz_distance=0.2)

Compute a grid index mapping for cell positions.

This groups cell centers based on a position tolerance.

Warning

This function is monkey-patched onto CircuitGroup at import time.

Parameters:

Name Type Description Default
self CircuitGroup

Group to analyze.

required
fuzz_distance float

Position rounding factor for grouping.

0.2

Returns:

Type Description
Tuple[ndarray, ndarray, ndarray]

Tuple[np.ndarray, np.ndarray, np.ndarray]: cell_col_row, map, inverse_map.

Example
from PV_Circuit_Model.device import make_module, make_solar_cell
cells = [make_solar_cell() for _ in range(60)]
module = make_module(cells, num_strings=3, num_cells_per_halfstring=20)
cell_col_row, map_, inverse_map = module.get_cell_col_row()