-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault_parameters.py
37 lines (37 loc) · 1.05 KB
/
default_parameters.py
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
import numpy as np
sins = lambda x,y: np.sin(x-5)*np.sin(y-5)
cone = lambda x,y: -np.sqrt((x-5)**2+(y-5)**2)
# parabola = lambda x,y: -(x-5)**2-(y-5)**2
def parabola(x,y):
arr = -(x-5)**2-(y-5)**2
return arr
def pyramid(x, y):
ax,bx = x.min(),x.max()
ay,by = y.min(),y.max()
X,Y = 2*(x-ax)/(bx-ax)-1, 2*(y-ay)/(by-ay)-1
# testing if go to right side of pyramid
# X,Y = -X,-Y
pyramid = np.where(np.logical_and(Y<=X,Y<=-X),1+Y,X)
pyramid = np.where(np.logical_and(Y<=X,Y>=-X),1-X,pyramid)
pyramid = np.where(np.logical_and(Y>=X,Y<=-X),1+X,pyramid)
pyramid = np.where(np.logical_and(Y>=X,Y>=-X),1-Y,pyramid)
return 1*pyramid
parameters = {
"M": 5000,
"N": 10000,
"Lx": 10,
"Ly": 15,
"te": 0.00001,
"ta": 1,
"dt": 0.01,
"dx": 0.01,
"chemical": pyramid,
"taxis_strength": 1,
"speed": 0.1,
"n_states":2,
"state_ODE": lambda C,x,y: np.array([(C-x-y)/parameters["te"],(C-y)/parameters["ta"]]).T,
"lambda0": 1,
"initial_condition": "delta",
"dimension": 2,
"seed": 3
}