Metadata-Version: 2.4
Name: FluidSolve
Version: 0.9.3
Summary: Fluid Dynamics Calculations
Author-email: DOSprojects <mail@domain.com>
License: MIT License
        
        Copyright (c) 2021 maserasgroup-repo
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://github.com/DOSprojects/fluidsolve.git
Project-URL: documentation, https://fluidsolve.readthedocs.io/en/latest/index.html
Project-URL: repository, https://github.com/DOSprojects/fluidsolve.git
Project-URL: changelog, https://github.com/DOSprojects/fluidsolve/blob/main/CHANGELOG.rst
Keywords: python,fluid dynamics,engineering,physics,pint,fluids,calculation,process engineering,mechanical engineering
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: mpl_interactions
Requires-Dist: fluids
Requires-Dist: pint
Requires-Dist: thermo
Requires-Dist: scipy
Provides-Extra: dev
Requires-Dist: pylint; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: doc
Requires-Dist: sphinx; extra == "doc"
Requires-Dist: sphinx-rtd-theme; extra == "doc"
Requires-Dist: sphinx-gallery; extra == "doc"
Requires-Dist: sphinx-toolbox; extra == "doc"
Requires-Dist: docutils==0.20; extra == "doc"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

******
Readme
******

Description
===========

This Python module is meant to facilitate the calculations of head losses in circuits an the selection of suitable pomps.
It is built on **Fluids** `https://pypi.org/project/fluids/ <https://pypi.org/project/fluids/>`__,
**Thermo** `https://pypi.org/project/thermo/ <https://pypi.org/project/thermo/>`__
and **Pint** `https://pypi.org/project/Pint/ <https://pypi.org/project/Pint/>`__.

Use Cases
=========

* easy calculation of head losses
* pump working point determination
* visualisation of pump and circuit curves and working point
* orifice dimensioning

.. figure:: https://github.com/DOSprojects/fluidsolve/raw/main/doc/source/_images/basic.png
    :width: 45%

    Calculations

.. figure:: https://github.com/DOSprojects/fluidsolve/raw/main/doc/source/_images/plotserial.png
    :width: 45%

    Interactive Plot


The Fluid Solve tool
====================

This is a tool of toolkit, not a user friendly appication to do headloss calculations.
Thus the calculations scripts need to be written in Python.
Although this is all relative simple code, some knowledge of python will be necessary.
We will use Python (at least version 3.10) with some additional libraries.
If you install it via ``pip`` (see below), these dependencies will be installed together with the tool, 

Usage
=====

This module contains a number of functionalities:

* Medium definition.
* Material definition.
* Component definition.
* Pump definition.
* Path definition (consisting of one ore more components).
* Network definition (consisting of a network of connected components).
* Pump and component selection (from catalogue)
* Plotting (static or interactive) Q-H graphs.
* Orifice dimensioning and other utility tools.

Take a look at the included examples for more info.

**IMPORTANT NOTE:**

In order to reduce typing there is only one namespace: fluidsolve.
So when in the documentation there is: ``fluidsolve.extplot.QHcurve``, you have to type ``fluidsolve.QHcurve``. 
Or when you ``from fluidsolve import *``, you simply type ``QHcurve``.

Installation
============

fluidsolve is just a Python package, so:

    .. code-block:: console

        pip install fluidsolve

Step by step installation (basic)
=======================================

Two things are needed: a Python environment and an editor to create and run yous scripts.
For the python enviromnment, the most simple way is to download and install a Python interpreter.
As en editor one has a lot of options, but I would suggest something like Notepad++ or VSCode.

Every Python setup will do. But as an example the procedure below should work on windows.

* create on D: following map structure(this will be the loacation where you place your calculation scripts)

::

    D:\
    └── fluidsolve\

* Download a python interpreter from `https://www.python.org/downloads/windows/ <https://www.python.org/downloads/windows/>`__; choose Windows installer (64-bit)
* Double click to install; make sure to add the interpreter to path.
* Download Visual Studio Code (vscode) from `https://code.visualstudio.com/ <https://code.visualstudio.com/>`__; 
* Double click to install
* set the default terminal
    * Press Ctrl+Shift+P (or F1) to open the Command Palette.
    * To search for Terminal Settings type: *Terminal: Select Default Profile*
    * choose *command prompt*
* Install some vscode extensions:
    * Python
* Select Python default interpreter
    * Press Ctrl+Shift+P (or F1) to open the Command Palette.
    * To search for Terminal Settings type: *Python: select interpreter*
    * choose the interpreter
* To test the interpreter: open a terminal and type: *python --version*
* Install library (fluidsolve is just a Python package)
    * in the terminal:

    .. code-block:: console

        pip install fluidsolve

Step by step installation (virtual environment)
===============================================

When you already have a Python environment, or you want to separate this form other python environments, 
you have to add some steps in the procedure before, just before installing the fluidsolve library.
The complete procedure becomes (for details see above):

* create on D: following map structure

::

    D:\
    └── fluidsolve\
        └── ... (rest of the files)


* Download a python interpreter from `https://www.python.org/downloads/windows/ <https://www.python.org/downloads/windows/>`__; choose Windows installer (64-bit)
* Double click to install; make sure to add the interpreter to path.
* Download Visual Studio Code (vscode) from `https://code.visualstudio.com/ <https://code.visualstudio.com/>`__; 
* Double click to install
* set the default terminal
    * Press Ctrl+Shift+P (or F1) to open the Command Palette.
    * To search for Terminal Settings type: *Terminal: Select Default Profile*
    * choose *command prompt*
* Install some vscode extensions:
    * Python
    * Pylint
    * ...
* Setup a virtual environment
    * Open the Command Palette (Ctrl+Shift+P), search for **Python: Create Environment**
    * Select venv
    * Enter the python interpreter
    * if in dev mode: select optional dependencies (check them all - also doc and test); also see the development section.
    * After selecting the Python interpreter version, a notification will show the progress of the environment creation.
    * The environment folder (.venv) will appear in your workspace.
    * Open the Command Palette (Ctrl+Shift+P), search for **Python: Select Interpreter**
    * select the python interpreter from the venv
* To test the interpreter: open a terminal and type: *python --version*
* Install library (fluidsolve is just a Python package)
    * If you want to install it in dev mode: see that section
    * in the terminal:

    .. code-block:: console

        pip install fluidsolve

Support
=======

This library is under development.
So breaking changes are always possible.

fluidsolve works with Python 3.10 and higher.

Development setup
=================

See the development section.

Usage
=====

Take a look at the example scripts. 

Eventually activate the virtual environment: `d:\fluidsolve\_venv\fluidsolve\Scripts\activate`
You can check if it is activated with: `pip list`

Data from printed pump characteristics can easily be extracted by using a tool such as webwplot digitizer: `https://apps.automeris.io/wpd4/ <https://apps.automeris.io/wpd4/>`__

References
==========

homepage : `https://github.com/DOSprojects/fluidsolve.git <https://github.com/DOSprojects/fluidsolve.git>`__

documentation : `https://fluidsolve.readthedocs.io/en/latest/index.html <https://fluidsolve.readthedocs.io/en/latest/index.html>`__
