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:
-
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.
-
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 script for Step 6
Section titled “Example script for Step 6”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]),]General form
Section titled “General form”The create_distribution function has the following form,
create_distribution(DistributionInput.Name, simToSim=[PDFtype], yearToYear=[PDFtype], stepToStep=[PDFtype])and contains three components:
- Name — the name of the parameter assigned with a distribution.
- Frequency — the frequency at which the distribution is applied, i.e., simToSim, yearToYear or stepToStep.
- 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.
Thermal coefficient of module power, ModuleEfficiencyTemperatureCoefficient
Uc, Uc
Uv, Uv
Frequency
Section titled “Frequency”PDF type
Section titled “PDF type”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.