rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
BrooksCorey.m
1 classdef BrooksCorey < TwoPhaseData.Interface
2 
3  methods
4  function kw = water_permeability(this, glob, S, model)
5 
6  Squadrat = S.*S;
7  kw = model.tp_kw_factor * Squadrat ./ (Squadrat + (1-S).^(0.5));
8  end
9 
10  function dkw = water_permeability_derivative(this, glob, S, model)
11 
12  oben = S .* S;
13  unten = oben + (1-S).^(0.5);
14 
15  oben_der = 2 * S;
16  unten_der = oben_der - 0.5 * (1-S).^(-0.5);
17 
18  dkw = model.tp_kw_factor * (oben_der .* unten - oben .* unten_der) ./ (unten .* unten);
19  assert(~any(isnan(dkw)));
20  end
21 
22  function ko = oil_permeability(this, glob, S, model)
23 
24  Squadrat = (1-S).*(1-S);
25  ko = model.tp_ko_factor * Squadrat ./ (Squadrat + S.^(0.5));
26  end
27 
28  function dko = oil_permeability_derivative(this, glob, S, model)
29 
30  oben = (1-S) .* (1-S);
31  unten = oben + S.^(0.5);
32 
33  oben_der = -2 + 2 * S;
34  unten_der = oben_der + 0.5 * S.^(-0.5);
35 
36  dko = model.tp_ko_factor * (oben_der .* unten - oben .* unten_der) ./ (unten .* unten);
37  assert(~any(isnan(dko)));
38  end
39 
40  function pc = capillary_pressure(this, glob, S, model)
41 
42  pc = model.tp_pb * S.^(-1/model.tp_lambda);
43  end
44 
45  function dpc = capillary_pressure_derivative(this, glob, S, model)
46 
47  dpc = model.tp_pb .* (-1/model.tp_lambda) .* S.^(-1/model.tp_lambda - 1);
48  end
49 
50  function ddpc = capillary_pressure_second_derivative(this, glob, S, model)
51 
52  ddpc = model.tp_pb .* (-1/model.tp_lambda).*(-1/model.tp_lambda - 1) .* S.^(-1/model.tp_lambda - 2);
53  end
54 
55  function c = injection_concentration(this, glob, model)
56 
57  c = 0;
58  end
59 
60  function s_under = lower_source(this, glob, model)
61 
62  s_under = 0;
63  end
64 
65  function s_above = upper_source(this, glob, model)
66 
67  s_above = 0;
68  end
69 
70  function descr = default_descr(this, descr)
71  descr.tp_pb = -0.5;
72  descr.tp_kw_factor = 1;
73  descr.tp_ko_factor = 1;
74  descr.tp_lambda = 0.5;
75  end
76  end
77 end