Created
December 27, 2014 12:08
-
-
Save srmagura/57e877afe43d45c37037 to your computer and use it in GitHub Desktop.
get_u_reg_expr()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_u_reg_expr(): | |
''' | |
SymPy expression for expected solution to the regularized problem. | |
''' | |
k, R, r, th = symbols('k R r th') | |
a = pi/6 | |
nu = pi / (2*pi - a) | |
# True solution to original problem | |
u = besselj(nu/2, k*r) * sin(nu*(th-a)/2) | |
# Inhomogeneous part of asymptotic expansion | |
u -= get_u_asympt_expr() | |
# Compute the shc_coef using quadratures | |
problem = ShcBesselKnown() | |
# Homogeneous part of asymptotic expansion | |
for m in range(1, len(problem.shc_coef)+1): | |
u -= problem.shc_coef[m-1] * besselj(m*nu, k*r) * sin(m*nu*(th - a)) | |
return u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment