Elvas Tower: I think I have finally got it figured......... - Elvas Tower

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

I think I have finally got it figured......... A fix for poor performing steamers? Rate Topic: -----

#1 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 02 September 2013 - 02:59 PM

Now I believe this is theanswer as to why the steam code does not perform to well. There are two problems both data, the main mathematics seeming to be OK.


THe first is low tractive effort, the TE is the responsibilty of the ForceFactor2 table, this table is in 2 parts an interpolated look up table. The input being cuttoff. The output being a decimal fraction that is actaully the ratio of the cylinder mean effective pressure to the cylinders input pressure. The seconf part of the table is a scaling calculation, this being the first part of two equations that calculate the loco's motive force. The problem with this table is the data in the table itself is incorrect being far to low. THe following is the dat representing the cylinder conditions of a steamer as caculated frm scratch. This data has been compared to the GWR 4900 hall graphs as well as a number of cylinder pressure diagrams, and is quite close.


Cuttoff    mep ratio
0.200      0.5
0.265      0.64
0.330      0.685
0.395      0.78
0.460      0.85
0.525      0.88
0.590      0.915
0.655      0.934
0.720      0.96
0.785      0.97
0.85       0.98


I have checked this data against real world performance and it produces good results in my own sim.


The second problem is excessive steam consumption, this in the sim is caused by the cylinder input pressure being far to high, no pressure drop in the manifolds being taken into account, this high pressure causes the cylinder to be filled far beyond what it should being filled. the following table shows the ratio of the boiler pressure to the actual cylinder filling pressure. Now this is somewhat over simplified as the actual cylinder filling pressure varies with the loco's speed as well as cuttoff.

cuttoff      ratio cylinder filling pressure
             to boiler pressure.

0.75          1.00
0.65          0.92
0.55          0.83
0.45          0.74
0.35          0.65
0.25          0.56
0.20          0.47



This table asssumes that low cuttoffs will only be used on loco's at speed therefore when steam flow rates are high. This solution is whats known as a "quick and dirty" solution, ie a simplified item to see if it worked. Under normal driving conditions the result was very good. Basicly how it was applied is at speed at say a cuttoff of 0.25 with a boiler pressure of 215 lbs/sqinch (A GWR 4900 hall class loco at speed) one would expect a cylinder filling pressure of 0.25 x 215 = 126lbs/sq inch. This represents the cylinders input pressure. Now at a cuttoff 0.25 a hall has a mean effective pressure of 68 lbs (Note 1), at cuttoff of 0.25 the cylinders mean effective pressure is 0.58 (the top table) if the cylinders input pressure is 125 lbs the MEP would be 72.5 lbs, this being very close to what the halls pressure really is.The actual expra pressure being the back pressure.

Note 1: Taken from the hall performance graphs.

Is the above clear, anyone have any questions?

Lindsay

#2 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 02 September 2013 - 03:21 PM

With the current code base one could probably get by for the second issue (excessive steam consumption) by setting the CylinderPressureDrop at max steam flows to around 40 percent of the boiler pressure. Probably be a need for some experimentation. Another thing is reading in interpolator data line in from an eng file does not appear to work.

Also I believe that in the code line 212 MSTSSteamLocomtive.cs ......

                CylinderPressureDrop.ScaleX(ExhaustLimitLBpH);

should be
                CylinderPressureDrop.ScaleX(MaxBoilerOutputLBpH);

As its on the input to the cylinder not the output.


LIndsay

#3 User is offline   captain_bazza 

  • Chairman, Board of Directors
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 13,927
  • Joined: 21-February 06
  • Gender:Male
  • Location:Way, way, way, South
  • Simulator:MSTS & OR
  • Country:

Posted 02 September 2013 - 04:20 PM

For the info of the uninitiated:

http://en.wikipedia..../GWR_4900_Class

Info on the UK Hall Class 4-6-0 tender locomotive.

Cheers Bazza

Note the link with the Harry Potter films.

#4 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 02 September 2013 - 04:37 PM

The GWR 4900 Hall was used as a reference purely because its one of the ___VERY____ rare breed of steamers thats had decent performance figures published.

Lindsay

#5 User is offline   captain_bazza 

  • Chairman, Board of Directors
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 13,927
  • Joined: 21-February 06
  • Gender:Male
  • Location:Way, way, way, South
  • Simulator:MSTS & OR
  • Country:

Posted 02 September 2013 - 06:38 PM

Good choice, actually, Lindsay.

Cheers Bazza

#6 User is offline   wushin 

  • Apprentice
  • Group: Status: Dispatcher
  • Posts: 29
  • Joined: 04-June 05
  • Gender:Male
  • Location:Sacramento
  • Simulator:ORTS, MSTS
  • Country:

Posted 02 September 2013 - 09:12 PM

Lindsay,

Are these changes to the .eng files or to the main program itself. I do not have the Hall locomotive and instead was looking at the .eng file for Derek Millers WP 2-8-2 #335 as an example. The reason I am asking is the CylinderPressureDrop is not one of the engine parameters in this particular engine. A step by step would probably help those of us who know just enough about this game to screw it up royally when left to our own devices.

Thanks for sharing your research with us.

Donald

View PostLindsayts, on 02 September 2013 - 03:21 PM, said:

With the current code base one could probably get by for the second issue (excessive steam consumption) by setting the CylinderPressureDrop at max steam flows to around 40 percent of the boiler pressure. Probably be a need for some experimentation. Another thing is reading in interpolator data line in from an eng file does not appear to work.

Also I believe that in the code line 212 MSTSSteamLocomtive.cs ......

                CylinderPressureDrop.ScaleX(ExhaustLimitLBpH);

should be
                CylinderPressureDrop.ScaleX(MaxBoilerOutputLBpH);

