Droplet Lagrangian Transient One-dimensional Reacting Code Implementation of both liquid and gas phase governing equations.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

83 lines
1.5KB

  1. #include "parse.h"
  2. #ifndef GSL_DEF
  3. #define GSL_DEF
  4. #include <gsl/gsl_math.h>
  5. #include <gsl/gsl_spline.h>
  6. #endif
  7. #ifndef GRID_DEF
  8. #define GRID_DEF
  9. typedef struct gridTag{
  10. size_t basePts;
  11. size_t nPts;
  12. double position;
  13. double leastMove;
  14. double a;
  15. double w;
  16. double mag;
  17. double leftFac;
  18. double rightFac;
  19. int refineLeft;
  20. int refineRight;
  21. double* x;
  22. double* xOld;
  23. } *UserGrid;
  24. inline double l(const double* x,
  25. const double* a,
  26. const double* w,
  27. const double* fac,
  28. const int* refineLeft);
  29. inline double r(const double* x,
  30. const double* a,
  31. const double* w,
  32. const double* fac,
  33. const int* refineRight);
  34. inline double f(const double* x,
  35. const double* a,
  36. const double* c,
  37. const double* w);
  38. inline double g(const double* x,
  39. const double* a,
  40. const double* c,
  41. const double* w);
  42. inline double rho(const double* x,
  43. const double* a,
  44. const double* c,
  45. const double* w,
  46. const double* mag,
  47. const double* leftFac,
  48. const double* rightFac,
  49. const int* refineLeft,
  50. const int* refineRight);
  51. size_t maxPoints(const size_t basePts,
  52. const double* a,
  53. const double* w,
  54. const double* mag,
  55. const double* leftFac,
  56. const double* rightFac,
  57. const int* refineLeft,
  58. const int* refineRight);
  59. double safePosition(double c, double w);
  60. int reGrid(UserGrid grid, double position);
  61. void storeGrid(const double* x, double *y, const size_t nPts);
  62. int initializeGrid(UserGrid grid);
  63. int getGridSettings(FILE *input, UserGrid grid);
  64. #endif