Skip to content

Commit

Permalink
just adjust comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccamccabe committed Nov 10, 2024
1 parent bbd4b65 commit 165fcec
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions mdocean/simulation/modules/geometry.m
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
V_vc_m = A_vc_c * (h_s - h_d); % volume of column material

% damping plate material use
A_d = pi/4 * D_d^2; % damping plate itself
A_d = pi/4 * D_d^2; % damping plate itself
num_supports = 4;
L_dt = D_d / (2*cos(theta_dt));
D_dt_i = D_dt - 2 * t_dt;
Expand Down Expand Up @@ -130,11 +130,11 @@
D_s/(2*t_sr),...
0];%D_or/(2*t_r)];
I = [I_f, I_vc, I_rp];
T = [T_f_2, T_s, h_d]; % drafts: used to calculated F_surge in dynamics.m
m_m = m_f_m + m_s_m; % total mass of material
T = [T_f_2, T_s, h_d]; % drafts: used to calculated F_surge in dynamics.m
m_m = m_f_m + m_s_m; % total mass of material

V_d = [V_f_d, V_vc_d, V_d_d]; % volume displaced
mass = [m_f_m, m_vc_m, m_d_m]; % material mass of each structure
V_d = [V_f_d, V_vc_d, V_d_d]; % volume displaced
mass = [m_f_m, m_vc_m, m_d_m]; % material mass of each structure

%% Metacentric Height Calculation

Expand All @@ -144,7 +144,6 @@
D_term_3 = -6*D_s^2 + 3*D_f_b^2 + 2*D_f_b*D_f + D_f^2;
CB_f_integral = D_term_1*T_f_1^2 + D_term_2*T_f_1*T_f_2 + D_term_3*T_f_2^2;
CB_f_from_waterline = 1/V_f_d * pi/48 * CB_f_integral;
%CB_f_from_waterline = T_f_2 / 2; % cylinder case

T_term_1 = T_f_1^2 + 2*T_f_1*T_f_2 - 3*T_f_2^2;
T_term_2 = 2*T_f_1^2 - 2 *T_f_2^2;
Expand All @@ -156,7 +155,6 @@
CM_f_num = T_term_1*D_f_b^2 + T_term_2*D_f_b*D_f + T_term_3*D_f^2 + T_term_4*D_s^2;
CM_f_den = T_term_5*D_f_b^2 + T_term_5*D_f_b*D_f + T_term_6*D_f^2 + T_term_7*D_s^2;
CM_f_from_waterline = CM_f_num / CM_f_den;
%CM_f_from_waterline = T_f_2 - h_f/2; % cylinder case

% centers of buoyancy, measured from keel (bottom of damping plate)
CB_f = T_s - CB_f_from_waterline;
Expand Down

0 comments on commit 165fcec

Please sign in to comment.