-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPyInitialConditions.py
More file actions
82 lines (80 loc) · 1.52 KB
/
PyInitialConditions.py
File metadata and controls
82 lines (80 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#%%
"""
This script consists of a single function designed to take out the
limit cycles for different values of Ct a a given value of Vplc
Used in conjunction with VplcCycle to generate a hybrid diagram of the open cell
"""
import sys
import os
import numpy as np
from scipy.io import savemat
auto_directory = "/home/huitzil/auto/07p/python"
sys.path.append(auto_directory)
from pathlib import Path
parentPath = str(Path(os.getcwd()).parent)
sys.path.append(parentPath)
# from newContFunctions import *
from auto import *
from auto import run, load, save, merge, relabel, cl, klb
from numpy import e, log, sqrt
# from Python.openCellZeroDimCt import params
#%% Initial conditions - BurstOpenCell
file = "AUTOBurstOpenCell"
model = load(file, constants = file)
run(
model,
IPS=-2,
ICP=['TIME'],
NMX=5000,
NPR=1000,
)
eq = run(
model,
IPS=1,
ICP=['Vplc'],
NMX=5000,
DS=1e-2,
DSMAX=1e-0,
UZSTOP={'Vplc': 1}
)
save(eq, 'eq')
cl()
#%% Initial conditions - OpenCell
file = "AUTOOpenCell"
model = load(file)
# run(
# model,
# IPS=-2,
# ICP=['TIME'],
# NMX=40000,
# )
eq = run(
model,
IPS=1,
ICP=['p'],
NMX=5000,
DS=3e-2,
DSMAX=1e-0,
UZSTOP={'p': 1}
)
save(eq, 'eq')
cl()
#%% Initial conditions - BurstClosedCell
file = "AUTOBurstClosedCell"
model = load(file)
run(
model,
IPS=-2,
ICP=['TIME'],
NMX=40000,
)
eq = run(
model,
IPS=1,
ICP=['Vplc'],
NMX=5000,
DS=1e-2,
DSMAX=1e-0,
UZSTOP={'Vplc': 1}
)
cl()