Commit 7fcb2c02 authored by Paul Schultz's avatar Paul Schultz
Browse files

removed sim data

parent 8d0bf09e
This diff is collapsed.
......@@ -209,7 +209,7 @@ def network_rhs_numba(y, t):
text_file.write("indptr=np.array({})".format(indptr.tolist()))
text_file.write("\n")
text_file.write("indices=np.array({})".format(indices.tolist()))
text_file.write("\n")
text_file.write("\n\n")
text_file.write(def_network_rhs_string)
from __psdcache__.compile_function import network_rhs_numba
......@@ -220,14 +220,14 @@ if __name__ == "__main__":
node_list = list()
node_list.append(SwingEquationNode(3, infeed=1.))
node_list.append(SwingEquationNode(3, infeed=-1.1))
node_list.append(SwingEquationNode(3, infeed=-1))
Y = -8.j * np.ones((2, 2), dtype=np.complex128)
Y[0, 0] *= -1.
Y[1, 1] *= -1.
rhs = define_network_rhs(node_list, Y)
nrhs = define_network_rhs_codegen(node_list, Y)
#rhs = define_network_rhs(node_list, Y)
rhs = define_network_rhs_codegen(node_list, Y)
#
# for i in range(10):
# ic = np.random.rand(6)
......
......@@ -3,7 +3,7 @@
import numpy as np
from numba import njit
import os
from complex_current_and_nodes import SwingEquationNode,define_network_rhs,define_network_rhs_codegen, define_root_rhs
from complex_current_and_nodes import SwingEquationNode,define_network_rhs,define_network_rhs_codegen, define_root_rhs_omega
try:
import baobap as bao
......@@ -39,7 +39,7 @@ def define_gen_rc(brp, rhs, init=None, method="krylov"):
init = np.ones(3 * system_size, dtype=np.float64) * 0.5
def generate_run_conditions(batch, run):
root_rhs = define_root_rhs(2 * system_size, rhs)
root_rhs = define_root_rhs_omega(2 * system_size, rhs)
from scipy.optimize import root
print "start root"
result = root(root_rhs, init, method="{}".format(method))
......@@ -117,7 +117,7 @@ def main(sim_dir=default_dir, create_test_data=True, run_test=True, flag_baobab=
fig = plt.figure()
ax = fig.gca(projection='3d')
for k in range(3):
for k in range(brp.system_dimension):
ax.plot(states[:, k], states[:, brp.system_dimension+k], states[:, 2*brp.system_dimension+k])
ax.set_xlabel(r"$\Re$ V")
ax.set_ylabel(r"$\Im$ V")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment