Coder Social home page Coder Social logo

nisangan / freshwater Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danielrobb/freshwater

2.0 0.0 0.0 289 KB

Python module for estimating thermodynamic properties of water in freshwater lakes.

Home Page: https://danielrobb.github.io/freshwater/

License: MIT License

Python 100.00%

freshwater's Introduction

Freshwater Toolbox

Compute thermodynamic properties of lake water

travis-ci build status

The freshwater toolbox is a python package for estimating thermodynamic properties of water in freshwater bodies. Given temperature, salinity, and pressure, the freshwater toolbox enables the user to estimate the density, thermal expansion coefficient, specific heat capacity, speed of sound, temperature of maximum density, and freezing point of a parcel of lake water. The equation of state described in Chen and Millero (1986) [1] is implemented, which is suited for lake waters over the range of temperature, salinity, and pressure of 0--30 °C, 0--0.6 g/kg, and 0--180 bar, respectively.

Links

Installation

The easiest way to install the freshwater toolbox is using pip:

pip install freshwater

You can also clone the source code from the github repository and install it with the following commands:

git clone https://github.com/danielrobb/freshwater
cd freshwater/
pip install .

Quick Start

Say you have a sample of lake water with temperature 10 °C, salinity 0.5 g/kg, and pressure 0 bar, and you would like to compute its density 𝜌 and thermal expansion coefficient 𝛼. This can be done with the following commands.

First, import the equation of state (Eos) class:

>>> from freshwater.eos import Eos

Second, Eos takes arguments of temperature, salinity and pressure:

>>> e = Eos(t=10, s=0.5, p=0)
>>> e.rho
1000.091963
>>> e.alpha
8.94332e-05

Please consult the online documentation for more details.

[1]Chen, C. T. A., & Millero, F. J. (1986). Thermodynamic properties for natural waters covering only the limnological range. Limnology and Oceanography, 31(3), 657-662. doi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.