Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A framework to implement CHEMically reacting Method Of Characteristics for supersonic reacting flows.

License

NotificationsYou must be signed in to change notification settings

RSuryaNarayan/CHEMOC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHEMOC is an acronym for CHEMically reacting Method Of Characteristics. This is an attempt to implement solutions to governing PDEs of suspersonic non-equilibrium reacting gas-dynamics using the classical method of characteristics approach. Method of Characteristics (MOC) has been used previously to seek solutions to supersonic flow fields by marching along characteristics to chart out the flow field along Mach-lines. In CHEMOC we use this approach, however, in-addition perform 1-D finite-rate chemistry to account for chemical reactions. Popular uses of MOC include computing the supersonic nozzle contour, Taylor-Macoll flow around ogival noses and much more. All of these require suitable unit processes that could be used to iterate to produce the flow field via marching along characteristics. CHEMOC is an attempt to provide pre-coded modules for standard 3-characteristic unit-process and make solutions to these flows simple.

Dependencies and setup

CHEMOC is written entirely in the Julia programming language. CHEMOC uses Cantera to integrate chemistry into flow physics. Cantera is integrated into Julia using thePyCall library. detailed steps to integrate Cantera into Julia is given below. For updates on a native Julia code for Cantera-like packages, followCantera-enhancements. Attempts are being made to benchmark finite-rate chemistry cases with CHEMOC. To start using CHEMOC you first have to integrate Cantera and Julia.

Integrating Cantera and Julia

Go to theCantera Downloads page and install Cantera in your system usingPython installation. Follow the steps in the website as is and test if Cantera works in the Python IDLE. Copy the location of the python.exe. Alternatively you can and downloadthese and follow theses steps:

  • Install python (run the python setup).
  • configure numpy using shell
  • run the cantera setup
  • configure cantera in python
  • copy the location of the python.exe executableNow open the Julia REPL and installPyCall
using Pkg;Pkg.add("PyCall");

Once Julia is done updating its registries, update the local python environment that has the Cantera installation using the following commands:

using PyCallENV["PYTHON"] = "location of the python.exe"

The location should look something likeC:\Users\<Username>\AppData\Local\Programs\Python\Python37,if you are using windows. Now STOP the REPL and restart Julia. You can now run Cantera using:

using PyCall;pyimport("cantera");gas1=cantera.Solution("gri30.xml");

What we have done is initialized agas object using theGRI30 combustion mechanism of natural gas with with reburn chemistry. You should get a result like so:

gri30:temperature    300 Kpressure    101325 Padensity  0.0818891 kg/m^3mean mol. weight 2.01588 amu

It should also show other properties likeinternal energy,enthalpy,Gibbs function,heat capacity c_p,heat capacity c_v.

Usage

CHEMOC is originally targetted at producing a shock-free nozzle contour. However there exist some generic functions with self-explanotory names to march along specific characteristics. More its usage to be done.

Results so far

An initial kernel for the rocket nozzle design problem has been obtained using theUnit_process_AXIS andUnit_process_INTERIOR_Cminus functions:plot!
The following is plot of the Mach number along the axis of the nozzle.plot!


[8]ページ先頭

©2009-2025 Movatter.jp