Fixed minor bugs
This commit is contained in:
parent
87e2918ffd
commit
700ff6093e
3 changed files with 16 additions and 9 deletions
|
@ -20,6 +20,8 @@ config.read("config.ini")
|
||||||
|
|
||||||
inp = pathlib.Path(config.get("post", "inp"))
|
inp = pathlib.Path(config.get("post", "inp"))
|
||||||
root = pathlib.Path(config.get("swash", "out"))
|
root = pathlib.Path(config.get("swash", "out"))
|
||||||
|
out = pathlib.Path(config.get("plot", "out"))
|
||||||
|
out.mkdir(exist_ok=True)
|
||||||
|
|
||||||
|
|
||||||
def data(var):
|
def data(var):
|
||||||
|
@ -52,4 +54,4 @@ ani = animation.FuncAnimation(
|
||||||
fig, animate, frames=wl[:, 0].size, interval=20, blit=True
|
fig, animate, frames=wl[:, 0].size, interval=20, blit=True
|
||||||
)
|
)
|
||||||
|
|
||||||
plt.show(block=True)
|
ani.save(out.joinpath("anim.mp4"))
|
||||||
|
|
|
@ -21,6 +21,7 @@ config.read("config.ini")
|
||||||
inp = pathlib.Path(config.get("post", "inp"))
|
inp = pathlib.Path(config.get("post", "inp"))
|
||||||
root = pathlib.Path(config.get("swash", "out"))
|
root = pathlib.Path(config.get("swash", "out"))
|
||||||
out = pathlib.Path(config.get("plot", "out"))
|
out = pathlib.Path(config.get("plot", "out"))
|
||||||
|
out.mkdir(exist_ok=True)
|
||||||
|
|
||||||
|
|
||||||
def data(var):
|
def data(var):
|
||||||
|
|
|
@ -54,14 +54,14 @@ U = np.sqrt(np.abs(phi_u[1]))
|
||||||
G = H / U
|
G = H / U
|
||||||
th_eta_u = np.angle(phi_eta_u[1])
|
th_eta_u = np.angle(phi_eta_u[1])
|
||||||
|
|
||||||
# R1 = np.sqrt(
|
|
||||||
# (np.abs(phi_eta[1]) + np.abs(phi_u[1]) - 2 * np.abs(phi_eta_u[1]))
|
|
||||||
# / (np.abs(phi_eta[1]) + np.abs(phi_u[1]) + 2 * np.abs(phi_eta_u[1]))
|
|
||||||
# )
|
|
||||||
R = np.sqrt(
|
R = np.sqrt(
|
||||||
(1 + G**2 - 2 * G * np.cos(th_eta_u))
|
(np.abs(phi_eta[1]) + np.abs(phi_u[1]) - 2 * np.abs(phi_eta_u[1]))
|
||||||
/ (1 + G**2 + 2 * G * np.cos(th_eta_u))
|
/ (np.abs(phi_eta[1]) + np.abs(phi_u[1]) + 2 * np.abs(phi_eta_u[1]))
|
||||||
)
|
)
|
||||||
|
#R = np.sqrt(
|
||||||
|
# (1 + G**2 - 2 * G * np.cos(th_eta_u))
|
||||||
|
# / (1 + G**2 + 2 * G * np.cos(th_eta_u))
|
||||||
|
#)
|
||||||
|
|
||||||
if config.has_option("post", "compare"):
|
if config.has_option("post", "compare"):
|
||||||
inp_comp = pathlib.Path(config.get("post", "compare"))
|
inp_comp = pathlib.Path(config.get("post", "compare"))
|
||||||
|
@ -88,9 +88,13 @@ if config.has_option("post", "compare"):
|
||||||
th_eta_u_ = np.angle(phi_eta_u_[1])
|
th_eta_u_ = np.angle(phi_eta_u_[1])
|
||||||
|
|
||||||
R_ = np.sqrt(
|
R_ = np.sqrt(
|
||||||
(1 + G_**2 - 2 * G_ * np.cos(th_eta_u_))
|
(np.abs(phi_eta_[1]) + np.abs(phi_u_[1]) - 2 * np.abs(phi_eta_u_[1]))
|
||||||
/ (1 + G_**2 + 2 * G_ * np.cos(th_eta_u_))
|
/ (np.abs(phi_eta_[1]) + np.abs(phi_u_[1]) + 2 * np.abs(phi_eta_u_[1]))
|
||||||
)
|
)
|
||||||
|
#R_ = np.sqrt(
|
||||||
|
# (1 + G_**2 - 2 * G_ * np.cos(th_eta_u_))
|
||||||
|
# / (1 + G_**2 + 2 * G_ * np.cos(th_eta_u_))
|
||||||
|
#)
|
||||||
|
|
||||||
|
|
||||||
# Plotting
|
# Plotting
|
||||||
|
|
Loading…
Reference in a new issue