Пример #1
0
    def eval_bc(self, arg, sid):
        """ Evaluate regularized BC """
        r, th = domain_util.arg_to_polar(self.boundary, self.a, arg, sid)

        if r <= 0:
            return -self.eval_bc(-arg, sid)

        return self.eval_bc__noreg(arg, sid) - self.eval_regfunc(r, th)
Пример #2
0
    def eval_bc__noreg(self, arg, sid):
        # r > 0 only
        a = self.a
        nu = self.nu
        k = self.k

        r, th = domain_util.arg_to_polar(self.boundary, self.a, arg, sid)
        return self.eval_v(r, th)
Пример #3
0
            def eval_bc(self, arg, sid):
                r, th = domain_util.arg_to_polar(self.boundary, a, arg, sid)

                if sid == 0:
                    bc = eval_phi0(th) - eval_v_asympt(r, th)

                    for m in range(1, M+1):
                        bc -= a_coef[m-1] * jv(m*nu, k*r) * np.sin(m*nu*(th-a))

                    return bc

                elif sid == 1 and r >= 0:
                    return eval_phi1(r) - eval_v_asympt(r, 2*np.pi)

                elif sid == 2 and r >= 0:
                    return eval_phi2(r) - eval_v_asympt(r, a)

                return 0