def __init__(self, eq_index, z_coordinate, is_boundary_x=False, is_boundary_y=False, has_well=False, well_index=None): self.is_boundary_y = is_boundary_y self.is_boundary_x = is_boundary_x self.cell_states = [CellState(), CellState()] # n, n + 1 layers self.eq_index = eq_index self.has_well = has_well self.well = Well(self, well_index, horizontal=Layer.horizontal) if has_well else None self.z_coordinate = z_coordinate self.flow_array_x = np.array( [Flow() for _ in range(Layer.components_count)], dtype=Flow ) # Поток минус(для oil и water) Поток плюс(для oil и water) self.flow_array_y = np.array( [Flow() for _ in range(Layer.components_count)], dtype=Flow) self.flow_array_z = np.array( [Flow() for _ in range(Layer.components_count)], dtype=Flow)
def addCell(self, cellType=0, cellAdh=0, length=3.5, **kwargs): cid = self.next_id() cs = CellState(cid) cs.length = length cs.cellType = cellType cs.cellAdh = cellAdh cs.idx = self.next_idx() self.idToIdx[cid] = cs.idx self.idxToId[cs.idx] = cid self.cellStates[cid] = cs if self.integ: self.integ.addCell(cs) self.reg.addCell(cs) if self.sig: self.sig.addCell(cs) self.phys.addCell(cs, **kwargs)