From 9b65338461fe19b30a1c37e362f290451a44df2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 3 May 2013 20:21:37 +0200 Subject: [PATCH] Add MRST function for 'sim_simple' development --- mrst/sim_simple.m | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 mrst/sim_simple.m diff --git a/mrst/sim_simple.m b/mrst/sim_simple.m new file mode 100644 index 000000000..ef3943546 --- /dev/null +++ b/mrst/sim_simple.m @@ -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