As its on the input to the cylinder not the output.


LIndsay


#7 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 02 September 2013 - 11:40 PM

View Postwushin, on 02 September 2013 - 09:12 PM, said:

Lindsay,

Are these changes to the .eng files or to the main program itself. I do not have the Hall locomotive and instead was looking at the .eng file for Derek Millers WP 2-8-2 #335 as an example. The reason I am asking is the CylinderPressureDrop is not one of the engine parameters in this particular engine. A step by step would probably help those of us who know just enough about this game to screw it up royally when left to our own devices.

Thanks for sharing your research with us.

Donald


You should be able to change via the eng file but I cannot get it to work so at this stage one hopes the default data in the source can be changed.

You should be able to use a line in the engine section of the eng file like below to change the default ForceFactor2 data, but I cannot get it to work so at this stage it would be nice to try it in the source.


forcefactor2 ( 0.200 .5 .265 .64 .33 .685 .395 .78 .46 .85 .525 .88 .590 .915 .655 .934 .720 .96 .785 .97 .85 .98 )



The layout of the line (I think, Note 1) is at the start the name of the Interpolator, something like forcefactor2, cylinderpressuredrop, boilerefficiency or backpressure, then an opening brace and pairs of data of the table concerned. In the above example the pairs of data are cuttoff and its ascociated pressure factor, eg 0.200 0.5.

Note 1: I have gone through all the source files and I believe this is how it should work, I though have no experience with C# and considering the C# compiler for Linux was abandond over 18 months ago, I probably never will get much konwledge of this language.

I can give example data for CylinderPressure drop, it would be nice to able to submit data via the eng file mechanism, I may submit a detailed bug report on this as I can give the required line numbers in ALL the files concerned with the parsing of this data in the eng file. This should make it some what easier to find out what is going on.

Note: although I am a long time assembly and C language programmmer, I have NEVER worked with windows (my main OS for at least the last 15 years being Linux) and I find C# to be a mystery wrapped in an enigma, the steam physics in MSTSSteamlocomotive.cs is largely mathematical so I have little trouble in working that out, but I do hesitate to go where I do not understand clearly what is going on. So I will have to leave changing the code to others.

C# appears to have no headers files and there is function prototypes and data structures all over the place with absolutely no way of finding out what they do or how they work, so its guessing time, something one should _____________NEVER___________ have to do in programming. In C and specialy assembler you ___NEVER___ get that situation occuring.

Lindsay

#8 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 02 September 2013 - 11:49 PM

View Postcaptain_bazza, on 02 September 2013 - 06:38 PM, said:

Good choice, actually, Lindsay.

Cheers Bazza


The Hall is a nice loco and as usual with British steamers had a real low water and coal consumption for the power it put out but there was little choice in its selection though as this was only one of two locos that a good set of nearly complete test data was availible for it. The other loco being of course the PRR k4s, the data for it though did not have the cuttoff used specified, this made the Hall easier to use as one did not have to calculate the cuttoff.

LIndsay

#9 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 03 September 2013 - 01:27 AM

This code section is the two interploaters patched with my data. Its from MSTSSteamLocomtive.cs from lines 187 to 214. Luckily both tables are consecetive in the code. It all may blow up in my face, but I believe its correct and worth a try. Theres little point in building on the code if the data in it is not correct.

This has been directly cut out of the file all that is required is to replace the existing lines with this code. One of the major advantages of code repositries such as SVN is the ability to go back to ANY version of the code base. So its not a tragedy if it fails.


            if (ForceFactor2 == null)
            {
                ForceFactor2 = new Interpolator(11);
                ForceFactor2[.200f] = .500f;
                ForceFactor2[.265f] = .640f;
                ForceFactor2[.330f] = .685f;
                ForceFactor2[.395f] = .780f;
                ForceFactor2[.460f] = .850f;
                ForceFactor2[.525f] = .880f;
                ForceFactor2[.590f] = .915f;
                ForceFactor2[.655f] = .934f;
                ForceFactor2[.720f] = .960f;
                ForceFactor2[.785f] = .970f;
                ForceFactor2[.850f] = .980f;
                ForceFactor2.ScaleY(4.4482f * (float)Math.PI / 4 * 39.372f * 39.372f *
                    NumCylinders * CylinderDiameterM * CylinderDiameterM * CylinderStrokeM / (2 * DriverWheelRadiusM));
            }
            if (CylinderPressureDrop == null)
            {   // this table is not based on measurements
                CylinderPressureDrop = new Interpolator(5);
                CylinderPressureDrop[0] = 0;
                CylinderPressureDrop[.2f] = 2;
                CylinderPressureDrop[.5f] = 12;
                CylinderPressureDrop[1] = 60;
                CylinderPressureDrop[2] = 120;
                CylinderPressureDrop.ScaleX(MaxBoilerOutputLBpH);
                CylinderPressureDrop.ScaleX(1 / 3600f);
            }





Lindsay

#10 User is offline   Falcus 

  • Conductor
  • Group: Status: Inactive
  • Posts: 408
  • Joined: 01-November 08
  • Location:Puget Sound Region
  • Country:

Posted 03 September 2013 - 02:18 AM

So, just to clarify, with a fix to the coding of the game's Physics for Steam Locomotives, all these funky issues we've been having with steam locomotives having as much tractive effort as a stick of butter should go away with this fix?

And how do we get it fixed? Is this something we can do Manually (Step by step instructions would be awesome! though not expected)? Or is this something we can get sent to the OR Devs and have it fixed in the next update? or both? Because, though I like OR (My outdated computer problems aside), right now the adhesion/Tractive Effort issues it has drives me to distraction (Getting the latest beta was an immense improvement over V9, but the issues are still present if only lessened from what I've seen).

Thanks!
Falcus

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users