Skip to content

Commit

Permalink
Included ODE based Tx line equations
Browse files Browse the repository at this point in the history
  • Loading branch information
aaliqureshi committed Mar 2, 2024
1 parent 6203731 commit 5afd89e
Show file tree
Hide file tree
Showing 14 changed files with 1,931 additions and 16 deletions.
457 changes: 457 additions & 0 deletions andes/cases/SMIB_Chow/ANDES_Chow_Out_Inductance.csv

Large diffs are not rendered by default.

457 changes: 457 additions & 0 deletions andes/cases/SMIB_Chow/ANDES_Chow_Out_RL_Line.csv

Large diffs are not rendered by default.

Binary file added andes/cases/SMIB_Chow/SMIB_Mod.xlsx
Binary file not shown.
Binary file added andes/cases/SMIB_Chow/SMIB_Mod_B.xlsx
Binary file not shown.
Binary file added andes/cases/SMIB_Chow/SMIB_Mod_Tx.xlsx
Binary file not shown.
Binary file added andes/cases/SMIB_Chow/SMIB_RL_Line.xlsx
Binary file not shown.
204 changes: 204 additions & 0 deletions andes/cases/SMIB_Chow/Save_data.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import andes"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Working directory: \"/home/aaliqureshi/andes/andes/cases/SMIB_Chow\"\n",
"> Loaded config from file \"/home/aaliqureshi/.andes/andes.rc\"\n",
"> Loaded generated Python code in \"/home/aaliqureshi/.andes/pycode\".\n",
"Generated code for <PQ> is stale.\n",
"Numerical code generation (rapid incremental mode) started...\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Generating code for 1 models on 8 processes.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Saved generated pycode to \"/home/aaliqureshi/.andes/pycode\"\n",
"> Reloaded generated Python code of module \"pycode\".\n",
"Generated numerical code for 1 models in 0.1786 seconds.\n",
"Parsing input file \"./SMIB_RL_Line.xlsx\"...\n",
"Input file parsed in 0.4110 seconds.\n",
"System internal structure set up in 0.0289 seconds.\n",
"-> System connectivity check results:\n",
" No islanded bus detected.\n",
" System is interconnected.\n",
" Each island has a slack bus correctly defined and enabled.\n",
"\n",
"-> Power flow calculation\n",
" Numba: Off\n",
" Sparse solver: KLU\n",
" Solution method: NR method\n",
"Power flow initialized in 0.0045 seconds.\n",
"0: |F(x)| = 0.9236039498\n",
"1: |F(x)| = 0.1578673997\n",
"2: |F(x)| = 0.0019952715\n",
"3: |F(x)| = 3.351401032e-07\n",
"Converged in 4 iterations in 0.0052 seconds.\n",
"Report saved to \"SMIB_RL_Line_out.txt\" in 0.0008 seconds.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"-> Single process finished in 0.9327 seconds.\n"
]
}
],
"source": [
"ss = andes.run(\"./SMIB_RL_Line.xlsx\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"ss.TDS.config.tf = 15"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\n",
"-> Time Domain Simulation Summary:\n",
"Sparse Solver: KLU\n",
"Simulation time: 0.0-15 s.\n",
"Fixed step size: h=33.33 ms. Shrink if not converged.\n",
"Initialization for dynamics completed in 0.0259 seconds.\n",
"Initialization was successful.\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "39ef888f0aa44a73835f1938100ac2da",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
" 0%| | 0/100 [00:00<?, ?%/s]"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"<Fault Fault_1>: Applying fault on Bus (idx=3) at t=6.0 sec.\n",
"<Fault Fault_1>: Clearing fault on Bus (idx=3) at t=6.1 sec.\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Simulation to t=15.00 sec completed in 0.3628 seconds.\n",
"Outputs to \"SMIB_RL_Line_out.lst\" and \"SMIB_RL_Line_out.npz\".\n",
"Outputs written in 0.0026 seconds.\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ss.TDS.run()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"CSV data saved to \"ANDES_Chow_Out_RL_Line.csv\".\n"
]
},
{
"data": {
"text/plain": [
"'ANDES_Chow_Out_RL_Line.csv'"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ss.TDS.plt.export_csv(\"ANDES_Chow_Out_RL_Line.csv\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "andes",
"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.8.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Empty file.

0 comments on commit 5afd89e

Please sign in to comment.