diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f66840a --- /dev/null +++ b/CMakeLists.txt @@ -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) diff --git a/Make/files b/Make/files deleted file mode 100644 index e42cc17..0000000 --- a/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -ct2foam.C - -EXE = $(FOAM_USER_APPBIN)/ct2foam diff --git a/Make/options b/Make/options deleted file mode 100644 index d57f8a5..0000000 --- a/Make/options +++ /dev/null @@ -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 diff --git a/ct2foam.C b/ct2foam.C index 83aab2f..f17a5c7 100644 --- a/ct2foam.C +++ b/ct2foam.C @@ -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