Return the size of the floc with separation distances equal to
    the Kolmogorov length and the inner viscous length scale.
18073
def diam_kolmogorov(EnergyDis, Temp, ConcAl, ConcClay, coag, material,
                    DIM_FRACTAL):
    
    return (material.Diameter
            * ((eta_kolmogorov(EnergyDis, Temp).magnitude / material.Diameter)
               * ((6 * frac_vol_floc_initial(ConcAl, ConcClay, coag, material))
                  / np.pi
                  )**(1/3)
               )**(3 / DIM_FRACTAL)
            )
236613
def size(self):
        """"""
        if isinstance(self.data, numpy.ndarray):
            h, w = self.data.shape[:2]
        elif isinstance(self.data, PIL.Image.Image):
            w, h = self.data.size()
        else:
            raise RuntimeError(
                'Cannot get size of "%s"' % self.data.__class__.__name__)
        return h, w
1141558
def time_col_turbulent(EnergyDis, ConcAl, ConcClay, coag, material,
                       DiamTarget, DIM_FRACTAL):
    
    return((1/6) * (6/np.pi)**(1/9) * EnergyDis**(-1/3) * DiamTarget**(2/3)
           * frac_vol_floc_initial(ConcAl, ConcClay, coag, material)**(-8/9)
           * (DiamTarget / material.Diameter)**((8*(DIM_FRACTAL-3)) / 9)
           )
