Python implementation of the DHLLDV slurry transport framework
Note that the equations are from the 3rd edition of the book 'Slurry Transport Fundamentals, A Historical Overview & The Delft Head Loss & Limit Deposit Velocity Framework', By Sape A. Miedema, Edited by Robert Ramsdell
Each model has a test suite, based on 'hand' calculations contained in the included Excel spreadsheet tests/tests.xls
In addition, DHLLDV Framework.xlsm, a spreadsheet developed by Sape Miedema, implements the framework, a simple pump and slurry system model, historical models and more.
Unless noted in a particular sub-directory, this project is licenced under the GNU Public License (GPL) 3.0. The current exceptions are as follows:
Download the source code:
PS C:\Users\you\PycharmProjects\DHLLDV>git clone https://github.com/rcriii42/DHLLDV.git DHLLDV
Change to the DHLLDV directory and create a virtual environment (not required but recommended):
PS C:\Users\you\PycharmProjects\DHLLDV>python -m venv .\env
Activate the virtual environment:
source env/bin/activate
env\scripts\activate.ps1
After activating the virtual environment, the command prompt will be preceded by (env)
.
Install the requirements:
(env) PS C:\Users\you\PycharmProjects\DHLLDV>pip install -r requirements.txt
Run the tests:
(venv) PS C:\Users\YOU\PycharmProjects\DHLLDV> pytest --cov-report term-missing --cov=DHLLDV
======================================================= test session starts ========================================================
platform win32 -- Python 3.10.2, pytest-7.2.0, pluggy-1.0.0
rootdir: C:\Users\YOU\PycharmProjects\DHLLDV
plugins: cov-4.0.0
collected 123 items
tests\test_DHLLDV_framework.py ...... [ 4%]
tests\test_DHLLDV_framework_graded.py ............... [ 17%]
tests\test_Framework_LDV.py ....... [ 22%]
tests\test_Pipe.py ................. [ 36%]
tests\test_PumpObj.py ............. [ 47%]
tests\test_SlurryObj.py .................... [ 63%]
tests\test_Wilson_V50.py ..... [ 67%]
tests\test_Wilson_stratified.py ...s.. [ 72%]
tests\test_heterogeneous.py ..... [ 76%]
tests\test_homogeneous.py .............. [ 87%]
tests\test_stratified.py ........ [ 94%]
tests\test_utils.py ....... [100%]
---------- coverage: platform win32, python 3.10.2-final-0 -----------
Name Stmts Miss Cover Missing
--------------------------------------------------------------
src\DHLLDV\DHLLDV_Utils.py 37 0 100%
src\DHLLDV\DHLLDV_constants.py 13 0 100%
src\DHLLDV\DHLLDV_framework.py 272 10 96% 138, 199, 233, 286-289, 309-310, 358, 470
src\DHLLDV\DriverObj.py 14 2 86% 23, 28
src\DHLLDV\PipeObj.py 155 31 80% 52, 88, 108, 146, 184, 208, 218, 226-251
src\DHLLDV\PumpObj.py 157 42 73% 56, 62, 82, 95, 127, 146, 160-197, 229
src\DHLLDV\SlurryObj.py 188 7 96% 51, 176, 181-190, 214, 216, 313
src\DHLLDV\__init__.py 0 0 100%
src\DHLLDV\heterogeneous.py 55 1 98% 146
src\DHLLDV\homogeneous.py 58 0 100%
src\DHLLDV\stratified.py 80 2 98% 171, 220
--------------------------------------------------------------
TOTAL 1029 95 91%
================================================== 122 passed, 1 skipped in 5.57s ==================================================
There is an interactive viewer that runs in a bokeh server, the following command will open a tab in your browser:
(env) PS C:\Users\YOU\PycharmProjects\DHLLDV> bokeh serve --show DHLLDV_viewer
The viewer has a top bar, and two tabs; a Slurry Tab and Pipeline Tab
The viewer allows you to adjust certain properties of the system:
Shows a particular pipeline, including a CSD dredge with two pumps.