-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeo_points_ramc2.m
65 lines (55 loc) · 2.23 KB
/
Geo_points_ramc2.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Seatrec Spring 2023 %%%%
%%%% Code for Calculating Geo pts %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clc
clear all
%% RAM C-II geometry (2D)
r_w = 15.24e-2; %(m) Domain Nose radius
theta_w = 9*pi/180; %(rad) Wall Semi-Cone angle
L = 129.54e-2; %(m) Length
r_d = 4*r_w; %(m) Domain Nose radius
theta_d = 4*theta_w; %(rad) Domain Semi-Cone angle
L2 = L + r_d/2; %(m) Domain length
% Wall
Pt1 = [0, 0];
Pt2 = [r_w-r_w*sin(theta_w), r_w*cos(theta_w)];
Pt3 = [L, Pt2(2)+(L-Pt2(1))*tan(theta_w)];
% Domain
Pt4 = [-r_d/2, 0];
Pt5 = [Pt4(1)+r_d-r_d*sin(theta_d), r_d*cos(theta_d)];
Pt6 = [L, Pt5(2)+(L2-(Pt5(1)-Pt4(1)))*tan(theta_d)];
Ptc1 = [r_w, 0];
Ptc2 = [Pt4(1)+r_d, 0];
% Curve lengths
d1 = r_w*(pi/2-theta_w); %(m) Wall nose radius
d2 = r_d*(pi/2-theta_d); %(m) Domain nose radius
d3 = norm(Pt4-Pt1,2); %(m) Farfield from wall at nose
d4 = norm(Pt5-Pt6,2); %(m) Domain cone length
d5 = norm(Pt6-Pt3,2); %(m) Domain outlet length
d6 = norm(Pt3-Pt2,2); %(m) Wall cone length
% Meshing
n1 = 100; % Number of divisions on nose
n2 = n1; % Number of divisions on domain nose
% Element sizes
e1 = d1/n1; % Size on nose
e2 = d2/n1; % Size on domain nose
% Number of elements on transfinite curves
n3 = round(d3/e1);
n4 = round(d4/e2);
n5 = round(log(1-d5*(1-1.1)/(e1))/log(1.1));
n6 = round(d6/e1);
% Refinements
N_o = [n1;n2;n3;n4;n5;n6];
N_c1 = round([n1;n2*0.875;n3;n4*0.875;n5*0.875;n6]);
% Didn't converge -----------------------------------------------------
% N_c2 = round([n1*0.875;n2*0.875;n3*0.875;n4*0.875;n5*0.875;n6*0.875]);
% N_c3 = round([n1*0.75;n2*0.75;n3*0.75;n4*0.75;n5*0.75;n6*0.75]);
% N_c4 = round([n1*0.75;n2*0.5;n3*0.75;n4*0.5;n5*0.5;n6*0.75]);
% N_c5 = round([n1*0.5;n2*0.5;n3*0.5;n4*0.5;n5*0.5;n6*0.5]);
% ---------------------------------------------------------------------
N_r1 = [n1*2;n2;n3*2;n4;n5;n6*2];
N_r2 = N_o*2;
N_r3 = [n1;n2*2;n3;n4*2;n5*2;n6];
N_r4 = N_o*4;
S = [N_c1,N_o,N_r1,N_r2,N_r3,N_r4];