Skip to content

Syntax

Distributions are applied in Step 6 of the Jupyter Notebook.

Below is an example script for defining distributions, and then a description of the necessary syntax.

Before then, two words of advice:

  1. Minimise the number of distributions within an analysis. If a distribution does not contribute significantly to the overall uncertainty, then it is merely slowing down the analysis.

  2. Use ‘stepToStep’ distributions sparingly. They will slow down the calculations because they require new variables to be generated at every time step of every year of every simulation.

Example: Applying distributions to GHI and availability.

distribution_list = [
create_distribution(DistributionInput.GHI, simToSim=['Gaussian', 1, 0.025]),
create_distribution(DistributionInput.Availability, yearToYear=['Weibull', 1, 0.024, 1.6, False]),
]

The create_distribution function has the following form,

create_distribution(DistributionInput.Name, simToSim=[PDFtype], yearToYear=[PDFtype], stepToStep=[PDFtype])

and contains three components:

  1. Name — the name of the parameter assigned with a distribution.
  2. Frequency — the frequency at which the distribution is applied, i.e., simToSim, yearToYear or stepToStep.
  3. PDFtype — the type of distribution function.

The syntax for each are shown below.

Distributions can be applied to these parameters using the listed syntax for the Name.

ParameterSyntaxGHI, GHIWind speed, WindSpeedAmbient temperature, TemperatureDiffuse fraction modifier, DiffuseFractionCircumsolar fraction modifier, CircumsolarFractionRated power at STC, ModulePower

Thermal coefficient of module power, ModuleEfficiencyTemperatureCoefficient

Albedo, AlbedoRear structural shading factor, RearStructuralShadingFactorRear transmission factor, RearTransmissionFactorSpectral correction factor, SpectralCorrectionFront soiling, SoilingFrontRear soiling, SoilingRear

Uc, Uc

Uv, Uv

Alpha, AlphaCell-to-cell mismatch, CellToCellMismatchModule-to-module mismatch, ModuleToModuleMismatchString-to-string mismatch, StringToStringMismatchInverter-to-inverter mismatch, InverterToInverterMismatchInverter efficiency, InverterEfficiencyUndulating ground modifier, UndulatingGroundModifierDC health, DCHealthAvailability, AvailabilityCurtailment, CurtailmentYield modifier, YieldModifierAnnual degradation rate, AnnualDegradationRate
When distribution appliedSyntaxStart of each simulation, simToSimStart of each year, yearToYearStart of each time step, stepToStepPDF typeSyntaxConstant, [‘Constant’,, x0]Gaussian, [‘Gaussian’,, x0,, σ]Skewed Gaussian, [‘SkewedGaussian’,, ξ,, ω,, α]Weibull, [‘Weibull’,, x0,, λ,, k,, p=1]Arbitrary, [‘Arbitrary’,, [x1,, x2,, … xn],, [PDF1,, PDF2,, …,, PDFn] ]

The variables are defined in PDF types.

Weibull function: Enter True or False for the final argument. This dictates whether p is +1 (True) or –1 (False).

Arbitrary function: The values of x₁… xₙ must be in ascending order. The values of PDF cannot be negative.