Code Monkey home page Code Monkey logo

flow-curve-fitter's Introduction

Flow curve fitter

Software that fits rheological models to viscometer measurements of stress vs. strain rate. Code is written in Python language. Demo video: https://www.youtube.com/watch?v=0Tc-vnOoss0

flowcurves

1. Background

Shear viscosity is an important measurement technique for several industries: food, chemicals, concrete are common examples. To quantify the material properties several models have been developed, from a simple power law to more complex equations that are virtually impossible to insert into common spreadsheets software. This software makes the above task intuitive, fast and easy.

2. The data

Synthetic data representative of a shear thinning fluid such as mayonnaise or chocolate spread.

Only two columns (features), shear strain rate and shear stress, are given as input in the file "input_data.csv". To fit your data simply update the file pasting the corresponding values from your measurement.

You obtain and Excel file as output. It contains a sheet with experimental and calculated data from each fit, and a sheet with constants calculated values and model scores.

3. The models

• Ostwald – de Waele power law
  
• Carreau
  
• Carreau-Yasuda
  
• Cross
    
• Bingham
   
• Herschel-Bulkley
   
• Casson

Details for each can be easily found online. Equation are written into decorators and fitted to the experimental values using the Scikit-Learn curve-fitting package.

jupyterThe whole code can be found in the following Jupyter notebook

Data from a selected model are presented as experimental fit and plotted with Matplotlib.

fit

4. Conclusions

  • Open the file "input_data.csv" and paste the values of strain rate and stress you would like to model. Several theoretical models are quickly fitted to experimental data. Constant and curvefits are calculated for each.

  • You can get all results in a convenient format so that can be further analysed with any spreadsheet software. Output file is named at your wish using a simple input-name function in the code.

flow-curve-fitter's People

Contributors

opsabarsec avatar

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.