Giter Club home page Giter Club logo

pasr's Introduction

PaSR

Partially Stirred Reactor using Cantera for validating mixing models.

1. Dependencies

cantera >= 2.5
mlpack, networkx
yaml, numpy, scipy, matplotlib

2. Usage

### Typical input file (this example is in "inputs/KerM01.yaml")
# Input parameters for PaSR simulation.
case: non-premixed
mech: "mech/h2_sandiego.yaml"
mixing model: "KerM"
sigma_k: 0.1
number of particles: 1000
temperature: 300.0
pressure: 1.0
equivalence ratio: 1.0
residence time: 2.e-3
mixing time: 0.7e-3
number of residence times: 5
fuel:
  H2: 1.0
  N2: 1.0
oxidizer:
  O2: 0.21
  N2: 0.79
### Run PaSR simulation
# specify input by `--input`, output by `--output`
python PaSR_main.py --input inputs/KerM01.yaml --output data/KerM01.npy --doplot
# which can be written in short as
python PaSR_main.py -i inputs/KerM01.yaml -p
  • PaSR simulation results of H2/N2-Air mixture, with IEM, MC and EMST as mixing model.

  • PaSR simulation results of H2/N2-Air mixture, with KerM as mixing model of different kernel sizes.

3. Implementation details

3.1 EMST variance decay

The mixing happens on the edges of EMST tree, with:

The parameter controls the variance decay rate. Denoting, then from time to , one has:

And by variance decay rule of micro-mixing model:

Thus, following the variance decay rule, we need to let satisfy the equation

In general, ,, . To get at least one real number solution, one need:

Once is selected, the mixing ratio is hence to be:

For multiple scalars, single could not lead to target variance decay for all scalars. So a root finding technique is employed to estimate best .

Typically, the root finding process converges in 2-3 loops.

4. References

pasr's People

Contributors

suxy15 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.