Cody

Solution 609629

Submitted on 1 Apr 2015 by Ritwik Rudra
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% Note % The following properties are measured at room temperature and are tensile % in a single direction. Some materials, such as metals are generally % isotropic, whereas others, like composite are highly anisotropic % (different properties in different directions). Also, property values can % range depending on the material grade. Finally, thermal or environmental % changes can alter these properties, sometimes drastically.

2   Pass
%% steel alloy (ASTM A36) S_y = 250e6; %Pa S_u = 400e6; %Pa e_y = 0.00125; e_u = 0.35; nu = 0.26; G = 79.3e9; %Pa E = 200e9; %Pa density = 7.85; %g/cm^3 sh_exp = 0.14; %strain-hardening exponent sh_coeff = 0.463; %strain-hardening coefficient BR_corr = 0.003571; assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 0.0036

3   Pass
%% titanium (Ti-6Al-4V) S_y = 830e6; %Pa S_u = 900e6; %Pa e_y = 0.00728; e_u = 0.14; nu = 0.342; G = 44e9; %Pa E = 114e9; %Pa density = 4.51; %g/cm^3 sh_exp = 0.04; %strain-hardening exponent sh_coeff = 0.974; %strain-hardening coefficient BR_corr = 0.052; assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 0.0520

4   Pass
%% Inconel 718 S_y = 1172e6; %Pa S_u = 1407e6; %Pa e_y = 0.00563; e_u = 0.027; nu = 0.29; G = 11.6e9; %Pa E = 208e9; %Pa density = 8.19; %g/cm^3 sh_exp = 0.075; %strain-hardening exponent sh_coeff = 1.845; %strain-hardening coefficient BR_corr = 0.2085; assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 0.2085

5   Pass
%% aluminum alloy (6061-T6)%^& S_y = 241e6; %Pa S_u = 300e6; %Pa e_y = 0.0035; e_u = 0.15; nu = 0.33; G = 26e9; %Pa E = 68.9e9; %Pa density = 2.7; %g/cm^3 sh_exp = 0.042; %strain-hardening exponent sh_coeff = 0.325; %strain-hardening coefficient BR_corr = 0.02333; assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 0.0233

6   Pass
%% copper S_y = 70e6; %Pa S_u = 220e6; %Pa e_y = 0.00054; e_u = 0.48; nu = 0.34; G = 48e9; %Pa E = 130e9; %Pa density = 8.92; %g/cm^3 sh_exp = 0.44; %strain-hardening exponent sh_coeff = 0.304; %strain-hardening coefficient BR_corr = 0.001125; assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 0.0011

7   Pass
%% rhenium S_y = 317e6; %Pa S_u = 1130e6; %Pa e_y = 0.000685; e_u = 0.24; nu = 0.3; G = 178e9; %Pa E = 463e9; %Pa density = 21.02; %g/cm^3 sh_exp = 0.353; %strain-hardening exponent sh_coeff = 1.870; %strain-hardening coefficient BR_corr = 0.002854; assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 0.0029

8   Pass
%% polymer (nylon, 6/6) S_y = 82e6; %Pa S_u = 82e6; %Pa e_y = 0.0265; e_u = 0.45; nu = 0.41; G = 2.8e9; %Pa E = 3.1e-2; %Pa density = 1.14; %g/cm^3 BR_corr = 0.058889; assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 0.0589

9   Pass
%% polymer (nylon, 6/6) reinforced with 45wt.% glass fiber S_y = 230e6; %Pa S_u = 230e6; %Pa e_y = 0.016; e_u = 0.016; nu = 0.35; G = 13.0e9; %Pa E = 14.5e9; %Pa density = 1.51; %g/cm^3 BR_corr = 1.0; assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 1

10   Pass
%% diamond S_y = 1200e6; %Pa S_u = 1200e6; %Pa e_y = 0.001; e_u = 0.001; nu = 0.20; G = 478e9; %Pa E = 1200e9; %Pa density = 3.51; %g/cm^3 BR_corr = 1.0; assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 1

11   Pass
%% ind = randi(4); switch ind case 1 e_y = 0.00125; e_u = 0.35; BR_corr = 0.003571; case 2 e_y = 0.00054; e_u = 0.48; BR_corr = 0.001125; case 3 e_y = 0.0035; e_u = 0.15; BR_corr = 0.02333; case 4 e_y = 0.00054; e_u = 0.48; BR_corr = 0.001125; end assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 0.0233

12   Pass
%% ind = randi(4); switch ind case 1 e_y = 0.0265; e_u = 0.45; BR_corr = 0.058889; case 2 e_y = 0.00728; e_u = 0.14; BR_corr = 0.052; case 3 e_y = 0.00563; e_u = 0.027; BR_corr = 0.2085; case 4 e_y = 0.016; e_u = 0.016; BR_corr = 1.0; end assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 0.0520

13   Pass
%% ind = randi(4); switch ind case 1 e_y = 0.00125; e_u = 0.35; BR_corr = 0.003571; case 2 e_y = 0.00563; e_u = 0.027; BR_corr = 0.2085; case 3 e_y = 0.00728; e_u = 0.14; BR_corr = 0.052; case 4 e_y = 0.00054; e_u = 0.48; BR_corr = 0.001125; end assert(abs(stress_strain3(e_y,e_u)-BR_corr)/BR_corr<1e-2)

ans = 0.0520