PerryPlatypus, on 10 January 2020 - 11:02 AM, said:
Can you provide some more detail on the trains that you are trying to run up the hill, and what is happening?
Locomotive types, tonnage, grade, etc?
Thanks
Posted 11 January 2020 - 12:13 PM
PerryPlatypus, on 10 January 2020 - 11:02 AM, said:
Posted 11 January 2020 - 09:00 PM
steamer_ctn, on 11 January 2020 - 12:13 PM, said:
Posted 17 January 2020 - 09:43 AM
Posted 17 January 2020 - 10:59 AM
Posted 18 January 2020 - 12:51 AM
Posted 18 January 2020 - 09:56 AM
if (IsDavisFriction || IsORTSFriction == false) // If Davis parameters are not defined in WAG file, then use default methods
if (IsDavisFriction == false) // If Davis parameters are not defined in WAG file, then use default methods
if (IsDavisFriction == false || IsORTSFriction == false) // If Davis parameters are not defined in WAG file, then use default methods
if (!IsDavisFriction || !IsORTSFriction) // If Davis parameters are not defined in WAG file, then use default methods
Posted 18 January 2020 - 10:04 AM
if ( !IsDavisFriction|| !IsORTSFriction )
// wag file data public string MainShapeFileName; public string FreightShapeFileName; public float FreightAnimMaxLevelM; public float FreightAnimMinLevelM; public float FreightAnimFlag = 1; // if absent or >= 0 causes the freightanim to drop in tenders public string Cab3DShapeFileName; // 3DCab view shape file name public string InteriorShapeFileName; // passenger view shape file name public string MainSoundFileName; public string InteriorSoundFileName; public string Cab3DSoundFileName; public float ExternalSoundPassThruPercent = -1; public float WheelRadiusM = 1; // provide some defaults in case it's missing from the wag protected float StaticFrictionFactorN; // factor to multiply friction by to determine static or starting friction - will vary depending upon whether roller or friction bearing float FrictionLowSpeedN; // Davis low speed value 0 - 5 mph float FrictionBelowMergeSpeedN; // Davis low speed value for defined speed public float Friction0N; // static friction protected float Friction5N; // Friction at 5mph public float StandstillFrictionN; public float MergeSpeedFrictionN; public float MergeSpeedMpS; public float DavisAN; // davis equation constant public float DavisBNSpM; // davis equation constant for speed public float DavisCNSSpMM; // davis equation constant for speed squared public float DavisDragConstant; // Drag coefficient for wagon public float WagonFrontalAreaM2; // Frontal area of wagon public float TrailLocoResistanceFactor; // Factor to reduce base and wind resistance if locomotive is not leading - based upon original Davis drag coefficients
Posted 18 January 2020 - 10:13 AM
Posted 18 January 2020 - 10:19 AM
Quote
Posted 18 January 2020 - 10:28 AM
Posted 18 January 2020 - 10:33 AM
Quote
if (IsDavisFriction == true) // test to see if OR thinks that Davis Values have been entered in WG file. { if (DavisAN == 0 || DavisBNSpM == 0 || DavisCNSSpMM == 0 && StandstillFrictionN >= 0 && MergeSpeedMpS >= 0) // If Davis parameters are not defined in WAG file, then set falg to use default friction values IsDavisFriction = false; // set to false - indicating that Davis friction is not used } if (IsORTSFriction == true) // test to see if OR thinks that Davis Values have been entered in WAG file. { if (DavisAN > 0 || DavisBNSpM > 0 || DavisCNSSpMM > 0 && StandstillFrictionN > 0 && MergeSpeedMpS > 0) // If Davis parameters are not defined in WAG file, then set falg to use default friction values IsORTSFriction = true; else IsORTSFriction = false; // set to false - indicating that Davis friction is not used
Posted 18 January 2020 - 11:32 AM
if (IsORTSFriction == true) // test to see if OR thinks that Davis Values have been entered in WAG file.
Posted 19 January 2020 - 01:54 AM
if (IsDavisFriction == true) // test to see if OR thinks that Davis Values have been entered in WG file. { if (DavisAN == 0 || DavisBNSpM == 0 || DavisCNSSpMM == 0 && StandstillFrictionN >= 0 && MergeSpeedMpS >= 0) // If Davis parameters are not defined in WAG file, then set falg to use default friction values IsDavisFriction = false; // set to false - indicating that Davis friction is not used } if (IsORTSFriction == true) // test to see if OR thinks that Davis Values have been entered in WAG file. { if (DavisAN > 0 || DavisBNSpM > 0 || DavisCNSSpMM > 0 && StandstillFrictionN > 0 && MergeSpeedMpS > 0) // If Davis parameters are not defined in WAG file, then set falg to use default friction values IsORTSFriction = true; else IsORTSFriction = false; // set to false - indicating that Davis friction is not used // Davis formulas only apply above merge speed, so different treatment required for low speed if (AbsSpeedMpS > MpS.FromMpH(MergeSpeedMpS)) // if speed above merge speed then turn off low speed calculations IsBelowMergeSpeed = false; if (AbsSpeedMpS == 0.0) IsBelowMergeSpeed = true; if (IsBelowMergeSpeed) { // Dtermine the starting friction factor based upon the type of bearing float StartFrictionLowLoadN = StandstillFrictionN; // Starting friction // Determine the starting resistance due to wheel bearing temperature // Note reference values in lbf and US tons - converted to metric values as appropriate // At -10 DegC it will be equal to the snowing value, as the temperature increases to 25 DegC, it will move towards the summer value // Assume a linear relationship between the two sets of points above and plot a straight line relationship. const float LowGrad = -0.15f; float LowIntersect = 7.15f * (StandstillFrictionN / DavisAN); float HighIntersect = 18.5f * (StandstillFrictionN / DavisAN); if (WheelBearingTemperatureDegC < -10) { // Set to snowing (frozen value) StartFrictionLowLoadN = N.FromLbf(8f * (StandstillFrictionN / DavisAN)); // Starting friction for a car with standard roller bearings, snowing } else if (WheelBearingTemperatureDegC > 25) { // Set to normal temperature value StartFrictionLowLoadN = N.FromLbf(2.5f * (StandstillFrictionN / DavisAN) * (StandstillFrictionN / DavisAN)); // Starting friction for a 10 ton(US) car with standard roller bearings, not snowing } else { // Set to variable value as bearing heats and cools StartFrictionLowLoadN = N.FromLbf(LowGrad * WheelBearingTemperatureDegC + LowIntersect); } // Determine the running resistance due to wheel bearing temperature float WheelBearingTemperatureResistanceFactor = 0; // Assume the running resistance is impacted by wheel bearing temperature, ie gets higher as tmperature decreasses. This will only impact the A parameter as it is related to // bearing. Assume that resisnce will increase by 30% as temperature drops below 0 DegC. // At -10 DegC it will be equal to the snowing value, as the temperature increases to 25 DegC, it will move towards the summer value // Assume a linear relationship between the two sets of points above and plot a straight line relationship. const float RunGrad = -0.0085714285714286f; const float RunIntersect = 1.2142857142857f; if (WheelBearingTemperatureDegC < -10) { // Set to snowing (frozen value) WheelBearingTemperatureResistanceFactor = 1.3f; } else if (WheelBearingTemperatureDegC > 25) { // Set to normal temperature value WheelBearingTemperatureResistanceFactor = 1.0f; } else { // Set to variable value as bearing heats and cools WheelBearingTemperatureResistanceFactor = RunGrad * WheelBearingTemperatureDegC + RunIntersect; } // If hot box has been initiated, then increase friction on the wagon significantly if (HotBoxActivated && ActivityElapsedDurationS > HotBoxStartTimeS) { WheelBearingTemperatureResistanceFactor = 2.0f; StaticFrictionFactorN *= 2.0f; } // Calculation of resistance @ low speeds // Wind resistance is not included at low speeds, as it does not have a significant enough impact MergeSpeedFrictionN = DavisAN * WheelBearingTemperatureResistanceFactor + MpS.FromMpH(MergeSpeedMpS) * (DavisBNSpM + MpS.FromMpH(MergeSpeedMpS) * DavisCNSSpMM); // Calculate friction @ merge speed Friction0N = StandstillFrictionN * StaticFrictionFactorN; // Static friction is journal or roller bearing friction x weight factor based upon US tons as this matches reference value FrictionLowSpeedN = ((1.0f - (AbsSpeedMpS / MpS.FromMpH(MergeSpeedMpS))) * (Friction0N - MergeSpeedFrictionN)) + MergeSpeedFrictionN; // Calculate friction below merge speed - decreases linearly with speed FrictionForceN = FrictionLowSpeedN; // At low speed use this value } else { // Determine the running resistance due to wheel bearing temperature float WheelBearingTemperatureResistanceFactor = 0; // Assume the running resistance is impacted by wheel bearing temperature, ie gets higher as tmperature decreasses. This will only impact the A parameter as it is related to // bearing. Assume that resisnce will increase by 30% as temperature drops below 0 DegC. // At -10 DegC it will be equal to the snowing value, as the temperature increases to 25 DegC, it will move towards the summer value // Assume a linear relationship between the two sets of points above and plot a straight line relationship. const float RunGrad = -0.0085714285714286f; const float RunIntersect = 1.2142857142857f; if (WheelBearingTemperatureDegC < -10) { // Set to snowing (frozen value) WheelBearingTemperatureResistanceFactor = 1.3f; } else if (WheelBearingTemperatureDegC > 25) { // Set to normal temperature value WheelBearingTemperatureResistanceFactor = 1.0f; } else { // Set to variable value as bearing heats and cools WheelBearingTemperatureResistanceFactor = RunGrad * WheelBearingTemperatureDegC + RunIntersect; } // If hot box has been initiated, then increase friction on the wagon significantly if (HotBoxActivated && ActivityElapsedDurationS > HotBoxStartTimeS) { WheelBearingTemperatureResistanceFactor = 2.0f; } FrictionForceN = DavisAN * WheelBearingTemperatureResistanceFactor + AbsSpeedMpS * (DavisBNSpM + AbsSpeedMpS * DavisCNSSpMM); // for normal speed operation // if this car is a locomotive, but not the lead one then recalculate the resistance with lower value as drag will not be as high on trailing locomotives // Only the drag (C) factor changes if a trailing locomotive, so only running resistance, and not starting resistance needs to be corrected if (WagonType == WagonTypes.Engine && Train.LeadLocomotive != this) { FrictionForceN = DavisAN * WheelBearingTemperatureResistanceFactor + AbsSpeedMpS * (DavisBNSpM + AbsSpeedMpS * (TrailLocoResistanceFactor * DavisCNSSpMM)); } // Test to identify whether a tender is attached to the leading engine, if not then the resistance should also be derated as for the locomotive bool IsLeadTender = false; if (WagonType == WagonTypes.Tender) { bool PrevCarLead = false; foreach (var car in Train.Cars) { // If this car is a tender and the previous car is the lead locomotive then set the flag so that resistance will be reduced if (car == this && PrevCarLead) { IsLeadTender = true; break; // If the tender has been identified then break out of the loop, otherwise keep going until whole train is done. } // Identify whether car is a lead locomotive or not. This is kept for when the next iteration (next car) is checked. if (Train.LeadLocomotive == car) { PrevCarLead = true; } else { PrevCarLead = false; } } // If tender is coupled to a trailing locomotive then reduce resistance if (!IsLeadTender) { FrictionForceN = DavisAN * WheelBearingTemperatureResistanceFactor + AbsSpeedMpS * (DavisBNSpM + AbsSpeedMpS * (TrailLocoResistanceFactor * DavisCNSSpMM)); } } }
Posted 20 January 2020 - 09:00 AM
if (IsDavisFriction == true) // test to see if OR thinks that Davis Values have been entered in WG file. { if (DavisAN == 0 || DavisBNSpM == 0 || DavisCNSSpMM == 0 && StandstillFrictionN >= 0 && MergeSpeedMpS >= 0) // If Davis parameters are not defined in WAG file, then set falg to use default friction values IsDavisFriction = false; // set to false - indicating that Davis friction is not used } if (IsORTSFriction == true) // test to see if OR thinks that Davis Values have been entered in WG file. { if (DavisAN == 0 || DavisBNSpM == 0 || DavisCNSSpMM == 0 && StandstillFrictionN == 0 && MergeSpeedMpS == 0) // If Davis parameters are not defined in WAG file, then set falg to use default friction values IsORTSFriction = false; // set to false - indicating that Davis friction is not used } if (IsORTSFriction) // test to see if OR thinks that Davis Values have been entered in WAG file. { // Davis formulas only apply above merge speed, so different treatment required for low speed if (AbsSpeedMpS > MpS.FromMpH(MergeSpeedMpS)) // if speed above merge speed then turn off low speed calculations IsBelowMergeSpeed = false; if (AbsSpeedMpS == 0.0) IsBelowMergeSpeed = true;
ORTSDavis_A ( 2670.353756 ) ORTSDavis_B ( 18.59957 ) ORTSDavis_C ( 1.607582 ) ORTSStandstillFriction ( 2803.871443 ) ORTSMergeSpeed ( 1.674476 )