-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
KiranUofG
authored and
KiranUofG
committed
Aug 5, 2016
0 parents
commit bfff4ed
Showing
1 changed file
with
332 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,332 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from sympy import *" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 19, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"var('A0, A1, c, A,n')\n", | ||
"x = symbols('x')" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The following equation must be evaluated within LDVM:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"$$M_{\\beta} = \\int_A^c\\Delta p (x_b - x)dx=\\rho\\int_A^c\\Big[\\sqrt{\\Big(1+\\Big(\\dfrac{\\partial \\eta}{\\partial x}\\Big)^2\\Big)}(U\\cos\\alpha + \\dot{h}\\sin\\alpha - \\dot{\\alpha}\\eta + \\dfrac{\\partial \\phi_{LEV}}{\\partial x}+\\dfrac{\\partial \\phi_{TEV}}{\\partial x}\\Big)\\gamma(x) + \\dfrac{\\partial}{\\partial t}\\int_0^x\\gamma(x_0)dx_0\\Big](x_b-x)dx$$" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The first terms are already set up within LDVM and can be integrated easily by switching the lower index from 1 to the index corresponding to the hinge moment. The time derivative term which was analytically easy to derive for the pitching moment is no longer easy due to the lower bound no longer being zero. The infinite summation doesn't evaluate to the simple expressions given in Ramesh et al. and Katz and Plotkin." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"$$\\dfrac{\\partial}{\\partial t} \\int_A^c \\int_0^x \\gamma(x_0,t)dx_0 dx\n", | ||
"=\\dfrac{\\partial}{\\partial t} \\int_A^c \\int_0^\\theta 2U \\Bigg[A_0(t) \\dfrac{1 + \\cos\\theta_0}{\\sin\\theta_0} + \\sum_{n=1}^\\infty A_n(t) \\sin(n\\theta_0)\\Bigg] \\dfrac{c}{2} \\sin\\theta_0 d\\theta_0 dx $$\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"$$x_b\\dfrac{\\partial}{\\partial t} \\int_A^c \\int_0^\\theta cU \\Bigg[A_0(t) \\dfrac{1 + \\cos\\theta_0}{\\sin\\theta_0} + A_1(t) \\sin\\theta_0 +\\sum_{n=2}^\\infty A_n(t) \\sin(n\\theta_0)\\Bigg]\\sin\\theta_0 d\\theta_0 dx$$" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 14, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"A0*(x + sin(x))" | ||
] | ||
}, | ||
"execution_count": 14, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"integrate(A0*(1 + cos(x)),x)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 16, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"A1*(x/2 - sin(x)*cos(x)/2)" | ||
] | ||
}, | ||
"execution_count": 16, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"integrate(A1*sin(x)**2,x)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 20, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"Piecewise((-x*sin(x)**2/2 - x*cos(x)**2/2 + sin(x)*cos(x)/2, Eq(n, -1)), (x*sin(x)**2/2 + x*cos(x)**2/2 - sin(x)*cos(x)/2, Eq(n, 1)), (-n*sin(x)*cos(n*x)/(n**2 - 1) + sin(n*x)*cos(x)/(n**2 - 1), True))" | ||
] | ||
}, | ||
"execution_count": 20, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"integrate(sin(n*x)*sin(x),x)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"$$x_b\\dfrac{\\partial}{\\partial t}cU \\int_A^c\\Bigg\\{A_0(t)(\\theta+\\sin\\theta) + A_1\\Big(\\dfrac{\\theta}{2} - \\dfrac{\\sin\\theta\\cos\\theta}{2}\\Big)+ \\sum_{n=2}^\\infty A_n(t) \\Big[\\dfrac{\\sin(n\\theta)\\cos(\\theta)-n\\sin(\\theta)\\cos(n\\theta)}{n^2 - 1}\\Big]\\Bigg\\}dx$$" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"$$x_b\\dfrac{\\partial}{\\partial t}\\dfrac{c^2U}{2} \\int_A^c\\Bigg\\{A_0(t)(\\theta+\\sin\\theta) + A_1\\Big(\\dfrac{\\theta}{2} - \\dfrac{\\sin\\theta\\cos\\theta}{2}\\Big)+ \\sum_{n=2}^\\infty A_n(t) \\Big[\\dfrac{\\sin(n\\theta)\\cos(\\theta)-n\\sin(\\theta)\\cos(n\\theta)}{n^2 - 1}\\Big]\\Bigg\\}\\sin\\theta d\\theta$$" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The definite integral is evaluated using symbolic math in Python and can be seen below. The first two terms generate relatively simple expressions while the latter has conditions placed upon it. Neglecting the first output in piecewise as it relates to n = -2, the remainder of the output dictates what the series will generate for n >= 2. " | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 33, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"-A0*(A*sin(A)**2/2 + A*cos(A)**2/2 - A*cos(A) - sin(A)*cos(A)/2 + sin(A)) + 3*pi*A0/2" | ||
] | ||
}, | ||
"execution_count": 33, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"integrate(A0*(x+sin(x))*sin(x),(x,A,pi))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 34, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"-A1*(-A*cos(A)/2 - sin(A)**3/6 + sin(A)/2) + pi*A1/2" | ||
] | ||
}, | ||
"execution_count": 34, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"integrate(A1*(x/2 - sin(x)*cos(x)/2)*sin(x),(x,A,pi))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 35, | ||
"metadata": { | ||
"collapsed": false, | ||
"scrolled": true | ||
}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"Piecewise((-A*sin(A)**2*cos(2*A)/4 + A*sin(A)*sin(2*A)*cos(A)/2 + A*cos(A)**2*cos(2*A)/4 - 5*sin(A)**2*sin(2*A)/24 - sin(2*A)*cos(A)**2/8 - pi/4, Eq(n, -2)), (A*sin(A)**2*cos(2*A)/4 - A*sin(A)*sin(2*A)*cos(A)/2 - A*cos(A)**2*cos(2*A)/4 + 5*sin(A)**2*sin(2*A)/24 + sin(2*A)*cos(A)**2/8 + pi/4, Eq(n, 2)), (n**2*sin(A)**2*sin(A*n)/(n**4 - 5*n**2 + 4) + 3*n*sin(A)*cos(A)*cos(A*n)/(n**4 - 5*n**2 + 4) - sin(A)**2*sin(A*n)/(n**4 - 5*n**2 + 4) + 3*sin(pi*n)/(n**4 - 5*n**2 + 4) - 3*sin(A*n)*cos(A)**2/(n**4 - 5*n**2 + 4), True))" | ||
] | ||
}, | ||
"execution_count": 35, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"integrate((-n*sin(x)*cos(n*x)/(n**2 - 1) + sin(n*x)*cos(x)/(n**2 - 1))*sin(x),(x,A,pi))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The last integration that needs to be determined is the following:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"$$\\dfrac{\\partial}{\\partial t}\\dfrac{c^2U}{2} \\int_A^c x\\Bigg\\{A_0(t)(\\theta+\\sin\\theta) + A_1\\Big(\\dfrac{\\theta}{2} - \\dfrac{\\sin\\theta\\cos\\theta}{2}\\Big)+ \\sum_{n=2}^\\infty A_n(t) \\Big[\\dfrac{\\sin(n\\theta)\\cos(\\theta)-n\\sin(\\theta)\\cos(n\\theta)}{n^2 - 1}\\Big]\\Bigg\\}\\sin\\theta d\\theta$$" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"$$\\dfrac{\\partial}{\\partial t} \\dfrac{c^3U}{4}\\int_A^c\\Bigg\\{A_0(t)(\\theta+\\sin\\theta) + A_1\\Big(\\dfrac{\\theta}{2} - \\dfrac{\\sin\\theta\\cos\\theta}{2}\\Big)+ \\sum_{n=2}^\\infty A_n(t) \\Big[\\dfrac{\\sin(n\\theta)\\cos(\\theta)-n\\sin(\\theta)\\cos(n\\theta)}{n^2 - 1}\\Big]\\Bigg\\}\\sin\\theta(1-\\cos\\theta) d\\theta$$" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 36, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"-A0*(A*sin(A)**2/4 + 3*A*cos(A)**2/4 - A*cos(A) - sin(A)**3/3 - 3*sin(A)*cos(A)/4 + sin(A)) + 7*pi*A0/4" | ||
] | ||
}, | ||
"execution_count": 36, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"integrate(A0*(x+sin(x))*sin(x)*(1-cos(x)),(x,A,pi))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 37, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"-A1*(A*sin(A)**4/16 + A*sin(A)**2*cos(A)**2/8 - A*sin(A)**2/8 + A*cos(A)**4/16 + A*cos(A)**2/8 - A*cos(A)/2 + sin(A)**3*cos(A)/16 - sin(A)**3/6 - sin(A)*cos(A)**3/16 - sin(A)*cos(A)/8 + sin(A)/2) + 11*pi*A1/16" | ||
] | ||
}, | ||
"execution_count": 37, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"integrate(A1*(x/2 - sin(x)*cos(x)/2)*sin(x)*(1-cos(x)),(x,A,pi))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 38, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"Piecewise((A*sin(A)**3*sin(3*A)/16 + 3*A*sin(A)**2*cos(A)*cos(3*A)/16 - 3*A*sin(A)*sin(3*A)*cos(A)**2/16 - A*cos(A)**3*cos(3*A)/16 + sin(A)**2*sin(3*A)*cos(A)/16 - sin(A)**2*sin(3*A)/5 - 9*sin(A)*cos(A)*cos(3*A)/40 + sin(3*A)*cos(A)**3/48 + 3*sin(3*A)*cos(A)**2/40 + pi/16, Eq(n, -3)), (-A*sin(A)**2*cos(2*A)/4 + A*sin(A)*sin(2*A)*cos(A)/2 + A*cos(A)**2*cos(2*A)/4 + 2*sin(A)**3*cos(2*A)/15 - 4*sin(A)**2*sin(2*A)*cos(A)/15 - 5*sin(A)**2*sin(2*A)/24 - 2*sin(A)*cos(A)**2*cos(2*A)/5 + sin(2*A)*cos(A)**3/5 - sin(2*A)*cos(A)**2/8 - pi/4, Eq(n, -2)), (A*sin(A)**2*cos(2*A)/4 - A*sin(A)*sin(2*A)*cos(A)/2 - A*cos(A)**2*cos(2*A)/4 - 2*sin(A)**3*cos(2*A)/15 + 4*sin(A)**2*sin(2*A)*cos(A)/15 + 5*sin(A)**2*sin(2*A)/24 + 2*sin(A)*cos(A)**2*cos(2*A)/5 - sin(2*A)*cos(A)**3/5 + sin(2*A)*cos(A)**2/8 + pi/4, Eq(n, 2)), (-A*sin(A)**3*sin(3*A)/16 - 3*A*sin(A)**2*cos(A)*cos(3*A)/16 + 3*A*sin(A)*sin(3*A)*cos(A)**2/16 + A*cos(A)**3*cos(3*A)/16 - sin(A)**2*sin(3*A)*cos(A)/16 + sin(A)**2*sin(3*A)/5 + 9*sin(A)*cos(A)*cos(3*A)/40 - sin(3*A)*cos(A)**3/48 - 3*sin(3*A)*cos(A)**2/40 - pi/16, Eq(n, 3)), (-n**4*sin(A)**2*sin(A*n)*cos(A)/(n**6 - 14*n**4 + 49*n**2 - 36) + n**4*sin(A)**2*sin(A*n)/(n**6 - 14*n**4 + 49*n**2 - 36) + n**3*sin(A)**3*cos(A*n)/(n**6 - 14*n**4 + 49*n**2 - 36) - 3*n**3*sin(A)*cos(A)**2*cos(A*n)/(n**6 - 14*n**4 + 49*n**2 - 36) + 3*n**3*sin(A)*cos(A)*cos(A*n)/(n**6 - 14*n**4 + 49*n**2 - 36) + 4*n**2*sin(A)**2*sin(A*n)*cos(A)/(n**6 - 14*n**4 + 49*n**2 - 36) - 10*n**2*sin(A)**2*sin(A*n)/(n**6 - 14*n**4 + 49*n**2 - 36) + 6*n**2*sin(pi*n)/(n**6 - 14*n**4 + 49*n**2 - 36) + 3*n**2*sin(A*n)*cos(A)**3/(n**6 - 14*n**4 + 49*n**2 - 36) - 3*n**2*sin(A*n)*cos(A)**2/(n**6 - 14*n**4 + 49*n**2 - 36) - 4*n*sin(A)**3*cos(A*n)/(n**6 - 14*n**4 + 49*n**2 - 36) + 12*n*sin(A)*cos(A)**2*cos(A*n)/(n**6 - 14*n**4 + 49*n**2 - 36) - 27*n*sin(A)*cos(A)*cos(A*n)/(n**6 - 14*n**4 + 49*n**2 - 36) + 9*sin(A)**2*sin(A*n)/(n**6 - 14*n**4 + 49*n**2 - 36) - 39*sin(pi*n)/(n**6 - 14*n**4 + 49*n**2 - 36) - 12*sin(A*n)*cos(A)**3/(n**6 - 14*n**4 + 49*n**2 - 36) + 27*sin(A*n)*cos(A)**2/(n**6 - 14*n**4 + 49*n**2 - 36), True))" | ||
] | ||
}, | ||
"execution_count": 38, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"integrate((-n*sin(x)*cos(n*x)/(n**2 - 1) + sin(n*x)*cos(x)/(n**2 - 1))*sin(x)*(1-cos(x)),(x,A,pi))" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Again, the expressions generated are very large and could be computationally intensive. The first two piecewise generated solutions are neglected as they deal with n = -2,-3." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python [Root]", | ||
"language": "python", | ||
"name": "Python [Root]" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.5.2" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |