Skip to main content
Post Closed as "Not suitable for this site" by BioPhysicist, Noumeno, Jon Custer, Buzz, ProfRob
deleted 519 characters in body
Source Link

For fun, I'm trying to play with really simple simulation of a Tesla Model 3. Modeling its acceleration and such. But I've hit a roadblock early on despite validating my math several times.

What I want to do is find the car's velocity at a time $t$ given the motor's (current) torque, wheel radius, mass, and a timestep $dt$, figure out how much the speed of the car should changemass.

When I look up values for this car, here's what I get:

  • Peak torque: $\tau = 639\ \text{N}\cdot\text{m}$
  • Mass: $m = 1800\ \text{kg}$
  • Wheel radius: $R = 0.2413\ \text{m}$

Here's how I'm calculating acceleration:

$$ F = \frac{\tau}{R} \\ a = F/m \\ a = \frac{\tau}{Rm} $$

So in code, here's howConsidering that I'm updating the car's speed. dt equals the time, in secondsmodeling torque as constant, since the last frame renderedacceleration will also be constant, so it's usually around 0.016 (60 fps)which means:

const force = torque / car.wheelRadius
speed += (force / car.weight) * dt

$$ v(t) = at = \frac{\tau}{Rm}t $$

However, after a fewwhen I plug in $t = 3.2$ (the Model 3 accelerates from 0-60mph in 3.2 seconds), the speed of my simulated carvelocity is only $\text{2-3 m/s}$$\text{4.7 m/s}$. For the actual car, it wouldIt should be closer to $\text{30 m/s}$. I thought that was odd, so I plugged some real-world approximations of how the car works into WolframAlpha to figure out how much torque it "should" have, only to see that it said $\text{3800 N} \cdot \text{m}$! That's way more thanWhere is this discrepancy coming from? Are the car's specs say.

What amofficial numbers I doingfound simply wrong here? Why is my simulated car so slow, and why does the math tell me the Model 3 should have 5x more torque than it claims to have?

For fun, I'm trying to play with really simple simulation of a Tesla Model 3. Modeling its acceleration and such. But I've hit a roadblock early on despite validating my math several times.

What I want to do is given the motor's (current) torque, wheel radius, mass, and a timestep $dt$, figure out how much the speed of the car should change.

When I look up values for this car, here's what I get:

  • Peak torque: $\tau = 639\ \text{N}\cdot\text{m}$
  • Mass: $m = 1800\ \text{kg}$
  • Wheel radius: $R = 0.2413\ \text{m}$

Here's how I'm calculating acceleration:

$$ F = \frac{\tau}{R} \\ a = F/m \\ a = \frac{\tau}{Rm} $$

So in code, here's how I'm updating the car's speed. dt equals the time, in seconds, since the last frame rendered, so it's usually around 0.016 (60 fps):

const force = torque / car.wheelRadius
speed += (force / car.weight) * dt

However, after a few seconds, the speed of my simulated car is only $\text{2-3 m/s}$. For the actual car, it would be closer to $\text{30 m/s}$. I thought that was odd, so I plugged some real-world approximations of how the car works into WolframAlpha to figure out how much torque it "should" have, only to see that it said $\text{3800 N} \cdot \text{m}$! That's way more than the car's specs say.

What am I doing wrong here? Why is my simulated car so slow, and why does the math tell me the Model 3 should have 5x more torque than it claims to have?

For fun, I'm trying to play with really simple simulation of a Tesla Model 3. Modeling its acceleration and such. But I've hit a roadblock early on despite validating my math several times.

What I want to do is find the car's velocity at a time $t$ given the motor's torque, wheel radius, and mass.

When I look up values for this car, here's what I get:

  • Peak torque: $\tau = 639\ \text{N}\cdot\text{m}$
  • Mass: $m = 1800\ \text{kg}$
  • Wheel radius: $R = 0.2413\ \text{m}$

Here's how I'm calculating acceleration:

$$ F = \frac{\tau}{R} \\ a = F/m \\ a = \frac{\tau}{Rm} $$

Considering that I'm modeling torque as constant, acceleration will also be constant, which means:

$$ v(t) = at = \frac{\tau}{Rm}t $$

However, when I plug in $t = 3.2$ (the Model 3 accelerates from 0-60mph in 3.2 seconds), the velocity is only $\text{4.7 m/s}$. It should be closer to $\text{30 m/s}$. Where is this discrepancy coming from? Are the official numbers I found simply wrong?

Source Link

Calculating linear acceleration from torque in a car

For fun, I'm trying to play with really simple simulation of a Tesla Model 3. Modeling its acceleration and such. But I've hit a roadblock early on despite validating my math several times.

What I want to do is given the motor's (current) torque, wheel radius, mass, and a timestep $dt$, figure out how much the speed of the car should change.

When I look up values for this car, here's what I get:

  • Peak torque: $\tau = 639\ \text{N}\cdot\text{m}$
  • Mass: $m = 1800\ \text{kg}$
  • Wheel radius: $R = 0.2413\ \text{m}$

Here's how I'm calculating acceleration:

$$ F = \frac{\tau}{R} \\ a = F/m \\ a = \frac{\tau}{Rm} $$

So in code, here's how I'm updating the car's speed. dt equals the time, in seconds, since the last frame rendered, so it's usually around 0.016 (60 fps):

const force = torque / car.wheelRadius
speed += (force / car.weight) * dt

However, after a few seconds, the speed of my simulated car is only $\text{2-3 m/s}$. For the actual car, it would be closer to $\text{30 m/s}$. I thought that was odd, so I plugged some real-world approximations of how the car works into WolframAlpha to figure out how much torque it "should" have, only to see that it said $\text{3800 N} \cdot \text{m}$! That's way more than the car's specs say.

What am I doing wrong here? Why is my simulated car so slow, and why does the math tell me the Model 3 should have 5x more torque than it claims to have?