zhangyantju / reactingcanterafoam Goto Github PK
View Code? Open in Web Editor NEWOpenFOAM + Cantera
OpenFOAM + Cantera
git checkout tags/v2.5.1
git submodule update
python3 /usr/bin/scons build prefix= system_fmt=n system_eigen=n system_sundials=n
python3 /usr/bin/scons test
python3 /usr/bin/scons install #sudo might required
The warning of missing header during compilation can be ignored. If anyone wants to avoid this, in the Make/options, we need many -I options for EXE_INC = (e.g.):
-I$(LIB_SRC)/../../../DNS/solver/reactingCanteraFoam/cantera/include/cantera/transport \
The solver is for OF7 at the time of this post. These are what I did to port it to OF6:
createFieldRefs.H
a. scalar nSpecies= composition.species().size(); //new line 17
b. if (gas->nSpecies() != nSpecies) //line 19 -> use nSpecies to avoid warning
c const word Yname = "diff_" + Y[i].name(); //new line 44
d. dimensionedScalar(Yname, dimDensitydimVelocitydimLength, 0.0) // line 59: Yname is used here
e. dimensionedScalar("diffsh", dimEnergy/dimTime/dimVolume, 0.0) //line 102: add "diffsh"
f. dimensionedVector("vk", dimensionSet(1,0,-3,0,0,0,0), Foam::vector(0,0,0)) //line 115: add "vk"
g. dimensionedScalar("Hsi", dimEnergy/dimMass, 0.0 //line 128: add "Hsi"
YEqn.H
//line 1, 2, and 3 initialize with dimensionedVector, replace zero
h. vk = dimensionedVector("vk", dimensionSet(1,0,-3,0,0,0,0), Foam::vector(0,0,0));
i. diffsh = dimensionedScalar("diffsh", dimEnergy/dimTime/dimVolume, 0.0);
j. DiffError = dimensionedVector("DiffError", dimDynamicViscosity/dimLength, Foam::vector(0,0,0));
k. X[i][cellI] = Y[i][cellI]*MW[cellI]/composition.W(i); // replace composition.Wi(i)
l. YiEqn.solve(mesh.solver("Yi")); // replace "Yi" in ()
(make sure units are consistent by yourself....and check new commits...)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.