diff --git a/src/captas.c b/src/captas.c index 3903c00..ff16b35 100644 --- a/src/captas.c +++ b/src/captas.c @@ -1,6 +1,6 @@ /* - Computer Aided Pressure Transient Analysis (and Simulation?) – CAPTA(S?) + Computer Aided Pressure Transient Analysis (and Simulation?) � CAPTA(S?) Copyright (C) 2013 Carlos E. Pico This program is free software: you can redistribute it and/or modify @@ -534,7 +534,8 @@ void init_parameters(modelparameters *par) par->parnames[PENETRATION_RATIO] = "b"; par->parnames[MIDPOINT_ELEVATION] = "zw", par->parnames[EFFECTIVE_HEAT_CAPACITY] = "cpt", - par->parnames[INITIAL_TEMPERATURE] = "Ti"; + par->parnames[INITIAL_TEMPERATURE] = "Ti", + par->parnames[JOULE_THOMSON_COEFFICIENT] = "ejt"; /******************** pointers to delta_pwf functions ********************/ for(i = 0; i < NPMODELS; i++){ @@ -683,7 +684,6 @@ void read_inifile(modelparameters *par) par->h = iniparser_getdouble(ini, "Test description:h", 0.0); par->rw = iniparser_getdouble(ini, "Test description:rw", 0.0); par->ct = iniparser_getdouble(ini, "Test description:ct", 0.0); - par->ejt = iniparser_getdouble(ini, "Test description:ejt", 0.0); par->rhosc = iniparser_getdouble(ini, "Test description:rhosc", 0.0); par->cp = iniparser_getdouble(ini, "Test description:cp", 0.0); diff --git a/src/models/dTwf.c b/src/models/dTwf.c index 37f17ec..832f6e5 100644 --- a/src/models/dTwf.c +++ b/src/models/dTwf.c @@ -16,7 +16,7 @@ * Transient temperature behavior and analysis of single-phase liquid-water * geothermal reservoirs during drawdown and buildup tests: Part I. * Theory, new analytical and approximate solutions. -* Journal of Petroleum Science and Engineering, 146, 637–656. +* Journal of Petroleum Science and Engineering, 146, 637�656. * https://doi.org/10.1016/j.petrol.2016.08.003 */ @@ -28,21 +28,22 @@ double dTwf(const modelparameters *p, double t) { double a, b, cpR, f, d; - double k, S, cpt; + double k, S, cpt, ejt; gsl_set_error_handler_off(); k = p->rpval[PERMEABILITY]; S = p->rpval[SKIN_FACTOR]; cpt = p->rpval[EFFECTIVE_HEAT_CAPACITY]; + ejt = p->rpval[JOULE_THOMSON_COEFFICIENT]; a = (p->C2 * p->qB * p->mu) / (k * p->h); b = (p->rw * p->rw * p->phi * p->ct * p->mu ) / (4.0 * k * p->C1); cpR = (p->rhosc / p->B) * p->cp / cpt; - f = p->phi * cpR * (p->ejt + 1.0 / (p->rhosc * p->cp / p->B)) - p->ejt; + f = p->phi * cpR * (ejt + 1.0 / (p->rhosc * p->cp / p->B)) - ejt; d = (p->phi * cpR * p->ct) * a * 0.5; - return -0.5*a*( -p->ejt*(gsl_sf_expint_E1(b/t) + 2.0*S) - f*gsl_sf_expint_E1(b/t + d) ); + return -0.5*a*( -ejt*(gsl_sf_expint_E1(b/t) + 2.0*S) - f*gsl_sf_expint_E1(b/t + d) ); } /*****************************************************************************/ diff --git a/src/models/modelparam.h b/src/models/modelparam.h index 31a4a28..c853176 100644 --- a/src/models/modelparam.h +++ b/src/models/modelparam.h @@ -30,6 +30,7 @@ #define MIDPOINT_ELEVATION 18 #define EFFECTIVE_HEAT_CAPACITY 19 #define INITIAL_TEMPERATURE 20 +#define JOULE_THOMSON_COEFFICIENT 21 typedef struct { @@ -62,7 +63,6 @@ typedef struct ct, // total compressibility rw, // wellbore radius h, // formation thickness - ejt, // joule-thomson coefficient rhosc, // density at standard conditions cp; // specific heat capacity