def __init__(self, l, M): # Setting up physical parameters params = Params() params.p_prod = params.p_prod * 1e-1 params.p_inj = params.p_inj * 1e-1 params.p_ref = params.p_ref * 1e-1 params.well_radius = 0.1 # TIME STEPPING end = 0.5 / 24. num_steps = 1 * M**l maxdt = end / num_steps # GEO N = int(numpy.ceil(5 * M**l)) geo = GeoModel(N, N, params, 1., 1.) self.Kw = Function(geo.V) geo.K_x = geo.K_x * self.Kw geo.K_y = geo.K_y * self.Kw geo.phi = geo.phi geo.kT = geo.phi * geo.params.ko + (1 - geo.phi) * geo.params.kr # CASE prod_points = [[0.3, 0.5]] inj_points = [[0.7, 0.5]] case = TestCase(params, geo, prod_points=prod_points, inj_points=inj_points) case.wellfunc = 'square' case.init_wells(prod_points, inj_points, 'square') self.model = ThermalModel(geo, case, params, solver_parameters="pc_fieldsplit_cd", end=end, maxdt=maxdt, small_dt_start=False, verbosity=False) self.V = self.model.V
from thermalporous.physicalparameters import PhysicalParameters as Params from thermalporous.homogeneousgeo import HomogeneousGeo as GeoModel from thermalporous.wellcase import WellCase as TestCase from thermalporous.twophase import TwoPhase as ThermalModel params = Params() params.rate = 5e-7 params.T_inj = 373.15 params.S_o = 0.9 # checkpointing and saving savepvd = True import os suffix = os.path.splitext(__file__)[0] initial = "_initial_smalld" savename = suffix + "_initial_smalld" loadname = suffix + initial checkpointing = {"save": False, "load": False, "loadname": loadname, "savename": savename} # TIME STEPPING import sys argument = sys.argv[2] dt = float(argument) end = 2*dt maxdt = dt # GEO