rbmatlab 0.10.01
datafunc/+TwoPhaseData/Michel.m
00001 classdef Michel < TwoPhaseData.Interface
00002 
00003   methods
00004     function kw = water_permeability(this, glob, S, model)
00005 
00006       Skubus = S.*S.*S;
00007       kw = model.tp_kw_factor * Skubus / 2;
00008     end
00009 
00010     function dkw = water_permeability_derivative(this, glob, S, model)
00011 
00012       Squadrat = S.*S;
00013       dkw = model.tp_kw_factor * 3/2 * Squadrat;
00014     end
00015 
00016     function ko = oil_permeability(this, glob, S, model)
00017 
00018       Skubus = (1-S).*(1-S).*(1-S);
00019       ko = model.tp_ko_factor * Skubus ./ 3;
00020     end
00021 
00022     function dko = oil_permeability_derivative(this, glob, S, model)
00023 
00024       Squadrat = (1-S) .* (1-S);
00025 
00026       dko = (-1) .* model.tp_ko_factor .* Squadrat;
00027       assert(~any(isnan(dko)));
00028     end
00029 
00030     function pc = capillary_pressure(this, glob, S, model)
00031 
00032       pc = model.tp_pb * sqrt((1-S)./S);
00033     end
00034 
00035     function dpc = capillary_pressure_derivative(this, glob, S, model)
00036 
00037       dpc = model.tp_pb .* (-1/2)./sqrt(S.^3.-S.^4);
00038     end
00039 
00040     function ddpc = capillary_pressure_second_derivative(this, glob, S, model)
00041       ddpc = model.tp_pb .* (1/4).*(S.^3-S.^4).^(-3/2).*(3.*S.^2-4.*S.^3);
00042 %      ddpc = model.tp_pb .* (1/2).*(4./S - 1./(S.^2-S.^3));
00043 %      ddpc = model.tp_pb .* (-1/2).*(-1.5.*S.^(0.5) + 2.*S)./(S.^(1.5)-S.^2).^2;
00044     end
00045 
00046     function c = injection_concentration(this, model)
00047 
00048       c = model.tp_injection_c;
00049     end
00050 
00051     function s_under = lower_source(this, elemin, loc, grid)
00052 
00053       glob = local2global(grid, elemin, loc, this);
00054       X = glob(:,1);
00055       Y = glob(:,2);
00056 
00057 %      if model.t < 0.5
00058         D3 = ((X-0.8).^2 + (Y-0.5).^2) <= 0.01;
00059         s_under = 30 * D3;
00060 %      else
00061 %        s_under = zeros(size(X));
00062 %      end
00063     end
00064 
00065     function s_above = upper_source(this, elemin, loc, grid)
00066 
00067       glob = local2global(grid, elemin, loc, this);
00068       X  = glob(:,1);
00069       Y  = glob(:,2);
00070 
00071 %      if model.t < 0.5
00072       D1 = ((X-0.5).^2 + (Y-0.8).^2) <= 0.01;
00073       D2 = ((X-0.2).^2 + (Y-0.2).^2) <= 0.01;
00074       s_above = 10 * D1 + 20 * D2;
00075 %      else
00076 %        s_above = zeros(size(X));
00077 %      end
00078     end
00079 
00080     function descr = default_descr(this, descr)
00081       descr.tp_pb          = -0.5;
00082       descr.tp_kw_factor   = 0.15;
00083       descr.tp_ko_factor   = 1;
00084       descr.tp_injection_c = 0.80;
00085     end
00086   end
00087 end
 All Classes Namespaces Files Functions Variables