664480
def determine_lengths(dtrajs):
    
    """
    if (isinstance(dtrajs[0], (int))):
        return len(dtrajs) * np.ones((1))
    lengths = np.zeros((len(dtrajs)))
    for i in range(len(dtrajs)):
        lengths[i] = len(dtrajs[i])
    return lengths
762509
def file_length(file_obj):
    
    file_obj.seek(0, 2)
    length = file_obj.tell()
    file_obj.seek(0)
    return length
867538
def get_size(self):
        
        raise NotImplementedError("%s not implemented for %s" % (self.get_size.__func__.__name__,
                                                                 self.__class__.__name__))
1196192
def output_size(self) -> Tuple[Sequence[Shape], Sequence[Shape], Sequence[Shape], int]:
        ''''''
        return (self.state_size, self.action_size, self.interm_size, 1)
101677
def time_col_laminar(EnergyDis, Temp, ConcAl, ConcClay, coag, material,
                     DiamTarget, DiamTube, DIM_FRACTAL, RatioHeightDiameter):
    
    return (((1/6) * ((6/np.pi)**(1/3))
             * frac_vol_floc_initial(ConcAl, ConcClay, coag, material) ** (-2/3)
             * (pc.viscosity_kinematic(Temp).magnitude / EnergyDis) ** (1 / 2)
             * (DiamTarget / material.Diameter) ** (2*DIM_FRACTAL/3 - 2)
             )  # End of the numerator
            / (gamma_coag(ConcClay, ConcAl, coag, material, DiamTube,
                          RatioHeightDiameter)
               )  # End of the denominator
            )
1297154
def PaperSize(s):
    """"""
    size = s.lower()
    f = "p"
    if size.endswith("-l"):
        f = "l"
        size = size[:-2]
    if size.endswith("-p"):
        size = size[:-2]
    rc = paperSizes.get(size, (-1, -1))
    if f == "p":
        return rc
    return (rc[1], rc[0])
571351
def size(self):
        
        if 'length' in self.metainfo['info']:   # Singlefile
            return self.metainfo['info']['length']
        elif 'files' in self.metainfo['info']:  # Multifile torrent
            return sum(fileinfo['length']
                       for fileinfo in self.metainfo['info']['files'])
8616
def get_size(self):
    
    if not self._is_open:
      raise IOError('Not opened.')

    if not hasattr(self._file_object, 'get_size'):
      if not self._size:
        current_offset = self.get_offset()
        self.seek(0, os.SEEK_END)
        self._size = self.get_offset()
        self.seek(current_offset, os.SEEK_SET)
      return self._size

    return self._file_object.get_size()
720835
def output_size(self):
    """"""
    if callable(self._output_size):
      self._output_size = self._output_size()
    return self._output_size
629865
def interm_size(self)-> Sequence[Sequence[int]]:
        '''
        '''
        fluents = self.domain.intermediate_fluents
        ordering = self.domain.interm_fluent_ordering
        return self._fluent_size(fluents, ordering)
312585
def ent_tank_a(self):
        
        # first guess planview area
        a_new = 1 * u.m**2
        a_ratio = 2  # set to >1+tolerance to start while loop
        tolerance = 0.01
        a_floc_pv = (
            self.floc.vol /
            (self.floc.downstream_H + (self.floc.HL / 2))
        )
        while a_ratio > (1 + tolerance):
            a_et_pv = a_new
            a_etf_pv = a_et_pv + a_floc_pv
            w_tot = a_etf_pv / self.floc.max_L
            w_chan = w_tot / self.floc.channel_n

            a_new = self.floc.max_L * w_chan
            a_ratio = a_new / a_et_pv
        return a_new
14118
def length(self, t0=0, t1=1, error=LENGTH_ERROR, min_depth=LENGTH_MIN_DEPTH):
        """"""
        if t0 == 0 and t1 == 1:
            if self._length_info['bpoints'] == self.bpoints() \
                    and self._length_info['error'] >= error \
                    and self._length_info['min_depth'] >= min_depth:
                return self._length_info['length']

        # using scipy.integrate.quad is quick
        if _quad_available:
            s = quad(lambda tau: abs(self.derivative(tau)), t0, t1,
                            epsabs=error, limit=1000)[0]
        else:
            s = segment_length(self, t0, t1, self.point(t0), self.point(t1),
                               error, min_depth, 0)

        if t0 == 0 and t1 == 1:
            self._length_info['length'] = s
            self._length_info['bpoints'] = self.bpoints()
            self._length_info['error'] = error
            self._length_info['min_depth'] = min_depth
            return self._length_info['length']
        else:
            return s
1296007
def size(self):
        
        N = self.nmax + 1;
        NC = N + self.mmax * (2 * N - self.mmax - 1);
        assert NC == len(self._vec)
        return NC
883897
def __shpFileLength(self):
        """"""
        # Start with header length
        size = 100
        # Calculate size of all shapes
        for s in self._shapes:
            # Add in record header and shape type fields
            size += 12
            # nParts and nPoints do not apply to all shapes
            #if self.shapeType not in (0,1):
            #       nParts = len(s.parts)
            #       nPoints = len(s.points)
            if hasattr(s,'parts'):
                nParts = len(s.parts)
            if hasattr(s,'points'):
                nPoints = len(s.points)
            # All shape types capable of having a bounding box
            if self.shapeType in (3,5,8,13,15,18,23,25,28,31):
                size += 32
            # Shape types with parts
            if self.shapeType in (3,5,13,15,23,25,31):
                # Parts count
                size += 4
                # Parts index array
                size += nParts * 4
            # Shape types with points
            if self.shapeType in (3,5,8,13,15,23,25,31):
                # Points count
                size += 4
                # Points array
                size += 16 * nPoints
            # Calc size of part types for Multipatch (31)
            if self.shapeType == 31:
                size += nParts * 4
            # Calc z extremes and values
            if self.shapeType in (13,15,18,31):
                # z extremes
                size += 16
                # z array
                size += 8 * nPoints
            # Calc m extremes and values
            if self.shapeType in (23,25,31):
                # m extremes
                size += 16
                # m array
                size += 8 * nPoints
            # Calc a single point
            if self.shapeType in (1,11,21):
                size += 16
            # Calc a single Z value
            if self.shapeType == 11:
                size += 8
            # Calc a single M value
            if self.shapeType in (11,21):
                size += 8
        # Calculate size as 16-bit words
        size //= 2
        return size