You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mooi-Kickstart/test_waterstorage.ipynb

307 lines
6.3 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": 91,
"id": "9a36fb7b-b801-4b1a-a521-a975fce88a59",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"source": [
"from notepad import WaterStorage, Heatpump\n",
"\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 92,
"id": "a5ff1249-285b-486a-87ed-478f0bc19680",
"metadata": {},
"outputs": [],
"source": [
"ws = WaterStorage(\n",
" name='MyStorage',\n",
" max_power=10,\n",
" min_power=-10,\n",
" roundtrip_eff=0.90,\n",
" energy_density = 50 * 10e-3,\n",
" volume = 500,\n",
" lifetime = 25,\n",
" temperature = 368, #K\n",
" min_storagelevel = 5,\n",
" max_storagelevel = 23\n",
" \n",
")\n"
]
},
{
"cell_type": "code",
"execution_count": 93,
"id": "8df465b8-6ebb-4426-8d5f-3f476bb771ba",
"metadata": {},
"outputs": [],
"source": [
"ws.set_freq('15T')"
]
},
{
"cell_type": "code",
"execution_count": 94,
"id": "5fc7654b-47b3-4a4c-8a6e-e8bf358c3163",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'MyStorage',\n",
" 'id': 0,\n",
" 'max_power': 10,\n",
" 'min_power': -10,\n",
" 'modes': {'max': 10, 'min': -10},\n",
" 'roundtrip_eff': 0.9,\n",
" 'volume': 500,\n",
" 'lifetime': 25,\n",
" 'temperature': 368,\n",
" 'energy_density': 0.5,\n",
" 'max_storage_capacity': 250.0,\n",
" 'max_storagelevel': 23,\n",
" 'min_storagelevel': 5,\n",
" 'freq': '15T',\n",
" 'time_factor': 0.25}"
]
},
"execution_count": 94,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ws.__dict__\n"
]
},
{
"cell_type": "code",
"execution_count": 95,
"id": "134b463f-970f-4884-9e85-cd8afbf042b6",
"metadata": {},
"outputs": [],
"source": [
"ws.set_storagelevel(6)"
]
},
{
"cell_type": "code",
"execution_count": 96,
"id": "f3a0bda9-42c7-449c-8f64-addb478dda77",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"68.0"
]
},
"execution_count": 96,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ws.charging_power_limit"
]
},
{
"cell_type": "code",
"execution_count": 97,
"id": "ca46ed52-bb1a-49bc-8c2c-a3ebde535dcc",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"68.0"
]
},
"execution_count": 97,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ws.charge(100)\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 98,
"id": "e2c48c78-2efd-4877-a433-89607df23755",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'MyStorage',\n",
" 'id': 0,\n",
" 'max_power': 10,\n",
" 'min_power': -10,\n",
" 'modes': {'max': 10, 'min': -10},\n",
" 'roundtrip_eff': 0.9,\n",
" 'volume': 500,\n",
" 'lifetime': 25,\n",
" 'temperature': 368,\n",
" 'energy_density': 0.5,\n",
" 'max_storage_capacity': 250.0,\n",
" 'max_storagelevel': 23,\n",
" 'min_storagelevel': 5,\n",
" 'freq': '15T',\n",
" 'time_factor': 0.25,\n",
" 'storagelevel': 23}"
]
},
"execution_count": 98,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ws.__dict__"
]
},
{
"cell_type": "code",
"execution_count": 99,
"id": "dd3724af-d0bc-452d-8a34-d6355818dfd5",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"23"
]
},
"execution_count": 99,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ws.storagelevel"
]
},
{
"cell_type": "code",
"execution_count": 100,
"id": "be37c269-698b-44e5-8728-8b7951ed9d49",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"bounded_energy 2.0\n",
"new_cl 21.0\n",
"Hello\n"
]
},
{
"data": {
"text/plain": [
"8.0"
]
},
"execution_count": 100,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ws.discharge(8)"
]
},
{
"cell_type": "code",
"execution_count": 101,
"id": "ff2aea69-060c-4d30-992c-bd2039dd856a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"21.0"
]
},
"execution_count": 101,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ws.storagelevel"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8eb63454-86e7-4b99-8a16-8018f76b09e2",
"metadata": {},
"outputs": [],
"source": [
"# Test storage scenarios.If Storage is empty and charging is working\n",
"# If it is full, not overcharged\n",
"# Bunlari yoxladiq, discharge islemir ama ona baxmaq lazimdi sonra"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "621a8d5c-bc05-4f5f-9964-ef34fc87a244",
"metadata": {},
"outputs": [],
"source": [
"# Fluctuated demand, sink source a bax deyir onun ucun CSV file atacam\n",
"# Small simulations elemeliyem. 10 quarter hour in a row or 5 quarter hour in a row. This is related with set_freq (1/15). Produce some graphs"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "da624f30-c735-4e1a-941d-4da2f3c4e5d8",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}