Skip to main content

SolarCell

Struct SolarCell 

Source
pub struct SolarCell {
    pub j_sc: f64,
    pub j0: f64,
    pub ideality: f64,
    pub r_series: f64,
    pub r_shunt: f64,
    pub temperature: f64,
    pub bandgap_ev: f64,
}
Expand description

Solar cell parameters (single-junction diode model).

Fields§

§j_sc: f64

Short-circuit current density Jsc (A/m²).

§j0: f64

Reverse saturation current density J0 (A/m²).

§ideality: f64

Ideality factor n (1..2).

§r_series: f64

Series resistance (Ohm·m²).

§r_shunt: f64

Shunt resistance (Ohm·m²).

§temperature: f64

Temperature (K).

§bandgap_ev: f64

Bandgap energy Eg (eV).

Implementations§

Source§

impl SolarCell

Source

pub fn new( j_sc: f64, j0: f64, ideality: f64, temperature: f64, r_series: f64, ) -> Self

Create a new solar cell with given parameters.

§Arguments
  • j_sc – Short-circuit current density (A/m²)
  • j0 – Reverse saturation current density (A/m²)
  • ideality – Ideality factor (1–2)
  • temperature – Temperature (K)
  • r_series – Series resistance (Ω·m²)
Source

pub fn silicon() -> Self

Typical silicon solar cell (AM1.5 illumination).

Source

pub fn gaas() -> Self

GaAs solar cell.

Source

pub fn thermal_voltage(&self) -> f64

Thermal voltage Vt = kT/q (V).

Source

pub fn current_density(&self, v: f64) -> f64

Diode current density (A/m²) at voltage V (including parasitic resistances).

Source

pub fn voc(&self) -> f64

Open circuit voltage Voc (V).

Source

pub fn fill_factor(&self) -> f64

Estimate fill factor (FF) using Ro = Jsc * Voc / J0-normalised formula.

Source

pub fn v_mpp(&self) -> f64

Maximum power point voltage Vmpp (V).

Source

pub fn p_max(&self) -> f64

Maximum power density (W/m²).

Source

pub fn efficiency(&self, irradiance: f64) -> f64

Power conversion efficiency at AM1.5 (1000 W/m² irradiance).

Source

pub fn sq_limit(bandgap_ev: f64) -> f64

Shockley-Queisser detailed balance limit efficiency for bandgap Eg (eV).

Uses a simplified analytical approximation.

Source

pub fn temp_coeff_voc(&self) -> f64

Temperature coefficient of Voc (V/K) — typically negative.

Trait Implementations§

Source§

impl Clone for SolarCell

Source§

fn clone(&self) -> SolarCell

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SolarCell

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.