diff --git a/example_notebook.ipynb b/example_notebook.ipynb index 259ee11..9c9c296 100644 --- a/example_notebook.ipynb +++ b/example_notebook.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -30,6 +30,152 @@ "- string voltage\n", "- panels per string\n" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Voltage Drop\n", + "\n", + "The function voltage_drop returns the total ``voltage drop`` and the ``percentage`` from nominal." + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[12.96, 5.4]" + ] + }, + "execution_count": 2, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "jmk.voltage_drop(240, 100, '2/0')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The default material is copper, however this can be specified as aluminum by adding `material = 'al'` to the function." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[24.96, 10.4]" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "jmk.voltage_drop(240, 100, '2/0', material='al')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If there are parallel runs, we can add the `num_runs` to the function." + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[6.24, 2.6]" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "jmk.voltage_drop(240, 100, '2/0', material='al', num_runs=4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## PV Module" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The `panels_per_string` function calculates the maximum number of panels that can be in a single string using a max voltage constraint.\n", + "\n", + "The default assumes that the minimum temperature at the installation is the STC temperature of 25C." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "37" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "jmk.panels_per_string(1500,40)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If this isn't the case, then the temperature coefficient `beta` and minimum temperature of `temp` can be specified. The `beta` is typically negative indicating that as the temperature rises the Voc decreases." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "33" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "jmk.panels_per_string(1500,40,beta=-0.5,temp = 2)" + ] } ], "metadata": { diff --git a/jepl/init.ipynb b/jepl/init.ipynb index c3f6c51..dcbfab5 100644 --- a/jepl/init.ipynb +++ b/jepl/init.ipynb @@ -22,11 +22,11 @@ " data.to_sql(table, conn, if_exists='replace', index=False) \n", " conn.close()\n", "\n", - "def create_database(name,tables):\n", + "def create_database(name,tables): \n", " '''\n", " This function loops over the source data lists to create tables in the database.\n", " '''\n", - "\n", + " \n", " for i in range(len(tables)):\n", " db = tables[i][0]\n", " table = tables[i][1]\n", @@ -53,7 +53,7 @@ "create_database(db_name,CEC21_database)\n", "\n", "\n", - "db_name = 'cable.db'\n", + "db_name = 'jepl-cable.db'\n", "cable_database = [\n", " [db_name,'SW-Spec 25055','Tables/Manufacturer/SW-Spec-23055.csv'],\n", " ]\n",