'Find a specific dimension which is part of the system.
dim can be a string or a dimension object. If no dimension is found,
then return None.'

def get_dim(self, dim):

    found_dim = None
    if isinstance(dim, string_types):
        dim = Symbol(dim)
    if dim.is_Symbol:
        for d in self._dims:
            if (dim in (d.name, d.symbol)):
                found_dim = d
                break
    elif isinstance(dim, Dimension):
        for (i, idim) in enumerate(self._dims):
            if (dim.get_dimensional_dependencies() == idim.get_dimensional_dependencies()):
                return idim
    return found_dim
