Add MRST function for 'sim_simple' development

This commit is contained in:
Bård Skaflestad 2013-05-03 20:21:37 +02:00
parent d0866c39b5
commit 9b65338461

26
mrst/sim_simple.m Normal file
View File

@ -0,0 +1,26 @@
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]);
state = initState(g, [], 0, repmat([ 0.5, 0.5 ], [g.cells.num, 1]));
state = incompTPFA(state, g, T, fluid, 'src', src);
if nargin < 4, verb = false; end
state = implicitTransport(state, g, tf, rock, fluid, ...
'src', src, 'verbose', verb);
x = struct('g', g, 'rock', rock, 'T', T, 'fluid', fluid, ...
'src', src, 'state', state);
end