-
Notifications
You must be signed in to change notification settings - Fork 0
/
groinOpt.m
47 lines (34 loc) · 1.28 KB
/
groinOpt.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
clc
clear
close all
tic
%{
This code calculates the optimized Xg/Yg ratio for specified area of groin
series.
It takes area length, initial groin length, adjacent groin tip angle and
ratio interval as input.
cumSpace outpul should be analyzed for determining Xg/Yg ratio, grLength
gives groin length and space will give spaces between groins.
C.Özsoy (2020)
%}
%% Inputs
areaLength=935; % Area length in meter
iniGrLength=30; % Initial groin length
adjGrAngle=6; % Angle between adjacent groin tip (CEM suggest 6 degree)
ratio=2:0.01:3; % Xg/Yg ratio (CEM suggest between 2-3)
%% Calculation
alfa=deg2rad(adjGrAngle);
for i=ratio
index=find(ratio==i);
k=1;
cumSpace(index,k)=0;
grLength(index,k)=iniGrLength;
while cumSpace(index,k)<areaLength
space(index,k)=i*grLength(index,k);
diff(index,k)=tan(alfa)*space(index,k);
grLength(index,k+1)=grLength(index,k)+diff(index,k);
cumSpace(index,k+1)=cumSpace(index,k)+space(index,k);
k=k+1;
end
end
toc