|
3 | 3 | { |
4 | 4 | "cell_type": "code", |
5 | 5 | "execution_count": null, |
6 | | - "id": "e9c96969", |
| 6 | + "id": "33cc6341", |
7 | 7 | "metadata": { |
8 | 8 | "deletable": false, |
9 | 9 | "editable": false |
|
187 | 187 | { |
188 | 188 | "cell_type": "code", |
189 | 189 | "execution_count": null, |
190 | | - "id": "aab97cd2", |
| 190 | + "id": "98c2bd44", |
191 | 191 | "metadata": { |
192 | 192 | "deletable": false, |
193 | 193 | "editable": false |
|
390 | 390 | { |
391 | 391 | "cell_type": "code", |
392 | 392 | "execution_count": null, |
393 | | - "id": "3a63db28", |
| 393 | + "id": "91f90d4e", |
394 | 394 | "metadata": { |
395 | 395 | "deletable": false, |
396 | 396 | "editable": false |
|
702 | 702 | { |
703 | 703 | "cell_type": "code", |
704 | 704 | "execution_count": null, |
705 | | - "id": "19c6029c", |
| 705 | + "id": "87056d69", |
706 | 706 | "metadata": { |
707 | 707 | "deletable": false, |
708 | 708 | "editable": false |
|
727 | 727 | }, |
728 | 728 | { |
729 | 729 | "cell_type": "markdown", |
730 | | - "id": "f96a24ea", |
| 730 | + "id": "88b113b9", |
731 | 731 | "metadata": { |
732 | 732 | "tags": [ |
733 | 733 | "otter_answer_cell" |
|
808 | 808 | "fig_vib, axs_vib = (..., ...)\n" |
809 | 809 | ] |
810 | 810 | }, |
| 811 | + { |
| 812 | + "cell_type": "markdown", |
| 813 | + "id": "6097c901", |
| 814 | + "metadata": {}, |
| 815 | + "source": [ |
| 816 | + "## Part 4, cont\n", |
| 817 | + "Now, go back and modify `HalfCarSimulationOutput` to contain a `sprung_mass_displacement` function to perform the calculation you did above:\n", |
| 818 | + "\n", |
| 819 | + "```python\n", |
| 820 | + " def sprung_mass_displacement(self, car_model):\n", |
| 821 | + " \"\"\"\n", |
| 822 | + " Calculates the sprung mass displacement at the back tire.\n", |
| 823 | + " Used for vibration analysis.\n", |
| 824 | + " \"\"\"\n", |
| 825 | + " ...\n", |
| 826 | + "```\n", |
| 827 | + "\n", |
| 828 | + "**Important: After you add this method, re-run the previous code cells in this section.** Old simulation outputs created before you added this function on the class will not have this function.\n", |
| 829 | + "\n", |
| 830 | + "Next, write code below to make the same plots as above, but using the `sprung_mass_displacement` function." |
| 831 | + ] |
| 832 | + }, |
811 | 833 | { |
812 | 834 | "cell_type": "code", |
813 | 835 | "execution_count": null, |
|
825 | 847 | { |
826 | 848 | "cell_type": "code", |
827 | 849 | "execution_count": null, |
828 | | - "id": "1618561b", |
| 850 | + "id": "a875b420", |
829 | 851 | "metadata": { |
830 | 852 | "deletable": false, |
831 | 853 | "editable": false |
|
852 | 874 | "For simplicity, we will be modeling the half cars with the weight of a full car." |
853 | 875 | ] |
854 | 876 | }, |
| 877 | + { |
| 878 | + "cell_type": "markdown", |
| 879 | + "id": "751c4c09", |
| 880 | + "metadata": { |
| 881 | + "deletable": false, |
| 882 | + "editable": false, |
| 883 | + "vscode": { |
| 884 | + "languageId": "raw" |
| 885 | + } |
| 886 | + }, |
| 887 | + "source": [ |
| 888 | + "### Internal combustion engine: 2025 Honda Civic\n", |
| 889 | + "\n", |
| 890 | + "We will base our internal combustion engine model on a 2025 Honda Civic.\n", |
| 891 | + "\n", |
| 892 | + "The Civic puts about 60% of its weight in the front, and 40% of its weight in the back, and its curb weight is about 1331kg ([source](https://www.dellahonda.net/how-much-does-a-honda-civic-weigh.html#:~:text=Honda%20Civic%20models%20have%20a,with%20good%20handling%20and%20balance.)).\n", |
| 893 | + "\n", |
| 894 | + "Curb weight includes both sprung and unsprung masses. We will assume that the unsprung mass is about 90kg total, with 60% in the front, which seems in line with estimations from similar cars ([source](https://www.civicxi.com/forum/threads/2023-civic-si-spring-rates-motion-ratio-ride-frequencies-autocross.52362/)).\n", |
| 895 | + "\n", |
| 896 | + "$$m_{curb} = m_s + m_u = 1331 - 90kg$$\n", |
| 897 | + "\n", |
| 898 | + "$$m_u = 90kg$$\n", |
| 899 | + "\n", |
| 900 | + "$$m_s = m_{curb} - m_u = 1331kg - 90kg = 1241kg$$\n", |
| 901 | + "\n", |
| 902 | + "$$m_{uf} = 0.6 * m_u$$\n", |
| 903 | + "\n", |
| 904 | + "$$m_{ub} = 0.4 * m_u$$\n", |
| 905 | + "\n", |
| 906 | + "$$m_{sf} = 0.6 * m_s$$\n", |
| 907 | + "\n", |
| 908 | + "$$m_{sb} = 0.4 * m_s$$\n", |
| 909 | + "\n", |
| 910 | + "\n", |
| 911 | + "The 2025 Honda Civic is ~4.69m long. With 60% of the weight in the front, that places the center of mass closer to the front and further from the back:\n", |
| 912 | + "\n", |
| 913 | + "$$l = 4.69m$$\n", |
| 914 | + "\n", |
| 915 | + "$$a_f = 0.4 * l$$\n", |
| 916 | + "\n", |
| 917 | + "$$a_b = 0.6 * l$$\n", |
| 918 | + "\n", |
| 919 | + "For the suspension, we'll make a few educated guesses. Calculating the spring constant is:\n", |
| 920 | + "\n", |
| 921 | + "$$k_s = \\frac{4\\pi^2f^2m_s}{mr^2}$$\n", |
| 922 | + "\n", |
| 923 | + "...where $f$ is the natural frequency of the spring (in Hz), $m_s$ is the sprung mass, and $mr$ is the motion ratio of spring to wheel (how much the spring travels relative to the wheel).\n", |
| 924 | + "\n", |
| 925 | + "The natural frequency of a passenger car is around 1Hz, and this isn't a super heavy car, so let's use $f=0.7 Hz$ for this car. And the motion ratio is frequently near 1, so let's arbitrarily decide $mr=0.8$ as the motion ratio.\n", |
| 926 | + "\n", |
| 927 | + "That would make $k_s$:\n", |
| 928 | + "\n", |
| 929 | + "$$k_{sf} = \\frac{4\\pi^2*0.7Hz^2*0.6 * 1241kg}{0.8^2} = 22506 N/m$$\n", |
| 930 | + "\n", |
| 931 | + "$$k_{sb} = \\frac{4\\pi^2*0.7Hz^2*0.4 * 1241kg}{0.8^2} = 15004 N/m$$\n", |
| 932 | + "\n", |
| 933 | + "For this first part, we're going to construct the car with _no damping_, so we will set $c_{sf} = c_{sb} = 0$.\n", |
| 934 | + "\n", |
| 935 | + "We'll use $k_{tf} = k_{tb} = 200000 N/m$, which is a reasonable baseline for a passenger car.\n", |
| 936 | + "\n", |
| 937 | + "The damping constants are defined as:\n", |
| 938 | + "\n", |
| 939 | + "$$c_s = 2 * m_s * dr * f * g$$\n", |
| 940 | + "\n", |
| 941 | + "...where $f$ is the frequency of the spring _in radians_, $dr$ is the _damping ratio_, and $g$ is gravity (9.81 m/s).\n", |
| 942 | + "\n", |
| 943 | + "The frequency of the suspension springs of the Civic is 0.7 Hz. We can convert Hz to radians by multiplying them by $2\\pi$. However, we need the damping ratio.\n", |
| 944 | + "\n", |
| 945 | + "The damping ratio of a regular car is often between 0.2 and 0.25 ([source](https://www.researchgate.net/figure/ehicle-typical-damping-coefficient_tbl1_245401813)), so we will arbitrarily use 0.25 for the Civic.\n", |
| 946 | + "\n", |
| 947 | + "Thus, the damping constants are:\n", |
| 948 | + "\n", |
| 949 | + "$$c_{sf} = 2 * m_{sf} * 0.25 * (0.7 Hz * 2\\pi rads/Hz) * 9.81 m/s = 16063 Ns/m$$\n", |
| 950 | + "\n", |
| 951 | + "$$c_{sb} = 2 * m_{sb} * 0.25 * (0.7 Hz * 2\\pi rads/Hz) * 9.81 m/s = 10708.7 Ns/m$$\n", |
| 952 | + "\n", |
| 953 | + "Now we can define the car!" |
| 954 | + ] |
| 955 | + }, |
855 | 956 | { |
856 | 957 | "cell_type": "code", |
857 | 958 | "execution_count": null, |
|
867 | 968 | "combustion_car_model = ..." |
868 | 969 | ] |
869 | 970 | }, |
| 971 | + { |
| 972 | + "cell_type": "markdown", |
| 973 | + "id": "890d1adc", |
| 974 | + "metadata": {}, |
| 975 | + "source": [ |
| 976 | + "### Electric car: 2025 Hyundai Ioniq 6\n", |
| 977 | + "\n", |
| 978 | + "For our electric car, we'll choose another sedan: Hyundai's Ioniq 6. As an electric vehicle, this car is considerably heavier than the Civic due to battery weight -- a 1985 kg curb weight. We'll assume 120 kg of that curb weight is unsprung weight due to the heavier tires needed to support that weight.\n", |
| 979 | + "\n", |
| 980 | + "Unlike the Civic, the Ioniq 6 is evenly balanced, with 50% of its weight falling on the front tires, and 50% on the back tires. That's because most of the weight in an EV is from batteries, which can be broken up to balance the vehicle's weight. This also makes our calculations simpler, since the front half of the car will use the same constants as the back half of the car!\n", |
| 981 | + "\n", |
| 982 | + "Thus:\n", |
| 983 | + "\n", |
| 984 | + "$$m_{sf} = m_{sb} = 0.5 * (1985 kg - 120 kg)$$\n", |
| 985 | + "\n", |
| 986 | + "$$m_{uf} = m_{ub} = 0.5 * 120 kg$$\n", |
| 987 | + "\n", |
| 988 | + "The Ioniq 6 is 4.85m long, making:\n", |
| 989 | + "\n", |
| 990 | + "$$a_f = a_b = 0.5 * 4.85 m$$\n", |
| 991 | + "\n", |
| 992 | + "For suspension, we'll once again use a motion ratio of 0.8, but up the frequency of the spring to 1.0 Hz, making:\n", |
| 993 | + "\n", |
| 994 | + "$$k_{sf} = k_{sb} = \\frac{4\\pi^2*1.0Hz^2*0.5 * 1865 kg}{0.8^2} = 57521 N/m$$\n", |
| 995 | + "\n", |
| 996 | + "Once again, we are constructing these cars with no damping, so:\n", |
| 997 | + "\n", |
| 998 | + "$$c_{sf} = c_{sb} = 0$$\n", |
| 999 | + "\n", |
| 1000 | + "Since this car is 50% heavier than the Civic, we'll increase the tire spring constant by 50%:\n", |
| 1001 | + "\n", |
| 1002 | + "$$k_{tf} = k_{tb} = 300000 N/m$$\n", |
| 1003 | + "\n", |
| 1004 | + "For the spring constant, we have spring with frequency 1.0 Hz, and we will arbitrarily use 0.2 as its damping ratio, making:\n", |
| 1005 | + "\n", |
| 1006 | + "$$c_{sf} = c_{sb} = 2 * m_{sf} * 0.2 * (1.0 Hz * 2\\pi rads/Hz) * 9.81 m/s = 22991 Ns/m$$\n", |
| 1007 | + "\n", |
| 1008 | + "Now you can define this car!" |
| 1009 | + ] |
| 1010 | + }, |
870 | 1011 | { |
871 | 1012 | "cell_type": "code", |
872 | 1013 | "execution_count": null, |
|
882 | 1023 | "electric_car_model = ..." |
883 | 1024 | ] |
884 | 1025 | }, |
| 1026 | + { |
| 1027 | + "cell_type": "markdown", |
| 1028 | + "id": "079d25e2", |
| 1029 | + "metadata": {}, |
| 1030 | + "source": [ |
| 1031 | + "## Part 5: Roads\n", |
| 1032 | + "\n", |
| 1033 | + "We will provide two roads to you, and you will define a third road. Then, you will simulate driving the cars through the roads, and plot their vibrations." |
| 1034 | + ] |
| 1035 | + }, |
885 | 1036 | { |
886 | 1037 | "cell_type": "code", |
887 | 1038 | "execution_count": null, |
|
941 | 1092 | { |
942 | 1093 | "cell_type": "code", |
943 | 1094 | "execution_count": null, |
944 | | - "id": "4e49ea07", |
| 1095 | + "id": "1b6565a2", |
945 | 1096 | "metadata": { |
946 | 1097 | "deletable": false, |
947 | 1098 | "editable": false |
|
961 | 1112 | "source": [ |
962 | 1113 | "<!-- BEGIN QUESTION -->\n", |
963 | 1114 | "\n", |
964 | | - "## Part 7, extra credit: Designing cars with fewer vibrations\n", |
| 1115 | + "## Part 6, extra credit: Designing cars with fewer vibrations\n", |
965 | 1116 | "\n", |
966 | 1117 | "The cars we provided mimic actual cars out there, but are not perfect for reducing cabin vibration.\n", |
967 | 1118 | "\n", |
|
1038 | 1189 | { |
1039 | 1190 | "cell_type": "code", |
1040 | 1191 | "execution_count": null, |
1041 | | - "id": "86131288", |
| 1192 | + "id": "cb3c88ae", |
1042 | 1193 | "metadata": { |
1043 | 1194 | "deletable": false, |
1044 | 1195 | "editable": false |
|
0 commit comments