2013-05-03 13:21:37 -05:00
|
|
|
function x = sim_simple(cartDims, physDims, tf, verb)
|
|
|
|
g = computeGeometry(cartGrid(cartDims, physDims));
|
|
|
|
|
|
|
|
rock = struct('perm', repmat(1, [g.cells.num, 1]), ...
|
|
|
|
'poro', repmat(1, [g.cells.num, 1]));
|
|
|
|
|
|
|
|
T = computeTrans(g, rock);
|
|
|
|
|
|
|
|
fluid = initSimpleFluid('n' , [ 1, 1], ...
|
|
|
|
'mu' , [ 1, 30], ...
|
|
|
|
'rho', [1000, 800]);
|
|
|
|
|
|
|
|
gravity reset off
|
|
|
|
|
|
|
|
src = addSource([], [1, g.cells.num], [1, -1], 'sat', [ 1, 0 ; 0, 1]);
|
|
|
|
|
2013-05-03 13:28:36 -05:00
|
|
|
s0 = [0, 1];
|
|
|
|
state = incompTPFA(initState(g, [], 0, s0), ...
|
2013-05-06 06:27:48 -05:00
|
|
|
g, T, fluid, 'src', src, 'matrixoutput', true);
|
2013-05-03 13:21:37 -05:00
|
|
|
|
|
|
|
if nargin < 4, verb = false; end
|
|
|
|
state = implicitTransport(state, g, tf, rock, fluid, ...
|
2013-05-06 06:27:48 -05:00
|
|
|
'src', src, 'verbose', verb, ...
|
|
|
|
'nltol', 1e-12);
|
2013-05-03 13:21:37 -05:00
|
|
|
|
|
|
|
x = struct('g', g, 'rock', rock, 'T', T, 'fluid', fluid, ...
|
|
|
|
'src', src, 'state', state);
|
|
|
|
end
|