tadd baseval value and close plot - sphere - GPU-based 3D discrete element meth… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit baccdebb417b7ec876b2637f5ef5e1f4fe3e5ad0 | |
parent d590ec7ff4e6d393e1d59bd998443ce9f0cea345 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 20 Jan 2015 11:41:32 +0100 | |
add baseval value and close plot | |
Diffstat: | |
M python/sphere.py | 8 +++++--- | |
1 file changed, 5 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -5191,7 +5191,7 @@ class sim: | |
:type baseval: float | |
:param A: The fluctuation amplitude | |
:type A: float | |
- :param phi: The phase shift [t] | |
+ :param phi: The phase shift [s] | |
:type phi: float | |
:param xlabel: The label for the x axis | |
:type xlabel: str | |
t@@ -5209,6 +5209,8 @@ class sim: | |
filename = self.sid + '-sin.' + outformat | |
plt.savefig(filename) | |
print(filename) | |
+ plt.clf() | |
+ plt.close(fig) | |
def setTopWallNormalStressModulation(self, A, f, plot=True): | |
''' | |
t@@ -5229,7 +5231,7 @@ class sim: | |
self.sigma0_mod_f[0] = f | |
if plot: | |
- plotSinFunction(A, f, phi=0.0, | |
+ self.plotSinFunction(self.w_sigma0[0], A, f, phi=0.0, | |
xlabel='$t$ [s]', ylabel='$\\sigma_0$ [Pa]') | |
def disableTopWallNormalStressModulation(self): | |
t@@ -5263,7 +5265,7 @@ class sim: | |
self.p_mod_phi[0] = phi | |
if plot: | |
- plotSinFunction(A, f, phi=0.0, | |
+ self.plotSinFunction(self.p_f[0,0,-1], A, f, phi=0.0, | |
xlabel='$t$ [s]', ylabel='$p_f$ [Pa]') | |
def disableFluidPressureModulation(self): |