#ifndef SUNDIALS_DEF #define SUNDIALS_DEF #include #include #endif #ifndef PRINT_DEF #define PRINT_DEF #include //for strings #include #include #include //for printf,scanf #include //for atoi, atof #endif #ifndef CANTERA_DEF #define CANTERA_DEF #include #include #endif #ifndef COOLPROP_DEF #define COOLPROP_DEF #include //for gas-phase thermodynamic properties //#include //#include #endif #include "UserData.h" #include //add the vector module #include void REGRID(double* ydata,double* ydotdata,UserData data); void INTERPO(double* y,double* ydot,const size_t nvar,size_t nPts,const double XNEW[], const double XOLD[]); double maxTemperaturePosition(const double* y,const size_t nt,const size_t nvar,const double* x ,size_t nPts); double maxTemperature(const double* y,const size_t nt, const size_t nvar, size_t nPts); int maxTemperatureIndex(const double* y,const size_t nt,const size_t nvar ,size_t nPts); double maxCurvPositionR(const double* y, const size_t nt, const size_t nvar, const size_t nr, size_t nPts); int maxCurvIndexR(const double* y, const size_t nt, const size_t nvar, const size_t nr, size_t nPts); double maxGradPosition(const double* y, const size_t nt, const size_t nvar, const double* x, size_t nPts); int maxGradIndex(const double* y, const size_t nt, const size_t nvar, const double* x, size_t nPts); double maxCurvPosition(const double* y, const size_t nt, const size_t nvar, const double* x, size_t nPts); int maxCurvIndex(const double* y, const size_t nt, const size_t nvar, const double* x, size_t nPts); double isothermPosition(const double* y, const double T, const size_t nt, const size_t nvar, const double* x, const size_t nPts); int setAlgebraicVariables(N_Vector *id,UserData data,const double* ydata); inline double calc_area(double x,int* i); void updateSolution(double* y, double* ydot, const size_t nvar, const double xOld[],const double xNew[],const size_t npts); //void readInitialCondition(FILE* input, double* ydata, const size_t nvar, const size_t nr, const size_t nPts); void readInitialCondition(FILE* input, double* ydata, const size_t nvar, const size_t nr, const size_t nPts, const size_t l_nPts, double Rg); double systemMass(double* ydata, UserData data); int initializePsiGrid(double* ydata, double* psidata, UserData data); int initializePsiEtaGrid(double* ydata, double* psidata, UserData data); int setInitialCondition(N_Vector* y, N_Vector* ydot, UserData data); inline void setGas(UserData data, double *ydata, size_t gridPoint); void getTransport(UserData data, double *ydata, size_t gridPoint, double *rho, double *lambda, double *YV); void getGasMassFlux(UserData data, double *ydata, size_t gridPoint, double* YV) ; int residue(double t, N_Vector y, N_Vector ydot, N_Vector res, void *user_data); void trackFlameOH(N_Vector y,UserData data); void trackFlame(N_Vector y,UserData data); size_t BathGasIndex(UserData data); size_t oxidizerIndex(UserData data); size_t specIndex(UserData data,const char *specName); inline double Qdot(double* t, double* x, double* ignTime, double* kernelSize, double* maxQdot); void printSpaceTimeHeader(UserData data); void printSpaceTimeOutput(double t, N_Vector* y, FILE* output, UserData data); void printSpaceTimeRates(double t, N_Vector ydot, UserData data); void printGlobalHeader(UserData data); void printGlobalVariables(double t, N_Vector* y, N_Vector* ydot, UserData data); void printSpaceTimeOutputInterpolated(double t, N_Vector y, UserData data); void writeRestart(double t, N_Vector* y, N_Vector* ydot, FILE* output, UserData data); void readRestart(N_Vector* y, N_Vector* ydot, FILE* input, UserData data); void getTimescale(UserData data, N_Vector* y); void printTimescaleHeader(UserData data); void printTimescaleOutput(double t,N_Vector* y,FILE* output,UserData data); void floorSmallValue(UserData data, N_Vector* y); void resetTolerance(UserData data, N_Vector* y,N_Vector* atolv); void getReactions(UserData data,N_Vector* y,FILE* output); void getSpecies(UserData data,N_Vector* y,FILE* output); //double getLiquidRho(double dropMole[],double temp,double pres); //double getLiquidCp(double dropMole[],double temp,double pres); //double getLiquidHv(double dropMole[],double temp,double pres); //double getLiquidMaxT(double dropMole[],double pres); double getLiquidDensity(const double temp,const double pres, const std::vector& composition); double getLiquidDensity(const double temp,const double pres, const std::vector& composition,const double mole_[]); double getLiquidCond(const double temp,const double pres, const std::vector& composition); double getLiquidCond(const double temp,const double pres, std::vector& composition,const double mole_[]); double getGasCond(UserData data, double *ydata, size_t gridPoint); double getLiquidCpb(const double temp,const double pres, const std::vector& composition); double getLiquidCpb(const double temp,const double pres, const std::vector& composition,const double mole_[]); void getLiquidCp(const double temp, const double pres, const std::vector &composition, double liquidCp[]); void getLiquidMoleVec(UserData data,double* ydata,int gridPoint,double mole_[]); void getLiquidVH(const double pres, const int dropType, double vapheat[2]); //void mass2mole(const double mass_[], double mole_[], UserData data); double getLiquidmassdiff(UserData data, double* ydata, size_t gridPoint,const double temp); //void getLiquidmassvec(UserData data,double* ydata,int gridPoint, double mass_[]); //void getLiquidmolevec(UserData data,double* ydata,int gridPoint, double mole_[]); std::vector components(int dropType); void getVapPressure(UserData data, double* ydata,int gridPoint,const double mole_[],double vapPres[]); double dropletmass(UserData data, double *ydata, const std::vector& composition); void printIddata(UserData data, double* iddata); void printPsidata(UserData data,double* psidata); void setLiquidTransport(UserData data, double *ydata, int gridPoint, const std::vector &composition, double *rho, double *lambda, double *YV);