Some information on the Science and Maths of a Greenpower car is at the following link:

- Easy to use web interface
- Simulates: Battery, Motor, AirDrag, RollingDrag, PitStops, BatteryChange/Charging, Wind

TrackLength | The track length in Meters. (Goodwood: 3862.0m, Castle Combe: 2977m) |

RaceDuration | The race duration in seconds. (4 Hours = 14400, 6 Hours = 21600) |

CarWeight | The cars weight, without driver in Kg. |

CarFrontArea | The cars frontal area in Meters squared. |

carFrictionCoeff | The cars rolling friction coefficient. |

carAirDragCoeff | The cars aerodynamic coefficient. |

battery0Capacity | This is the capacity of battery 0 at the 20hour rate. |

battery0KValue | This is the "K" value for battery 0. (A measure of the battery quality/age) |

battery1Capacity | This is the capacity of battery 1 at the 20hour rate. |

battery1KValue | This is the "K" value for battery 1. (A measure of the battery quality/age) |

motorGearing | The motor gear ratio. (for 17:57 this is 3.353) |

motorWheelDiameter | The diameter of the driving wheel in Meters. |

driveEfficiency | The efficiency of the drive chain/gears etc. Motor efficiency is taken into account with motor simulation. |

pitStopTime | The pitstop time in seconds. |

batteryChargeRate | The battery charge current used in pitstops. |

periods | The pitstop periods with number of laps and driver weight in Kg. Battery is changed on each pitStop. |

graphZoom | Zooms the graphs to see more detail. |

- Rolling resistance, in Newtons, was calculated using: "rollingResistance = carFrictionCoeff * mass * 9.8".
- Air Drag, in Newtons, was calculated using: "airDrag = 0.5 * airDensity * carAirDragCoeff * carFrontArea * (v * v)".

torque = 13.5 - (motorRpm * 13.5 / 2000.0)

torque = torque * voltage / 24.0;

current = 2.0 + (torque * 128.0 / 13.5)

torque = torque * voltage / 24.0;

current = 2.0 + (torque * 128.0 / 13.5)

T - Discharge time in hours

H - Battery discharge rate time (20 hour rate)

I - Discharge current

C - Battery capacity at stated discharge rate (75 amp/hour)

k - battery constant between 1.1 and 1.3 depending on battery type and condition.

For use in calculation a discharge value over a time period:

c = I * T * pow(I / Ir, k - 1)

c - Amount of charge to take away from total chargeI - Current

T - Time period in hours

Ir - Current for battery amp/hour rating (For 75Amp/hour at 20hour rate = 3.75)

k - battery constant between 1.1 and 1.3 depending on battery type and condition.

This is taken from info at: http://en.wikipedia.org/wiki/Peukert's_law

There is more info at: http://www.thermoanalytics.com/support/publications/batterymodelsdoc.html

More info at: http://mocha-java.uccs.edu/dossier/RESEARCH/2002evs19a-.pdf

This looks like it is reasonably accurate for the batteries we use based on the battery discharge tests performed. A k value of about 1.11 works for the Yuasa Elite batteries. Battery charging is not well simulated. We need to know more about the battery chargers to get this side of the simulation to be accurate. The simulation charges at 10Amps and assumes 75% efficiency in doing this.

There is basic simulation of Battery "recovery" by setting the charge factor to a low number.

The Battery voltage is calculated using:

Et = Eo - Ri*I + Ki*log(Ct/C)

Where

- Et = battery terminal voltage [volts]
- Eo = open circuit voltage of a battery cell when fully charged [volts]
- Ri = internal (ohmic) resistance of the battery [ohms]
- Ki = polarization resistance [ohms]
- I = instantaneous current [amps]
- C = current charge level in amp/hours
- Ct = total battery charge in amp/hours

- Does not simulate hills.
- Does not simulate driver skills or reliability !
- Does not simulate temperature variations, including motor efficiency reduction when it gets hot.

- UserId capability to store results. This would allow the boys to compete at getting the best Lap times from the simulator.
- Could simulate: Motor speed control, GearBox, uphill/downhill.

- Simple module system with one module per simulation entity.
- Creates new data in fixed time steps.