Message Boards Message Boards

1
|
3599 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

"AccuracyGoal" and NDSolve

Posted 9 years ago

Hi!

I would like to know how "AccuracyGoal" works. I know that "AccuracyGoal" is an option for various numerical operations which specifies how many effective digits of accuracy should be sought in the final result" so i tought that if I choose a bigger value the results should be more accurate, but if I put, for example AccuracyGoal->2 I obtain results that are completly different from the results I obtein with AccuracyGoal->4... It seems that a bigger value brings to a worse result and if I reach AccuracyGoal->10 the results disappear!

I also have another point: I plot the evolution of a function (displacement) in the time. I plot the displacement of a point in the x direction and y direction. In both the directions the situation is the same but the solicitation in direction y is 30% of that in x. So I expect that the displacements follow the same evolution but one is simply smaller than the other. This is true and I can see it in the output but just until a certain time (about 20 seconds, while the time history lasts more than 40 seconds). So, I don't understand...what happen from second 20?!

(*Record*)

dT = 0.02;

mList = {0.0008, 0.0008, 0.0008, 0.0007, 0.0007, 0.0008, 0.0008, 0.0008, 
   0.0008, 0.0008, 0.0008, 0.0008, 0.0008, 0.0008, 0.0009, 0.0016, 0.0025, 
   0.0023, 0.004, -0.0027, -0.0036, 0.019, -0.0023, -0.0144, 
   0.0199, -0.0111, -0.0128, 0.0411, 0.0385, 
   0.0151, -0.0362, -0.0681, -0.0213, 0.0223, 0.0099, -0.0064, 
   0.0172, -0.0055, -0.004, 0.0179, -0.0429, -0.0365, -0.0042, -0.0035, 
   0.0148, 0.0025, 0.0385, 0.0496, 0.0086, -0.0564, -0.0573, -0.028, 0.0039, 
   0.0656, 0.0269, -0.0045, -0.0437, -0.0495, 0.0168, 
   0.0301, -0.0032, -0.003, -0.0219, -0.0351, 0.022, 0.0498, 0.0411, 
   0.0155, -0.0364, -0.0413, 0.0174, 0.0229, -0.0276, 0.0207, 
   0.0298, -0.0388, -0.0218, 0.0101, 0.008, 0.0171, -0.0225, -0.0693, -0.031, 
   0.0044, 0.1399, 0.0975, -0.1172, -0.1936, -0.1457, 0.0319, 0.1517, 
   0.1399, -0.0744, -0.186, -0.0623, 0.0579, 0.0663, 0.0659, 
   0.0437, -0.0896, -0.1202, -0.1503, -0.0485, 0.081, 0.1521, 
   0.037, -0.1513, -0.0174, 0.0141, -0.0567, -0.0442, -0.039, 0.0689, 
   0.0479, -0.0332, 0.0565, 0.14, 0.0796, -0.1159, -0.1473, 0.0043, 0.0979, 
   0.1673, 0.1199, -0.1186, -0.1782, 0.0628, 
   0.1369, -0.0957, -0.1518, -0.0705, 0.0061, 
   0.0834, -0.0155, -0.009, -0.0358, 0.0906, 0.2502, 0.0705, 0.0108, 0.1073, 
   0.1198, 0.0553, -0.1092, -0.157, -0.0939, 0.0827, -0.0021, -0.0588, 0.0469,
    0.0062, 0.0384, 0.0327, -0.0932, -0.0888, 0.0091, 0.0486, 0.0795, 
   0.0149, -0.0272, -0.0184, 0.0845, 0.0648, -0.0685, -0.0139, -0.0102, 
   0.0221, 0.0362, 0.023, 0.0355, -0.0296, 0.024, -0.0473, -0.1121, 0.0409, 
   0.1169, 0.0519, -0.0345, 0.0072, -0.0455, -0.066, 0.062, 0.0887, 
   0.0104, -0.1063, -0.1174, 0.0097, 0.0802, 0.1354, 0.094, -0.1152, -0.143, 
   0.0341, 0.1162, 0.0021, -0.0757, 0.006, 0.0829, 
   0.0277, -0.0516, -0.0661, -0.043, -0.0144, -0.0902, -0.002, 0.0375, -0.014,
    0.101, 0.0717, -0.0955, -0.1297, -0.0315, 0.0647, 0.014, -0.013, 
   0.0119, -0.0088, -0.0005, -0.0181, 0.0149, 0.0609, -0.0006, -0.0482, 0.007,
    0.0523, 0.033, -0.0215, -0.0093, 0.0618, 0.0733, 0.0708, 0.014, -0.0207, 
   0.0618, 0.1285, 0.1042, 0.0544, 0.1092, 0.0644, -0.0609, -0.0139, 0.0279, 
   0.0168, 0.0781, 0.0194, -0.0578, 0.0106, 0.0343, 0.0445, 0.0732, 0.0627, 
   0.0452, 0.0906, 0.0883, 0.0263, 0.0721, 0.0448, -0.0383, -0.0465, -0.0676, 
   0.0293, 0.0382, -0.0175, 
   0.0416, -0.0003, -0.0912, -0.0663, -0.0066, -0.1, -0.1626, -0.08, 0.0148, 
   0.086, 0.0644, -0.0667, -0.2071, -0.2139, -0.1316, -0.0965, -0.0125, 
-0.0334, -0.0807, -0.0977, -0.0329, 0.2525, 0.3909, 
   0.2032, -0.1199, -0.232, -0.1479, 0.0467, 0.1039, 0.2549, 0.1918, 0.08, 
   0.1732, -0.1844, -0.3171, -0.3409, -0.3297, -0.0302, 0.1279, 0.202, 0.1938,
    0.0663, 0.0136, -0.2624, -0.3498, 0.0811, 
   0.152, -0.2839, -0.4184, -0.0218, 0.1646, 0.309, 0.3604, 0.0048, -0.113, 
   0.1696, 0.1124, -0.0869, -0.1484, -0.2276, -0.2204, -0.1414, 0.0166, 0.06, 
   0.0884, 0.2921, -0.0968, -0.482, -0.2828, -0.0713, 0.0988, 0.2772, 0.1415, 
   0.0258, 0.1947, 
   0.0287, -0.0153, -0.0876, -0.2009, -0.084, -0.0206, -0.0398, -0.2129, 
-0.2834, -0.2241, -0.1762, 0.1298, 0.3009, -0.1398, -0.2673, 0.1483, 
   0.2203, -0.0856, -0.2375, -0.074, -0.0351, -0.102, -0.0658, 0.033, 0.1408, 
   0.1958, 0.121, 0.0739, 0.0215, -0.2974, -0.2009, 0.2587, 0.3611, 0.3729, 
   0.2313, -0.0906, -0.1264, 0.1243, 0.1975, 0.0182, -0.033, 
   0.019, -0.0244, -0.1097, -0.0727, -0.0219, 0.0786, 0.156, 0.0774, 
   0.062, -0.1785, -0.2356, 0.016, 0.1308, 
   0.1215, -0.0535, -0.1927, -0.2107, -0.0531, 0.0928, 
   0.0122, -0.1611, -0.2162, -0.0523, 0.0704, 
   0.0917, -0.0687, -0.1754, -0.1409, -0.1518, -0.0974, -0.0803, -0.044, 
-0.2345, -0.3664, -0.0625, 0.0737, -0.117, -0.0628, 0.2174, 0.2214, 0.2286, 
   0.2091, 0.0153, -0.1107, -0.1519, -0.1009, 0.0796, 0.1121, 0.057, 0.1074, 
   0.1337, 0.279, 0.1918, -0.2148, -0.2245, 0.1001, 0.201, -0.0516, -0.1332, 
   0.043, -0.0379, -0.1301, -0.2454, -0.2062, 0.1726, 0.2714, 0.403, 0.5207, 
   0.2758, 0.096, 0.1434, 0.3092, 0.474, 0.4993, 0.338, 0.1877, 
   0.096, -0.0583, 0.0738, 
   0.2687, -0.2411, -0.4942, -0.284, -0.351, -0.3936, -0.3221, -0.3554, 
-0.169, 0.1451, 0.3851, 0.3496, 0.2636, 0.409, 0.3957, 0.3109, 0.208, 0.0131, 
   0.087, 0.3595, 0.0569, -0.1374, 0.0165, 0.1689, 0.2884, 
   0.3398, -0.0459, -0.274, -0.3163, -0.0082, -0.0563, 0.1464, -0.0222, 
   0.1389, -0.2603, -0.166, -0.4199, -0.4101, -0.5576, -0.4966, -0.3677, 
-0.1623, 0.0308, -0.4919, -0.2587, -0.1755, 0.0994, -0.4631, -0.2792, 
   0.0063, -0.049, 0.0437, -0.0336, -0.1098, 0.3071, 0.4002, 0.2337, 0.0934, 
   0.3352, 0.1373, -0.2805, -0.074, 0.1762, 0.1297, 0.2675, 0.2779, 0.2668, 
   0.2103, 0.0056, -0.2693, -0.075, 0.1172, -0.0502, 0.3151, 
   0.4027, -0.009, -0.2222, 0.029, 0.155, 0.1741, 
   0.0251, -0.351, -0.3515, -0.2252, -0.425, -0.2818, 
   0.0156, -0.1439, -0.0577, 0.1214, 0.3071, 0.455, 0.5451, 0.493, 0.2481, 
   0.0265, -0.1177, -0.3645, -0.3895, 
   0.1876, -0.0632, -0.3621, -0.2109, -0.0572, 0.1818, 
   0.0531, -0.015, -0.2372, -0.0722, 0.1233, 0.0871, 0.0816, -0.2174, -0.3144,
    0.0089, 0.0412, -0.3764, -0.2103, 0.1726, 0.1874, 0.2852, 0.2031, 0.2164, 
   0.3339, 0.0573, -0.1382, -0.2114, -0.1585, -0.1954, -0.3358, -0.083, 
   0.1749, 0.1108, -0.14, -0.2559, -0.0503, -0.1792, -0.2578, -0.2683, 
-0.0909, 0.1307, 0.1216, 0.1729, 0.36, 0.2628, 0.166, 0.1422, 0.2583, 0.2848, 
   0.2416, -0.0429, -0.1872, -0.3026, -0.1131, -0.2692, -0.1222, -0.0895, 
-0.1088, 0.0686, 0.0828, -0.2314, -0.5827, -0.6772, -0.0507, -0.406, -0.3394, 
   0.0252, 0.0293, -0.1598, -0.0274, 
   0.1143, -0.2133, -0.0658, -0.3321, -0.033, 0.1161, -0.0247, 0.1949, 
   0.2443, -0.0617, -0.1483, 0.0278, 0.2505, 0.207, 0.0991, 0.0254, 
   0.1391, -0.0323, 0.151, 0.3915, -0.1985, 0.1533, 0.1953, 0.3458, 0.396, 
   0.3908, 0.4503, -0.21, -0.3259, -0.138, -0.0209, -0.2096, 0.1308, 0.233, 
   0.0658, -0.1219, -0.1777, 0.147, 0.2152, 0.199, -0.224, -0.4389, -0.0069, 
   0.1477, 0.0835, -0.1173, -0.0837, 0.1378, -0.0802, -0.1372, -0.0699, 
   0.0102, 0.1193, -0.0146, -0.1807, -0.2773, -0.137, 0.0505, 0.1369, 0.1988, 
   0.2278, 0.3111, 0.3457, 0.1773, -0.0021, -0.1202, -0.1105, 0.0233, 0.1326, 
   0.122, 0.0759, 0.2293, 0.3707, 0.3642, 0.0555, -0.2034, 0.0598, 0.1784, 
   0.0049, -0.0381, 0.0265, 0.056, 0.0631, -0.0954, -0.153, 0.0726, 
   0.1413, -0.0074, -0.0156, -0.037, -0.0791, 0.0702, 0.0773, 0.196, 
   0.2581, -0.0527, -0.3342, -0.3345, -0.182, -0.1741, -0.1336, 0.1156, 
   0.2838, 0.247, -0.053, -0.2452, -0.076, 0.14, 0.2717, 
   0.1347, -0.0501, -0.1412, -0.2916, -0.1885, -0.1296, -0.2792, -0.2619, 
-0.0339, 0.1106, 0.2199, 0.2324, -0.0313, 
   0.0356, -0.0131, -0.3974, -0.3944, -0.0145, 0.1089, -0.1807, 0.0172, 
   0.2374, -0.0172, -0.1807, -0.2495, 0.0578, 0.2589, 0.082, 
   0.1222, -0.449, -0.4327, 
   0.0995, -0.1486, -0.2661, -0.1093, -0.1224, -0.2354, -0.1324, -0.0691, 
-0.0837, -0.0179, -0.0211, 0.0301, 0.0414, -0.0378, -0.0867, -0.0233, 0.0537, 
   -0.0806, -0.0599, 0.1315, 0.1224, -0.062, -0.0535, 0.133, -0.0361, -0.1387,
    0.0107, 0.1353, 0.1892, 0.2389, 0.2877, 0.3154, 0.2248, -0.0219, -0.0417, 
   0.0932, 0.1303, 0.0844, 0.0761, 0.1473, 0.1668, 0.1104, 
   0.048, -0.0302, -0.0448, 0.0118, 0.0392, 
   0.0047, -0.1013, -0.1839, -0.2019, -0.056, 0.0997, 0.2092, 
   0.168, -0.1191, -0.3105, -0.2506, -0.0306, 
   0.0234, -0.0008, -0.1261, -0.1912, 0.0119, 0.1285, 0.1899, 0.2555, 
   0.148, -0.1187, -0.3192, -0.3229, -0.1786, -0.1027, -0.0558, 0.0291, 
   0.1135, 0.2335, 0.1545, -0.1352, -0.1279, 0.095, 0.1522, 0.1243, 0.0686, 
   0.0005, -0.0203, 0.0799, 0.1369, 0.0809, 0.0224, -0.05, -0.0441, 0.034, 
   0.0795, 0.1074, 0.0902, 0.0176, -0.0134, -0.0179, -0.0487, 0.0187, 0.1168, 
   0.1925, 0.1563, -0.0305, -0.187, -0.1491, 0.0367, 0.1384, 0.1873, 0.1834, 
   0.0434, -0.1212, -0.2436, -0.1946, 0.0104, 0.1291, 0.1194, 
   0.0198, -0.0886, -0.2269, -0.1554, 0.0412, 0.0819, 0.0666, 0.0277, 
   0.0129, -0.0614, -0.0339, 0.1148, 0.117, 0.1082, 0.1159, 
   0.0223, -0.1084, -0.1689, -0.0977, 0.0117, 0.0565, 0.0639, 
   0.0311, -0.0956, -0.0916, 0.0084, 0.058, 0.117, 0.0973, -0.0356, -0.0229, 
   0.1235, 0.0671, -0.002, 0.0475, 0.0193, -0.0036, -0.0014, -0.0286, 0.0001, 
   0.0607, 0.0695, 0.0682, 0.0461, -0.0237, -0.0636, -0.009, 0.0567, 
   0.0362, -0.0034, -0.0585, -0.0694, -0.0564, 0.0057, 0.0768, 
   0.0721, -0.0329, -0.1587, -0.1579, -0.0608, 0.039, 0.115, 0.1127, 
   0.0602, -0.0623, -0.1179, -0.0677, -0.0699, -0.0889, -0.0372, -0.0298, 
-0.1328, -0.1181, -0.0964, -0.0618, 0.0491, 0.0055, -0.0491, -0.1536, -0.1624,
    0.0158, 0.0567, 0.1051, 0.1696, 
   0.0112, -0.1721, -0.2204, -0.2546, -0.1789, 0.1072, 
   0.131, -0.0467, -0.1439, -0.1159, -0.0224, -0.0179, -0.0253, 0.0089, 
   0.0452, 0.0196, -0.0113, -0.1591, -0.0937, 0.0792, 0.08, 
   0.0709, -0.0768, -0.0794, -0.0231, -0.049, 0.0107, 0.0259, 0.0854, 0.0886, 
   0.0008, -0.0367, -0.0209, 0.0152, -0.0086, 0.0257, 0.057, 0.0586, 0.0804, 
   0.0516, 0.0117, -0.0493, -0.0513, 0.0183, 
   0.0278, -0.0031, -0.0505, -0.0305, -0.0242, -0.06, 0.0189, 0.0887, 
   0.0531, -0.0694, -0.0682, 0.0424, 0.0326, 0.0047, 0.048, 0.0615, 0.0713, 
   0.1307, 0.1231, 0.019, -0.0185, 0.0554, 0.1122, 0.1103, 0.0638, 0.0181, 
   0.0318, 0.0553, 0.0435, 0.022, -0.0312, -0.1019, -0.0455, 
   0.0801, -0.0081, -0.0566, 0.0108, 0.0499, 0.0983, 0.1159, 0.1114, 0.1207, 
   0.1422, 0.1377, 0.0794, 0.0166, 0.0248, 0.0941, 0.0913, 
   0.0259, -0.0808, -0.0965, 0.0506, 0.0967, 0.062, 
   0.0055, -0.0229, -0.0459, -0.1033, -0.075, -0.0196, -0.0146, -0.0139, 
   0.0526, 0.0672, -0.0233, -0.0955, -0.0998, -0.0117, 0.0432, 
   0.0428, -0.003, -0.0271, 0.0267, 0.0015, -0.0939, -0.0782, 0.0058, 0.0375, 
   0.0076, -0.0306, -0.0316, -0.03, -0.0028, 
   0.0026, -0.0463, -0.0506, -0.0558, -0.1363, -0.1481, -0.0655, 0.0093, 
   0.0791, 0.0356, -0.113, -0.1521, -0.1602, -0.143, -0.062, -0.0233, -0.0498,
    -0.0849, -0.0532, 0.0112, 
   0.0244, -0.0522, -0.1154, -0.0997, -0.0171, -0.001, -0.0305, -0.0175, 
-0.0386, -0.0744, -0.0534, 0.0224, 0.0759, 0.0477, -0.0054, -0.0117, -0.0162, 
   0.0304, 0.0569, 0.0237, -0.0006, -0.012, 
   0.001, -0.0202, -0.073, -0.0903, -0.0412, 0.0163, 0.0739, 0.088, 
   0.0495, -0.0364, -0.1028, -0.0476, 0.0057, 0.0523, 0.0956, 0.0793, 
   0.0255, -0.0325, -0.028, 0.0466, 0.0481, 0.0066, 0.0617, 0.1724, 0.1834, 
   0.1002, 0.0204, -0.0557, -0.0361, 0.0675, 0.104, 0.1186, 0.1035, 
   0.0089, -0.1119, -0.1308, -0.0628, -0.0806, -0.0342, 0.1012, 0.1728, 
   0.1669, 0.0032, -0.1178, -0.098, -0.0809, 0.0229, 0.1349, 0.1988, 0.1552, 
   0.013, -0.0507, -0.004, 0.0828, 0.0443, 0.0185, 0.0177, 0.0067, 0.0784, 
   0.1386, 0.1167, 0.0691, 0.0816, 0.0676, 0.056, 0.0614, 0.0669, 
   0.0623, -0.0002, -0.0572, -0.0654, 0.0083, 
   0.0204, -0.0286, -0.0669, -0.0702, -0.0068, 0.0572, 0.1014, 
   0.0332, -0.1034, -0.194, -0.1913, -0.0651, 0.038, 0.115, 0.1272, 
   0.0241, -0.06, -0.1333, -0.1213, 0.0187, 0.1054, 0.1702, 
   0.1065, -0.0611, -0.1932, -0.2016, -0.1024, -0.1208, -0.0853, 
   0.013, -0.0317, -0.1157, -0.0322, 0.0541, 0.0368, 
   0.021, -0.0336, -0.1155, -0.0924, -0.0969, -0.098, -0.0066, 0.0762, 0.0969,
    0.0789, 0.0312, -0.1009, -0.1, 
   0.0056, -0.021, -0.0291, -0.0175, -0.046, -0.0364, -0.0532, -0.0464, 
-0.0103, -0.0142, -0.0226, -0.0228, 
   0.003, -0.0324, -0.1071, -0.0959, -0.0153, -0.0104, -0.0157, -0.0369, 
-0.0714, 0.0036, 0.0671, 0.1643, 0.0894, -0.199, -0.337, -0.2539, -0.051, 
   0.0887, 0.2003, 0.1683, 0.0186, -0.0692, -0.0555, 0.0179, 0.0154, 0.031, 
   0.0389, 0.029, 0.0832, 0.1375, 0.1304, 0.0613, 0.0506, 
   0.019, -0.1168, -0.084, 0.0706, 0.1649, 0.0586, -0.207, -0.1812, 0.0182, 
   0.1204, 0.2031, 0.1906, 0.045, -0.0763, -0.1805, -0.2277, -0.1005, -0.0002,
    0.1217, 0.144, -0.0688, -0.1807, -0.2212, -0.1201, 0.1343, 0.26, 0.2416, 
   0.1269, 0.0044, -0.0219, 0.0567, 0.0572, 0.0152, -0.0065, -0.0021, -0.0527,
    0.0351, 0.1829, 0.054, 0.0644, 0.0009, -0.0514, 0.0872, 0.1089, 0.0943, 
   0.0969, 0.061, -0.0017, -0.0409, -0.0018, 0.0117, 0.0019, 0.0111, 0.0146, 
   0.0076, -0.0075, -0.0331, -0.0732, -0.0755, -0.0094, 0.1116, 
   0.0835, -0.0427, -0.0301, 0.048, 0.0143, 0.0125, 0.0377, 0.0116, 
   0.0142, -0.0219, -0.0211, 0.0569, 0.0324, -0.0022, -0.0349, -0.0066, 
   0.2009, 0.0705, -0.2713, -0.2289, -0.0056, 0.0274, 0.0007, 
   0.0277, -0.0239, -0.0671, 0.0309, 0.0559, -0.0114, -0.0092, 0.0599, 
   0.0445, -0.0615, -0.0462, -0.0335, -0.0078, 
   0.0069, -0.0168, -0.0675, -0.0361, 0.0563, 0.1029, 
   0.0713, -0.032, -0.1001, -0.0048, 0.1375, 
   0.1713, -0.0174, -0.2902, -0.2388, -0.1289, -0.1109, -0.0805, 0.0152, 
   0.0294, -0.0821, -0.1841, -0.1935, -0.0633, -0.0376, 0.0176, 0.1738, 
   0.2059, 0.1181, -0.0075, -0.0048, 0.0453, 0.036, -0.0228, -0.077, -0.0463, 
   0.032, 0.037, -0.0419, -0.0616, 0.0408, 
   0.0488, -0.0412, -0.0802, -0.1253, -0.1554, -0.0747, 0.1319, 
   0.1144, -0.0087, 0.0306, 0.0349, 0.0539, 0.0728, 0.1098, 0.1196, 0.0885, 
   0.0782, 0.0463, -0.0031, -0.0259, 0.0055, 0.0414, 0.0739, 0.1158, 
   0.0768, -0.0657, -0.1661, -0.1212, 0.0084, 0.0208, 0.0041, 0.065, 0.0918, 
   0.0676, 0.0035, -0.0739, -0.1074, -0.0524, -0.0186, 0.0478, 0.1711, 0.2268,
    0.1728, 0.0242, -0.0729, -0.1506, -0.0918, 0.0612, 
   0.024, -0.0857, -0.0656, 0.0263, 
   0.0366, -0.0201, -0.0145, -0.0391, -0.0776, -0.0525, -0.0976, -0.0682, 
   0.0213, -0.007, -0.0871, -0.0249, 0.0993, 0.1438, 
   0.0401, -0.2518, -0.332, -0.2115, -0.1179, -0.0065, 0.0788, 0.112, 0.171, 
   0.1447, 0.0003, -0.1357, -0.1396, -0.037, -0.0072, 0.0406, 0.0051, 0.0104, 
   0.071, 0.0497, 0.0548, 0.0749, -0.0083, -0.1041, -0.0016, 0.0607, 0.0394, 
   0.0292, 0.0021, -0.0814, -0.0733, 0.0041, -0.0277, -0.0298, 0.0302, 0.0407,
    0.0027, -0.0144, -0.0371, -0.0425, 0.0197, 0.0958, 
   0.0866, -0.0267, -0.1093, -0.0693, 0.0367, 0.0922, 
   0.0586, -0.0221, -0.0759, -0.0386, 0.0597, 
   0.0594, -0.0063, -0.0638, -0.117, -0.0846, 0.0278, 0.121, 0.1123, 
   0.025, -0.0363, 0.0042, 0.0868, 0.1026, 0.0817, 
   0.0208, -0.0082, -0.0074, -0.0477, -0.0227, 0.0759, 0.0946, 
   0.0143, -0.0609, -0.0576, -0.0004, -0.0036, -0.1016, -0.097, 0.02, 0.0472, 
   0.0313, -0.0246, -0.0466, -0.0194, -0.0451, -0.0763, -0.1171, -0.0968, 
-0.0221, 0.0412, 0.1433, 0.1995, 0.0717, -0.1602, -0.1421, 0.0641, 0.1797, 
   0.1541, 0.0208, -0.0657, -0.112, -0.0591, 0.1236, 
   0.0702, -0.1791, -0.2918, -0.1892, -0.0228, -0.0116, -0.0544, -0.0561, 
   0.066, 0.1739, 0.1398, 0.059, 0.0039, 0.0004, 0.074, 0.1403, 0.1916, 
   0.1674, 0.0762, 0.0027, -0.0426, 0.0223, 0.1027, 0.1614, 
   0.0867, -0.1322, -0.3131, -0.3139, -0.1517, -0.0406, 0.0133, 
   0.0396, -0.0301, -0.201, -0.2275, -0.0505, 0.0577, 0.1915, 0.3301, 0.2343, 
   0.1235, 0.0858, 0.1044, 0.1797, 0.195, 0.1886, 0.0196, -0.3086, -0.0761, 
   0.0692, -0.3487, -0.3312, -0.1134, 0.0917, 0.2933, 0.0735, -0.0173, 0.0624,
    0.0476, 0.0941, -0.0325, 0.1203, 0.2663, 0.1367, -0.1176, -0.185, -0.0253,
    0.0894, 0.1611, 0.0943, -0.141, -0.1633, 0.0378, 0.1362, 0.146, 
   0.0526, -0.0261, -0.0434, -0.0248, -0.0485, -0.0891, -0.1162, -0.1998, \
-0.2119, -0.1698, -0.0786, 0.0481, 0.1385, 0.248, 0.2966, 0.284, 0.203, 
   0.0184, -0.0996, -0.1382, -0.074, -0.0669, -0.0763, 0.0417, 0.1416, 0.2211,
    0.1903, -0.0322, -0.1971, -0.2447, -0.2224, -0.1597, -0.142, -0.0905, \
-0.043, 0.003, 0.0536, 0.0562, 0.0782, 
   0.0735, -0.049, -0.119, -0.162, -0.181, -0.183, -0.1389, 0.0577, 0.1729, 
   0.0468, -0.2103, -0.2416, -0.0804, 0.0464, 0.1305, 
   0.0958, -0.0787, -0.0861, 0.0637, 0.0313, 0.0345, 0.0833, 
   0.0377, -0.0292, -0.1031, -0.1808, -0.1751, -0.0636, 0.0283, 0.1021, 
   0.0812, -0.0564, -0.1066, -0.0212, 0.0104, 0.0192, 
   0.0299, -0.0505, -0.0708, -0.0067, 0.0281, 0.044, 0.0749, 0.0654, 
   0.0082, -0.025, -0.0453, -0.029, 0.0256, 0.0103, -0.0592, -0.0304, 0.0623, 
   0.0886, 0.0691, -0.0023, -0.0709, -0.0306, 0.0737, 0.0915, 0.0636, 0.0577, 
   0.0069, -0.0572, -0.0434, 0.0381, 
   0.0183, -0.0349, -0.045, -0.1226, -0.0972, -0.0117, 0.0196, 0.076, 
   0.0149, -0.0341, 0.0021, -0.0338, -0.11, -0.1043, -0.0244, 0.0402, 0.0632, 
   0.0937, 0.0956, 0.0416, 0.0163, 0.0201, 0.061, 0.0726, 0.0492, 0.0688, 
   0.0776, 0.0792, 0.0981, 0.129, 
   0.0402, -0.1363, -0.2369, -0.2509, -0.1321, -0.0457, -0.0018, 0.0499, 
   0.0665, 0.0156, -0.0182, 0.0638, 0.1661, 0.1383, 0.0126, -0.002, 
   0.036, -0.0119, -0.0661, -0.0454, -0.0229, -0.0482, -0.0438, -0.0728, 
-0.0127, 0.1641, 0.2442, 0.1557, -0.0216, -0.1065, -0.1029, -0.0245, 0.0465, 
   0.0964, 0.102, 0.0438, 0.0119, 0.0934, 0.1466, 0.0467, -0.029, -0.0497, 
   0.001, 0.0253, 0.0102, 0.0653, 0.1294, 0.1468, 
   0.0707, -0.0229, -0.0906, -0.1235, -0.1419, -0.1384, -0.0215, 0.0858, 
   0.1563, 0.1094, -0.051, -0.1494, -0.1197, 0.0192, 
   0.0329, -0.0384, -0.0544, -0.041, 0.0618, 0.1508, 
   0.1165, -0.0003, -0.1077, -0.1241, -0.0141, 0.0577, 0.0655, 
   0.0286, -0.0454, -0.0806, -0.0451, 0.0143, 0.0301, 0.0336, 0.0895, 
   0.0335, -0.1382, -0.1466, 0.0016, 0.0605, -0.0131, -0.0982, -0.0781, 
   0.0136, 0.074, 0.0639, -0.0522, -0.0731, 0.0422, 0.118, 0.1015, 
   0.0339, -0.023, -0.096, -0.1142, -0.1102, -0.126, -0.1351, -0.0968, 0.0461,
    0.1305, 0.0775, -0.043, -0.1205, -0.1306, -0.0922, -0.0573, -0.0484, 
-0.051, -0.0249, 0.0155, 0.0626, 0.1029, 0.0873, 
   0.0041, -0.0564, -0.074, -0.0759, 0.0116, 0.0696, 0.0687, 0.0501, 0.0657, 
   0.0801, 0.0341, 0.0279, 0.0505, -0.0131, -0.0513, 0.0086, 
   0.0051, -0.0389, -0.0071, 0.0352, 0.05, 0.0454, 0.084, 0.1018, 
   0.0298, -0.0338, -0.0464, 0.0151, 0.02, -0.0475, -0.076, -0.0573, 0.0258, 
   0.0617, -0.0251, -0.0794, -0.028, -0.0006, -0.0438, -0.0406, 0.0503, 
   0.1284, 0.0992, -0.017, -0.0658, 0.0087, 0.081, 
   0.0566, -0.0046, -0.0684, -0.0876, -0.0618, -0.0608, -0.035, -0.0344, 
-0.0295, 0.0103, 0.0464, 0.0321, -0.0507, -0.0476, 0.0283, 0.0539, 0.0286, 
   0.0395, 0.0528, 0.0189, 0.0461, 0.0642, 0.0073, -0.0149, 0.0454, 
   0.0642, -0.0015, -0.0926, -0.1003, -0.0517, -0.0025, 0.0787, 0.154, 0.1576,
    0.0478, -0.0144, -0.0547, -0.0719, -0.021, -0.0717, -0.0917, 0.0204, 
   0.1141, 0.0925, -0.0516, -0.1962, -0.1679, 0.0102, 0.1063, 0.1206, 
   0.0481, -0.1055, -0.094, 0.0355, 0.1127, 0.1146, 
   0.0063, -0.1312, -0.1669, -0.0411, 0.0274, 0.0688, 
   0.0535, -0.0507, -0.1143, -0.0981, -0.025, -0.019, 0.0236, 0.088, 
   0.0757, -0.0005, -0.0643, -0.0345, 0.0298, 0.0328, 0.0374, 0.0598, 0.0759, 
   0.007, -0.0096, 0.1016, 0.1252, 0.0045, -0.1357, -0.1571, -0.0613, 0.0031, 
   0.0383, 0.059, 0.024, -0.0912, -0.1004, 0.0711, 0.1007, -0.0042, -0.0404, 
   0.008, 0.0361, 0.0329, 
   0.0008, -0.0346, -0.0292, -0.0523, -0.069, -0.0321, -0.0239, -0.0367, 
-0.057, -0.0688, -0.0139, 0.0211, 0.0082, -0.0609, -0.0537, 0.0507, 
   0.047, -0.0405, -0.0483, 0.0211, 0.0539, 0.0361, 0.0143, 0.0224, 
   0.0247, -0.0146, -0.0061, 0.0256, 0.0177, -0.0024, 0.0333, 0.0438, 0.039, 
   0.0165, -0.0987, -0.1258, -0.0493, -0.0044, 0.0354, 0.0224, -0.0306, 0.006,
    0.0539, 0.0708, 0.1089, 0.1015, -0.0159, -0.0984, -0.0732, 0.0249, 0.1018,
    0.1338, 0.1166, -0.0069, -0.0617, -0.0031, -0.0146, -0.012, 0.0895, 
   0.0974, -0.0407, -0.0827, -0.0336, -0.0405, -0.0307, 
   0.0035, -0.0196, -0.0857, -0.1136, -0.0982, -0.0403, 0.0115, 0.0514, 
   0.0316, -0.1217, -0.1382, 0.0584, 0.1369, 0.0837, 0.0393, -0.0575, -0.0834,
    0.0247, 0.0787, 0.0886, 0.0613, 0.0198, -0.0069, -0.0389, -0.0392, -0.013,
    0.0177, 0.0712, 0.0939, 0.0392, -0.0643, -0.0942, -0.0238, 0.0012, 0.0154,
    0.0163, -0.0098, -0.0217, -0.0074, -0.0319, -0.0485, -0.0119, 0.0148, 
   0.0548, 0.0698, 0.0403, -0.0081, -0.0512, 0.0008, 0.104, 0.14, 
   0.0792, -0.0361, -0.0785, 0.0016, 0.0833, 0.1106, 
   0.0613, -0.027, -0.074, -0.0421, -0.0034, 0.0265, 
   0.0303, -0.0346, -0.0555, -0.0026, 0.0362, 0.0405, -0.0187, -0.0441, 
   0.0339, 0.0445, -0.011, 0.0014, 0.0367, -0.0166, -0.0451, 0.0082, 0.0519, 
   0.0345, -0.0639, -0.1447, -0.1122, 0.0216, 0.0888, 
   0.0691, -0.0185, -0.1361, -0.1281, -0.0137, 0.0331, 0.0196, 
   0.0294, -0.0276, -0.078, -0.0361, 0.0059, 
   0.0132, -0.0285, -0.0475, -0.0026, 0.031, 0.0308, 
   0.0123, -0.0012, -0.0104, -0.0101, 0.0015, 0.008, 0.0071, 0.0027, -0.0002, 
   0.0004, 0.002, 0.0023, 0.0017, 0.0012, 0.001, 0.001, 0.001, 0.0009, 0.0009,
    0.0009, 0.0008, 0.0008, 0.0008, 0.0008, 0.0008, 0.0007, 0.0007, 0.0007, 
   0.0007, 0.0007, 0.0007, 0.0007, 0.0007, 0.0007, 0.0007, 0};

ListLinePlot[mList, 
 PlotRange -> {{0, Length[mList]}, {Min[mList], Max[mList]}}]

ListLinePlot[(0.3*mList), 
 PlotRange -> {{0, Length[mList]}, {0.3*Min[mList], 0.3*Max[mList]}}]

GetIndex[t_] := IntegerPart[t/dT] + 1;

mList[[GetIndex[0.04]]]

GetGroundAcceleration[t_] := 
  mList[[GetIndex[
     t]]] + (mList[[GetIndex[t] + 1]] - mList[[GetIndex[t]]]) FractionalPart[
     t/dT];

GetGroundAcceleration[40]

( Force-Displacement)

\[Mu] = 0.033;

g = 9.81;

R = 3.7;

\[Omega] = Sqrt[g/R];

YP = 0.001;

W = 726992.03;

\[Gamma] = 0.5;

tTotal = 45;

n = 5;

ParametricPlot[
 Evaluate[{x1[t], (1/R)*x1[t] + \[Mu]*x3[t]} /.
   Quiet@NDSolve[
     {x1'[t] == x5[t],
      x2'[t] == x6[t],
      x3'[t] == 
       x5[t]/YP (1 - 
          Abs[x3[t]]^n* (\[Gamma] *Sign[x5[t]* x3[t]] + (1 - \[Gamma]))),
      x4'[t] == 
       x6[t]/YP (1 - 
          Abs[x3[t]]^n* (\[Gamma] *Sign[x6[t]* x4[t]] + (1 - \[Gamma]))),
      x5'[t] == -(\[Omega]^2)*x1[t] - \[Mu]*9.81*x3[t] - 
        9.81*GetGroundAcceleration[t],
      x6'[t] == -(\[Omega]^2)*x2[t] - \[Mu]*9.81*x4[t] - 
        9.81*0.3*GetGroundAcceleration[t],
      x1[0] == 0,
      x2[0] == 0,
      x3[0] == 0,
      x4[0] == 0,
      x5[0] == 0,
      x6[0] == 0},
     {x1[t], x2[t], x3[t], x4[t], x5[t], x6[t]},
     {t, 0, tTotal}, AccuracyGoal -> 2]],
 {t, 0, tTotal},
 ImageSize -> {500, 500}, PlotRange -> {{-0.5, 0.5}, {-0.2, 0.2}}, 
 AspectRatio -> 1/1, AxesLabel -> {"ux", "F"}]

