summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-05-19 04:09:01 +0400
committereug-vs <eugene@eug-vs.xyz>2022-05-19 04:18:02 +0400
commit9f6331b437f32ae9422a190aad27bb1fc92f9bfc (patch)
treebbfa93b2f7139e7f83cfaf0cd9ce09993671e671
parentbd5b9c012a3a91ef9260ca89596b1e13d0c5bb4f (diff)
downloadCFD-SIMPLE-9f6331b437f32ae9422a190aad27bb1fc92f9bfc.tar.gz
feat: add more labels
-rw-r--r--src/simple.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/simple.py b/src/simple.py
index 9a3aa31..524e6fb 100644
--- a/src/simple.py
+++ b/src/simple.py
@@ -183,6 +183,10 @@ class SIMPLE:
self.plt.remove()
self.patch = axes.add_patch(Rectangle((0, 0), *reversed(self.bfs_size)))
+ axes.set_title('Velocity field (normalized)')
+ plt.suptitle(f'Avg mass source per grid point = {self.avg_error()}')
+ plt.xlabel('X')
+ plt.ylabel('Y')
u, v = self.u, self.v
if normalize:
@@ -199,5 +203,6 @@ class SIMPLE:
scale=30,
cmap='inferno'
)
- self.colorbar = plt.colorbar()
+ self.colorbar = plt.colorbar(label='Pressure')
+
plt.pause(0.0001)