Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor issues with the installation #1

Open
WWIIWWIIWW opened this issue May 27, 2021 · 0 comments
Open

Some minor issues with the installation #1

WWIIWWIIWW opened this issue May 27, 2021 · 0 comments

Comments

@WWIIWWIIWW
Copy link
Collaborator

WWIIWWIIWW commented May 27, 2021

  1. 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:

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

  1. 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 \

  2. 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...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant