aboutsummaryrefslogtreecommitdiff
path: root/fullswof-utils
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2021-12-17 18:27:24 +0000
committerPaul Garlick <pgarlick@tourbillion-technology.com>2021-12-17 18:27:24 +0000
commit3635b05eb67217a24ccb40f92723d728e464d592 (patch)
treebb378c6b22f3c3d19ed18628a98f60e15d8ba4b5 /fullswof-utils
parentb86da1bea4b8a30a85870f2ad45e621de7679cec (diff)
downloadfullSWOF-utils-3635b05eb67217a24ccb40f92723d728e464d592.tar.gz
fullswof-utils: Add script to monitor convergence history.
* fullswof-utils/specificPoints.py: New file.
Diffstat (limited to 'fullswof-utils')
-rwxr-xr-xfullswof-utils/specificPoints.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/fullswof-utils/specificPoints.py b/fullswof-utils/specificPoints.py
new file mode 100755
index 0000000..eb96eb7
--- /dev/null
+++ b/fullswof-utils/specificPoints.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+from matplotlib.ticker import MultipleLocator
+
+def detach_display():
+ t, x, y, h, u, v = np.loadtxt(
+ 'hu_specific_points.dat', delimiter='\t', unpack=True)
+ fig, ax = plt.subplots()
+ plt.plot(t,h, label='elevation')
+ plt.xlabel('t / s')
+ plt.ylabel('h / m')
+ ax.yaxis.set_minor_locator(MultipleLocator(0.2))
+ plt.grid(True, which='minor')
+ plt.show()
+
+if os.fork():
+ # parent
+ pass
+else:
+ # child
+ detach_display()