removing OpenFOAM dependence

This commit is contained in:
Yeongdo Park 2018-11-08 14:50:34 -05:00
parent 3185825983
commit d903af4d2b
4 changed files with 15 additions and 36 deletions

13
CMakeLists.txt Normal file
View file

@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.1)
project (ct2foam)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 11)
find_package(Threads REQUIRED)
include_directories("/usr/include" "/usr/include/eigen3")
link_directories("/usr/lib")
add_executable(ct2foam ct2foam.C)
target_link_libraries(ct2foam cantera sundials_cvodes sundials_ida sundials_nvecserial lapack blas Threads::Threads)

View file

@ -1,3 +0,0 @@
ct2foam.C
EXE = $(FOAM_USER_APPBIN)/ct2foam

View file

@ -1,18 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude\
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lchemistryModel \
-lfiniteVolume \
-lmeshTools \
-pthread \
-lcantera \
-lsundials_cvodes -lsundials_ida -lsundials_nvecserial \
-llapack -lblas

View file

@ -36,22 +36,13 @@ Description
#include "ofFormats.h"
#include "fvCFD.H"
#include "psiReactionThermo.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "OFstream.H"
#include "thermoPhysicsTypes.H"
#include "basicMultiComponentMixture.H"
#include "cellModeller.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
std::string stringNASACoefs (doublereal *coef)
{
std::string arr;
for (label j = 0; j < 7; j++)
for (int j = 0; j < 7; j++)
{
arr += fmt::format(" {:15.10E} ", coef[j]);
}
@ -61,16 +52,12 @@ std::string stringNASACoefs (doublereal *coef)
int main(int argc, char *argv[])
{
argList::noParallel();
#define CREATE_MESH createSingleCellMesh.H
#define NO_CONTROL
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Cantera::IdealGasMix gas_ ("gri30.cti", "gri30_mix");
Cantera::Transport *tr_ = Cantera::newTransportMgr("Mix", &gas_);
label nCanteraSp_ = gas_.nSpecies();
int nCanteraSp_ = gas_.nSpecies();
// these constants define the location of coefficient "a6" in the
// cofficient array c. The c array contains Tmid in the first