Droplet Lagrangian Transient One-dimensional Reacting Code Implementation of both liquid and gas phase governing equations.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.9KB

  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);
  67. void getTimescale(UserData data, N_Vector* y);
  68. void printTimescaleHeader(UserData data);
  69. void printTimescaleOutput(double t,N_Vector* y,FILE* output,UserData data);