mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-11 08:51:55 -06:00
Add MRST function for 'sim_simple' development
This commit is contained in:
parent
d0866c39b5
commit
9b65338461
26
mrst/sim_simple.m
Normal file
26
mrst/sim_simple.m
Normal 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
|
Loading…
Reference in New Issue
Block a user