-
Notifications
You must be signed in to change notification settings - Fork 0
/
IF2.m
28 lines (26 loc) · 900 Bytes
/
IF2.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function f = IF2(xi,eta,xk,yk,nkx,nky,L)
% IF2: Performs integration over an element
% the elements
% f = IF1(xi,eta,xk,yk,nkx,nky,L):
% Performs integration over an element
% input:
% xi = x location on element
% eta = y location on element
% xk = x-coordinate of the left node of the boundary element
% yk = y-coordinate of the left node of the boundary element
% nkx = x-component of normal vector of the element
% nky = y-component of normal vector of the element
% L = Length of the element
% output:
% f = Integral value
%
% Author: Divyaprakash
% Mechanical Engineer
% e-mail: [email protected]
% Date : 05 January 2022
A = L^2;
B = (-nky*(xk-xi) + (yk-eta)*nkx)*2*L;
E = (xk-xi)^2 + (yk-eta)^2;
fun = @(t) (nkx*(xk-xi)+nky*(yk-eta))./(A*t.^2 + B*t + E);
f = L/2/pi*integral(fun,0,1);
end