User Tools

Site Tools


dev:proposals:fuel

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:proposals:fuel [2022-05-04 21:26]
ywang
dev:proposals:fuel [2023-01-17 14:44]
evictionbot Evict 56independent
Line 1: Line 1:
-====== Fuel ====== +====== Power ====== 
-**Note** This wiki page was taken from the mailing list+===== Fuel ===== 
 +Fuel is essential for any real train to run. However, Advtrains trains seem to run using some form of prepetual energy source. This is physically impossible in the real world.
  
-seems that in most cases, countries electrify their rail lines, bypassing +To rememedy this problem, trains could run on fuelIn the real world, there are two main types of power sources: Electric and Combustible Fuel
-this problem. This can be simulated with third rail being added to track +
-models.+
  
-In advtrains, a lot of trains do not have a pantograph and seem to run on +==== Powering Types ==== 
-diesel. Trains which do work on electric can have a third rail shoe added. +Trains in Advtrains can work in any of three ways:
-Trains go into roll mode when the electric potential of the track is not high +
-enough. The amount of blocks a power source charges is configurable and +
-defaults at 50. When you reach the end, you must use a track with a third rail +
-terminal (which is where the rail slopes down to the ground to allow the shoe +
-to pickup gently), and begin a new third rail section.+
  
-To power third rail, you can configure the source to be mesecons, an advtrains +  * Electric Only 
-power block, or magic.+  * Combustible Fuel only 
 +  * Hybrid
  
-For diesel locomotives, they run on an inventory of fuel which can be added +A train creator can specify the fuel type of the train with either ''fuel_type = "electric"'' or ''fuel_type = "combustible"''. If this value is ommitted or invalid (which includes ''fuel_type = "hybrid"''), the train is assumed to be hybrid.
-using "refuelling tracks", which work in the same way as loading tracks but +
-only add fuel.+
  
-Fuel can be configured to be advtrains dieselbiofuel from the biofuel mod, +If a train can run on electricit checks the track below for a third railand if foundchecks if it is electrified. If it is not, it comes to a rolling stop.
-oil extractor anything in the fuel group (if it exists)+
  
-Trains do not run without problemsTubes get blocked. Electric short-circuit, +If a train can run on combustible fuel, it has a small inventory of fuelFuel calculations are compilcatedso are explained in another section.
-Power supplies break, and all forms of other things cause inconvinience.+
  
-What i propose is adding this to advtrains. Randomly, one of your rolling stock +The locomotive will drop "exhaust" onto the tracks for every 100 units of burntime. Exhaust can be turned to a lump of coal by using 9 exhaust for "exhaust powder"using 9 exhaust powder for "exhaust powder block", and using 9 exhaust powder blocks for 1 lump of coal.
-suddenly develops problem and runs at 50-90% of its speed. To fix itpunch +
-it with a repair toolwhich leaves your inventory and makes the train work +
-again at full speed. There is also a maintinince track, which works in the same +
-way as a loading track but with repair tools.+
  
-For better identification, the coordinates of trains with problems can be found +A mod can then create the "exhaustcleaner" carriage, which will automatically craft exhaust into coal and put it into its own inventory. You can also set the exhaustcleaner to automatically move coal to the fuel inventory.
-using a command and the broken trains make loud noises.+
  
-All of the above is configurableUsers can turn on whether trains use fuel, +==== Running out of fuel ==== 
-need repair, and what type of fuel you can use. This ensures backwards +If fuel of any train runs out, it will come to a rolling stopThe train will be unable to accelerate unless on a down rampin which case it will increase speed by 0.75 m/s for every block it falls. Brakes still function if neccesary. Once a train has stopped, it will report to chat the ID, position, and lack of fuel.
-compatibility.+
  
-I send this email as the beginning of a discussionand potential feature +==== Fuel Calculations ==== 
-request. I would like to see the feasibility of this.+Here are the figures for fuel usageper non-locomotive wagon:
  
