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: f64Short-circuit current density Jsc (A/m²).
j0: f64Reverse saturation current density J0 (A/m²).
ideality: f64Ideality factor n (1..2).
r_series: f64Series resistance (Ohm·m²).
r_shunt: f64Shunt resistance (Ohm·m²).
temperature: f64Temperature (K).
bandgap_ev: f64Bandgap energy Eg (eV).
Implementations§
Source§impl SolarCell
impl SolarCell
Sourcepub fn new(
j_sc: f64,
j0: f64,
ideality: f64,
temperature: f64,
r_series: f64,
) -> Self
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²)
Sourcepub fn thermal_voltage(&self) -> f64
pub fn thermal_voltage(&self) -> f64
Thermal voltage Vt = kT/q (V).
Sourcepub fn current_density(&self, v: f64) -> f64
pub fn current_density(&self, v: f64) -> f64
Diode current density (A/m²) at voltage V (including parasitic resistances).
Sourcepub fn fill_factor(&self) -> f64
pub fn fill_factor(&self) -> f64
Estimate fill factor (FF) using Ro = Jsc * Voc / J0-normalised formula.
Sourcepub fn efficiency(&self, irradiance: f64) -> f64
pub fn efficiency(&self, irradiance: f64) -> f64
Power conversion efficiency at AM1.5 (1000 W/m² irradiance).
Sourcepub fn sq_limit(bandgap_ev: f64) -> f64
pub fn sq_limit(bandgap_ev: f64) -> f64
Shockley-Queisser detailed balance limit efficiency for bandgap Eg (eV).
Uses a simplified analytical approximation.
Sourcepub fn temp_coeff_voc(&self) -> f64
pub fn temp_coeff_voc(&self) -> f64
Temperature coefficient of Voc (V/K) — typically negative.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SolarCell
impl RefUnwindSafe for SolarCell
impl Send for SolarCell
impl Sync for SolarCell
impl Unpin for SolarCell
impl UnsafeUnpin for SolarCell
impl UnwindSafe for SolarCell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more