Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ejt as estimate paramater #5

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/captas.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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++){
Expand Down Expand Up @@ -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);

Expand Down
9 changes: 5 additions & 4 deletions src/models/dTwf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand All @@ -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) );

}
/*****************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/models/modelparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define MIDPOINT_ELEVATION 18
#define EFFECTIVE_HEAT_CAPACITY 19
#define INITIAL_TEMPERATURE 20
#define JOULE_THOMSON_COEFFICIENT 21

typedef struct
{
Expand Down Expand Up @@ -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

Expand Down