Monday, June 30, 2008

Development Blog #1: The Engine

The past few weeks has been spent developing the engine simulation for the Kaizen Engine™ with a lot more functionality than was originally intended. As with any aspect of the simulation, the more you research and develop, the more things you discover that need implementation. We originally set out to develop the engine with the ability to specify the torque curve and tune the carburettor on the fly with it having an impact on the temperature and performance of the engine, all the while using real data and figures to achieve this. After a lot of work, I can now confirm that this has been achieved quite successfully.

As opposed to using 'magic numbers' to output a result close to real life, we have chosen to use real values for everything and the results and capabilities are definitely worth the extra work that was put into it. I've included the list of parameters that are defined in the engine specification file which should give you some idea as to what is being used in the calculations.

cylinderBore="52.000"
cylinderStroke="46.000"
cylinderMass="2000.000"
cylinderSpecificHeatCapacity="0.963"
cylinderThermalConductivity="205.000"
cylinderThermalExpansionCoefficient="24.660"

ecuIdleRPM="3000"
ecuRevLimit="16000"
externalSurfaceArea="4.000"

jetHighSpeedIdeal="0.25"
jetLowSpeedIdeal="2.0"
jetTransitionRPM="12000"
jetTransitionRange="2000"

lifeDuration="21600.000"

manufactureDate="2008"
mass="11000"
momentOfInertia="0.0187"

pistonDiameter="51.940"
pistonLength="55.000"
pistonMass="110.000"
pistonSpecificHeatCapacity="0.963"
pistonThermalConductivity="120.000"
pistonThermalExpansionCoefficient="23.000"
powerUnits="hp"

radiatorCooling="0"
radiatorSurfaceArea="1"
radiatorFluidMass="2000.000"
radiatorFluidSpecificHeatCapacity="4.1813"
radiatorFluidThermalConductivity="0.580"
radiatorFluidTemperature="12.000"

starterOnboard="true"
starterRPM="3000"
starterGearRatio="0.400"

As you can see there are a lot more variables to change now, but it will make it a lot easier for people to create their own engine as they are real numbers. For example the thermal conductivity coefficient of the cylinder "205.000" is the value for aluminium. This also has the added feature of being able to try out different materials such as teflon coated pistons etc. All of these values are used in the real time calculations of the engine. The thermal expansion coefficient of the components for example, is used in calculating the rate of expansion of the piston and cylinder which allows us to simulate cold seizes and seizes from overheating.

As I mentioned earlier, to simulate the things we wanted also required the development of additional functionality such as the fuel. There is no point in using real values for only some components and not for others. As you can see below, we are now calculating the fuel and oxidant enthalpy in order to work out the combustion temperature all in real time.

fuelThermalConductivity="0.150"
stoichiometryIdeal="10.487"

fcCarbonMoleWeightKGKMOL="12.000"
fcHydrogenMoleWeightKGKMOL="2.000"
fcSulfurMoleWeightKGKMOL="32.000"
fcNitrogenMoleWeightKGKMOL="28.000"
fcOxygenMoleWeightKGKMOL="32.000"
fcWaterMoleWeightKGKMOL="18.000"

fcCarbonMassBasisKGKG="0.780"
fcHydrogenMassBasisKGKG="0.050"
fcSulfurMassBasisKGKG="0.030"
fcNitrogenMassBasisKGKG="0.040"
fcOxygenMassBasisKGKG="0.080"
fcWaterMassBasisKGKG="0.020"

cpcCarbonDioxideMoleWeightKGKMOL="44.000"
cpcWaterVapourMoleWeightKGKMOL="18.000"
cpcSulfurDioxideMoleWeightKGKMOL="64.000"
cpcNitrogenMoleWeightKGKMOL="28.000"
cpcOxygenMoleWeightKGKMOL="32.000"

ocOxygenMoleWeightKGKMOL="32.000"
ocNitrogenMoleWeightKGKMOL="28.000"

ocOxygenMoleBasisKMOLKMOL="0.210"
ocNitrogenMoleBasisKMOLKMOL="0.790"

ocExcessOxidantMassBasisKGKG="1.000"

ocpcCarbonDioxideMoleWeightKGKMOL="44.000"
ocpcWaterVapourMoleWeightKGKMOL="18.000"
ocpcSulfurDioxideMoleWeightKGKMOL="64.000"
ocpcNitrogenMoleWeightKGKMOL="28.000"
ocpcOxygenMoleWeightKGKMOL="32.000"

ocpcCarbonDioxideGasConstantJKGK="188.900"
ocpcWaterVapourGasConstantJKGK="188.500"
ocpcSulfurDioxideGasConstantJKGK="130.000"
ocpcNitrogenGasConstantJKGK="296.900"
ocpcOxygenGasConstantJKGK="259.800"

ocpcCarbonDioxideSpecificHeatJKGK="845.000"
ocpcWaterVapourSpecificHeatJKGK="1690.000"
ocpcSulfurDioxideSpecificHeatJKGK="622.000"
ocpcNitrogenSpecificHeatJKGK="1038.000"
ocpcOxygenSpecificHeatJKGK="916.000"

ocpcCarbonDioxideGamma="1.300"
ocpcWaterVapourGamma="1.330"
ocpcSulfurDioxideGamma="1.260"
ocpcNitrogenGamma="1.400"
ocpcOxygenGamma="1.400"

ocpcFuelTemperature="7.000"
ocpcOxidantTemperature="2000.000"

So we now have a fairly in depth simulation of an engine happening but what effect does that have when driving? Going into such detail has made it a lot easier to implement the other aspects of driving a kart such as the realistic choking of the engine, tuning of the carburettor and maintaining the right engine temperature which is quite a skill when the engine is aircooled! So as well as trying to drive the right lines, brake as late as possible and get back on the throttle as early as possible, drivers will now have to look after their engines during the race as well with the optimal tune.

This means leaning off the low jet for the start of the race to get a slight increase in performance and get the jump on the rest of the pack. The high jet can also be leaned off to gain more top end power, but to the detriment of the engine temperature which will see power gradually decrease as the engine gets hotter. This should see drivers choking the engine and even richening the jets to keep the engine cool. If you have a water-cooled engine, you will have to cover the radiator when you first hit the track to get the engine up to temperature before the start and avoid a cold seize. All in all it should be an exciting element to keep on top of when driving in KartSim®.

Well that is pretty much it on the engine side of things for now, so keep checking back for more updates on the development of KartSim®.

4 comments:

Nathan said...

Wow that is just insane. This is an unprecedented level of detail for a public simulator, hell you wouldn't even get that in a military grade sim. Fantastic work, keep it up. PS: Are you planning on going into this much detail for tyre compounds & sidewall modeling?

Erik Jan said...

This is very interesting! Keep up the good work.

Erik

Anonymous said...

Are you still there guys?

Any updates coming? :(

Anonymous said...

Seems quite impressive.

I like how you are taking into account all of the engine parts and all the rest as well like driveline, clutch etc etc just like Richard Burns Rally did, it gave a very real feel to the cars.

I've been waiting for a real kart sim for a long time, thank you for starting this project and I hope all goes well for you!