tadd script to batch generate fluid pressure plots - sphere - GPU-based 3D disc… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 154931cb6724d3203804a5168d5cfc4cf670d512 | |
parent 79e929cf878cfeb92124cb866ddc68e370d2da35 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 16 Apr 2015 09:59:14 +0200 | |
add script to batch generate fluid pressure plots | |
Diffstat: | |
A python/halfshear-darcy-fluid-press… | 33 +++++++++++++++++++++++++++… | |
1 file changed, 33 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/python/halfshear-darcy-fluid-pressures.py b/python/halfshear-darcy… | |
t@@ -0,0 +1,33 @@ | |
+#!/usr/bin/env python | |
+import sphere | |
+import shutil | |
+ | |
+import seaborn as sns | |
+#sns.set(style='ticks', palette='Set2') | |
+#sns.set(style='ticks', palette='colorblind') | |
+sns.set(style='ticks', palette='Set2') | |
+sns.despine() # remove chartjunk | |
+ | |
+ | |
+sim = sphere.sim(fluid=True) | |
+ | |
+def plotpressures(sid): | |
+ sim.id(sid) | |
+ outformat = 'pdf' | |
+ sim.visualize('fluid-pressure',outformat=outformat, figsize=[3.74, 3.14]) | |
+ filename = sid + '-fluid-pressure.' + outformat | |
+ shutil.copyfile(filename, '/home/adc/articles/own/2/graphics/' + filename) | |
+ print(filename) | |
+ | |
+ | |
+sids = [ | |
+'halfshear-darcy-sigma0=20000.0-k_c=3.5e-15-mu=1.797e-06-velfac=1.0-shear', | |
+'halfshear-darcy-sigma0=20000.0-k_c=3.5e-14-mu=1.797e-06-velfac=1.0-shear', | |
+'halfshear-darcy-sigma0=20000.0-k_c=3.5e-13-mu=1.797e-06-velfac=1.0-shear', | |
+ | |
+'halfshear-darcy-sigma0=20000.0-k_c=3.5e-15-mu=1.797e-07-velfac=1.0-shear', | |
+'halfshear-darcy-sigma0=20000.0-k_c=3.5e-15-mu=1.797e-08-velfac=1.0-shear'#, | |
+] | |
+ | |
+for sid in sids: | |
+ plotpressures(sid) |