Cody

Problem 2781. Rule of mixtures (composites) - reverse engineering

Solution 2684639

Submitted on 12 Jul 2020 by Ramesh Kumar V
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
Ec = 35.4; Ef = 100; ff = 0.30; [Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff); assert(sum(abs(sort(Em) - [7.7143 12.7168 17.7193 22.7218 27.7243])) < 1e-2)

w1 = 0 0.2500 0.5000 0.7500 1.0000 w2 = 1.0000 0.7500 0.5000 0.2500 0 z1 = [] a = 0.0030 b = 0.0282 Em_l = 27.7243 Em_u = 7.7143 z = 27.7243 z1 = 27.7243 a = 0.0030 b = 0.0282 Em_l = 27.7243 Em_u = 7.7143 z = 22.7218 z1 = 27.7243 22.7218 a = 0.0030 b = 0.0282 Em_l = 27.7243 Em_u = 7.7143 z = 17.7193 z1 = 27.7243 22.7218 17.7193 a = 0.0030 b = 0.0282 Em_l = 27.7243 Em_u = 7.7143 z = 12.7168 z1 = 27.7243 22.7218 17.7193 12.7168 a = 0.0030 b = 0.0282 Em_l = 27.7243 Em_u = 7.7143 z = 7.7143 z1 = 27.7243 22.7218 17.7193 12.7168 7.7143 Em = 7.7143 12.7168 17.7193 22.7218 27.7243

2   Pass
Ec = 85.1; Ef = 250; ff = 0.20; [Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff); assert(sum(abs(sort(Em) - [43.8750 51.1696 58.4642 65.7589 73.0535])) < 1e-2)

w1 = 0 0.2500 0.5000 0.7500 1.0000 w2 = 1.0000 0.7500 0.5000 0.2500 0 z1 = [] a = 8.0000e-04 b = 0.0118 Em_l = 73.0535 Em_u = 43.8750 z = 73.0535 z1 = 73.0535 a = 8.0000e-04 b = 0.0118 Em_l = 73.0535 Em_u = 43.8750 z = 65.7589 z1 = 73.0535 65.7589 a = 8.0000e-04 b = 0.0118 Em_l = 73.0535 Em_u = 43.8750 z = 58.4642 z1 = 73.0535 65.7589 58.4642 a = 8.0000e-04 b = 0.0118 Em_l = 73.0535 Em_u = 43.8750 z = 51.1696 z1 = 73.0535 65.7589 58.4642 51.1696 a = 8.0000e-04 b = 0.0118 Em_l = 73.0535 Em_u = 43.8750 z = 43.8750 z1 = 73.0535 65.7589 58.4642 51.1696 43.8750 Em = 43.8750 51.1696 58.4642 65.7589 73.0535

3   Pass
Ec = 155.5; Ef = 1000; ff = 0.05; [Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff); assert(sum(abs(sort(Em) - [111.0526 120.5101 129.9676 139.4251 148.8826])) < 1e-2)

w1 = 0 0.2500 0.5000 0.7500 1.0000 w2 = 1.0000 0.7500 0.5000 0.2500 0 z1 = [] a = 5.0000e-05 b = 0.0064 Em_l = 148.8826 Em_u = 111.0526 z = 148.8826 z1 = 148.8826 a = 5.0000e-05 b = 0.0064 Em_l = 148.8826 Em_u = 111.0526 z = 139.4251 z1 = 148.8826 139.4251 a = 5.0000e-05 b = 0.0064 Em_l = 148.8826 Em_u = 111.0526 z = 129.9676 z1 = 148.8826 139.4251 129.9676 a = 5.0000e-05 b = 0.0064 Em_l = 148.8826 Em_u = 111.0526 z = 120.5101 z1 = 148.8826 139.4251 129.9676 120.5101 a = 5.0000e-05 b = 0.0064 Em_l = 148.8826 Em_u = 111.0526 z = 111.0526 z1 = 148.8826 139.4251 129.9676 120.5101 111.0526 Em = 111.0526 120.5101 129.9676 139.4251 148.8826

4   Pass
Ec = 27.6; Ef = 100; ff = 0.10; [Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff); assert(sum(abs(sort(Em) - [19.5556 21.0529 22.5503 24.0477 25.5450])) < 1e-2)

w1 = 0 0.2500 0.5000 0.7500 1.0000 w2 = 1.0000 0.7500 0.5000 0.2500 0 z1 = [] a = 1.0000e-03 b = 0.0362 Em_l = 25.5450 Em_u = 19.5556 z = 25.5450 z1 = 25.5450 a = 1.0000e-03 b = 0.0362 Em_l = 25.5450 Em_u = 19.5556 z = 24.0477 z1 = 25.5450 24.0477 a = 1.0000e-03 b = 0.0362 Em_l = 25.5450 Em_u = 19.5556 z = 22.5503 z1 = 25.5450 24.0477 22.5503 a = 1.0000e-03 b = 0.0362 Em_l = 25.5450 Em_u = 19.5556 z = 21.0529 z1 = 25.5450 24.0477 22.5503 21.0529 a = 1.0000e-03 b = 0.0362 Em_l = 25.5450 Em_u = 19.5556 z = 19.5556 z1 = 25.5450 24.0477 22.5503 21.0529 19.5556 Em = 19.5556 21.0529 22.5503 24.0477 25.5450

5   Pass
Ec = 204.9; Ef = 1000; ff = 0.15; [Em] = rule_of_mixtures_rev_eng(Ec,Ef,ff); assert(sum(abs(sort(Em) - [64.5882 93.3631 122.1380 150.9128 179.6877])) < 1e-2)

w1 = 0 0.2500 0.5000 0.7500 1.0000 w2 = 1.0000 0.7500 0.5000 0.2500 0 z1 = [] a = 1.5000e-04 b = 0.0049 Em_l = 179.6877 Em_u = 64.5882 z = 179.6877 z1 = 179.6877 a = 1.5000e-04 b = 0.0049 Em_l = 179.6877 Em_u = 64.5882 z = 150.9128 z1 = 179.6877 150.9128 a = 1.5000e-04 b = 0.0049 Em_l = 179.6877 Em_u = 64.5882 z = 122.1380 z1 = 179.6877 150.9128 122.1380 a = 1.5000e-04 b = 0.0049 Em_l = 179.6877 Em_u = 64.5882 z = 93.3631 z1 = 179.6877 150.9128 122.1380 93.3631 a = 1.5000e-04 b = 0.0049 Em_l = 179.6877 Em_u = 64.5882 z = 64.5882 z1 = 179.6877 150.9128 122.1380 93.3631 64.5882 Em = 64.5882 93.3631 122.1380 150.9128 179.6877