-----+^ Action ^ Energy usage in AEU per wagon ^ Energy usage in burntime (20 AEU) per wagon ^ Energy usage in amounts of oil extract (30 burntime) per wagon ^ 
 +| Acceleration | 5 per m/s/s | 2.5 per m/s/s | 3.33 | 
 +| Speed maintanence | 2.5 per m/s | 0.125 per m/s/s | 1.67 | 
 + 
 +Let's see how we got to these figures. 
 + 
 +Fuel energy measure is calculated in terms of AEU, which is the "Advtrains Energy Unit". This unit is exactly equal to 100 joules. 
 + 
 +Now, knowing the metric anchor for AEU, we can now do equations to calculate fuel usage. 
 + 
 +First of all, let's assume every wagon is exactly 500 kg. Let's also assume the highest speed is 20 m/s. 
 + 
 +Ok, so from this, we can get to energy usage. 
 + 
 +Let's first get to acceleration. Since the momentum equation is speed*mass, we can see that each additional m/s costs: 
 + 
 +1*500 
 + 
 +or 500 joules per wagon, or 5 AEU per wagon per m/s. 
 + 
 +So, to accelerate from 0 to 20, that would be 100 AEU. 
 + 
 +And then to maintain speed, we have 0.5 m/s/s of deceleration to counter. 
 + 
 +Thats: 
 + 
 +0.5*500 
 + 
 +or 250 joules, or 2.5 AEU per m/s (the reason it works out to m/s is because this is 250 joules for a second of travel at that speed. To find the distance we cover during that second, we use our friend m/s).  
 + 
 +So, to keep a speed of 20 m/s throughout a journey of 1,000 m, that's (2.5*20)*1000, or 50,000 AEU. That works out to (50,000/20)/30 oil extract, which is 83 pieces of oil extract per wagon. 
 + 
 +If we had a nice fast 7 carriage passanger train covering that distance, we can expect 581 pieces of oil extract to be used. This would take 6 inventory slots of the 9 in a locomotive.  
 + 
 +To take all 9 stacks, that would be (((9*99)*30)*20)/(20*2.5), 10,692 m for a 1 wagon train. For 7 wagons, we get approximately 1.5 km. 
 + 
 +It increases if we go at 10 m/s. That would be (((9*99)*30)*20)/(10*2.5), which is approximately 21.3 km. However, this figure just feels plain wrong. 
 + 
 +Don't forget you can change the burntime-AEU conversion factor from 20 to a higher number for larger ranges! 
 + 
 +==== Electrified Rails ==== 
 +Modders are free to add their own system of electrification, using the electrification API (which allows modders to set the region around their node to electrify and if it touches a track or is a track, the track is electrified; the region function can be executed on the basis of other nodes). 
 + 
 +A new advtrains mod inside the modpack, called "third rail", makes the third rails. Third rails come as "segments", which are long pieces of track with a third rail terminated by an end, which is a ramp. This allows the shoe to gently be pushed onto the third rail. 
 + 
 +Third rail is the best choice as they are much easier to program (just a new type of rail; no complex OLE logic), and is often easy to hide the pickup shoes if the rail is centred (which means they can be absent). 
 + 
 +Third rails will always limit speed to 85% of advtrains's max speed. This is due to the third rail shoe being worn away too quickly at high speeds. 
 + 
 +A third rail track will only be electrified if either: 
 + 
 +  * ''advtrains.electricity_always_on = true'' in minetest.conf 
 +  * A HV technic wire links to a "power station" connected to the track. The track draws a consant amount of power. If a train is on the track, the power draw grows. 
 +  * A mesecons on wire is connected to the third rail and ''advtrains.allow_mesecons_power = true'' in minetest.conf 
 + 
 +Third rail can only be powered for 250 metres. After this, the rail is unelectrified. This low-area transmission is a feature designed to encourage the development of working OLE (overhead line electrification). 
 + 
 +Multiple power sources (which are transmitting power) on the same stretch of third rail will cancel each other out and mean the third rail is unelectrified.  
 + 
 +If a third rail does not terminate in a ramp, the electricity "runs" into the ground from the exposed edge and the third rail remains electrified. If a train was to hit the unterminated end, it would either collide or  
 + 
 +Depending on a conf setting, people may be "electrocuted" within 10 m of an improperly-terminated third rai track (or their feet touch an electrified third rail). This only occurs if the player is not wearing insulating shoes (which can be defined in conf). 
 + 
 +When a player is being electrified, their avatar becomes uncontrollable. They spasm in random directions, see red, and lose 2 hp per second. For every second spent being electrified, 4 random items in their inventory are cooked as if in a furnace. 
 + 
 +If a stretch of track remains unelectrified for any reason shown above, it will report this reason with the location(s) which are causing the errors: 
 + 
 +  * "POS, POS, and POS are power sources on the same third rail segment. Third rails are not electrified unless only one power source transmits power." 
 +  * "POS is an improperly terminated end for third rail. Place a ramp to terminate it properly (wear insulating shoes or you may be electrocuted)." 
 + 
 +There are three new nodes for tracks: 
 + 
 +  * Third rail ramp termination 
 +  * Third rail 
 +  * Protected Third Rail (Does not electrocute if stood on; but limits speed to 15 m/s) 
 +  * Two rail (standard) 
 + 
 +The recomended use of third rail is as such: 
 + 
 +* Electrify every piece of straight track 
 +* Keep electrification sections smaller then track sections to give you better control 
 +* Leave gaps 3 m away from level crossings; stepping on a third rail is deadly and will kill if enabled. 
 +* At junctions, ALWAYS electrify in-between points if possible (when the track is more then 3 m between points). It's likely a train will be long enough to stand on a third rail, but if a section remains unelectrified, the train might not move. 
 + 
 +==== Crafting ==== 
 +10 third rail segments can be crafted by using either 10 mesecons or HV technic wire in place of of the middle stick. 
 + 
 +10 third rail ends can be crafted by using either 10 mesecons or HV technic wire at the top of the recipie.  
 +==== Refuelling Tracks ==== 
 +For combustable fuel, for automatic refuelling, there is a refuel track. This track takes fuel from a below-track chest and moves as much as possible to the train. 
 + 
 +The refuel track will automatically stop a train with space for fuel over it and transmit one stack of fuel every 2.5 seconds before sending it away with "SM" as an ATC command.  
 + 
 +==== Train HUD changes ==== 
 +To allow for better knowledge of train fuel, the HUD will have these new elements added: 
 + 
 +  * Display showing AEU remaining with current fuel 
 +  * Display showing how far you can go with that AEU, assuming speed does not change from what it is now 
 +  * Display showing how far you can go with that AEU, at a constant speed of 20 m/s 
 + 
 +Each of these will display on the bottom of the train HUD next to a box saying what they're for. 
 + 
 +If any of these numbers show as 0, the number will turn red and the warning message "NO FUEL" will show. It's up to the driver to: 
 + 
 +  * Install fuel manually 
 +  * Connect to a train with fuel
  
-//The following is taken from a reply to the email above.// 
-  * How should the amount of fuel/electricity be calculated? 
-  * How should regenerative braking handle the situation with multiple (different) power sources (e.g. from the technic mod)? 
-  * In the case of refueling/recharging tracks, it should be possible for a train to wait until it is fully refueled or recharged. 
-  * The vehicle breakdown algorithm should take it into consideration that the maintenance tracks allow periodical maintenance of a train, which reduces the probability of a breakdown. This means that vehicles maintained more often should be less prone to vehicle breakdowns. 
-  * The quality of the maintenance (which corresponds to (e.g.) how much is checked for a train) should be considered. A primitive implementation could calculate this based on the time spent on the maintenance track (with a limit on the maintenance status).