Git Product home page Git Product logo

rude's Introduction

Rheological Universal Differential Equations

This repository contains the code used to produce all results in the preprint: Scientific Machine Learning for Modeling and Simulating Complex Fluids.

Compatibility

The scripts used to train and test RUDEs on shear rheometric data were developed using Julia v1.8.3, with the following packages: Flux v0.13.9, Optimization v3.10.0, Optimisers v0.2.14, OptimizationOptimisers v0.1.1, SciMLSensitivity v7.11.1, DifferentialEquations v7.6.0, Zygote v0.6.51, Enzyme v0.10.12, PyPlot v2.11.0, OrdinaryDiffEq v6.35.1, DataInterpolations v3.10.1, BSON v0.3.6, and FFTW v1.5.0.

Computational fluid dynamics simulations were performed using OpenFOAM v9, with the rheoTool v5.0 toolbox.

The scripts used to process experimental linear response data and to plot OpenFOAM simulation results were developed using Python 3.8.5, with the following packages: NumPy 1.19.2, Matplotlib 3.3.2, SciPy 1.5.2, CSV 1.0, and pandas 1.1.3.

Contents

giesekus

  • rude.jl: Julia script to generate synthetic shear stress LAOS data for the Giesekus model, train a RUDE using this data, and test the RUDE on shear and normal stress data in LAOS as well as shear stress data in shear startup
  • tbnn.bson: pre-trained model weights for a RUDE trained using the rude.jl script
  • OpenFOAM: directory containing the files needed to simulate a 4:1 contraction flow
    • Giesekus: directory containing the setup files for an OpenFOAM simulation of the Giesekus model, including the mesh file (system/blockMeshDict), details for the integration and finite volume schemes (system/fvSchemes and system/fvSolution), definition of the constitutive model (constant/constitutiveProperties), and initial conditions (0)
    • Oldroyd-BLog: directory containing the setup files for an OpenFOAM simulation of the Oldroyd-B model (defined by the log-conformation tensor). Same file structure as the Giesekus directory
    • RUDE: directory containing the setup files for an OpenFOAM simulation of a trained RUDE. Same file structure as the Giesekus directory, with three additional files (weights1.txt, weights2.txt, and weights3.txt) containing the pre-trained weights for the TBNN layers obtained using the rude.jl script
    • simdata: directory containing selected results from the OpenFOAM simulations, including centerline velocities, velocity profiles, the velocity field, and streamlines
    • make_plots.py: Python script for plotting the simulation results contained in simdata

gel

  • data: directory containing experimental data for the metal-crosslinked polymer hydrogel. Includes the raw data output by TRIOS (raw) and pre-processed CSV files for LAOS and SAOS tests
  • fitlr.py: Python script to fit the linear response of the gel to a single-mode Maxwell model
  • rude.jl: Julia script to train a RUDE using the LAOS data, and predict the shear and normal stress response in another LAOS experiment (as well as an amplitude-sweep in LAOS)
  • weights_201.bson: partially pre-trained model, terminated after an epoch of 200 training iterations on the lowest-amplitude LAOS experiment
  • weights_402.bson: partially pre-trained model, terminated after an epoch of 200 training iterations on the two lowest-amplitude LAOS experiments, with training initialized using the weights_201.bson network
  • weights_603.bson: fully pre-trained model, terminated after an epoch of 200 training iterations on all three training LAOS curves, with training initialized using the weights_402.bson network

Contibuting

Inquiries and suggestions can be directed to krlennon[at]mit.edu.

License

GNU General Public License v3.0

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.