예제 #1
0
    def setRefineCriteria(self,
                          domain=None,
                          ratio=10.0,
                          slope=0.8,
                          curve=0.8,
                          prune=0.05):
        """Set the criteria used to refine one domain.

        :param domain:
            domain object
        :param ratio:
            additional points will be added if the ratio of the spacing
            on either side of a grid point exceeds this value
        :param slope:
            maximum difference in value between two adjacent points, scaled by
            the maximum difference in the profile (0.0 < slope < 1.0). Adds
            points in regions of high slope.
        :param curve:
            maximum difference in slope between two adjacent intervals, scaled
            by the maximum difference in the profile (0.0 < curve < 1.0). Adds
            points in regions of high curvature.
        :param prune:
            if the slope or curve criteria are satisfied to the level of
            'prune', the grid point is assumed not to be needed and is removed.
            Set prune significantly smaller than 'slope' and 'curve'. Set to
            zero to disable pruning the grid.

        >>> s.setRefineCriteria(d, ratio=5.0, slope=0.2, curve=0.3,
        ...                     prune=0.03)
        """
        idom = domain.index()
        return _cantera.sim1D_setRefineCriteria(self._hndl, idom, ratio, slope,
                                                curve, prune)
예제 #2
0
파일: onedim.py 프로젝트: anujg1991/cantera
    def setRefineCriteria(self, domain = None, ratio = 10.0, slope = 0.8,
                          curve = 0.8, prune = 0.05):
        """Set the criteria used to refine one domain.

        :param domain:
            domain object
        :param ratio:
            additional points will be added if the ratio of the spacing
            on either side of a grid point exceeds this value
        :param slope:
            maximum difference in value between two adjacent points, scaled by
            the maximum difference in the profile (0.0 < slope < 1.0). Adds
            points in regions of high slope.
        :param curve:
            maximum difference in slope between two adjacent intervals, scaled
            by the maximum difference in the profile (0.0 < curve < 1.0). Adds
            points in regions of high curvature.
        :param prune:
            if the slope or curve criteria are satisfied to the level of
            'prune', the grid point is assumed not to be needed and is removed.
            Set prune significantly smaller than 'slope' and 'curve'. Set to
            zero to disable pruning the grid.

        >>> s.setRefineCriteria(d, ratio=5.0, slope=0.2, curve=0.3,
        ...                     prune=0.03)
        """
        idom = domain.index()
        return _cantera.sim1D_setRefineCriteria(self._hndl,
                                                idom, ratio, slope, curve, prune)