-
Notifications
You must be signed in to change notification settings - Fork 0
/
IF1.m
29 lines (26 loc) · 878 Bytes
/
IF1.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
29
function f = IF1(xi,eta,xk,yk,nkx,nky,L)
% IF1: 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) log(A*t.^2 + B*t + E);
f = L/4/pi*integral(fun,0,1);
end