Introduction
Introduction Statistics Contact Development Disclaimer Help
tbetter approximate the actual steady-state pressure distribution when theres a…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit 23718477440c1df19d0f2da9b54e78177cac7c19
parent a9b29db26630b8d195836748f6e4440f02195224
Author: Anders Damsgaard <[email protected]>
Date: Thu, 25 Sep 2014 10:52:41 +0200
better approximate the actual steady-state pressure distribution when theres a …
Diffstat:
M python/sphere.py | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/python/sphere.py b/python/sphere.py
t@@ -2646,11 +2646,26 @@ class sim:
dtype=numpy.float64) * p
if (hydrostatic == True):
+
dz = self.L[2]/self.num[2]
- for iz in range(self.num[2]-1):
- z = dz*iz + 0.5*dz
- depth = self.L[2] - z
- self.p_f[:,:,iz] = p + (depth-dz) * rho * -self.g[2]
+ # Zero pressure gradient from grid top to top wall, linear pressure
+ # distribution from top wall to grid bottom
+ if (self.nw == 1):
+ wall0_iz = int(self.w_x[0]/(self.L[2]/self.num[2]))
+ self.p_f[:,:,wall0_iz:] = p
+
+ for iz in numpy.arange(wall0_iz - 1):
+ z = dz*iz + 0.5*dz
+ depth = self.w_x[0] - z
+ self.p_f[:,:,iz] = p + (depth-dz) * rho * -self.g[2]
+
+ # Linear pressure distribution from grid top to grid bottom
+ else:
+ for iz in numpy.arange(self.num[2] - 1):
+ z = dz*iz + 0.5*dz
+ depth = self.L[2] - z
+ self.p_f[:,:,iz] = p + (depth-dz) * rho * -self.g[2]
+
self.v_f = numpy.zeros((self.num[0], self.num[1], self.num[2], self.nd…
dtype=numpy.float64)
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.