Skip to content

Commit

Permalink
Allow adjustment of direct radiation
Browse files Browse the repository at this point in the history
  • Loading branch information
Halvor Lund committed Jun 10, 2024
1 parent 0c8afc9 commit 31a81ac
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions linerate/models/cigre207.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@

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(
Expand Down Expand Up @@ -49,7 +55,9 @@ 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
Expand Down

0 comments on commit 31a81ac

Please sign in to comment.