{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2025-12-14T01:33:56.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2025-12-14T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":8054,"title":"Stress-Strain Properties - 7","description":"The toughness of a material is technically defined as the plastic strain energy absorbed by the material (the plastic region in the figure below). Practically speaking, it's a measure of how much deformation a material can undergo (or energy it can absorb) before failure.\r\n\r\nWrite a function to calculate the toughness of a material—the absorbed strain energy minus the resilience. This can be accomplished by combining the code written in problem 2 (resilience) and problem 6 (absorbed strain energy). Also, return the fraction of absorbed strain energy that the toughness represents.\r\nPrevious problem: 6 - absorbed strain energy. Next problem: 8 - material properties list.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.440001px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 499px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 332px 249.5px; transform-origin: 332px 249.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 31.5px; text-align: left; transform-origin: 309px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe toughness of a material is technically defined as the plastic strain energy absorbed by the material (the plastic region in the figure below). Practically speaking, it's a measure of how much deformation a material can undergo (or energy it can absorb) before failure.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 304px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 152px; text-align: center; transform-origin: 309px 152px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cimg class=\"imageNode\" style=\"vertical-align: baseline\" src=\"https://qph.cf2.quoracdn.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\" data-image-state=\"image-loaded\"\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 84px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 42px; text-align: left; transform-origin: 309px 42px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWrite a function to calculate the toughness of a material—the absorbed strain energy minus the resilience. This can be accomplished by combining the code written in\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/8049-stress-strain-properties-2\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eproblem 2\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e (resilience) and\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eproblem 6\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e (absorbed strain energy). Also, return the fraction of absorbed strain energy that the toughness represents.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 10.5px; text-align: left; transform-origin: 309px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003ePrevious problem: 6 -\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eabsorbed strain energy\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. Next problem: 8 -\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003ematerial properties list\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff)\r\n\r\nT = 1;\r\n\r\nfrac = 0.5;\r\n\r\nend\r\n","test_suite":"%% Note\r\n% The following properties are measured at room temperature and are tensile\r\n% in a single direction. Some materials, such as metals, are generally\r\n% isotropic, whereas others, like composites, are highly anisotropic\r\n% (different properties in different directions). Also, property values can\r\n% range depending on the material grade. Finally, thermal or environmental\r\n% changes can alter these properties, sometimes drastically.\r\n\r\n%% steel alloy (ASTM A36)\r\nS_y = 250e6; %Pa\r\nS_u = 400e6; %Pa\r\ne_y = 0.00125;\r\ne_u = 0.35;\r\nnu = 0.26;\r\nG = 79.3e9; %Pa\r\nE = 200e9; %Pa\r\ndensity = 7.85; %g/cm^3\r\nsh_exp = 0.14; %strain-hardening exponent\r\nsh_coeff = 463e6; %strain-hardening coefficient\r\nT_corr = 12.26e7;\r\nfrac_corr = 0.9987;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% titanium (Ti-6Al-4V)\r\nS_y = 830e6; %Pa\r\nS_u = 900e6; %Pa\r\ne_y = 0.00728;\r\ne_u = 0.14;\r\nnu = 0.342;\r\nG = 44e9; %Pa\r\nE = 114e9; %Pa\r\ndensity = 4.51; %g/cm^3\r\nsh_exp = 0.04; %strain-hardening exponent\r\nsh_coeff = 974e6; %strain-hardening coefficient\r\nT_corr = 11.82e7;\r\nfrac_corr = 0.9751;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% Inconel 718\r\nS_y = 1172e6; %Pa\r\nS_u = 1407e6; %Pa\r\ne_y = 0.00563;\r\ne_u = 0.027;\r\nnu = 0.29;\r\nG = 11.6e9; %Pa\r\nE = 208e9; %Pa\r\ndensity = 8.19; %g/cm^3\r\nsh_exp = 0.075; %strain-hardening exponent\r\nsh_coeff = 1845e6; %strain-hardening coefficient\r\nT_corr = 3.205e7;\r\nfrac_corr = 0.9067;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% aluminum alloy (6061-T6)\r\nS_y = 241e6; %Pa\r\nS_u = 300e6; %Pa\r\ne_y = 0.0035;\r\ne_u = 0.15;\r\nnu = 0.33;\r\nG = 26e9; %Pa\r\nE = 68.9e9; %Pa\r\ndensity = 2.7; %g/cm^3\r\nsh_exp = 0.042; %strain-hardening exponent\r\nsh_coeff = 325e6; %strain-hardening coefficient\r\nT_corr = 4.279e7;\r\nfrac_corr = 0.9902;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% copper\r\nS_y = 70e6; %Pa\r\nS_u = 220e6; %Pa\r\ne_y = 0.00054;\r\ne_u = 0.48;\r\nnu = 0.34;\r\nG = 48e9; %Pa\r\nE = 130e9; %Pa\r\ndensity = 8.92; %g/cm^3\r\nsh_exp = 0.44; %strain-hardening exponent\r\nsh_coeff = 304e6; %strain-hardening coefficient\r\nT_corr = 7.340e7;\r\nfrac_corr = 0.9997;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% rhenium\r\nS_y = 317e6; %Pa\r\nS_u = 1130e6; %Pa\r\ne_y = 0.000685;\r\ne_u = 0.24;\r\nnu = 0.3;\r\nG = 178e9; %Pa\r\nE = 463e9; %Pa\r\ndensity = 21.02; %g/cm^3\r\nsh_exp = 0.353; %strain-hardening exponent\r\nsh_coeff = 1870e6; %strain-hardening coefficient\r\nT_corr = 20.05e7;\r\nfrac_corr = 0.9995;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% polymer (nylon, 6/6)\r\nS_y = 82e6; %Pa\r\nS_u = 82e6; %Pa\r\ne_y = 0.0265;\r\ne_u = 0.45;\r\nnu = 0.41;\r\nG = 2.8e9; %Pa\r\nE = 3.1e9; %Pa\r\ndensity = 1.14; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nT_corr = 3.473e7;\r\nfrac_corr = 0.9697;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% polymer (nylon, 6/6) reinforced with 45wt.% glass fiber\r\nS_y = 230e6; %Pa\r\nS_u = 230e6; %Pa\r\ne_y = 0.016;\r\ne_u = 0.016;\r\nnu = 0.35;\r\nG = 13.0e9; %Pa\r\nE = 14.5e9; %Pa\r\ndensity = 1.51; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nT_corr = 0;\r\nfrac_corr = 0;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(isequal(T,T_corr))\r\nassert(isequal(frac,frac_corr))\r\n\r\n%% diamond\r\nS_y = 1200e6; %Pa\r\nS_u = 1200e6; %Pa\r\ne_y = 0.001;\r\ne_u = 0.001;\r\nnu = 0.20;\r\nG = 478e9; %Pa\r\nE = 1200e9; %Pa\r\ndensity = 3.51; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nT_corr = 0;\r\nfrac_corr = 0;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(isequal(T,T_corr))\r\nassert(isequal(frac,frac_corr))\r\n\r\n%%\r\nfor i = 1:30\r\nind = randi(8);\r\nswitch ind\r\n\tcase 1\r\n\t\tS_y = 250e6; %Pa\r\n\t\te_y = 0.00125;\r\n\t\te_u = 0.35;\r\n\t\tsh_exp = 0.14; %strain-hardening exponent\r\n\t\tsh_coeff = 463e6; %strain-hardening coefficient\r\n\t\tT_corr = 12.26e7;\r\n\t\tfrac_corr = 0.9987;\r\n\t\t[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\n\t\tassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\n\t\tassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\tcase 2\r\n\t\tS_y = 830e6; %Pa\r\n\t\te_y = 0.00728;\r\n\t\te_u = 0.14;\r\n\t\tsh_exp = 0.04; %strain-hardening exponent\r\n\t\tsh_coeff = 974e6; %strain-hardening coefficient\r\n\t\tT_corr = 11.82e7;\r\n\t\tfrac_corr = 0.9751;\r\n\t\t[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\n\t\tassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\n\t\tassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\tcase 3\r\n\t\tS_y = 230e6; %Pa\r\n\t\te_y = 0.016;\r\n\t\te_u = 0.016;\r\n\t\tsh_exp = 0; %strain-hardening exponent\r\n\t\tsh_coeff = 0; %strain-hardening coefficient\r\n\t\tT_corr = 0;\r\n\t\tfrac_corr = 0;\r\n\t\t[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\n\t\tassert(isequal(T,T_corr))\r\n\t\tassert(isequal(frac,frac_corr))\r\n\tcase 4\r\n\t\tS_y = 317e6; %Pa\r\n\t\te_y = 0.000685;\r\n\t\te_u = 0.24;\r\n\t\tsh_exp = 0.353; %strain-hardening exponent\r\n\t\tsh_coeff = 1870e6; %strain-hardening coefficient\r\n\t\tT_corr = 20.05e7;\r\n\t\tfrac_corr = 0.9995;\r\n\t\t[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\n\t\tassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\n\t\tassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\tcase 5\r\n\t\tS_y = 70e6; %Pa\r\n\t\te_y = 0.00054;\r\n\t\te_u = 0.48;\r\n\t\tsh_exp = 0.44; %strain-hardening exponent\r\n\t\tsh_coeff = 304e6; %strain-hardening coefficient\r\n\t\tT_corr = 7.340e7;\r\n\t\tfrac_corr = 0.9997;\r\n\tcase 6\r\n\t\tS_y = 1172e6; %Pa\r\n\t\te_y = 0.00563;\r\n\t\te_u = 0.027;\r\n\t\tsh_exp = 0.075; %strain-hardening exponent\r\n\t\tsh_coeff = 1845e6; %strain-hardening coefficient\r\n\t\tT_corr = 3.205e7;\r\n\t\tfrac_corr = 0.9067;\r\n\tcase 7\r\n\t\tS_y = 82e6; %Pa\r\n\t\te_y = 0.0265;\r\n\t\te_u = 0.45;\r\n\t\tsh_exp = 0; %strain-hardening exponent\r\n\t\tsh_coeff = 0; %strain-hardening coefficient\r\n\t\tT_corr = 3.473e7;\r\n\t\tfrac_corr = 0.9697;\r\n\tcase 8\r\n\t\tS_y = 241e6; %Pa\r\n\t\te_y = 0.0035;\r\n\t\te_u = 0.15;\r\n\t\tsh_exp = 0.042; %strain-hardening exponent\r\n\t\tsh_coeff = 325e6; %strain-hardening coefficient\r\n\t\tT_corr = 4.279e7;\r\n\t\tfrac_corr = 0.9902;\r\nend\r\nend % for i = 1:30\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":26769,"edited_by":26769,"edited_at":"2024-03-27T17:44:32.000Z","deleted_by":null,"deleted_at":null,"solvers_count":88,"test_suite_updated_at":"2021-08-03T17:04:10.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-03-30T22:03:11.000Z","updated_at":"2026-02-19T09:46:19.000Z","published_at":"2015-03-30T22:03:11.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe toughness of a material is technically defined as the plastic strain energy absorbed by the material (the plastic region in the figure below). Practically speaking, it's a measure of how much deformation a material can undergo (or energy it can absorb) before failure.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"center\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"298\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"420\\\"/\u003e\u003cw:attr w:name=\\\"verticalAlign\\\" w:val=\\\"baseline\\\"/\u003e\u003cw:attr w:name=\\\"altText\\\" w:val=\\\"\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate the toughness of a material—the absorbed strain energy minus the resilience. This can be accomplished by combining the code written in\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/8049-stress-strain-properties-2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eproblem 2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (resilience) and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eproblem 6\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (absorbed strain energy). Also, return the fraction of absorbed strain energy that the toughness represents.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePrevious problem: 6 -\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eabsorbed strain energy\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Next problem: 8 -\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ematerial properties list\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"target\":\"/media/image1.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"relationshipId\":\"rId1\"}]},{\"partUri\":\"/media/image1.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"contentType\":\"image/net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"content\":\"https://qph.cf2.quoracdn.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":8053,"title":"Stress-Strain Properties - 6","description":"The total energy absorbed by a material up to failure in a tensile test is termed the absorbed strain energy. With respect to the figure below, it is the total area of the elastic and plastic regions and can be calculated by integrating the stress-strain curve. As a first approximation, many stress-strain responses can be approximated by:\r\n\r\nwhere K is a strength coefficient, eps_p is the plastic strain, and n is the hardening exponent. Stress as a function of strain can be calculated by creating a strain vector from zero to the ultimate strain and integrating the stress values in that vector.\r\n\r\n(from quora.com)\r\nWrite a function to return the absorbed strain energy for a material provided K and n. If the material does not strain harden, then K and n will be set equal to zero. In these cases, the absorbed strain energy is equal to the resilience (triangular area up to yield point) and any absorbed plastic energy, if applicable, which can be approximated by a rectangle from the yield point to the failure point with those stresses being equal. If the ultimate strain equals the yield strain, that rectangular area is zero.\r\nPrevious problem: 5 - stiffness-to-weight ratio. Next problem: 7 - toughness.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.440001px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 702px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 332px 351px; transform-origin: 332px 351px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 84px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 42px; text-align: left; transform-origin: 309px 42px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe total energy absorbed by a material up to failure in a tensile test is termed the absorbed strain energy. With respect to the figure below, it is the total area of the elastic and plastic regions and can be calculated by integrating the stress-strain curve. As a first approximation, many stress-strain responses can be approximated by:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 29px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 14.5px; text-align: center; transform-origin: 309px 14.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cimg class=\"imageNode\" width=\"73\" height=\"23\" style=\"vertical-align: baseline;width: 73px;height: 23px\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAXBAMAAAC12X9oAAAAMFBMVEX///8WFhZQUFBAQEAwMDBiYmLm5uZ0dHTMzMyKiooMDAyenp4EBAQiIiK2trYAAAARmbiRAAAAAXRSTlMAQObYZgAAAU9JREFUeNpjZiAAUsUCn31gwipV+8ebgfv/PRBTO7b7AgN2VRP/bmX4fVMJxCzz5tuAQ9X3vwwM9zXATOYHXxpwqOJYxcB5GsL81fD/KA4n8xswRECZLA1M0QzMDHw3JjQ4LkBV9YJR9d8FEGPrnccH/l8G2rhmZ8NzB6CAoSAIgOUYCu49CgDRDw+egmhj+8fAG4Buo9dsfpBGtpNQPtM/IwaGC+iqGp5+2Qak/l2HqeLewPC3AN2Lug2sf4A0d7FxA0SkH4gSGFDdxf6DgUEG5NUJMI8C8eJzINZ5MN8ARPw9wcDQ/LGA4S/cdMYGTgxn8QCdzi8ANNMAKsDM9sU8F00Rs8SU/9dczyVN+BtrW8q7nH35BEZCKWeCZCoTjpSDBArE/05gIKiKW+D7BAaCNjLJeX1bQEgRA6+6BQNhwAM2kJCqq8SoYvu5AUgCAMD/X3IO0icRAAAAAElFTkSuQmCC\" data-image-state=\"image-loaded\"\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 31.5px; text-align: left; transform-origin: 309px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003ewhere K is a strength coefficient, eps_p is the plastic strain, and n is the hardening exponent. Stress as a function of strain can be calculated by creating a strain vector from zero to the ultimate strain and integrating the stress values in that vector.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 304px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 152px; text-align: center; transform-origin: 309px 152px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cimg class=\"imageNode\" style=\"vertical-align: baseline\" src=\"https://qph.cf2.quoracdn.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\" data-image-state=\"image-loaded\"\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 10.5px; text-align: center; transform-origin: 309px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e(from quora.com)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 126px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 63px; text-align: left; transform-origin: 309px 63px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWrite a function to return the absorbed strain energy for a material provided K and n. If the material does not strain harden, then K and n will be set equal to zero. In these cases, the absorbed strain energy is equal to the resilience (triangular area up to yield point) and any absorbed plastic energy, if applicable, which can be approximated by a rectangle from the yield point to the failure point with those stresses being equal. If the ultimate strain equals the yield strain, that rectangular area is zero.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 10.5px; text-align: left; transform-origin: 309px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003ePrevious problem: 5 -\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003estiffness-to-weight ratio\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. Next problem: 7 -\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003etoughness\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [ASE] = stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)\r\n\r\nASE = 1;\r\n\r\nend\r\n","test_suite":"%% Note\r\n% The following properties are measured at room temperature and are tensile\r\n% in a single direction. Some materials, such as metals are generally\r\n% isotropic, whereas others, like composite are highly anisotropic\r\n% (different properties in different directions). Also, property values can\r\n% range depending on the material grade. Finally, thermal or environmental\r\n% changes can alter these properties, sometimes drastically.\r\n\r\n%% steel alloy (ASTM A36)\r\nS_y = 250e6; %Pa\r\nS_u = 400e6; %Pa\r\ne_y = 0.00125;\r\ne_u = 0.35;\r\nnu = 0.26;\r\nG = 79.3e9; %Pa\r\nE = 200e9; %Pa\r\ndensity = 7.85; %g/cm^3\r\nsh_exp = 0.14; %strain-hardening exponent\r\nsh_coeff = 463e6; %strain-hardening coefficient\r\nASE_corr = 12.28e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% titanium (Ti-6Al-4V)\r\nS_y = 830e6; %Pa\r\nS_u = 900e6; %Pa\r\ne_y = 0.00728;\r\ne_u = 0.14;\r\nnu = 0.342;\r\nG = 44e9; %Pa\r\nE = 114e9; %Pa\r\ndensity = 4.51; %g/cm^3\r\nsh_exp = 0.04; %strain-hardening exponent\r\nsh_coeff = 974e6; %strain-hardening coefficient\r\nASE_corr = 12.12e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% Inconel 718\r\nS_y = 1172e6; %Pa\r\nS_u = 1407e6; %Pa\r\ne_y = 0.00563;\r\ne_u = 0.027;\r\nnu = 0.29;\r\nG = 11.6e9; %Pa\r\nE = 208e9; %Pa\r\ndensity = 8.19; %g/cm^3\r\nsh_exp = 0.075; %strain-hardening exponent\r\nsh_coeff = 1845e6; %strain-hardening coefficient\r\nASE_corr = 3.535e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% aluminum alloy (6061-T6)%^\u0026\r\nS_y = 241e6; %Pa\r\nS_u = 300e6; %Pa\r\ne_y = 0.0035;\r\ne_u = 0.15;\r\nnu = 0.33;\r\nG = 26e9; %Pa\r\nE = 68.9e9; %Pa\r\ndensity = 2.7; %g/cm^3\r\nsh_exp = 0.042; %strain-hardening exponent\r\nsh_coeff = 325e6; %strain-hardening coefficient\r\nASE_corr = 4.321e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% copper\r\nS_y = 70e6; %Pa\r\nS_u = 220e6; %Pa\r\ne_y = 0.00054;\r\ne_u = 0.48;\r\nnu = 0.34;\r\nG = 48e9; %Pa\r\nE = 130e9; %Pa\r\ndensity = 8.92; %g/cm^3\r\nsh_exp = 0.44; %strain-hardening exponent\r\nsh_coeff = 304e6; %strain-hardening coefficient\r\nASE_corr = 7.342e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% rhenium\r\nS_y = 317e6; %Pa\r\nS_u = 1130e6; %Pa\r\ne_y = 0.000685;\r\ne_u = 0.24;\r\nnu = 0.3;\r\nG = 178e9; %Pa\r\nE = 463e9; %Pa\r\ndensity = 21.02; %g/cm^3\r\nsh_exp = 0.353; %strain-hardening exponent\r\nsh_coeff = 1870e6; %strain-hardening coefficient\r\nASE_corr = 20.06e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% polymer (nylon, 6/6)\r\nS_y = 82e6; %Pa\r\nS_u = 82e6; %Pa\r\ne_y = 0.0265;\r\ne_u = 0.45;\r\nnu = 0.41;\r\nG = 2.8e9; %Pa\r\nE = 3.1e9; %Pa\r\ndensity = 1.14; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nASE_corr = 3.581e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% polymer (nylon, 6/6) reinforced with 45wt.% glass fiber\r\nS_y = 230e6; %Pa\r\nS_u = 230e6; %Pa\r\ne_y = 0.016;\r\ne_u = 0.016;\r\nnu = 0.35;\r\nG = 13.0e9; %Pa\r\nE = 14.5e9; %Pa\r\ndensity = 1.51; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nASE_corr = 0.184e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% diamond\r\nS_y = 1200e6; %Pa\r\nS_u = 1200e6; %Pa\r\ne_y = 0.001;\r\ne_u = 0.001;\r\nnu = 0.20;\r\nG = 478e9; %Pa\r\nE = 1200e9; %Pa\r\ndensity = 3.51; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nASE_corr = 0.06e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%%\r\nind = randi(4);\r\nswitch ind\r\n\tcase 1\r\n\t\tS_y = 250e6; %Pa\r\n\t\te_y = 0.00125;\r\n\t\te_u = 0.35;\r\n\t\tsh_exp = 0.14; %strain-hardening exponent\r\n\t\tsh_coeff = 463e6; %strain-hardening coefficient\r\n\t\tASE_corr = 12.28e7;\r\n\tcase 2\r\n\t\tS_y = 82e6; %Pa\r\n\t\te_y = 0.0265;\r\n\t\te_u = 0.45;\r\n\t\tsh_exp = 0; %strain-hardening exponent\r\n\t\tsh_coeff = 0; %strain-hardening coefficient\r\n\t\tASE_corr = 3.581e7;\r\n\tcase 3\r\n\t\tS_y = 241e6; %Pa\r\n\t\te_y = 0.0035;\r\n\t\te_u = 0.15;\r\n\t\tsh_exp = 0.042; %strain-hardening exponent\r\n\t\tsh_coeff = 325e6; %strain-hardening coefficient\r\n\t\tASE_corr = 4.321e7;\r\n\tcase 4\r\n\t\tS_y = 317e6; %Pa\r\n\t\te_y = 0.000685;\r\n\t\te_u = 0.24;\r\n\t\tsh_exp = 0.353; %strain-hardening exponent\r\n\t\tsh_coeff = 1870e6; %strain-hardening coefficient\r\n\t\tASE_corr = 20.06e7;\r\nend\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%%\r\nind = randi(4);\r\nswitch ind\r\n\tcase 1\r\n\t\tS_y = 830e6; %Pa\r\n\t\te_y = 0.00728;\r\n\t\te_u = 0.14;\r\n\t\tsh_exp = 0.04; %strain-hardening exponent\r\n\t\tsh_coeff = 974e6; %strain-hardening coefficient\r\n\t\tASE_corr = 12.12e7;\r\n\tcase 2\r\n\t\tS_y = 241e6; %Pa\r\n\t\te_y = 0.0035;\r\n\t\te_u = 0.15;\r\n\t\tsh_exp = 0.042; %strain-hardening exponent\r\n\t\tsh_coeff = 325e6; %strain-hardening coefficient\r\n\t\tASE_corr = 4.321e7;\r\n\tcase 3\r\n\t\tS_y = 250e6; %Pa\r\n\t\te_y = 0.00125;\r\n\t\te_u = 0.35;\r\n\t\tsh_exp = 0.14; %strain-hardening exponent\r\n\t\tsh_coeff = 463e6; %strain-hardening coefficient\r\n\t\tASE_corr = 12.28e7;\r\n\tcase 4\r\n\t\tS_y = 70e6; %Pa\r\n\t\te_y = 0.00054;\r\n\t\te_u = 0.48;\r\n\t\tsh_exp = 0.44; %strain-hardening exponent\r\n\t\tsh_coeff = 304e6; %strain-hardening coefficient\r\n\t\tASE_corr = 7.342e7;\r\nend\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%%\r\nind = randi(4);\r\nswitch ind\r\n\tcase 1\r\n\t\tS_y = 1200e6; %Pa\r\n\t\te_y = 0.001;\r\n\t\te_u = 0.001;\r\n\t\tsh_exp = 0; %strain-hardening exponent\r\n\t\tsh_coeff = 0; %strain-hardening coefficient\r\n\t\tASE_corr = 0.06e7;\r\n\tcase 2\r\n\t\tS_y = 250e6; %Pa\r\n\t\te_y = 0.00125;\r\n\t\te_u = 0.35;\r\n\t\tsh_exp = 0.14; %strain-hardening exponent\r\n\t\tsh_coeff = 463e6; %strain-hardening coefficient\r\n\t\tASE_corr = 12.28e7;\r\n\tcase 3\r\n\t\tS_y = 230e6; %Pa\r\n\t\te_y = 0.016;\r\n\t\te_u = 0.016;\r\n\t\tsh_exp = 0; %strain-hardening exponent\r\n\t\tsh_coeff = 0; %strain-hardening coefficient\r\n\t\tASE_corr = 0.184e7;\r\n\tcase 4\r\n\t\tS_y = 1172e6; %Pa\r\n\t\te_y = 0.00563;\r\n\t\te_u = 0.027;\r\n\t\tsh_exp = 0.075; %strain-hardening exponent\r\n\t\tsh_coeff = 1845e6; %strain-hardening coefficient\r\n\t\tASE_corr = 3.535e7;\r\nend\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":7,"created_by":26769,"edited_by":26769,"edited_at":"2024-03-27T17:39:31.000Z","deleted_by":null,"deleted_at":null,"solvers_count":92,"test_suite_updated_at":"2015-03-30T21:25:46.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-03-30T20:58:35.000Z","updated_at":"2026-02-19T09:44:40.000Z","published_at":"2015-03-30T21:25:46.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe total energy absorbed by a material up to failure in a tensile test is termed the absorbed strain energy. With respect to the figure below, it is the total area of the elastic and plastic regions and can be calculated by integrating the stress-strain curve. As a first approximation, many stress-strain responses can be approximated by:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"center\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"23\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"73\\\"/\u003e\u003cw:attr w:name=\\\"verticalAlign\\\" w:val=\\\"baseline\\\"/\u003e\u003cw:attr w:name=\\\"altText\\\" w:val=\\\"\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ewhere K is a strength coefficient, eps_p is the plastic strain, and n is the hardening exponent. Stress as a function of strain can be calculated by creating a strain vector from zero to the ultimate strain and integrating the stress values in that vector.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"center\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"298\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"420\\\"/\u003e\u003cw:attr w:name=\\\"verticalAlign\\\" w:val=\\\"baseline\\\"/\u003e\u003cw:attr w:name=\\\"altText\\\" w:val=\\\"\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"center\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e(from quora.com)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to return the absorbed strain energy for a material provided K and n. If the material does not strain harden, then K and n will be set equal to zero. In these cases, the absorbed strain energy is equal to the resilience (triangular area up to yield point) and any absorbed plastic energy, if applicable, which can be approximated by a rectangle from the yield point to the failure point with those stresses being equal. If the ultimate strain equals the yield strain, that rectangular area is zero.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePrevious problem: 5 -\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003estiffness-to-weight ratio\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Next problem: 7 -\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003etoughness\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"target\":\"/media/image1.png\",\"relationshipId\":\"rId1\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"target\":\"/media/image1.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"relationshipId\":\"rId2\"}]},{\"partUri\":\"/media/image1.png\",\"contentType\":\"image/png\",\"content\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAXBAMAAAC12X9oAAAAMFBMVEX///8WFhZQUFBAQEAwMDBiYmLm5uZ0dHTMzMyKiooMDAyenp4EBAQiIiK2trYAAAARmbiRAAAAAXRSTlMAQObYZgAAAU9JREFUeNpjZiAAUsUCn31gwipV+8ebgfv/PRBTO7b7AgN2VRP/bmX4fVMJxCzz5tuAQ9X3vwwM9zXATOYHXxpwqOJYxcB5GsL81fD/KA4n8xswRECZLA1M0QzMDHw3JjQ4LkBV9YJR9d8FEGPrnccH/l8G2rhmZ8NzB6CAoSAIgOUYCu49CgDRDw+egmhj+8fAG4Buo9dsfpBGtpNQPtM/IwaGC+iqGp5+2Qak/l2HqeLewPC3AN2Lug2sf4A0d7FxA0SkH4gSGFDdxf6DgUEG5NUJMI8C8eJzINZ5MN8ARPw9wcDQ/LGA4S/cdMYGTgxn8QCdzi8ANNMAKsDM9sU8F00Rs8SU/9dczyVN+BtrW8q7nH35BEZCKWeCZCoTjpSDBArE/05gIKiKW+D7BAaCNjLJeX1bQEgRA6+6BQNhwAM2kJCqq8SoYvu5AUgCAMD/X3IO0icRAAAAAElFTkSuQmCC\",\"relationship\":null},{\"partUri\":\"/media/image1.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"contentType\":\"image/net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"content\":\"https://qph.cf2.quoracdn.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":8054,"title":"Stress-Strain Properties - 7","description":"The toughness of a material is technically defined as the plastic strain energy absorbed by the material (the plastic region in the figure below). Practically speaking, it's a measure of how much deformation a material can undergo (or energy it can absorb) before failure.\r\n\r\nWrite a function to calculate the toughness of a material—the absorbed strain energy minus the resilience. This can be accomplished by combining the code written in problem 2 (resilience) and problem 6 (absorbed strain energy). Also, return the fraction of absorbed strain energy that the toughness represents.\r\nPrevious problem: 6 - absorbed strain energy. Next problem: 8 - material properties list.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.440001px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 499px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 332px 249.5px; transform-origin: 332px 249.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 31.5px; text-align: left; transform-origin: 309px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe toughness of a material is technically defined as the plastic strain energy absorbed by the material (the plastic region in the figure below). Practically speaking, it's a measure of how much deformation a material can undergo (or energy it can absorb) before failure.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 304px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 152px; text-align: center; transform-origin: 309px 152px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cimg class=\"imageNode\" style=\"vertical-align: baseline\" src=\"https://qph.cf2.quoracdn.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\" data-image-state=\"image-loaded\"\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 84px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 42px; text-align: left; transform-origin: 309px 42px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWrite a function to calculate the toughness of a material—the absorbed strain energy minus the resilience. This can be accomplished by combining the code written in\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/8049-stress-strain-properties-2\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eproblem 2\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e (resilience) and\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eproblem 6\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e (absorbed strain energy). Also, return the fraction of absorbed strain energy that the toughness represents.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 10.5px; text-align: left; transform-origin: 309px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003ePrevious problem: 6 -\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eabsorbed strain energy\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. Next problem: 8 -\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003ematerial properties list\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff)\r\n\r\nT = 1;\r\n\r\nfrac = 0.5;\r\n\r\nend\r\n","test_suite":"%% Note\r\n% The following properties are measured at room temperature and are tensile\r\n% in a single direction. Some materials, such as metals, are generally\r\n% isotropic, whereas others, like composites, are highly anisotropic\r\n% (different properties in different directions). Also, property values can\r\n% range depending on the material grade. Finally, thermal or environmental\r\n% changes can alter these properties, sometimes drastically.\r\n\r\n%% steel alloy (ASTM A36)\r\nS_y = 250e6; %Pa\r\nS_u = 400e6; %Pa\r\ne_y = 0.00125;\r\ne_u = 0.35;\r\nnu = 0.26;\r\nG = 79.3e9; %Pa\r\nE = 200e9; %Pa\r\ndensity = 7.85; %g/cm^3\r\nsh_exp = 0.14; %strain-hardening exponent\r\nsh_coeff = 463e6; %strain-hardening coefficient\r\nT_corr = 12.26e7;\r\nfrac_corr = 0.9987;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% titanium (Ti-6Al-4V)\r\nS_y = 830e6; %Pa\r\nS_u = 900e6; %Pa\r\ne_y = 0.00728;\r\ne_u = 0.14;\r\nnu = 0.342;\r\nG = 44e9; %Pa\r\nE = 114e9; %Pa\r\ndensity = 4.51; %g/cm^3\r\nsh_exp = 0.04; %strain-hardening exponent\r\nsh_coeff = 974e6; %strain-hardening coefficient\r\nT_corr = 11.82e7;\r\nfrac_corr = 0.9751;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% Inconel 718\r\nS_y = 1172e6; %Pa\r\nS_u = 1407e6; %Pa\r\ne_y = 0.00563;\r\ne_u = 0.027;\r\nnu = 0.29;\r\nG = 11.6e9; %Pa\r\nE = 208e9; %Pa\r\ndensity = 8.19; %g/cm^3\r\nsh_exp = 0.075; %strain-hardening exponent\r\nsh_coeff = 1845e6; %strain-hardening coefficient\r\nT_corr = 3.205e7;\r\nfrac_corr = 0.9067;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% aluminum alloy (6061-T6)\r\nS_y = 241e6; %Pa\r\nS_u = 300e6; %Pa\r\ne_y = 0.0035;\r\ne_u = 0.15;\r\nnu = 0.33;\r\nG = 26e9; %Pa\r\nE = 68.9e9; %Pa\r\ndensity = 2.7; %g/cm^3\r\nsh_exp = 0.042; %strain-hardening exponent\r\nsh_coeff = 325e6; %strain-hardening coefficient\r\nT_corr = 4.279e7;\r\nfrac_corr = 0.9902;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% copper\r\nS_y = 70e6; %Pa\r\nS_u = 220e6; %Pa\r\ne_y = 0.00054;\r\ne_u = 0.48;\r\nnu = 0.34;\r\nG = 48e9; %Pa\r\nE = 130e9; %Pa\r\ndensity = 8.92; %g/cm^3\r\nsh_exp = 0.44; %strain-hardening exponent\r\nsh_coeff = 304e6; %strain-hardening coefficient\r\nT_corr = 7.340e7;\r\nfrac_corr = 0.9997;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% rhenium\r\nS_y = 317e6; %Pa\r\nS_u = 1130e6; %Pa\r\ne_y = 0.000685;\r\ne_u = 0.24;\r\nnu = 0.3;\r\nG = 178e9; %Pa\r\nE = 463e9; %Pa\r\ndensity = 21.02; %g/cm^3\r\nsh_exp = 0.353; %strain-hardening exponent\r\nsh_coeff = 1870e6; %strain-hardening coefficient\r\nT_corr = 20.05e7;\r\nfrac_corr = 0.9995;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% polymer (nylon, 6/6)\r\nS_y = 82e6; %Pa\r\nS_u = 82e6; %Pa\r\ne_y = 0.0265;\r\ne_u = 0.45;\r\nnu = 0.41;\r\nG = 2.8e9; %Pa\r\nE = 3.1e9; %Pa\r\ndensity = 1.14; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nT_corr = 3.473e7;\r\nfrac_corr = 0.9697;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\nassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\r\n%% polymer (nylon, 6/6) reinforced with 45wt.% glass fiber\r\nS_y = 230e6; %Pa\r\nS_u = 230e6; %Pa\r\ne_y = 0.016;\r\ne_u = 0.016;\r\nnu = 0.35;\r\nG = 13.0e9; %Pa\r\nE = 14.5e9; %Pa\r\ndensity = 1.51; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nT_corr = 0;\r\nfrac_corr = 0;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(isequal(T,T_corr))\r\nassert(isequal(frac,frac_corr))\r\n\r\n%% diamond\r\nS_y = 1200e6; %Pa\r\nS_u = 1200e6; %Pa\r\ne_y = 0.001;\r\ne_u = 0.001;\r\nnu = 0.20;\r\nG = 478e9; %Pa\r\nE = 1200e9; %Pa\r\ndensity = 3.51; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nT_corr = 0;\r\nfrac_corr = 0;\r\n[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\nassert(isequal(T,T_corr))\r\nassert(isequal(frac,frac_corr))\r\n\r\n%%\r\nfor i = 1:30\r\nind = randi(8);\r\nswitch ind\r\n\tcase 1\r\n\t\tS_y = 250e6; %Pa\r\n\t\te_y = 0.00125;\r\n\t\te_u = 0.35;\r\n\t\tsh_exp = 0.14; %strain-hardening exponent\r\n\t\tsh_coeff = 463e6; %strain-hardening coefficient\r\n\t\tT_corr = 12.26e7;\r\n\t\tfrac_corr = 0.9987;\r\n\t\t[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\n\t\tassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\n\t\tassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\tcase 2\r\n\t\tS_y = 830e6; %Pa\r\n\t\te_y = 0.00728;\r\n\t\te_u = 0.14;\r\n\t\tsh_exp = 0.04; %strain-hardening exponent\r\n\t\tsh_coeff = 974e6; %strain-hardening coefficient\r\n\t\tT_corr = 11.82e7;\r\n\t\tfrac_corr = 0.9751;\r\n\t\t[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\n\t\tassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\n\t\tassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\tcase 3\r\n\t\tS_y = 230e6; %Pa\r\n\t\te_y = 0.016;\r\n\t\te_u = 0.016;\r\n\t\tsh_exp = 0; %strain-hardening exponent\r\n\t\tsh_coeff = 0; %strain-hardening coefficient\r\n\t\tT_corr = 0;\r\n\t\tfrac_corr = 0;\r\n\t\t[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\n\t\tassert(isequal(T,T_corr))\r\n\t\tassert(isequal(frac,frac_corr))\r\n\tcase 4\r\n\t\tS_y = 317e6; %Pa\r\n\t\te_y = 0.000685;\r\n\t\te_u = 0.24;\r\n\t\tsh_exp = 0.353; %strain-hardening exponent\r\n\t\tsh_coeff = 1870e6; %strain-hardening coefficient\r\n\t\tT_corr = 20.05e7;\r\n\t\tfrac_corr = 0.9995;\r\n\t\t[T,frac] = stress_strain7(e_y,e_u,S_y,sh_exp,sh_coeff);\r\n\t\tassert(abs(T-T_corr)/T_corr\u003c1e-2)\r\n\t\tassert(abs(frac-frac_corr)/frac_corr\u003c1e-2)\r\n\tcase 5\r\n\t\tS_y = 70e6; %Pa\r\n\t\te_y = 0.00054;\r\n\t\te_u = 0.48;\r\n\t\tsh_exp = 0.44; %strain-hardening exponent\r\n\t\tsh_coeff = 304e6; %strain-hardening coefficient\r\n\t\tT_corr = 7.340e7;\r\n\t\tfrac_corr = 0.9997;\r\n\tcase 6\r\n\t\tS_y = 1172e6; %Pa\r\n\t\te_y = 0.00563;\r\n\t\te_u = 0.027;\r\n\t\tsh_exp = 0.075; %strain-hardening exponent\r\n\t\tsh_coeff = 1845e6; %strain-hardening coefficient\r\n\t\tT_corr = 3.205e7;\r\n\t\tfrac_corr = 0.9067;\r\n\tcase 7\r\n\t\tS_y = 82e6; %Pa\r\n\t\te_y = 0.0265;\r\n\t\te_u = 0.45;\r\n\t\tsh_exp = 0; %strain-hardening exponent\r\n\t\tsh_coeff = 0; %strain-hardening coefficient\r\n\t\tT_corr = 3.473e7;\r\n\t\tfrac_corr = 0.9697;\r\n\tcase 8\r\n\t\tS_y = 241e6; %Pa\r\n\t\te_y = 0.0035;\r\n\t\te_u = 0.15;\r\n\t\tsh_exp = 0.042; %strain-hardening exponent\r\n\t\tsh_coeff = 325e6; %strain-hardening coefficient\r\n\t\tT_corr = 4.279e7;\r\n\t\tfrac_corr = 0.9902;\r\nend\r\nend % for i = 1:30\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":2,"created_by":26769,"edited_by":26769,"edited_at":"2024-03-27T17:44:32.000Z","deleted_by":null,"deleted_at":null,"solvers_count":88,"test_suite_updated_at":"2021-08-03T17:04:10.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-03-30T22:03:11.000Z","updated_at":"2026-02-19T09:46:19.000Z","published_at":"2015-03-30T22:03:11.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe toughness of a material is technically defined as the plastic strain energy absorbed by the material (the plastic region in the figure below). Practically speaking, it's a measure of how much deformation a material can undergo (or energy it can absorb) before failure.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"center\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"298\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"420\\\"/\u003e\u003cw:attr w:name=\\\"verticalAlign\\\" w:val=\\\"baseline\\\"/\u003e\u003cw:attr w:name=\\\"altText\\\" w:val=\\\"\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate the toughness of a material—the absorbed strain energy minus the resilience. This can be accomplished by combining the code written in\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/8049-stress-strain-properties-2\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eproblem 2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (resilience) and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eproblem 6\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (absorbed strain energy). Also, return the fraction of absorbed strain energy that the toughness represents.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePrevious problem: 6 -\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eabsorbed strain energy\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Next problem: 8 -\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ematerial properties list\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"target\":\"/media/image1.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"relationshipId\":\"rId1\"}]},{\"partUri\":\"/media/image1.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"contentType\":\"image/net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"content\":\"https://qph.cf2.quoracdn.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":8053,"title":"Stress-Strain Properties - 6","description":"The total energy absorbed by a material up to failure in a tensile test is termed the absorbed strain energy. With respect to the figure below, it is the total area of the elastic and plastic regions and can be calculated by integrating the stress-strain curve. As a first approximation, many stress-strain responses can be approximated by:\r\n\r\nwhere K is a strength coefficient, eps_p is the plastic strain, and n is the hardening exponent. Stress as a function of strain can be calculated by creating a strain vector from zero to the ultimate strain and integrating the stress values in that vector.\r\n\r\n(from quora.com)\r\nWrite a function to return the absorbed strain energy for a material provided K and n. If the material does not strain harden, then K and n will be set equal to zero. In these cases, the absorbed strain energy is equal to the resilience (triangular area up to yield point) and any absorbed plastic energy, if applicable, which can be approximated by a rectangle from the yield point to the failure point with those stresses being equal. If the ultimate strain equals the yield strain, that rectangular area is zero.\r\nPrevious problem: 5 - stiffness-to-weight ratio. Next problem: 7 - toughness.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.440001px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 702px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 332px 351px; transform-origin: 332px 351px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 84px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 42px; text-align: left; transform-origin: 309px 42px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe total energy absorbed by a material up to failure in a tensile test is termed the absorbed strain energy. With respect to the figure below, it is the total area of the elastic and plastic regions and can be calculated by integrating the stress-strain curve. As a first approximation, many stress-strain responses can be approximated by:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 29px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 14.5px; text-align: center; transform-origin: 309px 14.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cimg class=\"imageNode\" width=\"73\" height=\"23\" style=\"vertical-align: baseline;width: 73px;height: 23px\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAXBAMAAAC12X9oAAAAMFBMVEX///8WFhZQUFBAQEAwMDBiYmLm5uZ0dHTMzMyKiooMDAyenp4EBAQiIiK2trYAAAARmbiRAAAAAXRSTlMAQObYZgAAAU9JREFUeNpjZiAAUsUCn31gwipV+8ebgfv/PRBTO7b7AgN2VRP/bmX4fVMJxCzz5tuAQ9X3vwwM9zXATOYHXxpwqOJYxcB5GsL81fD/KA4n8xswRECZLA1M0QzMDHw3JjQ4LkBV9YJR9d8FEGPrnccH/l8G2rhmZ8NzB6CAoSAIgOUYCu49CgDRDw+egmhj+8fAG4Buo9dsfpBGtpNQPtM/IwaGC+iqGp5+2Qak/l2HqeLewPC3AN2Lug2sf4A0d7FxA0SkH4gSGFDdxf6DgUEG5NUJMI8C8eJzINZ5MN8ARPw9wcDQ/LGA4S/cdMYGTgxn8QCdzi8ANNMAKsDM9sU8F00Rs8SU/9dczyVN+BtrW8q7nH35BEZCKWeCZCoTjpSDBArE/05gIKiKW+D7BAaCNjLJeX1bQEgRA6+6BQNhwAM2kJCqq8SoYvu5AUgCAMD/X3IO0icRAAAAAElFTkSuQmCC\" data-image-state=\"image-loaded\"\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 31.5px; text-align: left; transform-origin: 309px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003ewhere K is a strength coefficient, eps_p is the plastic strain, and n is the hardening exponent. Stress as a function of strain can be calculated by creating a strain vector from zero to the ultimate strain and integrating the stress values in that vector.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 304px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 152px; text-align: center; transform-origin: 309px 152px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cimg class=\"imageNode\" style=\"vertical-align: baseline\" src=\"https://qph.cf2.quoracdn.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\" data-image-state=\"image-loaded\"\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 10.5px; text-align: center; transform-origin: 309px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e(from quora.com)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 126px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 63px; text-align: left; transform-origin: 309px 63px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWrite a function to return the absorbed strain energy for a material provided K and n. If the material does not strain harden, then K and n will be set equal to zero. In these cases, the absorbed strain energy is equal to the resilience (triangular area up to yield point) and any absorbed plastic energy, if applicable, which can be approximated by a rectangle from the yield point to the failure point with those stresses being equal. If the ultimate strain equals the yield strain, that rectangular area is zero.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 309px 10.5px; text-align: left; transform-origin: 309px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003ePrevious problem: 5 -\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003estiffness-to-weight ratio\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. Next problem: 7 -\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"/#null\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003etoughness\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [ASE] = stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)\r\n\r\nASE = 1;\r\n\r\nend\r\n","test_suite":"%% Note\r\n% The following properties are measured at room temperature and are tensile\r\n% in a single direction. Some materials, such as metals are generally\r\n% isotropic, whereas others, like composite are highly anisotropic\r\n% (different properties in different directions). Also, property values can\r\n% range depending on the material grade. Finally, thermal or environmental\r\n% changes can alter these properties, sometimes drastically.\r\n\r\n%% steel alloy (ASTM A36)\r\nS_y = 250e6; %Pa\r\nS_u = 400e6; %Pa\r\ne_y = 0.00125;\r\ne_u = 0.35;\r\nnu = 0.26;\r\nG = 79.3e9; %Pa\r\nE = 200e9; %Pa\r\ndensity = 7.85; %g/cm^3\r\nsh_exp = 0.14; %strain-hardening exponent\r\nsh_coeff = 463e6; %strain-hardening coefficient\r\nASE_corr = 12.28e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% titanium (Ti-6Al-4V)\r\nS_y = 830e6; %Pa\r\nS_u = 900e6; %Pa\r\ne_y = 0.00728;\r\ne_u = 0.14;\r\nnu = 0.342;\r\nG = 44e9; %Pa\r\nE = 114e9; %Pa\r\ndensity = 4.51; %g/cm^3\r\nsh_exp = 0.04; %strain-hardening exponent\r\nsh_coeff = 974e6; %strain-hardening coefficient\r\nASE_corr = 12.12e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% Inconel 718\r\nS_y = 1172e6; %Pa\r\nS_u = 1407e6; %Pa\r\ne_y = 0.00563;\r\ne_u = 0.027;\r\nnu = 0.29;\r\nG = 11.6e9; %Pa\r\nE = 208e9; %Pa\r\ndensity = 8.19; %g/cm^3\r\nsh_exp = 0.075; %strain-hardening exponent\r\nsh_coeff = 1845e6; %strain-hardening coefficient\r\nASE_corr = 3.535e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% aluminum alloy (6061-T6)%^\u0026\r\nS_y = 241e6; %Pa\r\nS_u = 300e6; %Pa\r\ne_y = 0.0035;\r\ne_u = 0.15;\r\nnu = 0.33;\r\nG = 26e9; %Pa\r\nE = 68.9e9; %Pa\r\ndensity = 2.7; %g/cm^3\r\nsh_exp = 0.042; %strain-hardening exponent\r\nsh_coeff = 325e6; %strain-hardening coefficient\r\nASE_corr = 4.321e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% copper\r\nS_y = 70e6; %Pa\r\nS_u = 220e6; %Pa\r\ne_y = 0.00054;\r\ne_u = 0.48;\r\nnu = 0.34;\r\nG = 48e9; %Pa\r\nE = 130e9; %Pa\r\ndensity = 8.92; %g/cm^3\r\nsh_exp = 0.44; %strain-hardening exponent\r\nsh_coeff = 304e6; %strain-hardening coefficient\r\nASE_corr = 7.342e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% rhenium\r\nS_y = 317e6; %Pa\r\nS_u = 1130e6; %Pa\r\ne_y = 0.000685;\r\ne_u = 0.24;\r\nnu = 0.3;\r\nG = 178e9; %Pa\r\nE = 463e9; %Pa\r\ndensity = 21.02; %g/cm^3\r\nsh_exp = 0.353; %strain-hardening exponent\r\nsh_coeff = 1870e6; %strain-hardening coefficient\r\nASE_corr = 20.06e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% polymer (nylon, 6/6)\r\nS_y = 82e6; %Pa\r\nS_u = 82e6; %Pa\r\ne_y = 0.0265;\r\ne_u = 0.45;\r\nnu = 0.41;\r\nG = 2.8e9; %Pa\r\nE = 3.1e9; %Pa\r\ndensity = 1.14; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nASE_corr = 3.581e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% polymer (nylon, 6/6) reinforced with 45wt.% glass fiber\r\nS_y = 230e6; %Pa\r\nS_u = 230e6; %Pa\r\ne_y = 0.016;\r\ne_u = 0.016;\r\nnu = 0.35;\r\nG = 13.0e9; %Pa\r\nE = 14.5e9; %Pa\r\ndensity = 1.51; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nASE_corr = 0.184e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%% diamond\r\nS_y = 1200e6; %Pa\r\nS_u = 1200e6; %Pa\r\ne_y = 0.001;\r\ne_u = 0.001;\r\nnu = 0.20;\r\nG = 478e9; %Pa\r\nE = 1200e9; %Pa\r\ndensity = 3.51; %g/cm^3\r\nsh_exp = 0; %strain-hardening exponent\r\nsh_coeff = 0; %strain-hardening coefficient\r\nASE_corr = 0.06e7;\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%%\r\nind = randi(4);\r\nswitch ind\r\n\tcase 1\r\n\t\tS_y = 250e6; %Pa\r\n\t\te_y = 0.00125;\r\n\t\te_u = 0.35;\r\n\t\tsh_exp = 0.14; %strain-hardening exponent\r\n\t\tsh_coeff = 463e6; %strain-hardening coefficient\r\n\t\tASE_corr = 12.28e7;\r\n\tcase 2\r\n\t\tS_y = 82e6; %Pa\r\n\t\te_y = 0.0265;\r\n\t\te_u = 0.45;\r\n\t\tsh_exp = 0; %strain-hardening exponent\r\n\t\tsh_coeff = 0; %strain-hardening coefficient\r\n\t\tASE_corr = 3.581e7;\r\n\tcase 3\r\n\t\tS_y = 241e6; %Pa\r\n\t\te_y = 0.0035;\r\n\t\te_u = 0.15;\r\n\t\tsh_exp = 0.042; %strain-hardening exponent\r\n\t\tsh_coeff = 325e6; %strain-hardening coefficient\r\n\t\tASE_corr = 4.321e7;\r\n\tcase 4\r\n\t\tS_y = 317e6; %Pa\r\n\t\te_y = 0.000685;\r\n\t\te_u = 0.24;\r\n\t\tsh_exp = 0.353; %strain-hardening exponent\r\n\t\tsh_coeff = 1870e6; %strain-hardening coefficient\r\n\t\tASE_corr = 20.06e7;\r\nend\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%%\r\nind = randi(4);\r\nswitch ind\r\n\tcase 1\r\n\t\tS_y = 830e6; %Pa\r\n\t\te_y = 0.00728;\r\n\t\te_u = 0.14;\r\n\t\tsh_exp = 0.04; %strain-hardening exponent\r\n\t\tsh_coeff = 974e6; %strain-hardening coefficient\r\n\t\tASE_corr = 12.12e7;\r\n\tcase 2\r\n\t\tS_y = 241e6; %Pa\r\n\t\te_y = 0.0035;\r\n\t\te_u = 0.15;\r\n\t\tsh_exp = 0.042; %strain-hardening exponent\r\n\t\tsh_coeff = 325e6; %strain-hardening coefficient\r\n\t\tASE_corr = 4.321e7;\r\n\tcase 3\r\n\t\tS_y = 250e6; %Pa\r\n\t\te_y = 0.00125;\r\n\t\te_u = 0.35;\r\n\t\tsh_exp = 0.14; %strain-hardening exponent\r\n\t\tsh_coeff = 463e6; %strain-hardening coefficient\r\n\t\tASE_corr = 12.28e7;\r\n\tcase 4\r\n\t\tS_y = 70e6; %Pa\r\n\t\te_y = 0.00054;\r\n\t\te_u = 0.48;\r\n\t\tsh_exp = 0.44; %strain-hardening exponent\r\n\t\tsh_coeff = 304e6; %strain-hardening coefficient\r\n\t\tASE_corr = 7.342e7;\r\nend\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n\r\n%%\r\nind = randi(4);\r\nswitch ind\r\n\tcase 1\r\n\t\tS_y = 1200e6; %Pa\r\n\t\te_y = 0.001;\r\n\t\te_u = 0.001;\r\n\t\tsh_exp = 0; %strain-hardening exponent\r\n\t\tsh_coeff = 0; %strain-hardening coefficient\r\n\t\tASE_corr = 0.06e7;\r\n\tcase 2\r\n\t\tS_y = 250e6; %Pa\r\n\t\te_y = 0.00125;\r\n\t\te_u = 0.35;\r\n\t\tsh_exp = 0.14; %strain-hardening exponent\r\n\t\tsh_coeff = 463e6; %strain-hardening coefficient\r\n\t\tASE_corr = 12.28e7;\r\n\tcase 3\r\n\t\tS_y = 230e6; %Pa\r\n\t\te_y = 0.016;\r\n\t\te_u = 0.016;\r\n\t\tsh_exp = 0; %strain-hardening exponent\r\n\t\tsh_coeff = 0; %strain-hardening coefficient\r\n\t\tASE_corr = 0.184e7;\r\n\tcase 4\r\n\t\tS_y = 1172e6; %Pa\r\n\t\te_y = 0.00563;\r\n\t\te_u = 0.027;\r\n\t\tsh_exp = 0.075; %strain-hardening exponent\r\n\t\tsh_coeff = 1845e6; %strain-hardening coefficient\r\n\t\tASE_corr = 3.535e7;\r\nend\r\nassert(abs(stress_strain6(e_u,sh_exp,sh_coeff,S_y,e_y)-ASE_corr)/ASE_corr\u003c1e-2)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":7,"created_by":26769,"edited_by":26769,"edited_at":"2024-03-27T17:39:31.000Z","deleted_by":null,"deleted_at":null,"solvers_count":92,"test_suite_updated_at":"2015-03-30T21:25:46.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-03-30T20:58:35.000Z","updated_at":"2026-02-19T09:44:40.000Z","published_at":"2015-03-30T21:25:46.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe total energy absorbed by a material up to failure in a tensile test is termed the absorbed strain energy. With respect to the figure below, it is the total area of the elastic and plastic regions and can be calculated by integrating the stress-strain curve. As a first approximation, many stress-strain responses can be approximated by:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"center\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"23\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"73\\\"/\u003e\u003cw:attr w:name=\\\"verticalAlign\\\" w:val=\\\"baseline\\\"/\u003e\u003cw:attr w:name=\\\"altText\\\" w:val=\\\"\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ewhere K is a strength coefficient, eps_p is the plastic strain, and n is the hardening exponent. Stress as a function of strain can be calculated by creating a strain vector from zero to the ultimate strain and integrating the stress values in that vector.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"center\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"298\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"420\\\"/\u003e\u003cw:attr w:name=\\\"verticalAlign\\\" w:val=\\\"baseline\\\"/\u003e\u003cw:attr w:name=\\\"altText\\\" w:val=\\\"\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"center\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e(from quora.com)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to return the absorbed strain energy for a material provided K and n. If the material does not strain harden, then K and n will be set equal to zero. In these cases, the absorbed strain energy is equal to the resilience (triangular area up to yield point) and any absorbed plastic energy, if applicable, which can be approximated by a rectangle from the yield point to the failure point with those stresses being equal. If the ultimate strain equals the yield strain, that rectangular area is zero.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ePrevious problem: 5 -\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003estiffness-to-weight ratio\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. Next problem: 7 -\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"\\\"\u003e\u003cw:r\u003e\u003cw:t\u003etoughness\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"target\":\"/media/image1.png\",\"relationshipId\":\"rId1\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"target\":\"/media/image1.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"relationshipId\":\"rId2\"}]},{\"partUri\":\"/media/image1.png\",\"contentType\":\"image/png\",\"content\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAXBAMAAAC12X9oAAAAMFBMVEX///8WFhZQUFBAQEAwMDBiYmLm5uZ0dHTMzMyKiooMDAyenp4EBAQiIiK2trYAAAARmbiRAAAAAXRSTlMAQObYZgAAAU9JREFUeNpjZiAAUsUCn31gwipV+8ebgfv/PRBTO7b7AgN2VRP/bmX4fVMJxCzz5tuAQ9X3vwwM9zXATOYHXxpwqOJYxcB5GsL81fD/KA4n8xswRECZLA1M0QzMDHw3JjQ4LkBV9YJR9d8FEGPrnccH/l8G2rhmZ8NzB6CAoSAIgOUYCu49CgDRDw+egmhj+8fAG4Buo9dsfpBGtpNQPtM/IwaGC+iqGp5+2Qak/l2HqeLewPC3AN2Lug2sf4A0d7FxA0SkH4gSGFDdxf6DgUEG5NUJMI8C8eJzINZ5MN8ARPw9wcDQ/LGA4S/cdMYGTgxn8QCdzi8ANNMAKsDM9sU8F00Rs8SU/9dczyVN+BtrW8q7nH35BEZCKWeCZCoTjpSDBArE/05gIKiKW+D7BAaCNjLJeX1bQEgRA6+6BQNhwAM2kJCqq8SoYvu5AUgCAMD/X3IO0icRAAAAAElFTkSuQmCC\",\"relationship\":null},{\"partUri\":\"/media/image1.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"contentType\":\"image/net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"content\":\"https://qph.cf2.quoracdn.net/main-qimg-b2693f4b9ea8430af25df920757e0b29-lq\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"term":"tag:\"absorbed\"","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"tag:\"absorbed\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"absorbed\"","","\"","absorbed","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f74d8b76a48\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f74d8b769a8\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f74d8b75968\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f74d8b76d68\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f74d8b76cc8\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f74d8b76c28\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f74d8b76b88\u003e":"tag:\"absorbed\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f74d8b76b88\u003e":"tag:\"absorbed\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"search","password":"J3bGPZzQ7asjJcCk","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"absorbed\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"absorbed\"","","\"","absorbed","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f74d8b76a48\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f74d8b769a8\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f74d8b75968\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f74d8b76d68\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f74d8b76cc8\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f74d8b76c28\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f74d8b76b88\u003e":"tag:\"absorbed\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f74d8b76b88\u003e":"tag:\"absorbed\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":8054,"difficulty_rating":"medium"},{"id":8053,"difficulty_rating":"medium"}]}}