Skip to content

Commit

Permalink
move core MEEM files out of dev folder and into mdocean folder
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccamccabe committed May 21, 2024
1 parent 2e46b44 commit 3a93eb4
Show file tree
Hide file tree
Showing 21 changed files with 10 additions and 174 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
fname = ['N' num2str(N_num) '_M' num2str(M_num) '_K' num2str(K_num) '_heaving_' heaving];

% generate matlab functions from symbolic equations if needed
if ~exist(['dev/MEEM/generated/A_b_matrix_' fname],'file') || ...
~exist(['dev/MEEM/generated/hydro_potential_velocity_fields_' fname],'file')
if ~exist(['simulation/modules/MEEM/generated/A_b_matrix_' fname],'file') || ...
~exist(['simulation/modules/MEEM/generated/hydro_potential_velocity_fields_' fname],'file')
create_symbolic_expressions(heaving_IC, heaving_OC, auto_BCs, N_num, M_num, K_num, fname)
end

Expand Down Expand Up @@ -402,11 +402,11 @@ syms C_1n_1(n) C_1m_2(m) C_2n_1(n) C_2m_2(m) B_k(k) % unknown coefficients
% plot(full_line, bars(2)*[1,1], 'k') % first horizontal
% plot(full_line, bars(3)*[1,1], 'k') % first horizontal

matlabFunction(A,b,'File',['dev/MEEM/generated/A_b_matrix_' fname], 'Vars',[a1,a2,d1,d2,h,m0,m_k_const]);
matlabFunction(A,b,'File',['simulation/modules/MEEM/generated/A_b_matrix_' fname], 'Vars',[a1,a2,d1,d2,h,m0,m_k_const]);

matlabFunction(hydro_nondim_NMK,phi_i1_NMK,phi_i2_NMK,phi_e_NMK,phi_p_i1_NMK,phi_p_i2_NMK,...
phi_h_i1_NMK,phi_h_i2_NMK,v_1_r_NMK,v_1_z_NMK,v_2_r_NMK,v_2_z_NMK,v_e_r_NMK,v_e_z_NMK,...
'File',['dev/MEEM/generated/hydro_potential_velocity_fields_' fname],...
'File',['simulation/modules/MEEM/generated/hydro_potential_velocity_fields_' fname],...
'Vars',[a1,a2,d1,d2,h,m0,m_k_const,unknowns_const,r,z]);

end
Expand Down
164 changes: 0 additions & 164 deletions mdocean/simulation/modules/dynamics/get_E_A_B.m

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@

%% validation functions
function plot_potential_validation()
a1_potential = readmatrix("dev/MEEM/MEEM_validation/potential_a1.csv");
a2_potential = readmatrix("dev/MEEM/MEEM_validation/potential_a2.csv");
a1_potential = readmatrix("inputs/validation/MEEM_validation/potential_a1.csv");
a2_potential = readmatrix("inputs/validation/MEEM_validation/potential_a2.csv");
plot(a1_potential(:,1),a1_potential(:,2),'m-*','DisplayName','Yeung 2012 at a_1')
plot(a2_potential(:,1),a2_potential(:,2),'b-*','DisplayName','Yeung 2012 at a_2')
end

function plot_hydro_coeff_validation()
mu_nondim = readmatrix("dev/MEEM/MEEM_validation/added_mass.csv");
lambda_nondim = readmatrix("dev/MEEM/MEEM_validation/damping.csv");
excitation_nondim = readmatrix("dev/MEEM/MEEM_validation/excitation.csv");
excitation_phase_nondim = readmatrix("dev/MEEM/MEEM_validation/excitation_phase.csv");
mu_nondim = readmatrix("inputs/validation/MEEM_validation/added_mass.csv");
lambda_nondim = readmatrix("inputs/validation/MEEM_validation/damping.csv");
excitation_nondim = readmatrix("inputs/validation/MEEM_validation/excitation.csv");
excitation_phase_nondim = readmatrix("inputs/validation/MEEM_validation/excitation_phase.csv");

plot(mu_nondim(:,1), mu_nondim(:,2), 'c--','DisplayName','Added Mass Yeung 2012')
plot(lambda_nondim(:,1), lambda_nondim(:,2),'m--','DisplayName','Damping Yeung 2012')
Expand Down

0 comments on commit 3a93eb4

Please sign in to comment.