ParametricPlot[
 Evaluate[{x2[t], (1/R)*x2[t] + \[Mu]*x4[t]} /.
   Quiet@NDSolve[
     {x1'[t] == x5[t],
      x2'[t] == x6[t],
      x3'[t] == 
       x5[t]/YP (1 - 
          Abs[x3[t]]^n* (\[Gamma] *Sign[x5[t]* x3[t]] + (1 - \[Gamma]))),
      x4'[t] == 
       x6[t]/YP (1 - 
          Abs[x3[t]]^n* (\[Gamma] *Sign[x6[t]* x4[t]] + (1 - \[Gamma]))),
      x5'[t] == -(\[Omega]^2)*x1[t] - \[Mu]*9.81*x3[t] - 
        9.81*GetGroundAcceleration[t],
      x6'[t] == -(\[Omega]^2)*x2[t] - \[Mu]*9.81*x4[t] - 
        9.81*0.3*GetGroundAcceleration[t],
      x1[0] == 0,
      x2[0] == 0,
      x3[0] == 0,
      x4[0] == 0,
      x5[0] == 0,
      x6[0] == 0},
     {x1[t], x2[t], x3[t], x4[t], x5[t], x6[t]},
     {t, 0, tTotal}, AccuracyGoal -> 5]],
 {t, 0, tTotal},
 ImageSize -> {500, 500}, PlotRange -> {{-0.1, 0.1}, {-0.05, 0.05}}, 
 AspectRatio -> 1/1, AxesLabel -> {"uy", "F"}]

