Introduction
Introduction Statistics Contact Development Disclaimer Help
tadded fluid BC methods, testing stokes_law for dependence on CFD time step - s…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit 48692b733e6e121ddf0f6bd984db99ee677ba2cb
parent 3bac1089f971803928f003fba88be3c1b0433c46
Author: Anders Damsgaard <[email protected]>
Date: Fri, 2 May 2014 09:55:19 +0200
added fluid BC methods, testing stokes_law for dependence on CFD time step
Diffstat:
M doc/html/genindex.html | 24 ++++++++++++++++++++++--
M doc/html/objects.inv | 0
M doc/html/python_api.html | 69 ++++++++++++++++++++++++++++-…
M doc/html/searchindex.js | 4 ++--
M doc/pdf/sphere.pdf | 0
M python/sphere.py | 40 +++++++++++++++++++++++++++++…
M tests/stokes_law.py | 7 ++++---
7 files changed, 132 insertions(+), 12 deletions(-)
---
diff --git a/doc/html/genindex.html b/doc/html/genindex.html
t@@ -378,10 +378,30 @@
</dt>
+ <dt><a href="python_api.html#sphere.sim.setDEMstepsPerCFDstep">setDEMstepsPe…
+ </dt>
+
+
+ <dt><a href="python_api.html#sphere.sim.setFluidBottomFixedPressure">setFlui…
+ </dt>
+
+
+ <dt><a href="python_api.html#sphere.sim.setFluidBottomNoFlow">setFluidBottom…
+ </dt>
+
+
<dt><a href="python_api.html#sphere.sim.setFluidPressureModulation">setFluid…
</dt>
+ <dt><a href="python_api.html#sphere.sim.setFluidTopFixedPressure">setFluidTo…
+ </dt>
+
+
+ <dt><a href="python_api.html#sphere.sim.setFluidTopNoFlow">setFluidTopNoFlow…
+ </dt>
+
+
<dt><a href="python_api.html#sphere.sim.setGamma">setGamma() (sphere.sim met…
</dt>
t@@ -389,6 +409,8 @@
<dt><a href="python_api.html#sphere.sim.setMaxIterations">setMaxIterations()…
</dt>
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
<dt><a href="python_api.html#sphere.sim.setTheta">setTheta() (sphere.sim met…
</dt>
t@@ -401,8 +423,6 @@
<dt><a href="python_api.html#sphere.sim.shear">shear() (sphere.sim method)</…
</dt>
- </dl></td>
- <td style="width: 33%" valign="top"><dl>
<dt><a href="python_api.html#sphere.sim.sheardisp">sheardisp() (sphere.sim m…
</dt>
diff --git a/doc/html/objects.inv b/doc/html/objects.inv
Binary files differ.
diff --git a/doc/html/python_api.html b/doc/html/python_api.html
t@@ -1260,11 +1260,49 @@ best results precision and performance-wise are obtain…
of 0 and a low tolerance criteria value.</p>
<p>The default and recommended value is 0.0.</p>
<p>Other solver parameter setting functions: <a class="reference internal" hre…
-<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se…
+<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se…
+<a class="reference internal" href="#sphere.sim.setDEMstepsPerCFDstep" title="…
<a class="reference internal" href="#sphere.sim.setMaxIterations" title="spher…
</dd></dl>
<dl class="method">
+<dt id="sphere.sim.setDEMstepsPerCFDstep">
+<tt class="descname">setDEMstepsPerCFDstep</tt><big>(</big><em>ndem</em><big>)…
+<dd><p>A fluid solver parameter, the value of the maxiter parameter denotes the
+number of DEM time steps to be performed per CFD time step.</p>
+<p>The default value is 1.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="…
+</tr>
+</tbody>
+</table>
+<p>Other solver parameter setting functions: <a class="reference internal" hre…
+<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se…
+<a class="reference internal" href="#sphere.sim.setMaxIterations" title="spher…
+</dd></dl>
+
+<dl class="method">
+<dt id="sphere.sim.setFluidBottomFixedPressure">
+<tt class="descname">setFluidBottomFixedPressure</tt><big>(</big><big>)</big><…
+<dd><p>Set the lower boundary of the fluid domain to follow the fixed pressure
+value (Dirichlet) boundary condition.</p>
+<p>This is the default behavior for the boundary. See also
+<a class="reference internal" href="#sphere.sim.setFluidBottomNoFlow" title="s…
+</dd></dl>
+
+<dl class="method">
+<dt id="sphere.sim.setFluidBottomNoFlow">
+<tt class="descname">setFluidBottomNoFlow</tt><big>(</big><big>)</big><a class…
+<dd><p>Set the lower boundary of the fluid domain to follow the no-flow
+(Neumann) boundary condition.</p>
+<p>The default behavior for the boundary is fixed value (Dirichlet), see
+<a class="reference internal" href="#sphere.sim.setFluidBottomFixedPressure" t…
+</dd></dl>
+
+<dl class="method">
<dt id="sphere.sim.setFluidPressureModulation">
<tt class="descname">setFluidPressureModulation</tt><big>(</big><em>A</em>, <e…
<dd><p>Set the parameters for the sine wave modulating the fluid pressures
t@@ -1286,6 +1324,24 @@ at the top boundary. Note that a cos-wave is obtained w…
</dd></dl>
<dl class="method">
+<dt id="sphere.sim.setFluidTopFixedPressure">
+<tt class="descname">setFluidTopFixedPressure</tt><big>(</big><big>)</big><a c…
+<dd><p>Set the upper boundary of the fluid domain to follow the fixed pressure
+value (Dirichlet) boundary condition.</p>
+<p>This is the default behavior for the boundary. See also
+<a class="reference internal" href="#sphere.sim.setFluidTopNoFlow" title="sphe…
+</dd></dl>
+
+<dl class="method">
+<dt id="sphere.sim.setFluidTopNoFlow">
+<tt class="descname">setFluidTopNoFlow</tt><big>(</big><big>)</big><a class="h…
+<dd><p>Set the upper boundary of the fluid domain to follow the no-flow
+(Neumann) boundary condition.</p>
+<p>The default behavior for the boundary is fixed value (Dirichlet), see
+<a class="reference internal" href="#sphere.sim.setFluidTopFixedPressure" titl…
+</dd></dl>
+
+<dl class="method">
<dt id="sphere.sim.setGamma">
<tt class="descname">setGamma</tt><big>(</big><em>gamma</em><big>)</big><a cla…
<dd><p>Gamma is a fluid solver parameter, used for smoothing the pressure
t@@ -1303,7 +1359,8 @@ more averaging is introduced. A value of 0.0 disables al…
</tbody>
</table>
<p>Other solver parameter setting functions: <a class="reference internal" hre…
-<a class="reference internal" href="#sphere.sim.setBeta" title="sphere.sim.set…
+<a class="reference internal" href="#sphere.sim.setBeta" title="sphere.sim.set…
+<a class="reference internal" href="#sphere.sim.setDEMstepsPerCFDstep" title="…
</dd></dl>
<dl class="method">
t@@ -1325,7 +1382,8 @@ solver</td>
</tbody>
</table>
<p>Other solver parameter setting functions: <a class="reference internal" hre…
-<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se…
+<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se…
+and <a class="reference internal" href="#sphere.sim.setTolerance" title="spher…
</dd></dl>
<dl class="method">
t@@ -1347,7 +1405,8 @@ instabilities may be avoided with lower values.</p>
</tbody>
</table>
<p>Other solver parameter setting functions: <a class="reference internal" hre…
-<a class="reference internal" href="#sphere.sim.setBeta" title="sphere.sim.set…
+<a class="reference internal" href="#sphere.sim.setBeta" title="sphere.sim.set…
+<a class="reference internal" href="#sphere.sim.setDEMstepsPerCFDstep" title="…
</dd></dl>
<dl class="method">
t@@ -1367,7 +1426,7 @@ residual</td>
</tbody>
</table>
<p>Other solver parameter setting functions: <a class="reference internal" hre…
-<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se…
+<a class="reference internal" href="#sphere.sim.setTheta" title="sphere.sim.se…
<a class="reference internal" href="#sphere.sim.setMaxIterations" title="spher…
</dd></dl>
diff --git a/doc/html/searchindex.js b/doc/html/searchindex.js
t@@ -1 +1 @@
-Search.setIndex({objects:{"":{sphere:[5,0,1,""]},sphere:{status:[5,2,1,""],con…
-\ No newline at end of file
+Search.setIndex({objects:{"":{sphere:[5,0,1,""]},sphere:{status:[5,2,1,""],con…
+\ No newline at end of file
diff --git a/doc/pdf/sphere.pdf b/doc/pdf/sphere.pdf
Binary files differ.
diff --git a/python/sphere.py b/python/sphere.py
t@@ -2374,6 +2374,46 @@ class sim:
self.maxiter = numpy.array(1e4)
self.ndem = numpy.array(1)
+ def setFluidBottomNoFlow(self):
+ '''
+ Set the lower boundary of the fluid domain to follow the no-flow
+ (Neumann) boundary condition.
+
+ The default behavior for the boundary is fixed value (Dirichlet), see
+ :func:`setFluidBottomFixedPressure()`.
+ '''
+ self.bc_bot[0] = 1
+
+ def setFluidBottomFixedPressure(self):
+ '''
+ Set the lower boundary of the fluid domain to follow the fixed pressure
+ value (Dirichlet) boundary condition.
+
+ This is the default behavior for the boundary. See also
+ :func:`setFluidBottomNoFlow()`
+ '''
+ self.bc_bot[0] = 0
+
+ def setFluidTopNoFlow(self):
+ '''
+ Set the upper boundary of the fluid domain to follow the no-flow
+ (Neumann) boundary condition.
+
+ The default behavior for the boundary is fixed value (Dirichlet), see
+ :func:`setFluidTopFixedPressure()`.
+ '''
+ self.bc_top[0] = 1
+
+ def setFluidTopFixedPressure(self):
+ '''
+ Set the upper boundary of the fluid domain to follow the fixed pressure
+ value (Dirichlet) boundary condition.
+
+ This is the default behavior for the boundary. See also
+ :func:`setFluidTopNoFlow()`
+ '''
+ self.bc_top[0] = 0
+
def defaultParams(self,
mu_s = 0.4,
mu_d = 0.4,
diff --git a/tests/stokes_law.py b/tests/stokes_law.py
t@@ -8,7 +8,7 @@ import matplotlib.pyplot as plt
print("### Stokes test - single sphere sedimentation ###")
## Stokes drag
-orig = sphere.sim(sid = "stokes_law", fluid = True)
+orig = sphere.sim(sid = "stokes_law_DEMCFD1", fluid = True)
cleanup(orig)
orig.defaultParams()
orig.addParticle([0.5,0.5,1.46], 0.05)
t@@ -18,7 +18,8 @@ orig.defineWorldBoundaries([1.0,1.0,2.0])
orig.initFluid(mu = 8.9e-4)
#orig.initTemporal(total = 1.0, file_dt = 0.01)
#orig.initTemporal(total = 1.0e-1, file_dt = 5.0e-3)
-orig.initTemporal(total = 5.0, file_dt = 1.0e-2)
+#orig.initTemporal(total = 5.0, file_dt = 1.0e-2)
+orig.initTemporal(total = 1.0, file_dt = 1.0e-2)
#orig.time_file_dt = orig.time_dt
#orig.time_total = orig.time_dt*200
#orig.time_file_dt = orig.time_dt*10
t@@ -30,7 +31,7 @@ orig.vel[0,2] = -0.1
#orig.vel[0,2] = -0.001
#orig.setBeta(0.5)
orig.setTolerance(1.0e-4)
-orig.setDEMstepsPerCFDstep(100)
+#orig.setDEMstepsPerCFDstep(100)
orig.run(dry=True)
orig.run(verbose=True)
py = sphere.sim(sid = orig.sid, fluid = True)
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.