Add the HRR related function and parameters into LTORC
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

91 Zeilen
2.7KB

  1. #ifndef SUNDIALS_DEF
  2. #define SUNDIALS_DEF
  3. #include <sundials/sundials_types.h>
  4. #include <nvector/nvector_openmp.h>
  5. #endif
  6. #ifndef PRINT_DEF
  7. #define PRINT_DEF
  8. #include <string.h> //for strings
  9. #include <stdio.h> //for printf,scanf
  10. #include <stdlib.h> //for atoi, atof
  11. #endif
  12. #ifndef CANTERA_DEF
  13. #define CANTERA_DEF
  14. #include <cantera/IdealGasMix.h>
  15. #include <cantera/transport.h>
  16. #endif
  17. #include "UserData.h"
  18. double maxGradPosition(const double* y, const size_t nt,
  19. const size_t nvar, const double* x, size_t nPts);
  20. int maxGradIndex(const double* y, const size_t nt,
  21. const size_t nvar, const double* x, size_t nPts);
  22. double maxCurvPosition(const double* y, const size_t nt,
  23. const size_t nvar, const double* x, size_t nPts);
  24. int maxCurvIndex(const double* y, const size_t nt,
  25. const size_t nvar, const double* x, size_t nPts);
  26. double isothermPosition(const double* y, const double T, const size_t nt,
  27. const size_t nvar, const double* x, const size_t nPts);
  28. int setAlgebraicVariables(N_Vector *id,UserData data);
  29. inline double calc_area(double x,int* i);
  30. void updateSolution(double* y, double* ydot, const size_t nvar,
  31. const double xOld[],const double xNew[],const size_t npts);
  32. void readInitialCondition(FILE* input, double* ydata, const size_t nvar, const size_t nr, const size_t nPts);
  33. double systemMass(double* ydata, UserData data);
  34. int initializePsiGrid(double* ydata, double* psidata, UserData data);
  35. int setInitialCondition(N_Vector* y,
  36. N_Vector* ydot,
  37. UserData data);
  38. inline void setGas(UserData data, double *ydata, size_t gridPoint);
  39. void getTransport(UserData data,
  40. double *ydata,
  41. size_t gridPoint,
  42. double *rho,
  43. double *lambda,
  44. double *YV);
  45. int residue(double t,
  46. N_Vector y,
  47. N_Vector ydot,
  48. N_Vector res,
  49. void *user_data);
  50. void trackFlameOH(N_Vector y,UserData data);
  51. void trackFlame(N_Vector y,UserData data);
  52. size_t BathGasIndex(UserData data);
  53. size_t oxidizerIndex(UserData data);
  54. inline double Qdot(double* t,
  55. double* x,
  56. double* ignTime,
  57. double* kernelSize,
  58. double* maxQdot);
  59. void printSpaceTimeHeader(UserData data);
  60. void printSpaceTimeOutput(double t, N_Vector* y, FILE* output, UserData data);
  61. void printSpaceTimeRates(double t, N_Vector ydot, UserData data);
  62. void printGlobalHeader(UserData data);
  63. void printGlobalVariables(double t, N_Vector* y, N_Vector* ydot, UserData data);
  64. void printSpaceTimeOutputInterpolated(double t, N_Vector y, UserData data);
  65. void writeRestart(double t, N_Vector* y, N_Vector* ydot, FILE* output, UserData data);
  66. void readRestart(N_Vector* y, N_Vector* ydot, FILE* input, UserData data);