(* Displacement (time)*)

ParametricPlot[
 Evaluate[{t, x1[t]} /.
   Quiet@NDSolve[
     {x1'[t] == x5[t],
      x2'[t] == x6[t],
      x3'[t] == 
       x5[t]/YP (1 - 
          Abs[x3[t]]^n* (\[Gamma] *Sign[x5[t]* x3[t]] + (1 - \[Gamma]))),
      x4'[t] == 
       x6[t]/YP (1 - 
          Abs[x3[t]]^n* (\[Gamma] *Sign[x6[t]* x4[t]] + (1 - \[Gamma]))),
      x5'[t] == -(\[Omega]^2)*x1[t] - \[Mu]*9.81*x3[t] - 
        9.81*GetGroundAcceleration[t],
      x6'[t] == -(\[Omega]^2)*x2[t] - \[Mu]*9.81*x4[t] - 
        9.81*0.3*GetGroundAcceleration[t],
      x1[0] == 0,
      x2[0] == 0,
      x3[0] == 0,
      x4[0] == 0,
      x5[0] == 0,
      x6[0] == 0},
     {x1[t], x2[t], x3[t], x4[t], x5[t], x6[t]},
     {t, 0, tTotal}, AccuracyGoal -> 2]],
 {t, 0, tTotal},
 ImageSize -> {500, 500}, PlotRange -> {{0, tTotal}, {-0.4, 0.4}}, 
 AspectRatio -> 1/1, AxesLabel -> {"t", "ux"}]

