{"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":2774,"title":"Rule of mixtures (composites) - upper bound","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n* Ef: elastic modulus of the fiber material\r\n* Em: elastic modulus of the matrix material\r\n* ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nBased on these values, the upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n\r\nWrite a function to calculate this bound for various values.","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEf: elastic modulus of the fiber material\u003c/li\u003e\u003cli\u003eEm: elastic modulus of the matrix material\u003c/li\u003e\u003cli\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eBased on these values, the upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e\u003cp\u003eWrite a function to calculate this bound for various values.\u003c/p\u003e","function_template":"function Ec = rule_of_mixtures_upper_bound(Ef,Em,ff)\r\n Ec = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),37))\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.22;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),29.8))\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),23.5))\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),307))\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.22;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),227.8))\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),158.5))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":129,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-14T04:06:34.000Z","updated_at":"2026-02-13T03:46:57.000Z","published_at":"2014-12-14T04:06:34.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEf: elastic modulus of the fiber material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEm: elastic modulus of the matrix material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate this bound for various values.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2777,"title":"Rule of mixtures (composites) - either bound","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nBased on these values, the lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n\r\nWrite a function to calculate either bound, depending on which bound is requested in the input string.\r\n","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cpre\u003e    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/pre\u003e\u003cp\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e\u003cp\u003eWrite a function to calculate either bound, depending on which bound is requested in the input string.\u003c/p\u003e","function_template":"function [Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff)\r\n Ec = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nb_str = 'lower';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 13.6986) \u003c 1e-4)\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.22;\r\nb_str = 'L';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 12.4688) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nb_str = 'Upper';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 23.5) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nb_str = 'Lower';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 14.2248) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.22;\r\nb_str = 'u';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 227.8) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nb_str = 'upper';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 158.5) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":78,"test_suite_updated_at":"2014-12-16T23:04:03.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-14T04:54:34.000Z","updated_at":"2026-02-13T03:58:28.000Z","published_at":"2014-12-14T04:54:34.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[    Ef: elastic modulus of the fiber material\\n    Em: elastic modulus of the matrix material\\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate either bound, depending on which bound is requested in the input string.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2778,"title":"Rule of mixtures (composites) - lower and upper bounds (volumes)","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nSometimes, the volume fraction is not known and must be calculated from known volumes (Vf and Vm). In this case, ff = Vf / (Vf + Vm).\r\n\r\nBased on these values, the lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n\r\nWrite a function to calculate either bound, depending on which bound is requested in the input string and using the known volumes.\r\n","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cpre\u003e    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/pre\u003e\u003cp\u003eSometimes, the volume fraction is not known and must be calculated from known volumes (Vf and Vm). In this case, ff = Vf / (Vf + Vm).\u003c/p\u003e\u003cp\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e\u003cp\u003eWrite a function to calculate either bound, depending on which bound is requested in the input string and using the known volumes.\u003c/p\u003e","function_template":"function [Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm)\r\n Ec = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nVf = 30;\r\nVm = 70;\r\nb_str = 'lower';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 13.6986) \u003c 1e-4)\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nVf = 11;\r\nVm = 39;\r\nb_str = 'L';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 12.4688) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nVf = 150;\r\nVm = 850;\r\nb_str = 'Lower';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 11.5607) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nVf = 3;\r\nVm = 7;\r\nb_str = 'U';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 307) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nVf = 2.2;\r\nVm = 7.8;\r\nb_str = 'lower bound';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 12.7845) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nVf = 30;\r\nVm = 170;\r\nb_str = 'U bound';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 158.5) \u003c 1e-4)\r\n\r\n%%\r\nEf = 57;\r\nEm = 3.9;\r\nVf = 1.27;\r\nVm = 9;\r\nb_str = 'Lower';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 4.4078) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":73,"test_suite_updated_at":"2014-12-16T23:05:00.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-14T05:06:25.000Z","updated_at":"2026-02-13T04:00:39.000Z","published_at":"2014-12-14T05:06:25.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[    Ef: elastic modulus of the fiber material\\n    Em: elastic modulus of the matrix material\\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSometimes, the volume fraction is not known and must be calculated from known volumes (Vf and Vm). In this case, ff = Vf / (Vf + Vm).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate either bound, depending on which bound is requested in the input string and using the known volumes.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2776,"title":"Rule of mixtures (composites) - lower and upper bounds","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nBased on these values, the lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n\r\nWrite a function to calculate both bounds for various values. Also, return the difference between the modulus estimates and the ratios of this difference to both moduli estimates.","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cpre\u003e    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/pre\u003e\u003cp\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e\u003cp\u003eWrite a function to calculate both bounds for various values. Also, return the difference between the modulus estimates and the ratios of this difference to both moduli estimates.\u003c/p\u003e","function_template":"function [Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff)\r\n Ec_l = 1;\r\n Ec_u = 1;\r\n E_diff = 1;\r\n r_l = 1;\r\n r_u = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 13.6986) \u003c 1e-4)\r\nassert(abs(Ec_u - 37) \u003c 1e-4)\r\nassert(abs(E_diff - 23.3014) \u003c 1e-4)\r\nassert(abs(r_l - 1.7010) \u003c 1e-4)\r\nassert(abs(r_u - .6298) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.22;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 12.4688) \u003c 1e-4)\r\nassert(abs(Ec_u - 29.8) \u003c 1e-4)\r\nassert(abs(E_diff - 17.3312) \u003c 1e-4)\r\nassert(abs(r_l - 1.3900) \u003c 1e-4)\r\nassert(abs(r_u - 0.5816) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 11.5607) \u003c 1e-4)\r\nassert(abs(Ec_u - 23.5) \u003c 1e-4)\r\nassert(abs(E_diff - 11.9393) \u003c 1e-4)\r\nassert(abs(r_l - 1.0327) \u003c 1e-4)\r\nassert(abs(r_u - 0.5081) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 14.2248) \u003c 1e-4)\r\nassert(abs(Ec_u - 307) \u003c 1e-4)\r\nassert(abs(E_diff - 292.7752) \u003c 1e-4)\r\nassert(abs(r_l - 20.5821) \u003c 1e-4)\r\nassert(abs(r_u - 0.9537) \u003c 1e-4)\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.22;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 12.7845) \u003c 1e-4)\r\nassert(abs(Ec_u - 227.8) \u003c 1e-4)\r\nassert(abs(E_diff - 215.0155) \u003c 1e-4)\r\nassert(abs(r_l - 16.8185) \u003c 1e-4)\r\nassert(abs(r_u - 0.9439) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 11.7440) \u003c 1e-4)\r\nassert(abs(Ec_u - 158.5) \u003c 1e-4)\r\nassert(abs(E_diff - 146.756) \u003c 1e-4)\r\nassert(abs(r_l - 12.4963) \u003c 1e-4)\r\nassert(abs(r_u - 0.9259) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":94,"test_suite_updated_at":"2014-12-16T22:53:00.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-14T04:43:12.000Z","updated_at":"2026-02-13T03:51:00.000Z","published_at":"2014-12-14T04:43:12.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[    Ef: elastic modulus of the fiber material\\n    Em: elastic modulus of the matrix material\\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate both bounds for various values. Also, return the difference between the modulus estimates and the ratios of this difference to both moduli estimates.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2775,"title":"Rule of mixtures (composites) - lower bound","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n* Ef: elastic modulus of the fiber material\r\n* Em: elastic modulus of the matrix material\r\n* ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nBased on these values, the lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nWrite a function to calculate this bound for various values.","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEf: elastic modulus of the fiber material\u003c/li\u003e\u003cli\u003eEm: elastic modulus of the matrix material\u003c/li\u003e\u003cli\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eWrite a function to calculate this bound for various values.\u003c/p\u003e","function_template":"function Ec = rule_of_mixtures_lower_bound(Ef,Em,ff)\r\n Ec = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 13.6986) \u003c 1e-4)\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.22;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 12.4688) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 11.5607) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 14.2248) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.22;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 12.7845) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 11.7440) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":183,"test_suite_updated_at":"2014-12-16T22:51:58.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-14T04:09:25.000Z","updated_at":"2026-02-13T03:46:16.000Z","published_at":"2014-12-14T04:14:32.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEf: elastic modulus of the fiber material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEm: elastic modulus of the matrix material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate this bound for various values.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2779,"title":"Rule of mixtures (composites) - weighted bound","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n* Ef: elastic modulus of the fiber material\r\n* Em: elastic modulus of the matrix material\r\n* ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nBased on these values, the lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n\r\nWrite a function to calculate the weighted Ec between both bounds, based on the provided weighting (wt) of the upper bound. (The lower bound will have the remainder of the weighting, or 1–wt.)\r\n","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEf: elastic modulus of the fiber material\u003c/li\u003e\u003cli\u003eEm: elastic modulus of the matrix material\u003c/li\u003e\u003cli\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e\u003cp\u003eWrite a function to calculate the weighted Ec between both bounds, based on the provided weighting (wt) of the upper bound. (The lower bound will have the remainder of the weighting, or 1–wt.)\u003c/p\u003e","function_template":"function [Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt)\r\n Ec = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.25;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 19.5240) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.50;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 25.3493) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.75;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 31.1747) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.25;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 14.5455) \u003c 1e-4)\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.50;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 17.5303) \u003c 1e-4)\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.75;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 20.5152) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.25;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 87.4186) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.50;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 160.6124) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.75;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 233.8062) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.25;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 48.4330) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.50;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 85.1220) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.75;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 121.8110) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":94,"test_suite_updated_at":"2014-12-16T23:05:34.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-16T04:22:51.000Z","updated_at":"2026-02-13T07:13:31.000Z","published_at":"2014-12-16T04:22:51.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEf: elastic modulus of the fiber material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEm: elastic modulus of the matrix material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate the weighted Ec between both bounds, based on the provided weighting (wt) of the upper bound. (The lower bound will have the remainder of the weighting, or 1–wt.)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2780,"title":"Rule of mixtures (composites) - other bound","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n* Ef: elastic modulus of the fiber material\r\n* Em: elastic modulus of the matrix material\r\n* ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nYou are provided with the estimated elastic modulus at one bound. Determine if it is the lower or upper bound, based on the provided material properties, and return which bound was provided (0 = lower, 1 = upper) and the value for the other bound.\r\n\r\nThe lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nThe upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEf: elastic modulus of the fiber material\u003c/li\u003e\u003cli\u003eEm: elastic modulus of the matrix material\u003c/li\u003e\u003cli\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eYou are provided with the estimated elastic modulus at one bound. Determine if it is the lower or upper bound, based on the provided material properties, and return which bound was provided (0 = lower, 1 = upper) and the value for the other bound.\u003c/p\u003e\u003cp\u003eThe lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eThe upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e","function_template":"function [Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff)\r\n Ec_other = 1;\r\nend","test_suite":"%%\r\nEc = 37;\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 13.6986) \u003c 1e-4)\r\nassert(u_or_l == 1)\r\n\r\n%%\r\nEc = 13.6986;\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 37) \u003c 1e-4)\r\nassert(u_or_l == 0)\r\n\r\n%%\r\nEc = 23.5;\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 11.5607) \u003c 1e-4)\r\nassert(u_or_l == 1)\r\n\r\n%%\r\nEc = 11.5607;\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 23.5) \u003c 1e-4)\r\nassert(u_or_l == 0)\r\n\r\n%%\r\nEc = 11.7440;\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 158.5) \u003c 1e-4)\r\nassert(u_or_l == 0)\r\n\r\n%%\r\nEc = 158.5;\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 11.7440) \u003c 1e-4)\r\nassert(u_or_l == 1)\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":72,"test_suite_updated_at":"2014-12-16T23:06:11.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-16T04:42:12.000Z","updated_at":"2026-02-13T07:37:07.000Z","published_at":"2014-12-16T04:42:12.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEf: elastic modulus of the fiber material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEm: elastic modulus of the matrix material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYou are provided with the estimated elastic modulus at one bound. Determine if it is the lower or upper bound, based on the provided material properties, and return which bound was provided (0 = lower, 1 = upper) and the value for the other bound.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2781,"title":"Rule of mixtures (composites) - reverse engineering","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n* Ef: elastic modulus of the fiber material\r\n* Em: elastic modulus of the matrix material\r\n* ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nSuppose that you are reverse engineering a composite article. You've tested coupons from the article to determine Ec and taken sections to determine the material properties and volume fraction for the fiber material. Using the known values, calculate modulus estimates for the matrix material based on both weightings of upper- and lower-bounds. Provide values for (upper-bound) weightings of 0, 1/4, 1/2, 3/4, and 1 (weighting is not related to fiber fraction or material volume).\r\n\r\nThe lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em)   [eq.1]\r\n\r\nThe upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em   [eq.2]\r\n\r\nFor example, for each test case you will calculate Em_l, the lower-bound matrix elastic modulus extrapolated by eq.1, and Em_u, the upper-bound matrix elastic modulus extrapolated by eq.2. The weighted matrix elastic modulus is given by Em = wt * Em_u + (1-wt) * Em_l. For a weighting of 1/4, the weighted modulus is therefore given by Em = 0.25 * Em_u + 0.75 * Em_l.\r\n","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEf: elastic modulus of the fiber material\u003c/li\u003e\u003cli\u003eEm: elastic modulus of the matrix material\u003c/li\u003e\u003cli\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eSuppose that you are reverse engineering a composite article. You've tested coupons from the article to determine Ec and taken sections to determine the material properties and volume fraction for the fiber material. Using the known values, calculate modulus estimates for the matrix material based on both weightings of upper- and lower-bounds. Provide values for (upper-bound) weightings of 0, 1/4, 1/2, 3/4, and 1 (weighting is not related to fiber fraction or material volume).\u003c/p\u003e\u003cp\u003eThe lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em)   [eq.1]\u003c/p\u003e\u003cp\u003eThe upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em   [eq.2]\u003c/p\u003e\u003cp\u003eFor example, for each test case you will calculate Em_l, the lower-bound matrix elastic modulus extrapolated by eq.1, and Em_u, the upper-bound matrix elastic modulus extrapolated by eq.2. The weighted matrix elastic modulus is given by Em = wt * Em_u + (1-wt) * Em_l. For a weighting of 1/4, the weighted modulus is therefore given by Em = 0.25 * Em_u + 0.75 * Em_l.\u003c/p\u003e","function_template":"function [Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff)\r\n Em = ones(5,1);\r\nend","test_suite":"%%\r\nEc = 35.4;\r\nEf = 100;\r\nff = 0.30;\r\n[Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff);\r\nassert(sum(abs(sort(Em) - [7.7143   12.7168   17.7193   22.7218   27.7243])) \u003c 1e-2)\r\n\r\n%%\r\nEc = 85.1;\r\nEf = 250;\r\nff = 0.20;\r\n[Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff);\r\nassert(sum(abs(sort(Em) - [43.8750   51.1696   58.4642   65.7589   73.0535])) \u003c 1e-2)\r\n\r\n%%\r\nEc = 155.5;\r\nEf = 1000;\r\nff = 0.05;\r\n[Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff);\r\nassert(sum(abs(sort(Em) - [111.0526  120.5101  129.9676  139.4251  148.8826])) \u003c 1e-2)\r\n\r\n%%\r\nEc = 27.6;\r\nEf = 100;\r\nff = 0.10;\r\n[Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff);\r\nassert(sum(abs(sort(Em) - [19.5556   21.0529   22.5503   24.0477   25.5450])) \u003c 1e-2)\r\n\r\n%%\r\nEc = 204.9;\r\nEf = 1000;\r\nff = 0.15;\r\n[Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff);\r\nassert(sum(abs(sort(Em) - [64.5882   93.3631  122.1380  150.9128  179.6877])) \u003c 1e-2)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":6,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":54,"test_suite_updated_at":"2014-12-16T23:18:59.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-16T05:33:10.000Z","updated_at":"2026-02-13T10:45:04.000Z","published_at":"2014-12-16T05:33:10.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEf: elastic modulus of the fiber material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEm: elastic modulus of the matrix material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSuppose that you are reverse engineering a composite article. You've tested coupons from the article to determine Ec and taken sections to determine the material properties and volume fraction for the fiber material. Using the known values, calculate modulus estimates for the matrix material based on both weightings of upper- and lower-bounds. Provide values for (upper-bound) weightings of 0, 1/4, 1/2, 3/4, and 1 (weighting is not related to fiber fraction or material volume).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em) [eq.1]\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em [eq.2]\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFor example, for each test case you will calculate Em_l, the lower-bound matrix elastic modulus extrapolated by eq.1, and Em_u, the upper-bound matrix elastic modulus extrapolated by eq.2. The weighted matrix elastic modulus is given by Em = wt * Em_u + (1-wt) * Em_l. For a weighting of 1/4, the weighted modulus is therefore given by Em = 0.25 * Em_u + 0.75 * Em_l.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":2774,"title":"Rule of mixtures (composites) - upper bound","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n* Ef: elastic modulus of the fiber material\r\n* Em: elastic modulus of the matrix material\r\n* ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nBased on these values, the upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n\r\nWrite a function to calculate this bound for various values.","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEf: elastic modulus of the fiber material\u003c/li\u003e\u003cli\u003eEm: elastic modulus of the matrix material\u003c/li\u003e\u003cli\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eBased on these values, the upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e\u003cp\u003eWrite a function to calculate this bound for various values.\u003c/p\u003e","function_template":"function Ec = rule_of_mixtures_upper_bound(Ef,Em,ff)\r\n Ec = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),37))\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.22;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),29.8))\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),23.5))\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),307))\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.22;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),227.8))\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nassert(isequal(rule_of_mixtures_upper_bound(Ef,Em,ff),158.5))\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":129,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-14T04:06:34.000Z","updated_at":"2026-02-13T03:46:57.000Z","published_at":"2014-12-14T04:06:34.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEf: elastic modulus of the fiber material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEm: elastic modulus of the matrix material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate this bound for various values.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2777,"title":"Rule of mixtures (composites) - either bound","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nBased on these values, the lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n\r\nWrite a function to calculate either bound, depending on which bound is requested in the input string.\r\n","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cpre\u003e    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/pre\u003e\u003cp\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e\u003cp\u003eWrite a function to calculate either bound, depending on which bound is requested in the input string.\u003c/p\u003e","function_template":"function [Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff)\r\n Ec = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nb_str = 'lower';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 13.6986) \u003c 1e-4)\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.22;\r\nb_str = 'L';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 12.4688) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nb_str = 'Upper';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 23.5) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nb_str = 'Lower';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 14.2248) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.22;\r\nb_str = 'u';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 227.8) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nb_str = 'upper';\r\n[Ec] = rule_of_mixtures_either_bound(b_str,Ef,Em,ff);\r\nassert(abs(Ec - 158.5) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":78,"test_suite_updated_at":"2014-12-16T23:04:03.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-14T04:54:34.000Z","updated_at":"2026-02-13T03:58:28.000Z","published_at":"2014-12-14T04:54:34.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[    Ef: elastic modulus of the fiber material\\n    Em: elastic modulus of the matrix material\\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate either bound, depending on which bound is requested in the input string.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2778,"title":"Rule of mixtures (composites) - lower and upper bounds (volumes)","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nSometimes, the volume fraction is not known and must be calculated from known volumes (Vf and Vm). In this case, ff = Vf / (Vf + Vm).\r\n\r\nBased on these values, the lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n\r\nWrite a function to calculate either bound, depending on which bound is requested in the input string and using the known volumes.\r\n","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cpre\u003e    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/pre\u003e\u003cp\u003eSometimes, the volume fraction is not known and must be calculated from known volumes (Vf and Vm). In this case, ff = Vf / (Vf + Vm).\u003c/p\u003e\u003cp\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e\u003cp\u003eWrite a function to calculate either bound, depending on which bound is requested in the input string and using the known volumes.\u003c/p\u003e","function_template":"function [Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm)\r\n Ec = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nVf = 30;\r\nVm = 70;\r\nb_str = 'lower';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 13.6986) \u003c 1e-4)\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nVf = 11;\r\nVm = 39;\r\nb_str = 'L';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 12.4688) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nVf = 150;\r\nVm = 850;\r\nb_str = 'Lower';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 11.5607) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nVf = 3;\r\nVm = 7;\r\nb_str = 'U';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 307) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nVf = 2.2;\r\nVm = 7.8;\r\nb_str = 'lower bound';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 12.7845) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nVf = 30;\r\nVm = 170;\r\nb_str = 'U bound';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 158.5) \u003c 1e-4)\r\n\r\n%%\r\nEf = 57;\r\nEm = 3.9;\r\nVf = 1.27;\r\nVm = 9;\r\nb_str = 'Lower';\r\n[Ec] = rule_of_mixtures_either_bound_vol(b_str,Ef,Em,Vf,Vm);\r\nassert(abs(Ec - 4.4078) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":73,"test_suite_updated_at":"2014-12-16T23:05:00.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-14T05:06:25.000Z","updated_at":"2026-02-13T04:00:39.000Z","published_at":"2014-12-14T05:06:25.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[    Ef: elastic modulus of the fiber material\\n    Em: elastic modulus of the matrix material\\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSometimes, the volume fraction is not known and must be calculated from known volumes (Vf and Vm). In this case, ff = Vf / (Vf + Vm).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate either bound, depending on which bound is requested in the input string and using the known volumes.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2776,"title":"Rule of mixtures (composites) - lower and upper bounds","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nBased on these values, the lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n\r\nWrite a function to calculate both bounds for various values. Also, return the difference between the modulus estimates and the ratios of this difference to both moduli estimates.","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cpre\u003e    Ef: elastic modulus of the fiber material\r\n    Em: elastic modulus of the matrix material\r\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/pre\u003e\u003cp\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e\u003cp\u003eWrite a function to calculate both bounds for various values. Also, return the difference between the modulus estimates and the ratios of this difference to both moduli estimates.\u003c/p\u003e","function_template":"function [Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff)\r\n Ec_l = 1;\r\n Ec_u = 1;\r\n E_diff = 1;\r\n r_l = 1;\r\n r_u = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 13.6986) \u003c 1e-4)\r\nassert(abs(Ec_u - 37) \u003c 1e-4)\r\nassert(abs(E_diff - 23.3014) \u003c 1e-4)\r\nassert(abs(r_l - 1.7010) \u003c 1e-4)\r\nassert(abs(r_u - .6298) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.22;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 12.4688) \u003c 1e-4)\r\nassert(abs(Ec_u - 29.8) \u003c 1e-4)\r\nassert(abs(E_diff - 17.3312) \u003c 1e-4)\r\nassert(abs(r_l - 1.3900) \u003c 1e-4)\r\nassert(abs(r_u - 0.5816) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 11.5607) \u003c 1e-4)\r\nassert(abs(Ec_u - 23.5) \u003c 1e-4)\r\nassert(abs(E_diff - 11.9393) \u003c 1e-4)\r\nassert(abs(r_l - 1.0327) \u003c 1e-4)\r\nassert(abs(r_u - 0.5081) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 14.2248) \u003c 1e-4)\r\nassert(abs(Ec_u - 307) \u003c 1e-4)\r\nassert(abs(E_diff - 292.7752) \u003c 1e-4)\r\nassert(abs(r_l - 20.5821) \u003c 1e-4)\r\nassert(abs(r_u - 0.9537) \u003c 1e-4)\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.22;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 12.7845) \u003c 1e-4)\r\nassert(abs(Ec_u - 227.8) \u003c 1e-4)\r\nassert(abs(E_diff - 215.0155) \u003c 1e-4)\r\nassert(abs(r_l - 16.8185) \u003c 1e-4)\r\nassert(abs(r_u - 0.9439) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_l,Ec_u,E_diff,r_l,r_u] = rule_of_mixtures_l_and_u_bound(Ef,Em,ff);\r\nassert(abs(Ec_l - 11.7440) \u003c 1e-4)\r\nassert(abs(Ec_u - 158.5) \u003c 1e-4)\r\nassert(abs(E_diff - 146.756) \u003c 1e-4)\r\nassert(abs(r_l - 12.4963) \u003c 1e-4)\r\nassert(abs(r_u - 0.9259) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":94,"test_suite_updated_at":"2014-12-16T22:53:00.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-14T04:43:12.000Z","updated_at":"2026-02-13T03:51:00.000Z","published_at":"2014-12-14T04:43:12.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[    Ef: elastic modulus of the fiber material\\n    Em: elastic modulus of the matrix material\\n    ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate both bounds for various values. Also, return the difference between the modulus estimates and the ratios of this difference to both moduli estimates.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2775,"title":"Rule of mixtures (composites) - lower bound","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n* Ef: elastic modulus of the fiber material\r\n* Em: elastic modulus of the matrix material\r\n* ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nBased on these values, the lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nWrite a function to calculate this bound for various values.","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEf: elastic modulus of the fiber material\u003c/li\u003e\u003cli\u003eEm: elastic modulus of the matrix material\u003c/li\u003e\u003cli\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eWrite a function to calculate this bound for various values.\u003c/p\u003e","function_template":"function Ec = rule_of_mixtures_lower_bound(Ef,Em,ff)\r\n Ec = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 13.6986) \u003c 1e-4)\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.22;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 12.4688) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 11.5607) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 14.2248) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.22;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 12.7845) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nassert(abs(rule_of_mixtures_lower_bound(Ef,Em,ff) - 11.7440) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":183,"test_suite_updated_at":"2014-12-16T22:51:58.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-14T04:09:25.000Z","updated_at":"2026-02-13T03:46:16.000Z","published_at":"2014-12-14T04:14:32.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEf: elastic modulus of the fiber material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEm: elastic modulus of the matrix material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate this bound for various values.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2779,"title":"Rule of mixtures (composites) - weighted bound","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n* Ef: elastic modulus of the fiber material\r\n* Em: elastic modulus of the matrix material\r\n* ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nBased on these values, the lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n\r\nWrite a function to calculate the weighted Ec between both bounds, based on the provided weighting (wt) of the upper bound. (The lower bound will have the remainder of the weighting, or 1–wt.)\r\n","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEf: elastic modulus of the fiber material\u003c/li\u003e\u003cli\u003eEm: elastic modulus of the matrix material\u003c/li\u003e\u003cli\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e\u003cp\u003eWrite a function to calculate the weighted Ec between both bounds, based on the provided weighting (wt) of the upper bound. (The lower bound will have the remainder of the weighting, or 1–wt.)\u003c/p\u003e","function_template":"function [Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt)\r\n Ec = 1;\r\nend","test_suite":"%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.25;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 19.5240) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.50;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 25.3493) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.75;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 31.1747) \u003c 1e-4)\r\n\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.25;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 14.5455) \u003c 1e-4)\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.50;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 17.5303) \u003c 1e-4)\r\n\r\n%%\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.75;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 20.5152) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.25;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 87.4186) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.50;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 160.6124) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.30;\r\nwt = 0.75;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 233.8062) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.25;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 48.4330) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.50;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 85.1220) \u003c 1e-4)\r\n\r\n%%\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\nwt = 0.75;\r\n[Ec] = rule_of_mixtures_wt_bound(Ef,Em,ff,wt);\r\nassert(abs(Ec - 121.8110) \u003c 1e-4)\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":94,"test_suite_updated_at":"2014-12-16T23:05:34.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-16T04:22:51.000Z","updated_at":"2026-02-13T07:13:31.000Z","published_at":"2014-12-16T04:22:51.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEf: elastic modulus of the fiber material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEm: elastic modulus of the matrix material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eBased on these values, the lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOn the other hand, the upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function to calculate the weighted Ec between both bounds, based on the provided weighting (wt) of the upper bound. (The lower bound will have the remainder of the weighting, or 1–wt.)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2780,"title":"Rule of mixtures (composites) - other bound","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n* Ef: elastic modulus of the fiber material\r\n* Em: elastic modulus of the matrix material\r\n* ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nYou are provided with the estimated elastic modulus at one bound. Determine if it is the lower or upper bound, based on the provided material properties, and return which bound was provided (0 = lower, 1 = upper) and the value for the other bound.\r\n\r\nThe lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em).\r\n\r\nThe upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em.\r\n","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEf: elastic modulus of the fiber material\u003c/li\u003e\u003cli\u003eEm: elastic modulus of the matrix material\u003c/li\u003e\u003cli\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eYou are provided with the estimated elastic modulus at one bound. Determine if it is the lower or upper bound, based on the provided material properties, and return which bound was provided (0 = lower, 1 = upper) and the value for the other bound.\u003c/p\u003e\u003cp\u003eThe lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/p\u003e\u003cp\u003eThe upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/p\u003e","function_template":"function [Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff)\r\n Ec_other = 1;\r\nend","test_suite":"%%\r\nEc = 37;\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 13.6986) \u003c 1e-4)\r\nassert(u_or_l == 1)\r\n\r\n%%\r\nEc = 13.6986;\r\nEf = 100;\r\nEm = 10;\r\nff = 0.30;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 37) \u003c 1e-4)\r\nassert(u_or_l == 0)\r\n\r\n%%\r\nEc = 23.5;\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 11.5607) \u003c 1e-4)\r\nassert(u_or_l == 1)\r\n\r\n%%\r\nEc = 11.5607;\r\nEf = 100;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 23.5) \u003c 1e-4)\r\nassert(u_or_l == 0)\r\n\r\n%%\r\nEc = 11.7440;\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 158.5) \u003c 1e-4)\r\nassert(u_or_l == 0)\r\n\r\n%%\r\nEc = 158.5;\r\nEf = 1000;\r\nEm = 10;\r\nff = 0.15;\r\n[Ec_other,u_or_l] = rule_of_mixtures_opp_bound(Ec,Ef,Em,ff);\r\nassert(abs(Ec_other - 11.7440) \u003c 1e-4)\r\nassert(u_or_l == 1)\r\n","published":true,"deleted":false,"likes_count":3,"comments_count":0,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":72,"test_suite_updated_at":"2014-12-16T23:06:11.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-16T04:42:12.000Z","updated_at":"2026-02-13T07:37:07.000Z","published_at":"2014-12-16T04:42:12.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEf: elastic modulus of the fiber material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEm: elastic modulus of the matrix material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eYou are provided with the estimated elastic modulus at one bound. Determine if it is the lower or upper bound, based on the provided material properties, and return which bound was provided (0 = lower, 1 = upper) and the value for the other bound.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":2781,"title":"Rule of mixtures (composites) - reverse engineering","description":"The \u003chttp://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\r\n\r\n* Ef: elastic modulus of the fiber material\r\n* Em: elastic modulus of the matrix material\r\n* ff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\r\n\r\nSuppose that you are reverse engineering a composite article. You've tested coupons from the article to determine Ec and taken sections to determine the material properties and volume fraction for the fiber material. Using the known values, calculate modulus estimates for the matrix material based on both weightings of upper- and lower-bounds. Provide values for (upper-bound) weightings of 0, 1/4, 1/2, 3/4, and 1 (weighting is not related to fiber fraction or material volume).\r\n\r\nThe lower-bound estimate of elastic modulus is calculated by:\r\n\r\nEc = 1 / (ff / Ef + (1 – ff) / Em)   [eq.1]\r\n\r\nThe upper-bound (linear) estimate of elastic modulus is calculated by:\r\n\r\nEc = ff * Ef + (1 – ff) * Em   [eq.2]\r\n\r\nFor example, for each test case you will calculate Em_l, the lower-bound matrix elastic modulus extrapolated by eq.1, and Em_u, the upper-bound matrix elastic modulus extrapolated by eq.2. The weighted matrix elastic modulus is given by Em = wt * Em_u + (1-wt) * Em_l. For a weighting of 1/4, the weighted modulus is therefore given by Em = 0.25 * Em_u + 0.75 * Em_l.\r\n","description_html":"\u003cp\u003eThe \u003ca href = \"http://en.wikipedia.org/wiki/Rule_of_mixtures\"\u003erule of mixtures\u003c/a\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/p\u003e\u003cul\u003e\u003cli\u003eEf: elastic modulus of the fiber material\u003c/li\u003e\u003cli\u003eEm: elastic modulus of the matrix material\u003c/li\u003e\u003cli\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eSuppose that you are reverse engineering a composite article. You've tested coupons from the article to determine Ec and taken sections to determine the material properties and volume fraction for the fiber material. Using the known values, calculate modulus estimates for the matrix material based on both weightings of upper- and lower-bounds. Provide values for (upper-bound) weightings of 0, 1/4, 1/2, 3/4, and 1 (weighting is not related to fiber fraction or material volume).\u003c/p\u003e\u003cp\u003eThe lower-bound estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = 1 / (ff / Ef + (1 – ff) / Em)   [eq.1]\u003c/p\u003e\u003cp\u003eThe upper-bound (linear) estimate of elastic modulus is calculated by:\u003c/p\u003e\u003cp\u003eEc = ff * Ef + (1 – ff) * Em   [eq.2]\u003c/p\u003e\u003cp\u003eFor example, for each test case you will calculate Em_l, the lower-bound matrix elastic modulus extrapolated by eq.1, and Em_u, the upper-bound matrix elastic modulus extrapolated by eq.2. The weighted matrix elastic modulus is given by Em = wt * Em_u + (1-wt) * Em_l. For a weighting of 1/4, the weighted modulus is therefore given by Em = 0.25 * Em_u + 0.75 * Em_l.\u003c/p\u003e","function_template":"function [Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff)\r\n Em = ones(5,1);\r\nend","test_suite":"%%\r\nEc = 35.4;\r\nEf = 100;\r\nff = 0.30;\r\n[Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff);\r\nassert(sum(abs(sort(Em) - [7.7143   12.7168   17.7193   22.7218   27.7243])) \u003c 1e-2)\r\n\r\n%%\r\nEc = 85.1;\r\nEf = 250;\r\nff = 0.20;\r\n[Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff);\r\nassert(sum(abs(sort(Em) - [43.8750   51.1696   58.4642   65.7589   73.0535])) \u003c 1e-2)\r\n\r\n%%\r\nEc = 155.5;\r\nEf = 1000;\r\nff = 0.05;\r\n[Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff);\r\nassert(sum(abs(sort(Em) - [111.0526  120.5101  129.9676  139.4251  148.8826])) \u003c 1e-2)\r\n\r\n%%\r\nEc = 27.6;\r\nEf = 100;\r\nff = 0.10;\r\n[Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff);\r\nassert(sum(abs(sort(Em) - [19.5556   21.0529   22.5503   24.0477   25.5450])) \u003c 1e-2)\r\n\r\n%%\r\nEc = 204.9;\r\nEf = 1000;\r\nff = 0.15;\r\n[Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff);\r\nassert(sum(abs(sort(Em) - [64.5882   93.3631  122.1380  150.9128  179.6877])) \u003c 1e-2)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":6,"created_by":26769,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":54,"test_suite_updated_at":"2014-12-16T23:18:59.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-16T05:33:10.000Z","updated_at":"2026-02-13T10:45:04.000Z","published_at":"2014-12-16T05:33:10.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe\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=\\\"http://en.wikipedia.org/wiki/Rule_of_mixtures\\\"\u003e\u003cw:r\u003e\u003cw:t\u003erule of mixtures\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is used in the mechanical design of composite structures to estimate the elastic modulus (Ec) based on the following properties:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEf: elastic modulus of the fiber material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEm: elastic modulus of the matrix material\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eff or fm: volume fraction of the fiber or matrix material (ff = 1 – fm)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSuppose that you are reverse engineering a composite article. You've tested coupons from the article to determine Ec and taken sections to determine the material properties and volume fraction for the fiber material. Using the known values, calculate modulus estimates for the matrix material based on both weightings of upper- and lower-bounds. Provide values for (upper-bound) weightings of 0, 1/4, 1/2, 3/4, and 1 (weighting is not related to fiber fraction or material volume).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe lower-bound estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = 1 / (ff / Ef + (1 – ff) / Em) [eq.1]\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe upper-bound (linear) estimate of elastic modulus is calculated 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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEc = ff * Ef + (1 – ff) * Em [eq.2]\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFor example, for each test case you will calculate Em_l, the lower-bound matrix elastic modulus extrapolated by eq.1, and Em_u, the upper-bound matrix elastic modulus extrapolated by eq.2. The weighted matrix elastic modulus is given by Em = wt * Em_u + (1-wt) * Em_l. For a weighting of 1/4, the weighted modulus is therefore given by Em = 0.25 * Em_u + 0.75 * Em_l.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"term":"tag:\"materials science\"","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:\"materials science\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"materials science\"","","\"","materials science","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f74d86b65f8\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f74d86b6558\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f74d86b5c98\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f74d86b6918\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f74d86b6878\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f74d86b67d8\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f74d86b6738\u003e":"tag:\"materials science\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f74d86b6738\u003e":"tag:\"materials science\""},"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:\"materials science\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"materials science\"","","\"","materials science","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f74d86b65f8\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f74d86b6558\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f74d86b5c98\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f74d86b6918\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f74d86b6878\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f74d86b67d8\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f74d86b6738\u003e":"tag:\"materials science\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f74d86b6738\u003e":"tag:\"materials science\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":2774,"difficulty_rating":"easy"},{"id":2777,"difficulty_rating":"easy"},{"id":2778,"difficulty_rating":"easy"},{"id":2776,"difficulty_rating":"easy"},{"id":2775,"difficulty_rating":"easy"},{"id":2779,"difficulty_rating":"easy"},{"id":2780,"difficulty_rating":"easy-medium"},{"id":2781,"difficulty_rating":"easy-medium"}]}}