From 8c0cde304f263c4379ed7e216e4856c814ff970a Mon Sep 17 00:00:00 2001 From: Halvor Lund Date: Mon, 10 Jun 2024 14:54:04 +0200 Subject: [PATCH] Allow adjustment of direct radiation --- linerate/models/cigre207.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linerate/models/cigre207.py b/linerate/models/cigre207.py index 4fe5407..ff76639 100644 --- a/linerate/models/cigre207.py +++ b/linerate/models/cigre207.py @@ -14,11 +14,13 @@ class Cigre207(ThermalModel): def __init__( - self, span: Span, weather: Weather, time: Date, include_diffuse_radiation: bool = True + self, span: Span, weather: Weather, time: Date, include_diffuse_radiation: bool = True, + direct_radiation_factor: float = 1.0 ): super().__init__(span, weather) self.time = time self.include_diffuse_radiation = include_diffuse_radiation + self.direct_radiation_factor = direct_radiation_factor @_copy_method_docstring(ThermalModel) def compute_joule_heating( @@ -49,7 +51,7 @@ def compute_solar_heating( ) sin_eta = switch_cos_sin(cos_eta) - I_B = cigre207.solar_heating.compute_direct_solar_radiation(sin_H_s, y) + I_B = self.direct_radiation_factor*cigre207.solar_heating.compute_direct_solar_radiation(sin_H_s, y) if self.include_diffuse_radiation: I_d = cigre207.solar_heating.compute_diffuse_sky_radiation(I_B, sin_H_s) F = self.span.ground_albedo