ParametricPlot[
 Evaluate[{t, x2[t]} /.
   Quiet@NDSolve[
     {x1'[t] == x5[t],
      x2'[t] == x6[t],
      x3'[t] == 
       x5[t]/YP (1 - 
          Abs[x3[t]]^n* (\[Gamma] *Sign[x5[t]* x3[t]] + (1 - \[Gamma]))),
      x4'[t] == 
       x6[t]/YP (1 - 
          Abs[x3[t]]^n* (\[Gamma] *Sign[x6[t]* x4[t]] + (1 - \[Gamma]))),
      x5'[t] == -(\[Omega]^2)*x1[t] - \[Mu]*9.81*x3[t] - 
        9.81*GetGroundAcceleration[t],
      x6'[t] == -(\[Omega]^2)*x2[t] - \[Mu]*9.81*x4[t] - 
        9.81*0.3*GetGroundAcceleration[t],
      x1[0] == 0,
      x2[0] == 0,
      x3[0] == 0,
      x4[0] == 0,
      x5[0] == 0,
      x6[0] == 0},
     {x1[t], x2[t], x3[t], x4[t], x5[t], x6[t]},
     {t, 0, tTotal}, AccuracyGoal -> 2]],
 {t, 0, tTotal},
 ImageSize -> {500, 500}, PlotRange -> {{0, tTotal}, {-0.3, 0.3}}, 
 AspectRatio -> 1/1, AxesLabel -> {"t", "uy"}]

Thanks!

POSTED BY: Richard Dir

AccuracyGoal is fairly complicated. For NDSolve, the documentation states that it affects the step size of the integration.

AccuracyGoal effectively specifies the absolute local error allowed at each step in finding a solution, while PrecisionGoal specifies the relative local error.

I'd imagine how it reduces the step size could depend on the numerical method. If no numerical method is specified, then I can imagine it's possible that AccuracyGoal might affect which numerical method is automatically selected.

AccuracyGoal doesn't gurantee that entire solution is within a certain accuracy. It looks like it instead tries to get each step within a certain accuracy by reducing step sizes.

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract