You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you don't use the pre-compiled Cantera 2.5.2 library and installed your own Cantera instead. During compilation, you might meet errors like missing or couldn't find 'newTransportMgr' and 'newSolution'. It is all about how Cantera is installed. Try the following installation after git clone Cantera:
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...)
The text was updated successfully, but these errors were encountered:
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...)
The text was updated successfully, but these errors were encountered: