diff --git a/Tools/TranslateComments/comments2-orig.txt b/Tools/TranslateComments/comments2-orig.txt index 954505b0e8bf7b94fe8571515baa93fde823e401..8688fec216546a30d29864ef9310219e357751b9 100644 --- a/Tools/TranslateComments/comments2-orig.txt +++ b/Tools/TranslateComments/comments2-orig.txt @@ -1689,10 +1689,11 @@ 4638: ' Zwischen 1. und 8. gang sowie 9. und 16. Gang: 4662: '***Differenzial 4663: ' Leistung nach Diff (vor Getriebe) -4682: 'Pdiff +4691: '***Differenzial 4692: ' Leistung vor Diff 4744: '----------------Getriebe Trägheit---------------- >>> MODcalc\cVh.vb +5: 'Aus DRI-Datei 15: 'Berechnet 18: 'WegKor 58: 'Geschwindigkeit @@ -1700,18 +1701,19 @@ 79: 'Strecke (aus Zwischensekunden sonst passiert Fehler) 87: 'Steigung 99: 'Gang - nicht Mittelwert sondern Gang(t) = DRI.Gang(t) -112: 'Padd +124: 'Beschl. berechnen 132: 'Vair-Vorgaben: Nicht in Zwischensekunden!! 157: 'Geschwindigkeit 169: 'Strecke 177: 'Steigung 189: 'Gang - nicht Mittelwert sonder Gang(t) = DRI.Gang(t) -202: 'Padd +214: 'Beschl. berechnen 257: 'TODO: Wenn Fzg schneller als Zyklus... 273: 'Falls Zeitschritt wiederholen näher an Wegvorgabe als aktueller Weg => Zeitschritt wiederholen 279: 'Falls nächsten Zeitschritt löschen näher an Wegvorgabe als aktueller Weg => Nächsten Zeitschritt löschen 291: 'Keine Korrektur >>> MODcalc\Em Calc.vb +54: 'Normale Interpolation 101: 'Ersten zwei sekunden keine Korrektur: 185: 'Dictionaries erstellen 208: 'Summen ermitteln @@ -1749,7 +1751,7 @@ 610: 'C Zwischenrechnung fue Zyklusmittelwert: 617: 'C Berechnung der mittleren Amplitude in 3 Sekunden vor Emission (Ampl3s) 618: 'C und der Anzahl der Pe-Sekundenschritten ueber 3% der Nennleistung -619: 'C (LW3p3s): +650: 'C (2) Aenderung der aktuellen Motorleistung (dP_2s): 664: 'C Mittelwert 3 sec. vor Emission: 672: 'C Gezaehlt nur bei dynamischem betrieb: 681: 'C (4) Mittelwert der negativen Motorleistung ("PnegMW"): @@ -1769,7 +1771,7 @@ 846: '! Felder für Größen aus PHEM Hauptprogramm 895: '**** Einlesen von tgas aus .npi (Projekt HERO) **** 896: ' => überschreibt tgas(jz) aus HtMass() -897: ' Luz/Rexeis 16.05.2011 +912: ''' Hauptroutine für EXS Modul 916: '! Aufruf von Exs_Main(true) -> Developer Version ohne PHEM Hauptprogramm 921: '! Felder für Größen aus exs-File 951: 'Allgemeine Konstanten @@ -1785,7 +1787,7 @@ 1006: 'Dimensionieren: 1025: 'Übergabe der relevanten Größen aus dem PHEM Hauptprogramm 1026: 'In DEV direkt aus der Datei *.phe eingelesen -1045: 'Lambda +1051: 'Wird weiter unten belegt weil mpexh vorhanden sein muss 1056: 'Anfang exs-File einlesen 1072: 'dummy = DatExs.ReadLine(0) 'alte dummy zeilen: auf exs-file kompatibilität achten 1079: 'Initialisieren der entsprechenden Anzahl an Modulen @@ -1901,7 +1903,7 @@ 1924: 'Zeitdiskrete Lösung der PT1-Diffgl 1991: ''Extrapolation für LastTemp > TempAr(0) 2003: 'Extrapolation für LastTemp < TempAr(Adim) -2005: 'lbInt: +2013: 'Einen Zeitschritt vor ( = 1 Sekunde) 2041: 'Klasse initialisiert als Unterelement von TempMod 2047: 'c Prefix "c" bedeutet: Zykluswert verwendet für Kennlinien-Korrektur 2049: 'c Index "cc" bedeutet: Wert aus Kennlinie (-> "c" - "cc" ist die Differenz, mit der Korrigiert wird) @@ -1958,7 +1960,6 @@ 2543: 'c Raumgeschwindigkeit aus Kennlinie: 2561: 'Schreiben der Ergebnisse auf die standardisierten Variablen eEmKomp (iSchad, jz) und Qp_reak(jz) 2593: ''' KAT-Modell -2600: 'Klasse initialisiert als Unterelement von TempMod 2606: 'Kennfelddaten 2627: ''' Erstellen eines neuen KAT-Moduls 2642: ''' Interpolationsfunktion @@ -1995,6 +1996,7 @@ 2879: 'c Sortieren der 2 Werte nach aufsteigendem n: 2887: 'c Interpolation der zugehoerigen Maximalleistung (P/Pnenn) >>> My Project\AssemblyInfo.vb +5:' Allgemeine Informationen über eine Assembly werden über die folgenden 6:' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 7:' die mit einer Assembly verknüpft sind. 9:' Die Werte der Assemblyattribute überprüfen @@ -2003,5 +2005,5 @@ 25:' Hauptversion 26:' Nebenversion 27:' Buildnummer -28:' Revision +30:' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern 31:' übernehmen, indem Sie "*" eingeben: diff --git a/Tools/TranslateComments/comments2-trans.txt b/Tools/TranslateComments/comments2-trans.txt index 97d62c1c9f6667c7e73cd1e26b3cae2f1e151780..3d49bf6f0a26d3ebae932bb1dd187a32a6c6dd18 100644 --- a/Tools/TranslateComments/comments2-trans.txt +++ b/Tools/TranslateComments/comments2-trans.txt @@ -144,7 +144,7 @@ 56: 'c but lightly adapted: Average Nominal-Power of the engines into mep verwursteten >>> M_Lese.vb 16: 'Read GEN -35: 'VECTO: Defaultwerte für Parameter die nicht mehr in der .GEN/.VECTO sind werden beim Einlesen über SetDefault belegt. |@@| VECTO: Default values for the parameters are no longer in GEN/.VECTO are to be occupied in reading about SetDefault. +35: 'VECTO: Defaultwerte für Parameter die nicht mehr in der .GEN/.VECTO sind werden beim Einlesen über SetDefault belegt. |@@| VECTO: Default values for the parameters are no longer in GEN/.VECTO but are allocated when Read about SetDefault. 46: 'Error message in init() 51: 'Einlesen der KFZ-Spezifikationen aus 'KFZspez' |@@| Read the Vehicle(KFZ)-specifications from 'KFZspez' 131: ' FLD muss jetzt vor MAP/MEP eingelesen werden falls dort <DRAG> Einträge sind! |@@| if there are <DRAG> entries, then read FLD before MAP/MEP! @@ -1196,7 +1196,7 @@ 755: 'Reset von Errors die mit der Leistungsberechnung zu tun haben (nach Schaltmodell durchzuführen) |@@| Reset errors related to Power-calculation (towards performing the Gear-shifting model) 763: 'Emit Errors >>> MODcalc\cPower.vb -21: 'Data per second +21: 'Per-second Data 33: 'Interruption of traction 87: 'Recuperation 88: ' Project HERO - BMW Mini Hybrid @@ -1541,467 +1541,470 @@ 3465: 'Acceleration-phases: Downshift?(Zurückschalten) suppressed 3486: 'If within 6 seconds it Shifts back to the previous-Gear, 3487: 'then maintain the previous-Gear throughout. -3499: 'Wenn innerhalb von 6 Sekunden einmal höher und einmal niedriger als voriger Gang |@@| If within 6 seconds it Shifts once above and once below the previous-Gear, -3500: 'geschaltet wird, wird voriger Gang durchgehend beibehalten |@@| then maintain the previous-Gear throughout. +3499: 'If within 6 seconds it Shifts once above and once below the previous-Gear, +3500: 'then maintain the previous-Gear throughout. 3517: '--------------------------------Checks Part 2 ------------------------------------- 3518: 'Gear-shift from 2 to 1 are suppressed when v > 2.5 m/s 3519: 'NEU LUZ 040210: Hochschalten nur wenn im 2. Gang über Kuppeldrehzahl |@@| NEW LUZ 040210: Upshifting only when in 2nd Gear over Cluch-Revolutions 3524: 'bei verzoegerungsvorgaengen unter 2,5 m/s wird in Leerlauf geschaltet |@@| at decelerations below 2.5 m/s, shift to idle -3538: 'wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet |@@| wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet -3545: 'bei Beschleunigungsvorgaengen unter 1,5 m/s wird in 1. Gang geschaltet |@@| If v <0.1 m/s for more than 1 sec then shift to Gear=0 -3552: 'ueberpruefung, ob Drehzahl ueber nenndrehzahl, dann muss immer hochgeschaltet werden |@@| at Beschleunigungsvorgaengen below 1.5 m/s is used in 1 Gear is engaged -3553: 'checking if Revolutions above Nominal-Revolutions, then always Upshift -3562: 'otherwise lack the power! -3592: '-----------------------------------EV-Gear-shifting model (based on Cars(PKW)) -3593: 'Second 1 -------------------------------------- -3620: '--------------------------------First second: Find Gear / initialization -3622: '---------From second 2 -------------------------------------- -3623: 'Start-values --------- -3630: 'gangX = Last Gear ie Starting-base for Shifting-model -3633: '-------------------Clutch-lock check << already happened in Power.Calc -3640: '-----------Calculate Gear for the next 6 seconds --------------------- -3678: 'Shifting-function ---------- -3681: 'Revolutions-limit for Upshift, n_normiert (Idle = 0, Nominal-Revolutions = 1) -3684: 'Revolutions-limit for Downshift, n_normiert (Idle = 0, Nominal-Revolutions = 1) -3687: 'Convert here of Revolutions units to use (n/n_nominal): -3691: ' ''Revolutions with last Gear (gangX) -3694: 'Maximum permissible Gear-shifting every 2 seconds: -3703: 'Check whether Downshifting-gear, only when Revolutions decrease or Power increases -3711: 'Check whether Upshifting-gear, only when Revolutions increase or Power decreases -3720: 'Correct Gear-selection -3725: 'Not idle when Power > 0 -3729: 'New Revolutions -3743: 'Check if Gear within Power/Revolutions limits. Drag-operation is not respected -3755: 'Save Gears in field for later checks -3763: 'Accept Gear -3767: '--------------------------------Checks Teil 1------------------------------------- |@@| Add to Gang-sequence -3768: 'Checks Part 1 ------------------------------------- -3770: ''Checks to Purge non-sensible Gear-shift: -3780: ' ============>> Division into "IPhase(j)" stages: acceleration(=1), Deceleration(=2) and Cruise(=3): -3782: 'Already determined by VehState0 -3793: 'Search by last Gear-change -3799: 'Max permissible Gear-change every 3 seconds: -3800: 'Cruise-phases: -3801: 'Verzoegerungsphasen: Hochschalten wird unterdrückt |@@| As long Speed-change since last Gear-shift is under 6% and Pe/Pnom below 6%, do not run: -3802: 'Deceleration phases: Upshift suppressed -3823: 'Acceleration phases: Downshift?(Zurückschalten) suppressed -3824: 'durchgehend beibehalten |@@| If within 6 seconds switched back again to the previous Gear, stick -3836: 'Wenn innerhalb von 6 Sekunden einmal höher und einmal niedriger als voriger Gang |@@| to the previous Gear -3837: 'geschaltet wird, wird voriger Gang durchgehend beibehalten |@@| If within 6 seconds it Shifts once above and once below the previous-Gear, -3854: '--------------------------------Checks Teil 2------------------------------------- |@@| then maintain the previous-Gear throughout. -3855: 'Checks Part 2 ------------------------------------- -3856: 'Suppress Gear-shift from 2 to 1 when v > 2.5 m/s -3861: 'bei verzoegerungsvorgaengen unter 2,5 m/s wird in Leerlauf geschaltet |@@| NEW LUZ 040210: Upshift only when in 2 Gear over Clutch-revolutions -3875: 'wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet |@@| at decelerations below 2.5 m/s, shift to Idle -3882: 'bei Beschleunigungsvorgaengen unter 1,5 m/s wird in 1. Gang geschaltet |@@| If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 -3889: 'ueberpruefung, ob Drehzahl ueber nenndrehzahl, dann muss immer hochgeschaltet werden |@@| at acceleration processes below 1.5 m/s is used in first Gear is engaged -3890: 'Check whether Revolutions over Nominal-Revolutions, then should always Upshift, -3944: '-----------------------------------otherwise Power not enough! -3945: 'Second 1 -------------------------------------- -3982: '--------------------------------First second: Find Gear/Initialization -3984: '---------From second 2 -------------------------------------- -4014: 'Start-values --------- -4027: ' Compute power from jz to (jz + 6) ----------------- -4030: '(1) Nach Variante "schnelle Fahrweise" |@@| Calculated towards a Revolutions/Power model -4032: '1) "Fast Driving" variant -4033: 'Gear-shift only if v-change 5% since last Gear-shift -4045: 'VECTO: Commented out START -4047: 'VECTO: Commented out END -4050: 'Bei Aenderung der Steigung kann ebenfalls immer geschaltet werden: |@@| the first 10 seconds of the cycle can always be used for balancing gear-shifting: -4054: 'A Change in the Slope can always result in Gear-shift: -4061: 'Downshift: -4062: ' Upshift: -4063: ' dabei manchmal zu hoher gang -> Drehzahl und P_max viel zu nieder, daher nu bei niederen leistungen |@@| at Sloped-cycles with excessive speed the Gear i +1 is calculated -4064: ' hochschalten erlaubt: |@@| sometimes Gear is too high -> Revolutions and P_max too low, so only at low Power -4083: '(2) Nach Variante "sparsame Fahrweise" |@@| Upshift allowed: -4085: ' 2) "Economical Driving" Variant -4086: ' Downshift?(Zurueckschalten) happens only when Speed-change > 6% -4087: 'Always Upshift -4099: 'VECTO: Commented out START -4101: ' VECTO: Commented out END -4103: ' Bei Aenderung der Steigung kann ebenfalls immer geschaltet werden: |@@| The first 10 seconds cycle can always be used for balancing Gear-shift: -4107: ' When slope changes always may result in Gear-shift: -4117: 'Downshift: -4126: 'C Upshift, only if checked not the highest Gear: -4137: ' Relative Revolutions: -4138: ' der "sparsamen (..l)" Variante: |@@| Select Revolutions-relationship for the "fast (h ..)" and -4140: ' Drehzahlverhhealtnisse nach "Modellmix": |@@| the "economical (.. l)" Variant: -4141: ' anhand der erforderlichen maximalen Motorleistung ueber die |@@| Revolutions-relationship for "Modelmix": -4142: ' naechsten 6 Sekunden |@@| according to the required maximum Engine-power over the -4150: ' next 6 seconds -4151: ' (Determine the proportions between the Fast and the Economical Driving-style -4158: ' Hausberger model): -4159: ' (pmodell wird aus Eingabefile gelesen, = Anteil, zu der die Drehzahl |@@| Mix the calculated Gears as specified in the input file: -4160: ' nach "reales Modell" bestehen soll) |@@| from the Input-file it is read the pmodell = ratios of the revolutions -4165: ' Ermittlung des "virtuellen" aktuellen Ganges nach Modell |@@| towards a "real model") -4170: ' ueberpruefung, ob Drehzahl ueber nenndrehzahl, dann muss immer hochgeschaltet werden |@@| Determine the "virtual" up-to-date Gears from the Model -4171: ' check if Revolutions over Nominal-Revolutions, then must always upshift, -4181: ' otherwise Power not enough! -4182: ' Check whether required Power is over P_max (s) -4208: ' then Downshift?(zurueckgeschaltet): -4214: 'falls schlechte Vollastkurve ohne Moment in leerlauf wird korrigiert: |@@| Check whether Actual over P_max (s) -4217: ' Ueberpruefung, ob hoehere Leistung erforderlich ist als Maximalleistung bei nh |@@| if bad Full-load-curve without Torque, then correct in Idle: -4218: ' dann wird zurueckgeschaltet: |@@| Checking whether required Power is higher than maximum power at nh -4256: 'c Ende "Modell"-Basisgangwahl |@@| then Gear-shift-back?(zurueckgeschaltet): -4260: 'Kuppelschleif-check |@@| End "model"-Gear-selection basis -4263: '--------------------------------Checks Teil 1------------------------------------- |@@| Clutch-lock check -4264: 'Checks Part 1 ------------------------------------- -4265: 'Checks to Purge non-sensible Gear-shift: -4290: 'Division into "IPhase(j)" stages: Acceleration(=1), Deceleration(=2) and Cruise(=3): -4299: 'Search by last Gear-change -4304: 'Maximum permissible Gear-shifts every 3 seconds: -4305: 'Cruise-phases: -4306: 'As long Speed-change since last Gear-shift is below 6% and Pe/Pnom below 6% then do not Gear-shift: -4307: 'Deceleration-phases: Upshift suppressed -4326: 'Acceleration phases: Downshift?(Zurückschalten) suppressed -4327: 'If within 6 seconds switched back again to the previous Gear, then -4328: 'stick to previous Gear -4339: 'VECTO: Exception: on Full-load curve -4340: 'If within the 6 seconds, it shifts once to higher and once to lower-Gear than the previous one, then -4356: '--------------------------------stick to the previous Gear. -4357: 'Checks Part 2 ------------------------------------- -4358: 'Shifting from 2nd to 1st Gear is suppressed when v > 1.5 m/s -4363: 'bei verzoegerungsvorgaengen unter 1.5 m/s wird in Leerlauf geschaltet |@@| NEW LUZ 040210: Upshifting only when in 2nd Gear over the Clutch-revolutions -4375: 'wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet |@@| at decelerations below 1.5 m/s, shift to Idle -4383: 'If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 -4384: 'Check if Revolutions over Nominal-revolutions, then should always Upshift, -4424: 'otherwise Power not enough! -4437: 'Speed look-ahead -4438: 'Checks Gears for Cars(PKW) .... -4447: 'Bei verzoegerungsvorgaengen unter 2,5 m/s wird in Leerlauf geschaltet |@@| Gear-shifting from 2nd to 1st is suppressed at v > 2.5 m/s -4456: 'Wenn v mehr als 1 Sek. <0.1 m/s wird auf Gang=0 geschaltet |@@| At decelerations below 2.5 m/s, shift to Idle -4461: 'If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 -4488: 'When Speed?(Beschleunigungsvorgaengen) below 1.5 m/s, then shift to 1st Gear -4493: 'Function calculating the Power easily for Gear-shift-model -4508: 'Function calculating the Power easily for EV-shift-model -4552: '--------------Revolutions-setting -4561: '----------------Power in-front?(vor) of Diff = At Wheel ------------- -4566: '----------------Rolling-resistance---------------- -4591: '--------Drag-resistance---------------- -4593: 'Vehicle Acceleration-capability(Beschleunigungsleistung) -------- -4594: ' Previously (PHEM 10.4.2 and older) the m_raeder was used for Massered instead, with Massered = m_raeder + I_Getriebe * (Iachs / (0.5 * Dreifen)) ^ 2 -4598: '----------------The missing part (I_Getriebe * (Iachs / (0.5 * Dreifen)) ^ 2) is now considered by fPaG(V,a) -4603: '----------------Slope resistance ---------------- -4608: '-------------------Ancillaries(Nebenaggregate) ---------------- -4633: 'Transmission(Getriebe)------------------- -4636: 'Verluste berechnet (eignet sich nur für Schaltgetriebe) |@@| Power to Transmission (Transmission-output) -4637: ' Calculate Losses (suitable only for Manual-transmission(Schaltgetriebe)) -4638: ' Interpolation of the Transmission-power-loss -4662: '***Between 1 and 8 Gear, as well as between 9 and 16 Gear: -4663: ' Differential -4682: 'Power after Differential (before Transmission) -4692: ' Differential -4744: '----------------Power before Differential +3538: 'If v <0.1 m/s for more than 1 sec then shift to Gear=0 +3545: 'at Acceleration processes below 1.5 m/s, then shift to 1st Gear +3552: 'checking if Revolutions above Nominal-Revolutions, then always Upshift +3553: 'otherwise lack the power! +3562: 'EV-Gear-shifting model (based on Cars(PKW)) +3592: '-----------------------------------Second 1 -------------------------------------- +3593: 'First second: Find Gear / initialization +3620: '--------------------------------From second 2 -------------------------------------- +3622: '---------Start-values --------- +3623: 'gangX = Last Gear ie Starting-base for Shifting-model +3630: 'Clutch-lock check << already happened in Power.Calc +3633: '-------------------Calculate Gear for the next 6 seconds --------------------- +3640: '-----------Shifting-function ---------- +3678: 'Revolutions-limit for Upshift, n_normiert (Idle = 0, Nominal-Revolutions = 1) +3681: 'Revolutions-limit for Downshift, n_normiert (Idle = 0, Nominal-Revolutions = 1) +3684: 'Convert here of Revolutions units to use (n/n_nominal): +3687: 'Revolutions with last Gear (gangX) +3691: ' ''Maximum permissible Gear-shifting every 2 seconds: +3694: 'Check whether Downshifting-gear, only when Revolutions decrease or Power increases +3703: 'Check whether Upshifting-gear, only when Revolutions increase or Power decreases +3711: 'Correct Gear-selection +3720: 'Not idle when Power > 0 +3725: 'New Revolutions +3729: 'Check if Gear within Power/Revolutions limits. Drag-operation is not respected +3743: 'Save Gears in field for later checks +3755: 'Accept Gear +3763: 'Gang-Verlauf hinzufügen |@@| Add to Gang-sequence +3767: '--------------------------------Checks Part 1 ------------------------------------- +3768: 'Checks to Purge non-sensible Gear-shift: +3770: ''Division into "IPhase(j)" stages: acceleration(=1), Deceleration(=2) and Cruise(=3): +3780: ' ============>> Already determined by VehState0 +3782: 'Search by last Gear-change +3793: 'Max permissible Gear-change every 3 seconds: +3799: 'Cruise-phases: +3800: 'Solange Geschwindigkeitsaenderung seit letztem Gangwechsel unter 6% und Pe/Pnenn aenderung unter 6% wird nicht geschaltet: |@@| As long Speed-change since last Gear-shift is under 6% and Pe/Pnom below 6%, do not run: +3801: 'Deceleration phases: Upshift suppressed +3802: 'Acceleration phases: Downshift?(Zurückschalten) suppressed +3823: 'Wenn innerhalb von 6 Sekunden wieder in vorigen Gang zurueck geschaltet wird, wird der vorige Gang |@@| If within 6 seconds switched back again to the previous Gear, stick +3824: 'durchgehend beibehalten |@@| to the previous Gear +3836: 'Wenn innerhalb von 6 Sekunden einmal höher und einmal niedriger als voriger Gang |@@| If within 6 seconds it Shifts once above and once below the previous-Gear, +3837: 'geschaltet wird, wird voriger Gang durchgehend beibehalten |@@| then maintain the previous-Gear throughout. +3854: '--------------------------------Checks Part 2 ------------------------------------- +3855: 'Suppress Gear-shift from 2 to 1 when v > 2.5 m/s +3856: 'NEU LUZ 040210: Hochschalten nur wenn im 2. Gang über Kuppeldrehzahl |@@| NEW LUZ 040210: Upshift only when in 2 Gear over Clutch-revolutions +3861: 'bei verzoegerungsvorgaengen unter 2,5 m/s wird in Leerlauf geschaltet |@@| at decelerations below 2.5 m/s, shift to Idle +3875: 'wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet |@@| If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 +3882: 'at Acceleration below 1.5 m/s, then shift to 1st Gear +3889: 'Check whether Revolutions over Nominal-Revolutions, then should always Upshift, +3890: 'otherwise Power not enough! +3944: '-----------------------------------Second 1 -------------------------------------- +3945: 'First second: Find Gear/Initialization +3982: '--------------------------------From second 2 -------------------------------------- +3984: '---------Start-values --------- +4014: 'Compute power from jz to (jz + 6) ----------------- +4027: ' Berechnung nach Drehzahl/Leistung-Modell |@@| Calculated towards a Revolutions/Power model +4030: '(1) "Fast Driving" variant +4032: 'Gear-shift only if v-change 5% since last Gear-shift +4033: 'VECTO: Commented out START +4045: 'VECTO: Commented out END +4047: 'in ersten 10 Zyklussekunden kann zum Einregulieren immer geschlatet werden: |@@| the first 10 seconds of the cycle can always be used for balancing gear-shifting: +4050: 'A Change in the Slope can always result in Gear-shift: +4054: 'Downshift: +4061: 'Upshift: +4062: ' bei Steigungszyklen mit zu hohen Geschwindigkeiten wird geschw. i+1 erst nach gangwahl berechnet |@@| at Sloped-cycles with excessive speed the Gear i +1 is calculated +4063: ' dabei manchmal zu hoher gang -> Drehzahl und P_max viel zu nieder, daher nu bei niederen leistungen |@@| sometimes Gear is too high -> Revolutions and P_max too low, so only at low Power +4064: ' hochschalten erlaubt: |@@| Upshift allowed: +4083: '(2) "Economical Driving" Variant +4085: ' Downshift?(Zurueckschalten) happens only when Speed-change > 6% +4086: ' Always Upshift +4087: 'VECTO: Commented out START +4099: 'VECTO: Commented out END +4101: ' in ersten 10 Zyklussekunden kann zum einregulieren immer geschlatet werden: |@@| The first 10 seconds cycle can always be used for balancing Gear-shift: +4103: ' When slope changes always may result in Gear-shift: +4107: ' Downshift: +4117: 'Upshift, only if checked not the highest Gear: +4126: 'C Relative Revolutions: +4137: ' Auswahl des Drehzahlverhaeltnisses aus der "schnellen (..h)" und |@@| Select Revolutions-relationship for the "fast (h ..)" and +4138: ' der "sparsamen (..l)" Variante: |@@| the "economical (.. l)" Variant: +4140: ' Drehzahlverhhealtnisse nach "Modellmix": |@@| Revolutions-relationship for "Modelmix": +4141: ' anhand der erforderlichen maximalen Motorleistung ueber die |@@| according to the required maximum Engine-power over the +4142: ' next 6 seconds +4150: ' Determine the proportions between the Fast and the Economical Driving-style +4151: ' (Hausberger model): +4158: ' Mix der berechneten Gaenge gemaess Vorgabe in Eingabefile: |@@| Mix the calculated Gears as specified in the input file: +4159: ' (pmodell wird aus Eingabefile gelesen, = Anteil, zu der die Drehzahl |@@| from the Input-file it is read the pmodell = ratios of the revolutions +4160: ' nach "reales Modell" bestehen soll) |@@| towards a "real model") +4165: ' Ermittlung des "virtuellen" aktuellen Ganges nach Modell |@@| Determine the "virtual" up-to-date Gears from the Model +4170: ' check if Revolutions over Nominal-Revolutions, then must always upshift, +4171: ' otherwise Power not enough! +4181: ' Check whether required Power is over P_max (s) +4182: ' then Downshift?(zurueckgeschaltet): +4208: ' Eigentliche Ueberpruefung ob ueber P_max(n) |@@| Check whether Actual over P_max (s) +4214: 'falls schlechte Vollastkurve ohne Moment in leerlauf wird korrigiert: |@@| if bad Full-load-curve without Torque, then correct in Idle: +4217: ' Ueberpruefung, ob hoehere Leistung erforderlich ist als Maximalleistung bei nh |@@| Checking whether required Power is higher than maximum power at nh +4218: ' dann wird zurueckgeschaltet: |@@| then Gear-shift-back?(zurueckgeschaltet): +4256: 'c Ende "Modell"-Basisgangwahl |@@| End "model"-Gear-selection basis +4260: 'Kuppelschleif-check |@@| Clutch-lock check +4263: '--------------------------------Checks Part 1 ------------------------------------- +4264: 'Checks to Purge non-sensible Gear-shift: +4265: 'Division into "IPhase(j)" stages: Acceleration(=1), Deceleration(=2) and Cruise(=3): +4290: 'Search by last Gear-change +4299: 'Maximum permissible Gear-shifts every 3 seconds: +4304: 'Cruise-phases: +4305: 'As long Speed-change since last Gear-shift is below 6% and Pe/Pnom below 6% then do not Gear-shift: +4306: 'Deceleration-phases: Upshift suppressed +4307: 'Acceleration phases: Downshift?(Zurückschalten) suppressed +4326: 'If within 6 seconds switched back again to the previous Gear, then +4327: 'stick to previous Gear +4328: 'VECTO: Exception: on Full-load curve +4339: 'If within the 6 seconds, it shifts once to higher and once to lower-Gear than the previous one, then +4340: 'stick to the previous Gear. +4356: '--------------------------------Checks Part 2 ------------------------------------- +4357: 'Shifting from 2nd to 1st Gear is suppressed when v > 1.5 m/s +4358: 'NEU LUZ 040210: Hochschalten nur wenn im 2. Gang über Kuppeldrehzahl |@@| NEW LUZ 040210: Upshifting only when in 2nd Gear over the Clutch-revolutions +4363: 'bei verzoegerungsvorgaengen unter 1.5 m/s wird in Leerlauf geschaltet |@@| at decelerations below 1.5 m/s, shift to Idle +4375: 'If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 +4383: 'Check if Revolutions over Nominal-revolutions, then should always Upshift, +4384: 'otherwise Power not enough! +4424: 'Speed look-ahead +4437: 'Checks Gears for Cars(PKW) .... +4438: 'Schalten von 2. in 1. Gang wird bei v>2,5 m/s unterdrueckt |@@| Gear-shifting from 2nd to 1st is suppressed at v > 2.5 m/s +4447: 'Bei verzoegerungsvorgaengen unter 2,5 m/s wird in Leerlauf geschaltet |@@| At decelerations below 2.5 m/s, shift to Idle +4456: 'If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 +4461: 'When Acceleration below 1.5 m/s, then shift to 1st Gear +4488: 'Function calculating the Power easily for Gear-shift-model +4493: 'Function calculating the Power easily for EV-shift-model +4508: 'Revolutions-setting +4552: '--------------Power in-front?(vor) of Diff = At Wheel ------------- +4561: '----------------Rolling-resistance---------------- +4566: '----------------Drag-resistance---------------- +4591: '--------Vehicle Acceleration-capability(Beschleunigungsleistung) -------- +4593: 'Previously (PHEM 10.4.2 and older) the m_raeder was used for Massered instead, with Massered = m_raeder + I_Getriebe * (Iachs / (0.5 * Dreifen)) ^ 2 +4594: ' The missing part (I_Getriebe * (Iachs / (0.5 * Dreifen)) ^ 2) is now considered by fPaG(V,a) +4598: '----------------Slope resistance ---------------- +4603: '----------------Ancillaries(Nebenaggregate) ---------------- +4608: '-------------------Transmission(Getriebe)------------------- +4633: 'Leistung nach Getriebe (Getriebeausgang) |@@| Power to Transmission (Transmission-output) +4636: 'Calculate Losses (suitable only for Manual-transmission(Schaltgetriebe)) +4637: ' Interpolation of the Transmission-power-loss +4638: ' Between 1 and 8 Gear, as well as between 9 and 16 Gear: +4662: '***Differential +4663: ' Power after Differential (before Transmission) +4691: '***Differential +4692: ' Power before Differential +4744: '----------------Gearbox inertia ---------------- >>> MODcalc\cVh.vb -15: 'From DRI file -18: 'Calculated -58: 'Geschwindigkeit |@@| Route(Weg)Correct -69: 'Speed -79: 'Original-speed is longer by 1 -87: 'Steigung |@@| Segment (from Intermediate-seconds, otherwise Error) -99: 'Slope -112: 'Gear - but not Averaged, rather Gang(t) = DRI.Gear(t) -132: 'Calculate Acceleration -157: 'Vair specifications: Not in Intermediate-seconds! -169: 'Speed -177: 'Steigung |@@| Segment -189: 'Slope -202: 'Gear - not Averaged, rather Gear(t) = DRI.Gear(t) -257: 'Calculate Acceleration -273: 'TODO: If veh faster than cycle ... -279: 'Falls nächsten Zeitschritt löschen näher an Wegvorgabe als aktueller Weg => Nächsten Zeitschritt löschen |@@| If the repeating Time-step is closer to the Specified-route than the Actual-route => Repeat Time-step -291: 'Keine Korrektur |@@| If the next Time-step to Delete closer to specified Route than the Actual-route => Delete Next Time-step +5: 'From DRI file +15: 'Calculated +18: 'WegKor |@@| Route(Weg)Correct +58: 'Speed +69: 'Original-speed is longer by 1 +79: 'Strecke (aus Zwischensekunden sonst passiert Fehler) |@@| Segment (from Intermediate-seconds, otherwise Error) +87: 'Slope +99: 'Gear - but not Averaged, rather Gang(t) = DRI.Gear(t) +124: 'Calculate Acceleration +132: 'Vair specifications: Not in Intermediate-seconds! +157: 'Speed +169: 'Strecke |@@| Segment +177: 'Slope +189: 'Gear - not Averaged, rather Gear(t) = DRI.Gear(t) +214: 'Calculate Acceleration +257: 'TODO: If veh faster than cycle ... +273: 'Falls Zeitschritt wiederholen näher an Wegvorgabe als aktueller Weg => Zeitschritt wiederholen |@@| If the repeating Time-step is closer to the Specified-route than the Actual-route => Repeat Time-step +279: 'Falls nächsten Zeitschritt löschen näher an Wegvorgabe als aktueller Weg => Nächsten Zeitschritt löschen |@@| If the next Time-step to Delete closer to specified Route than the Actual-route => Delete Next Time-step +291: 'No correction >>> MODcalc\Em Calc.vb -101: 'Normal interpolation -185: 'First two seconds, no correction: -208: 'Create Dictionaries -220: 'Calculate sums -243: '************************************ 'Mean-values -258: '***** Cycle Mean-values ************************************ -261: '***** Measurement-value -264: '***** PHEM value -279: 'Diff - CAUTION: No Pnom normalization! Beware of the Dynamic-correction! -282: 'Average values over x seconds and imediately put au -286: 'Set to zero -292: 'Messwert |@@| Accumulate(Aufsummieren) -295: 'Measurement-value -311: '************************************ PHEM-value -324: 'Dump Modal '************************************ -328: 'Measurement-value -332: 'PHEM-value -351: 'Diff - CAUTION: No Pnominal-normalized! Beware of the Dynamic-correction! -355: 'Header and write units -358: 'Average Values over x seconds and imediately set au -371: 'to zero -388: 'Ausgabe |@@| Accumulati(Aufsummieren) -399: 'Output -402: 'Measurement-values -563: 'C PHEM-value -564: 'C Konstantfahrt: |@@| Load-cycle(lastwechsel) (general Qualification(Bedingung ) except for Intervals with -572: 'C Damit werden Trapezfoermige Zyklen nicht als lastwechsel erkannt |@@| Constant-traveling: -573: 'C da LWje = 0. In diesem fall wird voraus der naechste Wert gesucht, |@@| Thus Trapezoid-Cycles are not recognized as Load-cycle(lastwechsel) -574: 'C der nicht gleich Pe(jz) ist. Dieser wird anstelle von Pe(jz+1) |@@| since LWje = 0. In this case, search ahead of next Value, -575: 'C gesetzt: |@@| which is not equal to Pe(jz). -603: 'C lastwechsel werden nur als solche gezaehlt, wenn sie mehr als 0.05% von |@@| This will replace Pe(jz +1): -604: 'C Pnenn betragen (sonst ist Ergebnis viel zu wackelig): |@@| Load-cycles(lastwechsel) are accounted as such only if they exceed 0.05% of Pnom -605: 'C (Lastwechsel wird gezaehlt, wenn LWja < 0) |@@| otherwise Outcome is too unstable): -609: 'C (1) Mittlere Amplitude vom Pe-Verlauf ("Ampl") |@@| accounted as Load-cycle(lastwechsel) when LWja < 0) -610: 'C Zwischenrechnung fue Zyklusmittelwert: |@@| 1) Mean Amplitude of the running(Verlauf) Pe ("Ampl") -617: 'C Berechnung der mittleren Amplitude in 3 Sekunden vor Emission (Ampl3s) |@@| Intermediate calculation of Cycle-average: -618: 'C und der Anzahl der Pe-Sekundenschritten ueber 3% der Nennleistung |@@| Calculate the mean Amplitude in 3 seconds of(vor) Emissions (Ampl3s) -619: 'C (and the number of Second-steps where Pe is 3% above the Nominal-power -664: 'C 2) Change the current Engine-power (dP_2s): -672: 'C Gezaehlt nur bei dynamischem betrieb: |@@| Average 3 sec of(vor) Emission: -681: 'C (Counted only in dynamic operation: -687: 'C 4) Average of the negative Engine-power ("PnegMW"): -695: 'C Gezaehlt nur bei dynamischem betrieb: |@@| Average 3 sec of(vor) Emission: -707: 'C Counted only in dynamic operation: -708: 'C Addition der Amplituden von Pe (1. Pe-Wert |@@| Calculation of absolute Dynamic-map sizes: -709: 'C Addition of Pe Amplitudes (1 Pe-Value -710: 'C is counted also for Maxima and for Minima Amplitudes ) -714: 'C First Second: -717: 'C 2. Second to End: -792: 'Absolute-value: -805: 'Speed/Accel-dependent parameters only when not Eng-Only -806: ' ...Dynamic-parameters as the Differential of Dynamics of the Map -812: 'was here before. Now in its own method because of KF-creation invalidity -838:''' Dynamic parameters as the Differential of Dynamics in the Map: -846: '! Class for calculating the Exhaust-temperatures -895: '**** Einlesen von tgas aus .npi (Projekt HERO) **** |@@| Fields for Quantities from PHEM main-program -896: ' => Reading about tgas from .npi (Project HERO) **** -897: ' Luz/Rexeis 16.05.2011 |@@| overwrites tgas(jz) over(aus) HtMass() -916: '! Main-routine for EXS module -921: '! Calling from Exs_Main(true) -> Developer Version without PHEM main-program -951: 'Fields for Quantities from exs-file -955: '!General Constants -956: '!Exhaust Physical-values: -958: 'insensitive vs. lambda, see "Stoffwerte_vollständigeVerbrennung_neu.xls" -964: '!cp_exh = 1054.0 '!Exhaust heat-capacity [J/(kg*K)] is no longer used because it is now calculated directly in Abh from T and Lambda -965: '!Note: Average-value from searching the Internet, found no information in literature -967: 'Reaktionsenthalpien in J/mol |@@| calibrated based on Test Thermocouple assuming Coating-thickness(Schichtdicke) 0.1mm -972: 'Molmassen |@@| Reaction-enthalpies in J/mol -977: 'Molecular-weights -985: 'Compatibility with old EXS-structure Introduced before the new Concept for Em-components with cMap-class tMAP-class, etc. -1006: 'References for Emissions: The given, if available, otherwise the calculated -1025: 'Dimensioning: -1026: 'In DEV direkt aus der Datei *.phe eingelesen |@@| Return of the relevant Quantities from(aus) the PHEM main-program -1045: 'Read in DEV directly from the *. phe file -1056: 'Anfang exs-File einlesen |@@| It is allocated below because there must be further mpexh -1072: 'Begin readning exs-file -1079: 'dummy = DatExs.ReadLine(0) 'old dummy line: caution for exs-file compatibility -1085: 'Initialize the respective Number of Modules -1088: 'Reading of the Data-blocks for each Module -1096: 'Error-message in TempMod(iMod).Read(DatExs) -1100: 'End reading exs-file -1121: 'Beginning reading csy-file -1133: 'End reading csy-file -1135: 'Calculation loop: Per Time-step / per Module: 1. Temperatures, 2. Conversions -1139: ' Display per-second Results on each iteration Results -1159: ' Write Header *.ter -1169: 'Write the Header for KonvMods -1174: 'Start-values ​​for Cooling-system simulation: -1189: 'Heat transfer into the Cooling-system (Map) -1191: 'Cooling-System Simulation -1195: 'Heat inputs in Masses 1 and 2 -1199: 'The Heat-transfer Mass 1 and 2 for Cooling -system -1205: 'Bulk-temperatures for the next Time-step -1208: 'Heat-loss to the outside -1218: 'Total Heat-input into the Cooling-system (Output value of the simulation) -1219: 'Calculation of the Exhaust-gas-flow from a given Fuel-consumption and lambda -1220: 'Permitted only for engines without EGR -1221: 'Unit mpexh ....... [kg/s] -1222: 'Unit Vpexh ....... [m3/s] -1224: '!Case 1: Calculation of Consumption and lambda -1231: 'Case 2: Calculation of pumped Airflow through engine -1239: 'Missing: Methodology for Mass-flow calculation for EGR Engines BMW HERO Project -1252: 'Calculate Lambda if not explicitly given -1253: 'The First Module in the Exhausts-system may not be a catalytically active Element, -1269: 'therefore, emissions are always equal to the untreated emissions from the PHEM main-program -1273: 'Calculate Qp_reak: Mass-flow-rate * Conversion * Reactive-enthalpy / molar-mass -1277: 'Compute Pollutant-components -1291: 'Conversion of NOx, CO, HC -> old value * (1-conversion-rate) -1304: 'Zeile in *.ter schreiben |@@| If Module has no Conv-element changes nothing (Note: Module 1 has always ModTyp0) -1323: 'Write Line in *.ter. -1326: 'End Calculation-loop -1338: '---------- Close all second-by-second Result-files -1340: 'Abbruchbedingung: Temperatur des Massenelementes "t_m" des in "iter_pos" spezifizierten Moduls |@@| Query return in the iterative Calculation-mode for Starttemp ------------------- -1341: 'am Beginn und am Ende des Zyklus innerhalb vorzugebender Bandbreite "iter_tol" |@@| Termination-condition: Temperature of the Mass-elements "t_M" in the "iter_pos" specified module -1417: '--- Ausgabefile *.ter schreiben ---------------------------------------------------------- |@@| at the Beginning and End of the Cycle within vorzugebender bandwidth "iter_tol" -1419: '--- Write Output-file *. Ter --------------------------------------------- ------------- -1422: 'End wrtting Output-file *. ter -------------------------------------------- --------- -1431: ''' Clean up -1433: ''' <Class for Temperature-modules -1492: ''' remarks>Type of module is defined with Mod\typ </remarks> -1494: ''' <Reading the EXS file -1512: 'Pfad für Konvertierungsraten bei Modulen mit Konvertierung |@@| param name="Datei"> File-handler </param> -1520: 'Path to Conversion-rates for Modules with Conversion -1561: 'Initialize the modules & Read the Parameter-files, depending on Module -1563: 'Heat-transfer factor -1565: 'surface of exterior -1567: 'Faktoren für Wärmeübergänge nach außen |@@| Emissivity -1571: 'Factors for Heat-transfer to the outside -1574: 'Factors for Temperature related t_katsubstrat <-> t_kat_außen -1576: 'Cooling-mass curve -1578: 'Normalized Cross-sectional area -1580: 'Durchmesser Thermoelement |@@| average backpressure(Gegendruck) -1583: 'Thermocouple Diameter -1595: 'Thermocouple Cooling-curve -1621: 'Heat-transfer-Factors to the outside -1629: 'Check whether Tgas given in Cycle: -1638: 'Zusätzlich berechnete Parameter für Rohrmodule: |@@| Normalize(Entnormierungen) and Calculating other Variables -1650: 'Additionally calculated parameters for Pipe-module: -1653: 'Geometrische Größen berechnen |@@| For Flow-calculations in SI-units is Querschnittsfäche converted into m2 -1654: 'Geometrical Quantities calculated -1655: 'Note: it is assumed that temperature sensors are -1660: ' centered in the Pipe -1661: ' umströmter Zylinder vernachlässigt |@@| Note: Ball joint on t-sensor tip is neglected -1663: 'Abkühlkurven einlesen |@@| in the analysis of Airstream-cylinder -1691: ''' Read Cooling-curves -1708: 'Heat-transfer mass -1711: 'Setting Threshold for Precision of the Temperature-calculation (needed for iterative Calculation-mode) -1730: 'Return the Inlet-temperature of the Exhaust-gas from the Module above or from the Engine -1733: '! Calculation of the current Mass-temperature -1739: 'Falls Motor Aus wird nach Abkühlkurve gerechnet und Methode verlassen: |@@| at n_iter > 0 the Final-value is already assigned to the last Iteration -1761: 'Wärmekapazität (vgl. Bogdanic) |@@| If Engine-OFF, wait Cooling-curve and exit method: -1780: 'Heat-capacity (see Bogdanic) -1788: ' Iteration-loop for Heat-transfer -1794: 'Termination-criterion below -1803: 'Determining the Temperature of the Exhaust-gas at the Center of Mass ("t_gas_mid") consists of a non-linear (logarithmic) Temperature-curve(verlauf) -1807: 'Heat-transfer Convection inside all Modules (except for Pipe) -1809: 'for Pipe-modules: -1811: 'Nusselt Number: Density = 345/t_gas_mid, Term in Parenthesis: mu_Rohr / mu_Mitte -1815: 'Heat-transfer (Convection inside) d_pipe, in m: char. Length -1820: 'Heat-capacity (see Bogdanic) -1838: 'Termination-criterion: Change of the Exhaust Outlet-temperature compared to the last Iteration-step smaller than Threshold -1840: 'Calculate the Heat loss of the "thermal mass" to the outside -1841: 'Parameters are read from EXS file: -1842: ' Data for MuD: -1843: ' Oberfl_Kat = 0.12 'Surface for Heat-transfer in m^2 -1846: 'Empirische Formel, passt für alle Rollentests recht gut |@@| Emiss = 0.5 'emissivity -1848: 'Anm.: Versuch mit direkter Abhängigkeit von t_m -> funktioniert nicht gut |@@| Empirical formula, suitable for all OK Roll-tests -1850: 'Note: Tests with direct Dependence on t_m -> does not work well -1852: 'Heat-loss by Radiation -1856: 'Heat-loss by Convection -1857: 'Parameters are read from EXS file: -1858: ' Data for MuD: -1859: ' Module 3: -1860: ' Oberfl_Mod3 = 0.169457508 'Surface for Heat-transfer in m^2 -1863: ' Modul Nr. 4: |@@| Emiss = 0.5 'emissivity -1864: ' Module 4: -1865: ' Emiss = 0.9 'Emissivität |@@| Oberfl_Mod4 = 0.103596481 'Surface for Heat-transfer in m^2 -1869: 'Wärmeverlust durch Strahlung = Sichtfaktor * Emissivität * St.-Boltzm.-Konst * Oberfläche * (T_Rohr^4 - T_Umgebung^4) |@@| Emiss = 0.9 'emissivity -1871: 'Heat-loss by Radiation = View_factor * Emissivity * St.-Boltzm.-const * Surface * (T_Pipe^4 - T_Environ^4) -1874: 'Heat-loss by Convection = Heat_transfer_coefficient * Surface * (T_Pipe - T_Environ) -1879: 'Standard: Crad constant, no Loss by Convection -1886: ''' Total-heat-loss -1899: 'Thermocouple-Heat-transfer -1912: '!Formelwerk Berechnung Wärmeübergang am umströmten Zylinder |@@| If Engine-OFF, wait for Cooling-curve and exit method: -1921: 'Formula Calculating Heat-transfer-flow around the Cylinder -1922: 'Simplified solution of the Heat-flow-equation for the t-sensor -1924: 'Zeitdiskrete Lösung der PT1-Diffgl |@@| corresponds to a Diffgl. for a PT1 section(glied) -1991: ''Discrete-time Solution of the PT1-Diffgl -2003: 'Extrapolation for LastTemp > TempAR(0) -2005: 'Extrapolation for LastTemp < TempAR(Adim) -2041: 'Klasse initialisiert als Unterelement von TempMod |@@| One Time-step forward(vor)( =1 second) -2047: 'c Class initialized as a Subelement of TempMod -2049: 'c Prefix "c" means: use Cycle-value for Characteristic-correction -2053: 'Index "cc" means: Value of Charachteristic-curve (-> "c" - "cc" is the Derivative, corrected) -2105: 'Specify Filename for per-second Output-file -2126: 'Abort if given no NOx -2149: ' t-SCR (° C), deNOx (1-NOx-Exhaust/NOx-Raw), t-upstream (°C), NOx-raw (g/h)/kW_Nominal-power, total NOx over 60sec before g/h)/kW_Nominal-power, space velocity (1/h) -2150: ' Program to simulate SCR-fleet-model -2151: ' Note: deNOx values less than zero are possible: -2162: ' this corresponds to higher NOx-raw level than in the Base-map -2164: ' 1.) Calculation of per-second Values ​​for Input-variables of the SCR-model -2165: ' a.) t_SCR: combined-weight of t_upstream and t_downstream -2166: ' Temperaturmodelwerte (zB bei Kaltstart) werden nicht überschrieben |@@| SCR-model-internally there are Temperatures between 50 ° C and 500 ° C limits -2172: ' Temperature-model-values (eg Cold-start) will not be overwritten -2173: ' b.) t_up, NOxraw, SV. 20s Moving-average in the past -2187: ' Formula applied also to the first 20 seconds -2188: ' c.) NOx60s: Sum over the last 60s of the specific NOx-raw emissions -2194: ' Formula applied to the first 60 seconds -2201: ' for seconds 1-59 must Extrapolate total-value -2213: ' Calculation of deNOxmin value from Characteristic-curves at 50 ° C -2215: ' 2.) Calculation deNOx -2225: 'c a.) deNOx of characteristic: -2228: 'c b.) If correction criteria are met: deNOx-correction compared against Characteristic -2238: 'c t_up from characteristics: -2248: 'c NOx_raw of characteristics: -2258: 'c Sum of the NOxraw in the last 60 seconds from characteristics: -2276: 'Schreiben der Ergebnisse auf die standardisierten Variablen eEmKomp (iSchad, jz) und Qp_reak(jz) |@@| Space/Velocity from(aus) characteristics: -2312: ''' SCR Modell |@@| Write the results on the standardized variables eEmKomp (iSchad, jz) and Qp_reak (jz) -2319: 'SCR model -2325: 'c Class initialized as a Subelement of TempMod -2327: 'c Prefix "c" means: use Cycle value for Characteristic-correction -2331: 'Index "cc" means: Value of Characteristic (-> "c" - "cc" is the Derivative, corrected) -2385: 'Specify Filename for per-second Output-file -2405: 'Abort if no NOx given -2429: ' Programm zur Simulation SCR-Flottendurchschnitt |@@| t-SCR (° C), deNOx (1-NOx-Exhaust/NOx-raw), t-upstream (° C), NOx-raw (g/h) / kW_Nominal-power, total NOx over 60sec before g/h)/kW_Nominal-power, space velocity (1/h) -2430: ' Program to Simulate SCR-fleet-model -2431: ' Note: deNOx with values less than zero are possible: -2443: ' this corresponds to higher NOx-raw level than in the Base-map -2445: ' 1.) Calculation of per-second Values ​for Input-variables of the SCR model -2446: ' a) t_SCR: combined-weight of the t_upstream and t_downstream -2447: ' Temperaturmodelwerte (zB bei Kaltstart) werden nicht überschrieben |@@| SCR model internally there are temperatures between 50 ° C and 500 ° C limits -2453: ' Temperature-model values (eg cold start) will not be overwritten -2454: ' b.) t_up, NOxraw, SV. 20s moving average in the past -2470: ' Formula applies to the first 20 seconds -2471: ' c.) NOx60s: Sum over the last 60s of the specific NOx-raw emissions -2479: ' Formula applies to the first 60 seconds -2486: ' For seconds 1 to 59 must sum the projected values -2498: ' Calculation of the Characteristic-curves for deNOxmin values at 50 ° C -2500: ' 2.) Calculation of deNOx -2510: 'c a.) Characteristic of deNOx: -2513: 'c b.) If Correction-criteria are met: Correct deNOx against the Characteristic -2523: 'c Characteristic of t_up: -2533: 'c Characteristic-curve of the NOx_raw: -2543: 'c Sum of NOxraw in the last 60 seconds of Characteristic-curve: -2561: 'Characteristic-curve of Distnace-Speed(Raumgeschwindigkeit): -2593: ''' Write the results on the standardized variables eEmKomp(iSchad, jz) and Qp_reak(jz) -2600: 'KAT-model -2606: 'Class initialized as a Sub-element of TempMod -2627: ''' Mapped-data -2642: ''' Creating a new CAT module -2644: ''' <Interpolation-Function -2645: ''' <param name="x">Mass-flow(Massenstrom)</param> -2646: ''' <param name="y"> Temperature before(vor) KAT </param> -2647: ''' <param name="MapID">The MapID of the corresponding Exhaust-gas-component</param> -2648: ''' <returns>The interpolated value for x and y from the Map</returns> -2660: ''' remarks> It calculates the converted rate of the appropriate Exhaust-gas-component from the Mass-flow temperature Map</remarks> -2662: ''' <Reading the Maps for Conversion-rates -2716: 'param name="Name">Filename</param> -2719: 'Units (are not evaluated) -2731: 'Values -2742: 'Set KonvRaten to Zero when no component given -2750: 'Triangulating -2763: ''' define Dic. for modal Konvrate -2765: ''' <Calculation of the Conversion-rate from Map -2766: ''' <param name="jz">Time</param> -2768: 'remarks> Used to calculate the temperature of the Thermoelements on Kateingang (corresponds to Module-number i-1)!</remarks> -2784: ''' Conversion-rate calculated from Map -2796: ''' Header for Output-file -2798: ''' <Data for Output-file -2819: ''' param name="jz">Time</param> -2835: 'C Interface to Converter-classes cScrMod, cDocMod, etc. .. -2836: 'C uebergeben wid "such" als X-Wert, der dann als berechneter Y-Wert wieder zurueck gegeben wird |@@| Subroutine of(zu) PHEM for linear Interpolation of a Polygon (eg called by Vissimzs.for) -2837: 'C Zu Belegen sind vorher: |@@| It is given the X-value to "search", and it gives back the calculated Y-value -2838: 'C Xis(j) und Yis(j) |@@| for previous Allocation: -2839: 'c Xis(j) and Yis(j) -2850: 'C Given the desired Value(search) and the Number of the existing Polygon-points (izpl) -2851: 'c Search the closest points of the Revolutions from the input Full-load curve: -2862: 'C Distance to Input-points and Search those Points with the smallest Distance: -2868: '!Fix the second Interpolation-points (only interpolation, no extrapolation) -2874: '!Extrapolation up -2879: 'c Extrapolation down -2887: 'c Sort the 2 Values by ascending n: +54: 'Normal interpolation +101: 'First two seconds, no correction: +185: 'Create Dictionaries +208: 'Calculate sums +220: 'Mean-values +243: '************************************ 'Cycle Mean-values ************************************ +258: '***** Measurement-value +261: '***** PHEM value +264: '***** Diff - CAUTION: No Pnom normalization! Beware of the Dynamic-correction! +279: 'Average values over x seconds and imediately put au +282: 'Set to zero +286: 'Aufsummieren |@@| Accumulate(Aufsummieren) +292: 'Measurement-value +295: 'PHEM-value +311: '************************************ Dump Modal '************************************ +324: 'Measurement-value +328: 'PHEM-value +332: 'Diff - CAUTION: No Pnominal-normalized! Beware of the Dynamic-correction! +351: 'Header and write units +355: 'Average Values over x seconds and imediately set au +358: 'to zero +371: 'Aufsummieren |@@| Accumulati(Aufsummieren) +388: 'Output +399: 'Measurement-values +402: 'PHEM-value +563: 'C Lastwechsel (allgemeine Bedingung ausser bei Intervallen mit |@@| Load-cycle(lastwechsel) (general Qualification(Bedingung ) except for Intervals with +564: 'C Konstantfahrt: |@@| Constant-traveling: +572: 'C Damit werden Trapezfoermige Zyklen nicht als lastwechsel erkannt |@@| Thus Trapezoid-Cycles are not recognized as Load-cycle(lastwechsel) +573: 'C da LWje = 0. In diesem fall wird voraus der naechste Wert gesucht, |@@| since LWje = 0. In this case, search ahead of next Value, +574: 'C der nicht gleich Pe(jz) ist. Dieser wird anstelle von Pe(jz+1) |@@| which is not equal to Pe(jz). +575: 'C gesetzt: |@@| This will replace Pe(jz +1): +603: 'C lastwechsel werden nur als solche gezaehlt, wenn sie mehr als 0.05% von |@@| Load-cycles(lastwechsel) are accounted as such only if they exceed 0.05% of Pnom +604: 'C Pnenn betragen (sonst ist Ergebnis viel zu wackelig): |@@| otherwise Outcome is too unstable): +605: 'C (Lastwechsel wird gezaehlt, wenn LWja < 0) |@@| accounted as Load-cycle(lastwechsel) when LWja < 0) +609: 'C (1) Mittlere Amplitude vom Pe-Verlauf ("Ampl") |@@| 1) Mean Amplitude of the running(Verlauf) Pe ("Ampl") +610: 'C Zwischenrechnung fue Zyklusmittelwert: |@@| Intermediate calculation of Cycle-average: +617: 'C Berechnung der mittleren Amplitude in 3 Sekunden vor Emission (Ampl3s) |@@| Calculate the mean Amplitude in 3 seconds of(vor) Emissions (Ampl3s) +618: 'C and the number of Second-steps where Pe is 3% above the Nominal-power +650: 'C (2) Change the current Engine-power (dP_2s): +664: 'C Mittelwert 3 sec. vor Emission: |@@| Average 3 sec of(vor) Emission: +672: 'C Counted only in dynamic operation: +681: 'C (4) Average of the negative Engine-power ("PnegMW"): +687: 'C Mittelwert 3 sec. vor Emission: |@@| Average 3 sec of(vor) Emission: +695: 'C Counted only in dynamic operation: +707: 'C Berechnung der absoluten Dynamikkenngroessen: |@@| Calculation of absolute Dynamic-map sizes: +708: 'C Addition of Pe Amplitudes (1 Pe-Value +709: 'C is counted also for Maxima and for Minima Amplitudes ) +710: 'C First Second: +714: 'C 2. Second to End: +717: 'C Absolute-value: +792: 'Speed/Accel-dependent parameters only when not Eng-Only +805: 'Dynamic-parameters as the Differential of Dynamics of the Map +806: ' ...was here before. Now in its own method because of KF-creation invalidity +812: 'Dynamic parameters as the Differential of Dynamics in the Map: +838:''' Class for calculating the Exhaust-temperatures +846: '! Felder für Größen aus PHEM Hauptprogramm |@@| Fields for Quantities from PHEM main-program +895: '**** Reading about tgas from .npi (Project HERO) **** +896: ' => überschreibt tgas(jz) aus HtMass() |@@| overwrites tgas(jz) over(aus) HtMass() +912: ''' Main-routine for EXS module +916: '! Calling from Exs_Main(true) -> Developer Version without PHEM main-program +921: '! Fields for Quantities from exs-file +951: 'General Constants +955: '!Exhaust Physical-values: +956: '!insensitive vs. lambda, see "Stoffwerte_vollständigeVerbrennung_neu.xls" +958: 'cp_exh = 1054.0 '!Exhaust heat-capacity [J/(kg*K)] is no longer used because it is now calculated directly in Abh from T and Lambda +964: '!Note: Average-value from searching the Internet, found no information in literature +965: '!kalibriert anhand Test an Thermoelement unter Annahme von Schichtdicke 0.1mm |@@| calibrated based on Test Thermocouple assuming Coating-thickness(Schichtdicke) 0.1mm +967: 'Reaktionsenthalpien in J/mol |@@| Reaction-enthalpies in J/mol +972: 'Molecular-weights +977: 'Compatibility with old EXS-structure Introduced before the new Concept for Em-components with cMap-class tMAP-class, etc. +985: 'References for Emissions: The given, if available, otherwise the calculated +1006: 'Dimensioning: +1025: 'Übergabe der relevanten Größen aus dem PHEM Hauptprogramm |@@| Return of the relevant Quantities from(aus) the PHEM main-program +1026: 'Read in DEV directly from the *. phe file +1051: 'Wird weiter unten belegt weil mpexh vorhanden sein muss |@@| It is allocated below because there must be further mpexh +1056: 'Begin readning exs-file +1072: 'dummy = DatExs.ReadLine(0) 'old dummy line: caution for exs-file compatibility +1079: 'Initialize the respective Number of Modules +1085: 'Reading of the Data-blocks for each Module +1088: 'Error-message in TempMod(iMod).Read(DatExs) +1096: 'End reading exs-file +1100: 'Beginning reading csy-file +1121: 'End reading csy-file +1133: 'Calculation loop: Per Time-step / per Module: 1. Temperatures, 2. Conversions +1135: 'Display per-second Results on each iteration Results +1139: ' Write Header *.ter +1159: ' Write the Header for KonvMods +1169: 'Start-values ​​for Cooling-system simulation: +1174: 'Heat transfer into the Cooling-system (Map) +1189: 'Cooling-System Simulation +1191: 'Heat inputs in Masses 1 and 2 +1195: 'The Heat-transfer Mass 1 and 2 for Cooling -system +1199: 'Bulk-temperatures for the next Time-step +1205: 'Heat-loss to the outside +1208: 'Total Heat-input into the Cooling-system (Output value of the simulation) +1218: 'Calculation of the Exhaust-gas-flow from a given Fuel-consumption and lambda +1219: 'Permitted only for engines without EGR +1220: 'Unit mpexh ....... [kg/s] +1221: 'Unit Vpexh ....... [m3/s] +1222: 'Case 1: Calculation of Consumption and lambda +1224: '!Case 2: Calculation of pumped Airflow through engine +1231: 'Missing: Methodology for Mass-flow calculation for EGR Engines BMW HERO Project +1239: 'Calculate Lambda if not explicitly given +1252: 'The First Module in the Exhausts-system may not be a catalytically active Element, +1253: 'therefore, emissions are always equal to the untreated emissions from the PHEM main-program +1269: 'Calculate Qp_reak: Mass-flow-rate * Conversion * Reactive-enthalpy / molar-mass +1273: 'Compute Pollutant-components +1277: 'Conversion of NOx, CO, HC -> old value * (1-conversion-rate) +1291: 'Falls Modul kein Konv-Element hat ändert sich nix (Anmerkung: Modul 1 hat immer ModTyp0) |@@| If Module has no Conv-element changes nothing (Note: Module 1 has always ModTyp0) +1304: 'Write Line in *.ter. +1323: 'End Calculation-loop +1326: 'Close all second-by-second Result-files +1338: '---------- Abfrage Rücksprung im iterativen Berechnungsmodus für Starttemp ------------------- |@@| Query return in the iterative Calculation-mode for Starttemp ------------------- +1340: 'Abbruchbedingung: Temperatur des Massenelementes "t_m" des in "iter_pos" spezifizierten Moduls |@@| Termination-condition: Temperature of the Mass-elements "t_M" in the "iter_pos" specified module +1341: 'am Beginn und am Ende des Zyklus innerhalb vorzugebender Bandbreite "iter_tol" |@@| at the Beginning and End of the Cycle within vorzugebender bandwidth "iter_tol" +1417: '--- Write Output-file *. Ter --------------------------------------------- ------------- +1419: '--- End wrtting Output-file *. ter -------------------------------------------- --------- +1422: 'Clean up +1431: ''' Class for Temperature-modules +1433: ''' <remarks>Type of module is defined with Mod\typ </remarks> +1492: ''' Reading the EXS file +1494: ''' <param name="Datei">Dateihandler</param> |@@| param name="Datei"> File-handler </param> +1512: 'Path to Conversion-rates for Modules with Conversion +1520: 'Initialize the modules & Read the Parameter-files, depending on Module +1561: 'Heat-transfer factor +1563: 'surface of exterior +1565: 'Emissivität |@@| Emissivity +1567: 'Factors for Heat-transfer to the outside +1571: 'Factors for Temperature related t_katsubstrat <-> t_kat_außen +1574: 'Cooling-mass curve +1576: 'Normalized Cross-sectional area +1578: 'durchschnittlicher Gegendruck |@@| average backpressure(Gegendruck) +1580: 'Thermocouple Diameter +1583: 'Thermocouple Cooling-curve +1595: 'Heat-transfer-Factors to the outside +1621: 'Check whether Tgas given in Cycle: +1629: 'Entnormierungen und Berechnung weiterer Größen |@@| Normalize(Entnormierungen) and Calculating other Variables +1638: 'Additionally calculated parameters for Pipe-module: +1650: 'Für Strömungsberechnungen in SI-Einheiten wird Querschnittsfäche in m2 umgerechnet |@@| For Flow-calculations in SI-units is Querschnittsfäche converted into m2 +1653: 'Geometrical Quantities calculated +1654: 'Note: it is assumed that temperature sensors are +1655: 'centered in the Pipe +1660: ' Anmerkung: Kugelkalotte an t-sensor spitze wird in der Betrachtung als |@@| Note: Ball joint on t-sensor tip is neglected +1661: ' umströmter Zylinder vernachlässigt |@@| in the analysis of Airstream-cylinder +1663: 'Read Cooling-curves +1691: ''' Heat-transfer mass +1708: 'Setting Threshold for Precision of the Temperature-calculation (needed for iterative Calculation-mode) +1711: 'Return the Inlet-temperature of the Exhaust-gas from the Module above or from the Engine +1730: 'Calculation of the current Mass-temperature +1733: '! bei n_iter > 0 ist bereits der Endwert der letzten Iteration zugewiesen |@@| at n_iter > 0 the Final-value is already assigned to the last Iteration +1739: 'Falls Motor Aus wird nach Abkühlkurve gerechnet und Methode verlassen: |@@| If Engine-OFF, wait Cooling-curve and exit method: +1761: 'Heat-capacity (see Bogdanic) +1780: 'Iteration-loop for Heat-transfer +1788: ' Termination-criterion below +1794: 'Determining the Temperature of the Exhaust-gas at the Center of Mass ("t_gas_mid") consists of a non-linear (logarithmic) Temperature-curve(verlauf) +1803: 'Heat-transfer Convection inside all Modules (except for Pipe) +1807: 'for Pipe-modules: +1809: 'Nusselt Number: Density = 345/t_gas_mid, Term in Parenthesis: mu_Rohr / mu_Mitte +1811: 'Heat-transfer (Convection inside) d_pipe, in m: char. Length +1815: 'Heat-capacity (see Bogdanic) +1820: 'Termination-criterion: Change of the Exhaust Outlet-temperature compared to the last Iteration-step smaller than Threshold +1838: 'Calculate the Heat loss of the "thermal mass" to the outside +1840: 'Parameters are read from EXS file: +1841: 'Data for MuD: +1842: ' Oberfl_Kat = 0.12 'Surface for Heat-transfer in m^2 +1843: ' Emiss = 0.5 'Emissivität |@@| Emiss = 0.5 'emissivity +1846: 'Empirische Formel, passt für alle Rollentests recht gut |@@| Empirical formula, suitable for all OK Roll-tests +1848: 'Note: Tests with direct Dependence on t_m -> does not work well +1850: 'Heat-loss by Radiation +1852: 'Heat-loss by Convection +1856: 'Parameters are read from EXS file: +1857: 'Data for MuD: +1858: ' Module 3: +1859: ' Oberfl_Mod3 = 0.169457508 'Surface for Heat-transfer in m^2 +1860: ' Emiss = 0.5 'Emissivität |@@| Emiss = 0.5 'emissivity +1863: ' Module 4: +1864: ' Oberfl_Mod4 = 0.103596481 'Oberfläche für Wärmeübergang in m^2 |@@| Oberfl_Mod4 = 0.103596481 'Surface for Heat-transfer in m^2 +1865: ' Emiss = 0.9 'Emissivität |@@| Emiss = 0.9 'emissivity +1869: 'Heat-loss by Radiation = View_factor * Emissivity * St.-Boltzm.-const * Surface * (T_Pipe^4 - T_Environ^4) +1871: 'Heat-loss by Convection = Heat_transfer_coefficient * Surface * (T_Pipe - T_Environ) +1874: 'Standard: Crad constant, no Loss by Convection +1879: 'Total-heat-loss +1886: ''' Thermocouple-Heat-transfer +1899: 'Falls Motor Aus wird nach Abkühlkurve gerechnet und Methode verlassen: |@@| If Engine-OFF, wait for Cooling-curve and exit method: +1912: '!Formula Calculating Heat-transfer-flow around the Cylinder +1921: 'Simplified solution of the Heat-flow-equation for the t-sensor +1922: 'entspricht einer Diffgl. für ein PT1 glied |@@| corresponds to a Diffgl. for a PT1 section(glied) +1924: 'Discrete-time Solution of the PT1-Diffgl +1991: ''Extrapolation for LastTemp > TempAR(0) +2003: 'Extrapolation for LastTemp < TempAR(Adim) +2013: 'Einen Zeitschritt vor ( = 1 Sekunde) |@@| One Time-step forward(vor)( =1 second) +2041: 'Class initialized as a Subelement of TempMod +2047: 'c Prefix "c" means: use Cycle-value for Characteristic-correction +2049: 'c Index "cc" means: Value of Charachteristic-curve (-> "c" - "cc" is the Derivative, corrected) +2053: 'Specify Filename for per-second Output-file +2105: 'Abort if given no NOx +2126: 't-SCR (° C), deNOx (1-NOx-Exhaust/NOx-Raw), t-upstream (°C), NOx-raw (g/h)/kW_Nominal-power, total NOx over 60sec before g/h)/kW_Nominal-power, space velocity (1/h) +2149: ' Program to simulate SCR-fleet-model +2150: ' Note: deNOx values less than zero are possible: +2151: ' this corresponds to higher NOx-raw level than in the Base-map +2162: ' 1.) Calculation of per-second Values ​​for Input-variables of the SCR-model +2164: ' a.) t_SCR: combined-weight of t_upstream and t_downstream +2165: ' SCR-Model-intern werden dabei Temperaturen zwischen 50°C und 500°C begrenzt |@@| SCR-model-internally there are Temperatures between 50 ° C and 500 ° C limits +2166: ' Temperature-model-values (eg Cold-start) will not be overwritten +2172: ' b.) t_up, NOxraw, SV. 20s Moving-average in the past +2173: ' Formula applied also to the first 20 seconds +2187: ' c.) NOx60s: Sum over the last 60s of the specific NOx-raw emissions +2188: ' Formula applied to the first 60 seconds +2194: ' for seconds 1-59 must Extrapolate total-value +2201: ' Calculation of deNOxmin value from Characteristic-curves at 50 ° C +2213: ' 2.) Calculation deNOx +2215: ' a.) deNOx of characteristic: +2225: 'c b.) If correction criteria are met: deNOx-correction compared against Characteristic +2228: 'c t_up from characteristics: +2238: 'c NOx_raw of characteristics: +2248: 'c Sum of the NOxraw in the last 60 seconds from characteristics: +2258: 'c Raumgeschwindigkeit aus Kennlinie: |@@| Space/Velocity from(aus) characteristics: +2276: 'Schreiben der Ergebnisse auf die standardisierten Variablen eEmKomp (iSchad, jz) und Qp_reak(jz) |@@| Write the results on the standardized variables eEmKomp (iSchad, jz) and Qp_reak (jz) +2312: ''' SCR model +2319: 'Class initialized as a Subelement of TempMod +2325: 'c Prefix "c" means: use Cycle value for Characteristic-correction +2327: 'c Index "cc" means: Value of Characteristic (-> "c" - "cc" is the Derivative, corrected) +2331: 'Specify Filename for per-second Output-file +2385: 'Abort if no NOx given +2405: 't-SCR (°C), deNOx(1-NOx-Auspuff/NOx-Roh), -t-upstream(°C), NOx-Roh (g/h)/kW_Nennleistg, Summe NOx ueber 60Sek vorher g/h)/kW_Nennleistg, Raumgeschwindigkeit (1/h) |@@| t-SCR (° C), deNOx (1-NOx-Exhaust/NOx-raw), t-upstream (° C), NOx-raw (g/h) / kW_Nominal-power, total NOx over 60sec before g/h)/kW_Nominal-power, space velocity (1/h) +2429: ' Program to Simulate SCR-fleet-model +2430: ' Note: deNOx with values less than zero are possible: +2431: ' this corresponds to higher NOx-raw level than in the Base-map +2443: ' 1.) Calculation of per-second Values ​for Input-variables of the SCR model +2445: ' a) t_SCR: combined-weight of the t_upstream and t_downstream +2446: ' SCR-Model-intern werden dabei Temperaturen zwischen 50°C und 500°C begrenzt |@@| SCR model internally there are temperatures between 50 ° C and 500 ° C limits +2447: ' Temperature-model values (eg cold start) will not be overwritten +2453: ' b.) t_up, NOxraw, SV. 20s moving average in the past +2454: ' Formula applies to the first 20 seconds +2470: ' c.) NOx60s: Sum over the last 60s of the specific NOx-raw emissions +2471: ' Formula applies to the first 60 seconds +2479: ' For seconds 1 to 59 must sum the projected values +2486: ' Calculation of the Characteristic-curves for deNOxmin values at 50 ° C +2498: ' 2.) Calculation of deNOx +2500: ' a.) Characteristic of deNOx: +2510: 'c b.) If Correction-criteria are met: Correct deNOx against the Characteristic +2513: 'c Characteristic of t_up: +2523: 'c Characteristic-curve of the NOx_raw: +2533: 'c Sum of NOxraw in the last 60 seconds of Characteristic-curve: +2543: 'c Characteristic-curve of Distnace-Speed(Raumgeschwindigkeit): +2561: 'Write the results on the standardized variables eEmKomp(iSchad, jz) and Qp_reak(jz) +2593: ''' KAT-model +2600: 'Class initialized as a Sub-element of TempMod +2606: 'Mapped-data +2627: ''' Creating a new CAT module +2642: ''' Interpolation-Function +2644: ''' <param name="x">Mass-flow(Massenstrom)</param> +2645: ''' <param name="y"> Temperature before(vor) KAT </param> +2646: ''' <param name="MapID">The MapID of the corresponding Exhaust-gas-component</param> +2647: ''' <returns>The interpolated value for x and y from the Map</returns> +2648: ''' <remarks> It calculates the converted rate of the appropriate Exhaust-gas-component from the Mass-flow temperature Map</remarks> +2660: ''' Reading the Maps for Conversion-rates +2662: ''' <param name="Name">Filename</param> +2716: 'Units (are not evaluated) +2719: 'Values +2731: 'Set KonvRaten to Zero when no component given +2742: 'Triangulating +2750: 'define Dic. for modal Konvrate +2763: ''' Calculation of the Conversion-rate from Map +2765: ''' <param name="jz">Time</param> +2766: ''' <remarks> Used to calculate the temperature of the Thermoelements on Kateingang (corresponds to Module-number i-1)!</remarks> +2768: 'Conversion-rate calculated from Map +2784: ''' Header for Output-file +2796: ''' Data for Output-file +2798: ''' <param name="jz">Time</param> +2819: ''' Interface to Converter-classes cScrMod, cDocMod, etc. .. +2835: 'C Unterprogramm zu PHEM zur linearen INterpolation aus einem Polygonzug (z.B. in Vissimzs.for aufgerufen) |@@| Subroutine of(zu) PHEM for linear Interpolation of a Polygon (eg called by Vissimzs.for) +2836: 'C uebergeben wid "such" als X-Wert, der dann als berechneter Y-Wert wieder zurueck gegeben wird |@@| It is given the X-value to "search", and it gives back the calculated Y-value +2837: 'C Zu Belegen sind vorher: |@@| for previous Allocation: +2838: 'C Xis(j) and Yis(j) +2839: 'c Given the desired Value(search) and the Number of the existing Polygon-points (izpl) +2850: 'C Search the closest points of the Revolutions from the input Full-load curve: +2851: 'c Distance to Input-points and Search those Points with the smallest Distance: +2862: 'C Fix the second Interpolation-points (only interpolation, no extrapolation) +2868: '!Extrapolation up +2874: '!Extrapolation down +2879: 'c Sort the 2 Values by ascending n: +2887: 'c Interpolation of the associated Maximum-power (P/Pnom) >>> My Project\AssemblyInfo.vb -6:' Below is the General Information about the Attributes -7:' controlling the Assembly. Change these attribute values to modify the information -9:' associated with the Assembly. -20:'Review the values of the Assembly Attributes -23:' The following GUID is for the ID of the Typelib if this project is exposed to COM -25:' Version information for an assembly consists of the following four values: -26:' Major Release -27:' Minor Release -28:' Build Number -31:' You can specify all the values or use the defaults for Build and Revision Numbers +5:' Below is the General Information about the Attributes +6:' controlling the Assembly. Change these attribute values to modify the information +7:' associated with the Assembly. +9:' Review the values of the Assembly Attributes +20:'The following GUID is for the ID of the Typelib if this project is exposed to COM +23:' Version information for an assembly consists of the following four values: +25:' Major Release +26:' Minor Release +27:' Build Number +30:' You can specify all the values or use the defaults for Build and Revision Numbers +31:' by entering "*" in them: diff --git a/Tools/TranslateComments/extract_comments.ps1 b/Tools/TranslateComments/extract_comments.ps1 index 25ae1d302a3c7b7e019dc157d459ffe8bc2147b7..6da08f5a64c2e723a5560cafc78b002235229dec 100644 --- a/Tools/TranslateComments/extract_comments.ps1 +++ b/Tools/TranslateComments/extract_comments.ps1 @@ -51,12 +51,6 @@ cat comments2.txt | ## 4a. (MANUAL)Inspect translation and go back to 1 or 4a in case of problems. ## 5b. (MANUAL) Store translated-comments into ../translate_to.txt -$coms=cat comments2.txt -$from=cat translate_from.txt -$to=cat translate_to.txt -$coms.length, $from.length, $to.length - - function isolate-untranslated($coms, $from, $to) { for($i=0; $i -lt $coms.length; $i++) { @@ -74,6 +68,12 @@ function isolate-untranslated($coms, $from, $to) { ## 5.a. Merge translated comment-lines with original ones. ## +$coms=cat comments2.txt +$from=cat translate_from.txt +$to=cat translate_to.txt +$coms.length, $from.length, $to.length + + $r=for($i=0; $i -lt $coms.length; $i++) { $cline = $coms[$i]; $fline = $from[$i]; @@ -99,7 +99,7 @@ $r=for($i=0; $i -lt $coms.length; $i++) { } if (!$tline) { - #$nline = $cline; + #echo "$nline"; ## UNCOMMENT HERE and delete the rest else-case for producing original.txt continue; } elseif ($tline.startsWith('@')) { $tline = $tline.Substring(1); @@ -138,10 +138,10 @@ function matchTransLine($line) { } } -$coms=cat comments2-orig.txt filter Patch-Comments() { BEGIN { - $basepath = '../../VECTO'; + # Define it externally, depending on the PWD. + #$basepath = '../../VECTO'; $i = -1; $file = $Null; $isFileOK = $true; @@ -206,7 +206,10 @@ END { } } } -cat comments2-trans.txt | Patch-Comments +$coms=cat ..\Tools\TranslateComments\comments2-orig-EmCalc.txt +$basepath = '.'; +cat ..\Tools\TranslateComments\comments2-trans-EmCalc.txt| Patch-Comments +## The last cmd should run without any errors. ## DONE diff --git a/Tools/TranslateComments/translate_to.txt b/Tools/TranslateComments/translate_to.txt index 35151c1fe390dc163d3918df32949e69f1ac4296..6f403765b76bd1b35a0c81bb72ee2bbe53c8269c 100644 --- a/Tools/TranslateComments/translate_to.txt +++ b/Tools/TranslateComments/translate_to.txt @@ -178,7 +178,7 @@ Correction-function for Euro 3 like ARTEMIS slightly adapted (see FcCorr_Eu3ff. @Read GEN -VECTO: Default values for the parameters are no longer in GEN/.VECTO are to be occupied in reading about SetDefault. +VECTO: Default values for the parameters are no longer in GEN/.VECTO but are allocated when Read about SetDefault. @Error message in init() Read the Vehicle(KFZ)-specifications from 'KFZspez' if there are <DRAG> entries, then read FLD before MAP/MEP! @@ -1434,7 +1434,7 @@ Errors/Warnings occuring every second Reset errors related to Power-calculation (towards performing the Gear-shifting model) @Emit Errors -@Data per second +@Per-second Data @Interruption of traction @Recuperation @Project HERO - BMW Mini Hybrid @@ -1790,15 +1790,14 @@ Add to Gears-sequence @Acceleration-phases: Downshift?(Zurückschalten) suppressed @If within 6 seconds it Shifts back to the previous-Gear, @then maintain the previous-Gear throughout. -If within 6 seconds it Shifts once above and once below the previous-Gear, -then maintain the previous-Gear throughout. +@If within 6 seconds it Shifts once above and once below the previous-Gear, +@then maintain the previous-Gear throughout. @Checks Part 2 ------------------------------------- @Gear-shift from 2 to 1 are suppressed when v > 2.5 m/s NEW LUZ 040210: Upshifting only when in 2nd Gear over Cluch-Revolutions at decelerations below 2.5 m/s, shift to idle -wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet -If v <0.1 m/s for more than 1 sec then shift to Gear=0 -at Beschleunigungsvorgaengen below 1.5 m/s is used in 1 Gear is engaged +@If v <0.1 m/s for more than 1 sec then shift to Gear=0 +@at Acceleration processes below 1.5 m/s, then shift to 1st Gear @checking if Revolutions above Nominal-Revolutions, then always Upshift @otherwise lack the power! @EV-Gear-shifting model (based on Cars(PKW)) @@ -1843,7 +1842,7 @@ then maintain the previous-Gear throughout. NEW LUZ 040210: Upshift only when in 2 Gear over Clutch-revolutions at decelerations below 2.5 m/s, shift to Idle If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 -at acceleration processes below 1.5 m/s is used in first Gear is engaged +@at Acceleration below 1.5 m/s, then shift to 1st Gear @Check whether Revolutions over Nominal-Revolutions, then should always Upshift, @otherwise Power not enough! @Second 1 -------------------------------------- @@ -1920,7 +1919,7 @@ at decelerations below 1.5 m/s, shift to Idle Gear-shifting from 2nd to 1st is suppressed at v > 2.5 m/s At decelerations below 2.5 m/s, shift to Idle @If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 -@When Speed?(Beschleunigungsvorgaengen) below 1.5 m/s, then shift to 1st Gear +@When Acceleration below 1.5 m/s, then shift to 1st Gear @Function calculating the Power easily for Gear-shift-model @Function calculating the Power easily for EV-shift-model @Revolutions-setting @@ -2293,3 +2292,4 @@ for previous Allocation: + diff --git a/VECTO/MODcalc/Em Calc.vb b/VECTO/MODcalc/Em Calc.vb index fd4f66bc13dc0487c69580b650e80e7e26aa6666..cb0d8841ccf52e4ef21c0ee3d3ea8fcebe0d2f24 100644 --- a/VECTO/MODcalc/Em Calc.vb +++ b/VECTO/MODcalc/Em Calc.vb @@ -51,7 +51,7 @@ Public Class cEm 'Delaunay EmComp(KV.Key).RawVals.Add(MAP.fFCdelaunay_Intp(MODdata.nn(i), MODdata.Pe(i))) Else - 'Normale Interpolation + 'Normal interpolation EmComp(KV.Key).RawVals.Add(MAP.fShep_Intp(KV.Value)) End If @@ -98,7 +98,7 @@ Public Class cEm EmL = New List(Of Single) - 'Normal interpolation + 'First two seconds, no correction: EmL.Add(KV.Value.RawVals(0)) If MODdata.tDim > 0 Then @@ -182,7 +182,7 @@ Public Class cEm Return False End If - 'First two seconds, no correction: + 'Create Dictionaries For Each EmKV0 In DRI.EmComponents If EmComp.ContainsKey(EmKV0.Key) Then EmMesMW.Add(EmKV0.Key, 0) @@ -205,7 +205,7 @@ Public Class cEm TCMW.Add(TCKV.Key, 0) Next - 'Create Dictionaries + 'Calculate sums For Each EAcomp0 In EAcomp DriEmRef = DRI.EmComponents(EAcomp0) @@ -217,7 +217,7 @@ Public Class cEm Next - 'Calculate sums + 'Mean-values For Each EAcomp0 In EAcomp EmMesMW(EAcomp0) /= MODdata.tDim + 1 @@ -240,7 +240,7 @@ Public Class cEm file.WriteLine("Cycle average results") file.WriteLine("EmComp,Unit,Meas,Sim,Diff,Delta,R" & ChrW(178)) - '************************************ 'Mean-values + '************************************ 'Cycle Mean-values ************************************ For Each EAcomp0 In EAcomp s.Length = 0 @@ -255,13 +255,13 @@ Public Class cEm s.Append("," & DRI.EmComponents(EAcomp0).Unit) End If - '***** Cycle Mean-values ************************************ + '***** Measurement-value s.Append("," & EmMesMW(EAcomp0)) - '***** Measurement-value + '***** PHEM value s.Append("," & EmSimMW(EAcomp0)) - '***** PHEM value + '***** Diff - CAUTION: No Pnom normalization! Beware of the Dynamic-correction! s.Append("," & EmSimMW(EAcomp0) - EmMesMW(EAcomp0)) '***** Delta @@ -276,23 +276,23 @@ Public Class cEm a = New List(Of Double) b = New List(Of Double) - 'Diff - CAUTION: No Pnom normalization! Beware of the Dynamic-correction! + 'Average values over x seconds and imediately put au For t = isinterv To MODdata.tDim Step isinterv - 'Average values over x seconds and imediately put au + 'Set to zero EmMesMW(EAcomp0) = 0 EmSimMW(EAcomp0) = 0 - 'Set to zero + 'Aufsummieren |@@| Accumulate(Aufsummieren) For t1 = (t - isinterv) To t - 1 EmMesMW(EAcomp0) += DRI.EmComponents(EAcomp0).RawVals(t1) / isinterv EmSimMW(EAcomp0) += EmComp(EAcomp0).FinalVals(t1) / isinterv Next - 'Messwert |@@| Accumulate(Aufsummieren) + 'Measurement-value a.Add(CDbl(EmMesMW(EAcomp0))) - 'Measurement-value + 'PHEM-value b.Add(CDbl(EmSimMW(EAcomp0))) Next @@ -308,7 +308,7 @@ Public Class cEm Next - '************************************ PHEM-value + '************************************ Dump Modal '************************************ file.WriteLine(" ") file.WriteLine("Modal results averaged over " & isinterv & " seconds.") @@ -321,15 +321,15 @@ Public Class cEm DriEmRef = DRI.EmComponents(EAcomp0) - 'Dump Modal '************************************ + 'Measurement-value s.Append("," & DriEmRef.Name & "_Meas") sU.Append("," & DriEmRef.Unit) - 'Measurement-value + 'PHEM-value s.Append("," & EmComp(EAcomp0).Name & "_PHEM") sU.Append("," & EmComp(EAcomp0).Unit) - 'PHEM-value + 'Diff - CAUTION: No Pnominal-normalized! Beware of the Dynamic-correction! s.Append("," & DriEmRef.Name & "_Diff") If UnitsErr.ContainsKey(EAcomp0) Then sU.Append(",?!") @@ -348,14 +348,14 @@ Public Class cEm sU.Append("," & "-") Next - 'Diff - CAUTION: No Pnominal-normalized! Beware of the Dynamic-correction! + 'Header and write units file.WriteLine(s.ToString) file.WriteLine(sU.ToString) - 'Header and write units + 'Average Values over x seconds and imediately set au For t = isinterv To MODdata.tDim Step isinterv - 'Average Values over x seconds and imediately set au + 'to zero For Each EAcomp0 In EAcomp EmMesMW(EAcomp0) = 0 EmSimMW(EAcomp0) = 0 @@ -368,7 +368,7 @@ Public Class cEm TCMW(TCKV.Key) = 0 Next - 'to zero + 'Aufsummieren |@@| Accumulati(Aufsummieren) For t1 = (t - isinterv) To t - 1 pe += MODdata.Pe(t1) / isinterv @@ -385,7 +385,7 @@ Public Class cEm Next - 'Ausgabe |@@| Accumulati(Aufsummieren) + 'Output s.Length = 0 s.Append(CStr(DRI.t0 + t - ((isinterv - 1) / 2) - 1)) @@ -396,10 +396,10 @@ Public Class cEm For Each EAcomp0 In EAcomp - 'Output + 'Measurement-values s.Append("," & EmMesMW(EAcomp0)) - 'Measurement-values + 'PHEM-value s.Append("," & EmSimMW(EAcomp0)) 'Diff @@ -560,8 +560,8 @@ Public Class cTC For i = 1 To MODdata.tDim Pfind = 0 - 'C PHEM-value - 'C Konstantfahrt: |@@| Load-cycle(lastwechsel) (general Qualification(Bedingung ) except for Intervals with + 'C Lastwechsel (allgemeine Bedingung ausser bei Intervallen mit |@@| Load-cycle(lastwechsel) (general Qualification(Bedingung ) except for Intervals with + 'C Konstantfahrt: |@@| Constant-traveling: 'C If i = MODdata.tDim Then LWja = 0 @@ -569,10 +569,10 @@ Public Class cTC LWja = (Pe(i + 1) - Pe(i)) * (Pe(i) - Pe(i - 1)) End If 'C - 'C Damit werden Trapezfoermige Zyklen nicht als lastwechsel erkannt |@@| Constant-traveling: - 'C da LWje = 0. In diesem fall wird voraus der naechste Wert gesucht, |@@| Thus Trapezoid-Cycles are not recognized as Load-cycle(lastwechsel) - 'C der nicht gleich Pe(jz) ist. Dieser wird anstelle von Pe(jz+1) |@@| since LWje = 0. In this case, search ahead of next Value, - 'C gesetzt: |@@| which is not equal to Pe(jz). + 'C Damit werden Trapezfoermige Zyklen nicht als lastwechsel erkannt |@@| Thus Trapezoid-Cycles are not recognized as Load-cycle(lastwechsel) + 'C da LWje = 0. In diesem fall wird voraus der naechste Wert gesucht, |@@| since LWje = 0. In this case, search ahead of next Value, + 'C der nicht gleich Pe(jz) ist. Dieser wird anstelle von Pe(jz+1) |@@| which is not equal to Pe(jz). + 'C gesetzt: |@@| This will replace Pe(jz +1): If i = MODdata.tDim Then For js = i + 2 To MODdata.tDim If (Pe(js) <> Pe(i)) Then @@ -600,23 +600,23 @@ Public Class cTC End If 'C - 'C lastwechsel werden nur als solche gezaehlt, wenn sie mehr als 0.05% von |@@| This will replace Pe(jz +1): - 'C Pnenn betragen (sonst ist Ergebnis viel zu wackelig): |@@| Load-cycles(lastwechsel) are accounted as such only if they exceed 0.05% of Pnom - 'C (Lastwechsel wird gezaehlt, wenn LWja < 0) |@@| otherwise Outcome is too unstable): + 'C lastwechsel werden nur als solche gezaehlt, wenn sie mehr als 0.05% von |@@| Load-cycles(lastwechsel) are accounted as such only if they exceed 0.05% of Pnom + 'C Pnenn betragen (sonst ist Ergebnis viel zu wackelig): |@@| otherwise Outcome is too unstable): + 'C (Lastwechsel wird gezaehlt, wenn LWja < 0) |@@| accounted as Load-cycle(lastwechsel) when LWja < 0) 'C If (LWja > -0.0005) Then LWja = 0.1 'C - 'C (1) Mittlere Amplitude vom Pe-Verlauf ("Ampl") |@@| accounted as Load-cycle(lastwechsel) when LWja < 0) - 'C Zwischenrechnung fue Zyklusmittelwert: |@@| 1) Mean Amplitude of the running(Verlauf) Pe ("Ampl") + 'C (1) Mittlere Amplitude vom Pe-Verlauf ("Ampl") |@@| 1) Mean Amplitude of the running(Verlauf) Pe ("Ampl") + 'C Zwischenrechnung fue Zyklusmittelwert: |@@| Intermediate calculation of Cycle-average: 'C If (LWja < 0) Then LWzahl = LWzahl + 1 maxmin(LWzahl) = Pe(i) End If 'C - 'C Berechnung der mittleren Amplitude in 3 Sekunden vor Emission (Ampl3s) |@@| Intermediate calculation of Cycle-average: - 'C und der Anzahl der Pe-Sekundenschritten ueber 3% der Nennleistung |@@| Calculate the mean Amplitude in 3 seconds of(vor) Emissions (Ampl3s) - 'C (and the number of Second-steps where Pe is 3% above the Nominal-power + 'C Berechnung der mittleren Amplitude in 3 Sekunden vor Emission (Ampl3s) |@@| Calculate the mean Amplitude in 3 seconds of(vor) Emissions (Ampl3s) + 'C and the number of Second-steps where Pe is 3% above the Nominal-power + 'C (LW3p3s): LW3p3s(i) = 0 If (i < 2) Then Ampl3s(i) = Pe(i) - Pe(i - 1) @@ -647,7 +647,7 @@ Public Class cTC For i = 0 To MODdata.tDim 'C - 'C (2) Aenderung der aktuellen Motorleistung (dP_2s): + 'C (2) Change the current Engine-power (dP_2s): 'C If (i = 0) Then dP_2s(i) = 0 @@ -661,7 +661,7 @@ Public Class cTC If (Ppos(i) <= 0) Then Ppos(i) = 0 End If - 'C 2) Change the current Engine-power (dP_2s): + 'C Mittelwert 3 sec. vor Emission: |@@| Average 3 sec of(vor) Emission: If (i >= 2) Then Ppos3s(i) = (Ppos(i) + Ppos(i - 1) + Ppos(i - 2)) / 3 ElseIf (i = 2) Then @@ -669,7 +669,7 @@ Public Class cTC ElseIf (i = 1) Then Ppos3s(i) = Ppos(i) End If - 'C Gezaehlt nur bei dynamischem betrieb: |@@| Average 3 sec of(vor) Emission: + 'C Counted only in dynamic operation: xcheck = dP_2s(i) * dP_2s(i) If (xcheck >= 0.0000001) Then Ppos3s(i) = Ppos3s(i) @@ -678,13 +678,13 @@ Public Class cTC End If 'C 'C - 'C (Counted only in dynamic operation: + 'C (4) Average of the negative Engine-power ("PnegMW"): 'C Pneg(i) = Pe(i) If (Pneg(i) >= 0) Then Pneg(i) = 0 End If - 'C 4) Average of the negative Engine-power ("PnegMW"): + 'C Mittelwert 3 sec. vor Emission: |@@| Average 3 sec of(vor) Emission: If (i >= 2) Then Pneg3s(i) = (Pneg(i) + Pneg(i - 1) + Pneg(i - 2)) / 3 ElseIf (i = 2) Then @@ -692,7 +692,7 @@ Public Class cTC ElseIf (i = 1) Then Pneg3s(i) = Pneg(i) End If - 'C Gezaehlt nur bei dynamischem betrieb: |@@| Average 3 sec of(vor) Emission: + 'C Counted only in dynamic operation: xcheck = dP_2s(i) * dP_2s(i) If (xcheck >= 0.0000001) Then Pneg3s(i) = Pneg3s(i) @@ -704,17 +704,17 @@ Public Class cTC 'C 'C - 'C Counted only in dynamic operation: - 'C Addition der Amplituden von Pe (1. Pe-Wert |@@| Calculation of absolute Dynamic-map sizes: + 'C Berechnung der absoluten Dynamikkenngroessen: |@@| Calculation of absolute Dynamic-map sizes: 'C Addition of Pe Amplitudes (1 Pe-Value - 'C is counted also for Maxima and for Minima Amplitudes ) + 'C is counted also for Maxima and for Minima Amplitudes ) + 'C First Second: If (LWzahl >= 1) Then 'C - 'C First Second: + 'C 2. Second to End: For i = 2 To LWzahl Ampl0(i) = maxmin(i) - maxmin(i - 1) - 'C 2. Second to End: + 'C Absolute-value: If (Ampl0(i) < 0) Then Ampl0(i) = Ampl0(i) * (-1) End If @@ -789,7 +789,7 @@ Public Class cTC Next i - 'Absolute-value: + 'Speed/Accel-dependent parameters only when not Eng-Only If Not GEN.VehMode = tVehMode.EngineOnly Then For i = 0 To MODdata.tDim dynV(i) = MODdata.Vh.V(i) @@ -802,14 +802,14 @@ Public Class cTC Next i End If - 'Speed/Accel-dependent parameters only when not Eng-Only - ' ...Dynamic-parameters as the Differential of Dynamics of the Map + 'Dynamic-parameters as the Differential of Dynamics of the Map + ' ...was here before. Now in its own method because of KF-creation invalidity Calculated = True End Sub - 'was here before. Now in its own method because of KF-creation invalidity + 'Dynamic parameters as the Differential of Dynamics in the Map: Public Sub CalcDiff() Dim i As Integer @@ -835,7 +835,7 @@ Public Class cTC End Class ''' <summary> -''' Dynamic parameters as the Differential of Dynamics in the Map: +''' Class for calculating the Exhaust-temperatures ''' </summary> ''' <remarks></remarks> Public Class cEXS @@ -843,7 +843,7 @@ Public Class cEXS Private TempMod() As cTempMod Private ModAnz As Int16 - '! Class for calculating the Exhaust-temperatures + '! Felder für Größen aus PHEM Hauptprogramm |@@| Fields for Quantities from PHEM main-program Private vehspe(izykt) As Single Private nnorm As List(Of Single) Private p_norm As List(Of Single) @@ -892,9 +892,9 @@ Public Class cEXS Public Xis(100) As Single Public Yis(100) As Single - '**** Einlesen von tgas aus .npi (Projekt HERO) **** |@@| Fields for Quantities from PHEM main-program - ' => Reading about tgas from .npi (Project HERO) **** - ' Luz/Rexeis 16.05.2011 |@@| overwrites tgas(jz) over(aus) HtMass() + '**** Reading about tgas from .npi (Project HERO) **** + ' => überschreibt tgas(jz) aus HtMass() |@@| overwrites tgas(jz) over(aus) HtMass() + ' Luz/Rexeis 16.05.2011 Private t_gas1npi() As Single Private t_gas2npi() As Single '*************************************************** @@ -909,16 +909,16 @@ Public Class cEXS End Function ''' <summary> - ''' Hauptroutine für EXS Modul + ''' Main-routine for EXS module ''' </summary> ''' <remarks></remarks> Public Function Exs_Main() As Boolean 'aufzurufen im PHEM-Ablauf nach Dynamikkorrektur und vor Summenbildung - '! Main-routine for EXS module + '! Calling from Exs_Main(true) -> Developer Version without PHEM main-program Dim ii As Long, ij As Long, Diff As Single Dim t1 As Long - '! Calling from Exs_Main(true) -> Developer Version without PHEM main-program + '! Fields for Quantities from exs-file Dim iMod As Int16, iSchad As Int16 Dim efm_mode As Int16, cap_norm As Single, t_inl As Single, p_rel_inl As Single, fp4_efm As Single Dim dummy As String = "" @@ -948,33 +948,33 @@ Public Class cEXS MsgSrc = "EmCalc/EXS/Main" '------------------------------------------------------------------------------------------ - 'Fields for Quantities from exs-file + 'General Constants Pi_ = 3.1416 St_Boltz = 0.0000000567 'Stephan-Boltzmann Konstante R_air = 287.0 '!Gaskonstante Luft [J/(kg*K)] - '!General Constants '!Exhaust Physical-values: + '!insensitive vs. lambda, see "Stoffwerte_vollständigeVerbrennung_neu.xls" R_exh = 288.2 '!Gaskonstante Abgas [J/(kg*K)] - 'insensitive vs. lambda, see "Stoffwerte_vollständigeVerbrennung_neu.xls" + 'cp_exh = 1054.0 '!Exhaust heat-capacity [J/(kg*K)] is no longer used because it is now calculated directly in Abh from T and Lambda Pr_exh = 0.73 '!Prandtlzahl [-] '! cp_steel = 460.0 '!Wärmekapazität Edelstahl [J/(kg*K)] rho_steel = 7860.0 '!Dichte Edelstahl [[kg/m3] hc_soot = 0.15 '!Wärmeleitfähigkeit Russ [W/(mK)] "in loser Schichtung" - '!cp_exh = 1054.0 '!Exhaust heat-capacity [J/(kg*K)] is no longer used because it is now calculated directly in Abh from T and Lambda '!Note: Average-value from searching the Internet, found no information in literature + '!kalibriert anhand Test an Thermoelement unter Annahme von Schichtdicke 0.1mm |@@| calibrated based on Test Thermocouple assuming Coating-thickness(Schichtdicke) 0.1mm - 'Reaktionsenthalpien in J/mol |@@| calibrated based on Test Thermocouple assuming Coating-thickness(Schichtdicke) 0.1mm + 'Reaktionsenthalpien in J/mol |@@| Reaction-enthalpies in J/mol H_reak_co = 283200.0 H_reak_nox = 1928000.0 H_reak_hc = 483000.0 - 'Molmassen |@@| Reaction-enthalpies in J/mol + 'Molecular-weights M_co = 28.0 M_nox = 46.0 M_hc = 42.0 - 'Molecular-weights + 'Compatibility with old EXS-structure Introduced before the new Concept for Em-components with cMap-class tMAP-class, etc. eNOxOK = MODdata.Em.EmDefComp.ContainsKey(tMapComp.NOx) eHCOK = MODdata.Em.EmDefComp.ContainsKey(tMapComp.HC) eCOOK = MODdata.Em.EmDefComp.ContainsKey(tMapComp.CO) @@ -982,7 +982,7 @@ Public Class cEXS eEk1OK = MODdata.Em.EmDefComp.ContainsKey(tMapComp.PN) eEk2OK = MODdata.Em.EmDefComp.ContainsKey(tMapComp.NO) - 'Compatibility with old EXS-structure Introduced before the new Concept for Em-components with cMap-class tMAP-class, etc. + 'References for Emissions: The given, if available, otherwise the calculated If DRI.EmComponents.ContainsKey(sKey.MAP.HC) Then HC = DRI.EmComponents(sKey.MAP.HC).FinalVals Else @@ -1003,7 +1003,7 @@ Public Class cEXS t1 = MODdata.tDim - 'References for Emissions: The given, if available, otherwise the calculated + 'Dimensioning: ReDim vehspe(t1) @@ -1022,8 +1022,8 @@ Public Class cEXS n_iter = 0 'Zählvariable für Iterationen zur Berechnung der zyklusrepräsentativen Starttemperaturen - 'Dimensioning: - 'In DEV direkt aus der Datei *.phe eingelesen |@@| Return of the relevant Quantities from(aus) the PHEM main-program + 'Übergabe der relevanten Größen aus dem PHEM Hauptprogramm |@@| Return of the relevant Quantities from(aus) the PHEM main-program + 'Read in DEV directly from the *. phe file PathTer = MODdata.ModOutpName & ".ter" 'Left(JobFile, Len(JobFile) - 4) & ".ter" p_rated = VEH.Pnenn @@ -1042,18 +1042,18 @@ Public Class cEXS rpm = MODdata.nU tqs = MODdata.Em.EmDefComp(tMapComp.ExhTemp).FinalVals - 'Read in DEV directly from the *. phe file + 'Lambda If MAP.EmDefRef.ContainsKey(tMapComp.Lambda) Then LambdaGegJa = True lambda = MODdata.Em.EmDefComp(tMapComp.Lambda).FinalVals Else LambdaGegJa = False - 'Wird weiter unten belegt weil mpexh vorhanden sein muss + 'Wird weiter unten belegt weil mpexh vorhanden sein muss |@@| It is allocated below because there must be further mpexh lambda = New List(Of Single) End If '------------------------------------------------------------------------------------------ - 'Anfang exs-File einlesen |@@| It is allocated below because there must be further mpexh + 'Begin readning exs-file If Not DatExs.OpenRead(GEN.PathExs) Then WorkerMsg(tMsgID.Err, "Failed to open file '" & GEN.PathExs & "'!", MsgSrc) DatExs = Nothing @@ -1069,23 +1069,23 @@ Public Class cEXS cap_norm = CSng(DatExs.ReadLine(0)) t_inl = CSng(DatExs.ReadLine(0)) p_rel_inl = CSng(DatExs.ReadLine(0)) - 'Begin readning exs-file + 'dummy = DatExs.ReadLine(0) 'old dummy line: caution for exs-file compatibility 'dummy = DatExs.ReadLine(0) 'dummy = DatExs.ReadLine(0) fp4_efm = CSng(DatExs.ReadLine(0)) cap = cap_norm * p_rated 'Hubraum in [liter] - 'dummy = DatExs.ReadLine(0) 'old dummy line: caution for exs-file compatibility + 'Initialize the respective Number of Modules ReDim TempMod(ModAnz) For iMod = 1 To ModAnz TempMod(iMod) = New cTempMod(iMod, Me) Next - 'Initialize the respective Number of Modules + 'Reading of the Data-blocks for each Module For iMod = 1 To ModAnz If Not TempMod(iMod).Read(DatExs) Then 'Dabei werden auch KonvMods initialisiert & Fileköpfe der entsprechenden Ausgabefiles geschrieben - 'Reading of the Data-blocks for each Module + 'Error-message in TempMod(iMod).Read(DatExs) DatExs.Close() DatExs = Nothing Return False @@ -1093,11 +1093,11 @@ Public Class cEXS Next DatExs.Close() - 'Error-message in TempMod(iMod).Read(DatExs) + 'End reading exs-file '------------------------------------------------------------------------------------------ If GEN.CoolantsimJa Then - 'End reading exs-file + 'Beginning reading csy-file If Not DatCsy.OpenRead(GEN.CoolantSimPath) Then WorkerMsg(tMsgID.Err, "Failed to open file '" & GEN.CoolantSimPath & "'!", MsgSrc) Return False @@ -1118,7 +1118,7 @@ Public Class cEXS t_start_m1_m2 = CSng(DatCsy.ReadLine(0)) 'Starttemperatur für Masse 1 und 2 DatCsy.Close() - 'Beginning reading csy-file + 'End reading csy-file '------------------------------------------------------------------------------------------ End If @@ -1130,13 +1130,13 @@ Public Class cEXS lb100: 'Rücksprunglabel für iterativen Berechnungsmodus '------------------------------------------------------------------------------------------ - 'End reading csy-file + 'Calculation loop: Per Time-step / per Module: 1. Temperatures, 2. Conversions While True - 'Calculation loop: Per Time-step / per Module: 1. Temperatures, 2. Conversions + 'Display per-second Results on each iteration Results If Not (PHEMmode = tPHEMmode.ModeADVANCE) Then If Not (PHEMmode = tPHEMmode.ModeBATCH) Or Cfg.ModOut Then - ' Display per-second Results on each iteration Results + ' Write Header *.ter DatTer.OpenWrite(PathTer, ",") DatTer.WriteLine("result-file for temperatures in the exhaust system") DatTer.WriteLine("VECTO " & VECTOvers) @@ -1156,7 +1156,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus DatTer.WriteLine(line1) DatTer.WriteLine(line2) - ' Write Header *.ter + ' Write the Header for KonvMods For ii = 1 To ModAnz If TempMod(ii).ModTyp = 1 Or TempMod(ii).ModTyp = 2 Then TempMod(ii).KonvMod.Header() @@ -1166,12 +1166,12 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End If End If - 'Write the Header for KonvMods + 'Start-values ​​for Cooling-system simulation: t_mass1(0) = t_start_m1_m2 t_mass2(0) = t_start_m1_m2 - 'Start-values ​​for Cooling-system simulation: + 'Heat transfer into the Cooling-system (Map) If GEN.CoolantsimJa Then If MODdata.Em.EmDefComp.ContainsKey(tMapComp.Qp_coolant) Then qp_coolant = MODdata.Em.EmDefComp(tMapComp.Qp_coolant).FinalVals @@ -1186,26 +1186,26 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus For jz = 0 To t1 - 'Heat transfer into the Cooling-system (Map) + 'Cooling-System Simulation If GEN.CoolantsimJa Then - 'Cooling-System Simulation + 'Heat inputs in Masses 1 and 2 qp_coolant1(jz) = ratio_h_to_m1 * qp_coolant(jz) qp_coolant2(jz) = ratio_h_to_m2 * qp_coolant(jz) - 'Heat inputs in Masses 1 and 2 + 'The Heat-transfer Mass 1 and 2 for Cooling -system qp_loss1(jz) = alpha_A1 * (t_mass1(jz) - t_coolant) qp_loss2(jz) = alpha_A2 * (t_mass2(jz) - t_coolant) - 'The Heat-transfer Mass 1 and 2 for Cooling -system + 'Bulk-temperatures for the next Time-step If jz <> t1 Then t_mass1(jz + 1) = t_mass1(jz) + (qp_coolant1(jz) - qp_loss1(jz)) / (eng_mass1 * h_cap_mass1) t_mass2(jz + 1) = t_mass2(jz) + (qp_coolant2(jz) - qp_loss2(jz)) / (eng_mass2 * h_cap_mass2) End If - 'Bulk-temperatures for the next Time-step + 'Heat-loss to the outside qp_out(jz) = 0.21 * vehspe(jz) * surf_engine * (surf_temp_eng - t_amb) - 'Heat-loss to the outside + 'Total Heat-input into the Cooling-system (Output value of the simulation) qp_loss(jz) = qp_loss1(jz) + qp_loss2(jz) - qp_out(jz) End If @@ -1215,20 +1215,20 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus mpexh(jz) = 0 Else If efm_mode = 0 Then - 'Total Heat-input into the Cooling-system (Output value of the simulation) 'Calculation of the Exhaust-gas-flow from a given Fuel-consumption and lambda 'Permitted only for engines without EGR 'Unit mpexh ....... [kg/s] 'Unit Vpexh ....... [m3/s] + 'Case 1: Calculation of Consumption and lambda mpexh_fc = ((14.7 * lambda(jz)) + 1) * fc(jz) / 3600000 - '!Case 1: Calculation of Consumption and lambda + '!Case 2: Calculation of pumped Airflow through engine Vpexh_mot = ((cap / 1000) / 2) * (rpm(jz) / 60) zaehler = ((1 + (p_rel_inl / 1000)) * 100000) * Vpexh_mot nenner = (R_air * (t_inl + 273.15)) mpexh_mot = zaehler / nenner mpexh(jz) = Math.Max(mpexh_fc, mpexh_mot) ElseIf efm_mode = 1 Then - 'Case 2: Calculation of pumped Airflow through engine + 'Missing: Methodology for Mass-flow calculation for EGR Engines BMW HERO Project mpexh(jz) = MODdata.Em.EmDefComp(tMapComp.MassFlow).FinalVals(jz) Else WorkerMsg(tMsgID.Err, "Ungültige Auswahl für Abgasmassenstromberechnung", MsgSrc) @@ -1236,7 +1236,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End If End If - 'Missing: Methodology for Mass-flow calculation for EGR Engines BMW HERO Project + 'Calculate Lambda if not explicitly given If Not LambdaGegJa Then If fc(jz) < 1 Then lambda.Add(1000) @@ -1249,8 +1249,8 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus '-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!- '------------------------------------------------------------------------------------------ - 'Calculate Lambda if not explicitly given 'The First Module in the Exhausts-system may not be a catalytically active Element, + 'therefore, emissions are always equal to the untreated emissions from the PHEM main-program If eNOxOK Then TempMod(1).eEmKomp(2, jz) = NOx(jz) If eHCOK Then TempMod(1).eEmKomp(3, jz) = HC(jz) If eCOOK Then TempMod(1).eEmKomp(4, jz) = CO(jz) @@ -1266,15 +1266,15 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus TempMod(iMod).KonvMod.Konv(jz) 'Berechnung Konvertierung der Emissionskomponenten If (TempMod(iMod).ModTyp = 2) Then - 'therefore, emissions are always equal to the untreated emissions from the PHEM main-program + 'Calculate Qp_reak: Mass-flow-rate * Conversion * Reactive-enthalpy / molar-mass TempMod(iMod).Qp_reak(jz) = CO(jz) / 3600 * TempMod(iMod).KonvMod.KonvRate(tMapComp.CO)(jz) * H_reak_co / M_co + _ HC(jz) / 3600 * TempMod(iMod).KonvMod.KonvRate(tMapComp.HC)(jz) * H_reak_hc / M_hc + _ NOx(jz) / 3600 * TempMod(iMod).KonvMod.KonvRate(tMapComp.NOx)(jz) * H_reak_nox / M_nox - 'Calculate Qp_reak: Mass-flow-rate * Conversion * Reactive-enthalpy / molar-mass + 'Compute Pollutant-components For iSchad = 2 To 8 TempMod(iMod).eEmKomp(iSchad, jz) = TempMod(iMod - 1).eEmKomp(iSchad, jz) Next iSchad - 'Compute Pollutant-components + 'Conversion of NOx, CO, HC -> old value * (1-conversion-rate) TempMod(iMod).eEmKomp(2, jz) = TempMod(iMod - 1).eEmKomp(2, jz) * (1 - TempMod(iMod).KonvMod.KonvRate(tMapComp.NOx)(jz)) TempMod(iMod).eEmKomp(3, jz) = TempMod(iMod - 1).eEmKomp(3, jz) * (1 - TempMod(iMod).KonvMod.KonvRate(tMapComp.HC)(jz)) TempMod(iMod).eEmKomp(4, jz) = TempMod(iMod - 1).eEmKomp(4, jz) * (1 - TempMod(iMod).KonvMod.KonvRate(tMapComp.CO)(jz)) @@ -1288,7 +1288,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End If Else - 'Conversion of NOx, CO, HC -> old value * (1-conversion-rate) + 'Falls Modul kein Konv-Element hat ändert sich nix (Anmerkung: Modul 1 hat immer ModTyp0) |@@| If Module has no Conv-element changes nothing (Note: Module 1 has always ModTyp0) If iMod > 1 Then TempMod(iMod).Qp_reak(jz) = 0 @@ -1301,7 +1301,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Next - 'Zeile in *.ter schreiben |@@| If Module has no Conv-element changes nothing (Note: Module 1 has always ModTyp0) + 'Write Line in *.ter. If Not (PHEMmode = tPHEMmode.ModeADVANCE) Then If Not (PHEMmode = tPHEMmode.ModeBATCH) Or Cfg.ModOut Then line1 = jz & "," & vehspe(jz) & "," & nnorm(jz) & "," & p_norm(jz) & "," & rpm(jz) & "," & fc(jz) & "," & lambda(jz) & "," & mpexh(jz) & "," & tqs(jz) @@ -1320,10 +1320,10 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus '------------------------------------------------------------------------------------------ Next - 'Write Line in *.ter. + 'End Calculation-loop '---------------------------------------------------------------------------------------------- - 'End Calculation-loop + 'Close all second-by-second Result-files If Not (PHEMmode = tPHEMmode.ModeADVANCE) Then If Not (PHEMmode = tPHEMmode.ModeBATCH) Or Cfg.ModOut Then DatTer.Close() @@ -1335,10 +1335,10 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End If End If - '---------- Close all second-by-second Result-files + '---------- Abfrage Rücksprung im iterativen Berechnungsmodus für Starttemp ------------------- |@@| Query return in the iterative Calculation-mode for Starttemp ------------------- If (iter_mode = True) Then - 'Abbruchbedingung: Temperatur des Massenelementes "t_m" des in "iter_pos" spezifizierten Moduls |@@| Query return in the iterative Calculation-mode for Starttemp ------------------- - 'am Beginn und am Ende des Zyklus innerhalb vorzugebender Bandbreite "iter_tol" |@@| Termination-condition: Temperature of the Mass-elements "t_M" in the "iter_pos" specified module + 'Abbruchbedingung: Temperatur des Massenelementes "t_m" des in "iter_pos" spezifizierten Moduls |@@| Termination-condition: Temperature of the Mass-elements "t_M" in the "iter_pos" specified module + 'am Beginn und am Ende des Zyklus innerhalb vorzugebender Bandbreite "iter_tol" |@@| at the Beginning and End of the Cycle within vorzugebender bandwidth "iter_tol" Diff = Math.Abs(TempMod(iter_pos).t_m(t1) - TempMod(iter_pos).t_m(0)) If (Diff > iter_tol) Then n_iter = n_iter + 1 @@ -1414,12 +1414,12 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus MODdata.Em.EmDefComp(tMapComp.NO).FinalVals = Em0 End If - '--- Ausgabefile *.ter schreiben ---------------------------------------------------------- |@@| at the Beginning and End of the Cycle within vorzugebender bandwidth "iter_tol" - '--- Write Output-file *. Ter --------------------------------------------- ------------- + '--- End wrtting Output-file *. ter -------------------------------------------- --------- - 'End wrtting Output-file *. ter -------------------------------------------- --------- + + 'Clean up TempMod = Nothing Return True @@ -1428,9 +1428,9 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ''' <summary> - ''' Clean up + ''' Class for Temperature-modules ''' </summary> - ''' <Class for Temperature-modules + ''' <remarks>Type of module is defined with Mod\typ </remarks> Class cTempMod Dim Id As Int16 Public ModTyp As Int16, PathConv As String, m_norm As Single, heat_cap_m As Single, t_m_init As Single 'Normierte Masse, Wärmekapazität Masse, Starttemp. Masse @@ -1489,9 +1489,9 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End Sub ''' <summary> - ''' remarks>Type of module is defined with Mod\typ </remarks> + ''' Reading the EXS file ''' </summary> - ''' <Reading the EXS file + ''' <param name="Datei">Dateihandler |@@| param name="Datei"> File-handler </param> ''' <remarks></remarks> Public Function Read(ByVal Datei As cFile_V3) As Boolean Dim TmAbkPfad As String = "" @@ -1509,7 +1509,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ModTyp = CShort(Datei.ReadLine(0)) End If - 'Pfad für Konvertierungsraten bei Modulen mit Konvertierung |@@| param name="Datei"> File-handler </param> + 'Path to Conversion-rates for Modules with Conversion If ModTyp = 1 Or ModTyp = 2 Then PathConv = Datei.ReadLine(0) PathConv = fFileRepl(PathConv, fPATH(GEN.PathExs)) @@ -1517,7 +1517,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus PathConv = "" End If - 'Path to Conversion-rates for Modules with Conversion + 'Initialize the modules & Read the Parameter-files, depending on Module Select Case ModTyp Case 0 'nach Turbolader m_norm = CSng(Datei.ReadLine(0)) @@ -1558,29 +1558,29 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus heat_cap_m = CSng(Datei.ReadLine(0)) t_m_init = CSng(Datei.ReadLine(0)) FlowTyp = CShort(Datei.ReadLine(0)) - 'Initialize the modules & Read the Parameter-files, depending on Module - cht_norm = CSng(Datei.ReadLine(0)) 'Heat-transfer factor - ext_surface = CSng(Datei.ReadLine(0)) + cht_norm = CSng(Datei.ReadLine(0)) 'surface of exterior + ext_surface = CSng(Datei.ReadLine(0)) + 'Emissivität |@@| Emissivity emissivity = CSng(Datei.ReadLine(0)) - 'Faktoren für Wärmeübergänge nach außen |@@| Emissivity + 'Factors for Heat-transfer to the outside A_fak = CSng(Datei.ReadLine(0)) B_fak = CSng(Datei.ReadLine(0)) C_fak = CSng(Datei.ReadLine(0)) - 'Factors for Heat-transfer to the outside + 'Factors for Temperature related t_katsubstrat <-> t_kat_außen T_relation_k = CSng(Datei.ReadLine(0)) T_relation_d = CSng(Datei.ReadLine(0)) - 'Factors for Temperature related t_katsubstrat <-> t_kat_außen - TmAbkPfad = Datei.ReadLine(0) 'Cooling-mass curve - cs_norm = CSng(Datei.ReadLine(0)) + TmAbkPfad = Datei.ReadLine(0) 'Normalized Cross-sectional area + cs_norm = CSng(Datei.ReadLine(0)) + 'durchschnittlicher Gegendruck |@@| average backpressure(Gegendruck) p_rel_bk = CSng(Datei.ReadLine(0)) - 'Durchmesser Thermoelement |@@| average backpressure(Gegendruck) + 'Thermocouple Diameter d_tc = CSng(Datei.ReadLine(0)) d_soot = CSng(Datei.ReadLine(0)) - 'Thermocouple Diameter + 'Thermocouple Cooling-curve TtcAbkPfad = Datei.ReadLine(0) Case 3 'Rohrmodul @@ -1592,7 +1592,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus t_m_init = CSng(Datei.ReadLine(0)) cht_norm = CSng(Datei.ReadLine(0)) emissivity = CSng(Datei.ReadLine(0)) - 'Thermocouple Cooling-curve + 'Heat-transfer-Factors to the outside A_fak = CSng(Datei.ReadLine(0)) B_fak = CSng(Datei.ReadLine(0)) TmAbkPfad = Datei.ReadLine(0) @@ -1618,7 +1618,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus TtcAbkPfad = Datei.ReadLine(0) End Select - 'Heat-transfer-Factors to the outside + 'Check whether Tgas given in Cycle: If Id > 1 Then bTgasGegJa = DRI.ExsCompDef(tExsComp.Tgas, Id) If bTgasGegJa = True Then @@ -1626,7 +1626,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End If End If - 'Check whether Tgas given in Cycle: + 'Entnormierungen und Berechnung weiterer Größen |@@| Normalize(Entnormierungen) and Calculating other Variables If ModTyp <> 3 Then @@ -1635,7 +1635,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus d_pipe = ((4 * cs_pipe) / myEXS.Pi_) ^ 0.5 'Rohrdurchmesser in mm Cht = cht_norm * d_pipe 'WÜ-Faktor prop. Rohrdurchmesser Else - 'Zusätzlich berechnete Parameter für Rohrmodule: |@@| Normalize(Entnormierungen) and Calculating other Variables + 'Additionally calculated parameters for Pipe-module: ext_surface = d_pipe * 0.001 * myEXS.Pi_ * l_pipe * 0.001 'Oberfläche in m^2 mass = ext_surface * thickness_pipe * 0.001 * density 'Masse in kg cs_pipe = (d_pipe * 0.5) ^ 2 * myEXS.Pi_ 'Querschnitt in mm^2 @@ -1647,20 +1647,20 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Crad = crad_norm * myEXS.p_rated 'Abstrahlung prop. Nennleistung (Begründung siehe Diss) End If - 'Additionally calculated parameters for Pipe-module: + 'Für Strömungsberechnungen in SI-Einheiten wird Querschnittsfäche in m2 umgerechnet |@@| For Flow-calculations in SI-units is Querschnittsfäche converted into m2 cs_pipe = cs_pipe * (0.001 ^ 2) - 'Geometrische Größen berechnen |@@| For Flow-calculations in SI-units is Querschnittsfäche converted into m2 'Geometrical Quantities calculated 'Note: it is assumed that temperature sensors are + 'centered in the Pipe cl_cyl = (d_tc * 0.001) * myEXS.Pi_ * 0.5 'char. Länge umström Zyl cs_tc = (((d_tc * 0.001) / 2) ^ 2) * myEXS.Pi_ 'QS-Fläche t-sensor [m2] m_tc = cs_tc * ((d_pipe / 2) * 0.001) * myEXS.rho_steel 'Masse t_sensor [kg] surf_tc = (d_tc * 0.001) * myEXS.Pi_ * (d_pipe * 0.001) / 2 'Oberfläche t-sensor - ' centered in the Pipe - ' umströmter Zylinder vernachlässigt |@@| Note: Ball joint on t-sensor tip is neglected + ' Anmerkung: Kugelkalotte an t-sensor spitze wird in der Betrachtung als |@@| Note: Ball joint on t-sensor tip is neglected + ' umströmter Zylinder vernachlässigt |@@| in the analysis of Airstream-cylinder - 'Abkühlkurven einlesen |@@| in the analysis of Airstream-cylinder + 'Read Cooling-curves If Trim(UCase(TmAbkPfad)) = sKey.NoFile Then If myEXS.n_iter = 0 And PHEMmode = tPHEMmode.ModeSTANDARD Then WorkerMsg(tMsgID.Warn, "EXS-Module " & Id & ": No cool down curve for mass component defined. Cool down calculation disabled.", MsgSrc) NoCoolDown = True @@ -1688,7 +1688,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End Function ''' <summary> - ''' Read Cooling-curves + ''' Heat-transfer mass ''' </summary> ''' <param name="jz">Zeit</param> ''' <remarks></remarks> @@ -1705,10 +1705,10 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Dim T_aussen As Single Dim Nus_exh As Single, Re_exh As Single - 'Heat-transfer mass + 'Setting Threshold for Precision of the Temperature-calculation (needed for iterative Calculation-mode) dt_schwell = 0.01 - 'Setting Threshold for Precision of the Temperature-calculation (needed for iterative Calculation-mode) + 'Return the Inlet-temperature of the Exhaust-gas from the Module above or from the Engine If Id = 1 Then t_gas_in = myEXS.tqs(jz) 'Motor Else @@ -1727,16 +1727,16 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ht_exp = 0.8 'Turbulente Strömung. Keine Abhängigkeit Wärmeübergang von Volume Flow End If - 'Return the Inlet-temperature of the Exhaust-gas from the Module above or from the Engine + 'Calculation of the current Mass-temperature If ((jz = 0) And (myEXS.n_iter = 0)) Then t_m(jz) = t_m_init '!Sekunde 1: Temperatur auf Startwert setzen - '! Calculation of the current Mass-temperature + '! bei n_iter > 0 ist bereits der Endwert der letzten Iteration zugewiesen |@@| at n_iter > 0 the Final-value is already assigned to the last Iteration ElseIf (jz > 0) Then dt_m = (Qp_exh(jz - 1) + Qp_loss(jz - 1) - Qp_reak(jz - 1)) / (mass * heat_cap_m) 'Reaktionswärme geht derzeit zu 100% in die Katmasse t_m(jz) = t_m(jz - 1) - dt_m End If - 'Falls Motor Aus wird nach Abkühlkurve gerechnet und Methode verlassen: |@@| at n_iter > 0 the Final-value is already assigned to the last Iteration + 'Falls Motor Aus wird nach Abkühlkurve gerechnet und Methode verlassen: |@@| If Engine-OFF, wait Cooling-curve and exit method: If MODdata.EngState(jz) = tEngState.Stopped Then t_gas(jz) = -1 Qp_exh(jz) = -1 @@ -1758,7 +1758,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus t_gas_out = 0.5 * (t_gas_in + t_m(jz)) t_gas_mid = 0.5 * (t_gas_in + t_gas_out) - 'Wärmekapazität (vgl. Bogdanic) |@@| If Engine-OFF, wait Cooling-curve and exit method: + 'Heat-capacity (see Bogdanic) cp_exh = 144.7 * (-3 * (0.0975 + (0.0485 / myEXS.lambda(jz) ^ 0.75)) * (t_gas_mid) ^ 2 / (10 ^ 6) + 2 * (7.768 + 3.36 / (myEXS.lambda(jz) ^ 0.8)) * (t_gas_mid) / (10 ^ 4) + (4.896 + 0.464 / (myEXS.lambda(jz) ^ 0.93))) + 287.7 Qp_exh(jz) = myEXS.mpexh(jz) * cp_exh * (t_gas_out - t_gas_in) t_gas(jz) = t_gas_out @@ -1777,7 +1777,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus t_unter = t_gas_in End If - 'Heat-capacity (see Bogdanic) + 'Iteration-loop for Heat-transfer While True i_iter = i_iter + 1 If i_iter > 1 Then @@ -1785,13 +1785,13 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End If t_gas_out = 0.5 * (t_ober + t_unter) 'Solver halbiert fortschreitend Intervall, in dem die Temperatur des aus der Masse austretenden Abgases sein muss - ' Iteration-loop for Heat-transfer + ' Termination-criterion below If i_iter > 1 Then dt_konv = Math.Abs(t_gas_out - t_gas_out_alt) End If - 'Termination-criterion below + 'Determining the Temperature of the Exhaust-gas at the Center of Mass ("t_gas_mid") consists of a non-linear (logarithmic) Temperature-curve(verlauf) delta_tin = t_m(jz) - t_gas_in delta_tout = t_m(jz) - t_gas_out delta_t = (delta_tin - delta_tout) / Math.Log(delta_tin / delta_tout) @@ -1800,24 +1800,24 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus vp_exh_mid = (myEXS.mpexh(jz) * myEXS.R_exh * (t_gas_mid + 273.15)) / ((1 + (p_rel_bk / 1000)) * 100000) If ModTyp <> 3 Then - 'Determining the Temperature of the Exhaust-gas at the Center of Mass ("t_gas_mid") consists of a non-linear (logarithmic) Temperature-curve(verlauf) + 'Heat-transfer Convection inside all Modules (except for Pipe) ht_factor = myEXS.hc_exh(t_gas_mid) * ((vp_exh_mid / myEXS.kv_exh(t_gas_mid)) ^ ht_exp) Qp_ht = Cht * ht_factor * delta_t 'Cht -> hier: Faktor für Wärmeübergang Else - 'Heat-transfer Convection inside all Modules (except for Pipe) - Re_exh = d_pipe * 0.001 * (vp_exh_mid / cs_pipe) / myEXS.kv_exh(t_gas_mid) 'd_pipe in m 'for Pipe-modules: - Nus_exh = 0.027 * Re_exh ^ 0.8 * myEXS.Pr_exh ^ 0.333 * ((myEXS.kv_exh(t_gas_mid) * 345 / t_gas_mid) / (myEXS.kv_exh(t_m(jz)) * 345 / t_m(jz))) ^ 0.14 + Re_exh = d_pipe * 0.001 * (vp_exh_mid / cs_pipe) / myEXS.kv_exh(t_gas_mid) 'd_pipe in m 'Nusselt Number: Density = 345/t_gas_mid, Term in Parenthesis: mu_Rohr / mu_Mitte + Nus_exh = 0.027 * Re_exh ^ 0.8 * myEXS.Pr_exh ^ 0.333 * ((myEXS.kv_exh(t_gas_mid) * 345 / t_gas_mid) / (myEXS.kv_exh(t_m(jz)) * 345 / t_m(jz))) ^ 0.14 + 'Heat-transfer (Convection inside) d_pipe, in m: char. Length Qp_ht = Cht * Nus_exh * ext_surface * (myEXS.hc_exh(t_gas_mid) / (d_pipe * 0.001)) * delta_t 'Cht -> hier: Faktor für Rohrkrümmung End If - 'Heat-transfer (Convection inside) d_pipe, in m: char. Length + 'Heat-capacity (see Bogdanic) cp_exh = 144.7 * (-3 * (0.0975 + (0.0485 / myEXS.lambda(jz) ^ 0.75)) * (t_gas_mid) ^ 2 / 10 ^ 6 + 2 * (7.768 + 3.36 / myEXS.lambda(jz) ^ 0.8) * (t_gas_mid) / 10 ^ 4 + (4.896 + 0.464 / myEXS.lambda(jz) ^ 0.93)) + 287.7 Qp_thd = myEXS.mpexh(jz) * cp_exh * (t_gas_out - t_gas_in) diffQp = Qp_ht - Qp_thd - 'Heat-capacity (see Bogdanic) + 'Termination-criterion: Change of the Exhaust Outlet-temperature compared to the last Iteration-step smaller than Threshold If dt_konv < dt_schwell Then AbbruchIter = True If AbbruchIter Then @@ -1835,55 +1835,55 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End If - 'Termination-criterion: Change of the Exhaust Outlet-temperature compared to the last Iteration-step smaller than Threshold + 'Calculate the Heat loss of the "thermal mass" to the outside If ModTyp = 2 Then '3-W Kat - 'Calculate the Heat loss of the "thermal mass" to the outside 'Parameters are read from EXS file: - ' Data for MuD: + 'Data for MuD: ' Oberfl_Kat = 0.12 'Surface for Heat-transfer in m^2 + ' Emiss = 0.5 'Emissivität |@@| Emiss = 0.5 'emissivity ' A = 7, B = 0.21, C = 8, k = 1, d = -340 - 'Empirische Formel, passt für alle Rollentests recht gut |@@| Emiss = 0.5 'emissivity + 'Empirische Formel, passt für alle Rollentests recht gut |@@| Empirical formula, suitable for all OK Roll-tests T_aussen = t_m(jz) - 340 - 'Anm.: Versuch mit direkter Abhängigkeit von t_m -> funktioniert nicht gut |@@| Empirical formula, suitable for all OK Roll-tests - 'Note: Tests with direct Dependence on t_m -> does not work well - Qp_loss_rad = C_fak * ext_surface * myEXS.St_Boltz * emissivity * ((T_aussen + 273.15) ^ 4 - (myEXS.t_amb + 273.15) ^ 4) + 'Heat-loss by Radiation + Qp_loss_rad = C_fak * ext_surface * myEXS.St_Boltz * emissivity * ((T_aussen + 273.15) ^ 4 - (myEXS.t_amb + 273.15) ^ 4) + 'Heat-loss by Convection Qp_loss_konv = (B_fak * myEXS.vehspe(jz) + A_fak) * ext_surface * (T_aussen - myEXS.t_amb) ElseIf ModTyp = 3 Then 'Rohr - 'Heat-loss by Convection 'Parameters are read from EXS file: - ' Data for MuD: - ' Module 3: + 'Data for MuD: + ' Module 3: ' Oberfl_Mod3 = 0.169457508 'Surface for Heat-transfer in m^2 + ' Emiss = 0.5 'Emissivität |@@| Emiss = 0.5 'emissivity ' A = 7 ' B = 0.42 - ' Modul Nr. 4: |@@| Emiss = 0.5 'emissivity - ' Module 4: - ' Emiss = 0.9 'Emissivität |@@| Oberfl_Mod4 = 0.103596481 'Surface for Heat-transfer in m^2 + ' Module 4: + ' Oberfl_Mod4 = 0.103596481 'Oberfläche für Wärmeübergang in m^2 |@@| Oberfl_Mod4 = 0.103596481 'Surface for Heat-transfer in m^2 + ' Emiss = 0.9 'Emissivität |@@| Emiss = 0.9 'emissivity ' A = 7 ' B = 0 - 'Wärmeverlust durch Strahlung = Sichtfaktor * Emissivität * St.-Boltzm.-Konst * Oberfläche * (T_Rohr^4 - T_Umgebung^4) |@@| Emiss = 0.9 'emissivity - Qp_loss_rad = emissivity * myEXS.St_Boltz * ext_surface * ((t_m(jz) + 273.15) ^ 4 - (myEXS.t_amb + 273.15) ^ 4) 'Heat-loss by Radiation = View_factor * Emissivity * St.-Boltzm.-const * Surface * (T_Pipe^4 - T_Environ^4) + Qp_loss_rad = emissivity * myEXS.St_Boltz * ext_surface * ((t_m(jz) + 273.15) ^ 4 - (myEXS.t_amb + 273.15) ^ 4) + 'Heat-loss by Convection = Heat_transfer_coefficient * Surface * (T_Pipe - T_Environ) Qp_loss_konv = (B_fak * myEXS.vehspe(jz) + A_fak) * ext_surface * (t_m(jz) - myEXS.t_amb) Else - 'Heat-loss by Convection = Heat_transfer_coefficient * Surface * (T_Pipe - T_Environ) + 'Standard: Crad constant, no Loss by Convection Qp_loss_rad = Crad * (((t_m(jz) + 273.15) ^ 4) - ((myEXS.t_amb + 273.15) ^ 4)) Qp_loss_konv = 0 End If - 'Standard: Crad constant, no Loss by Convection + 'Total-heat-loss Qp_loss(jz) = Qp_loss_rad + Qp_loss_konv End Sub ''' <summary> - ''' Total-heat-loss + ''' Thermocouple-Heat-transfer ''' </summary> ''' <param name="jz">Zeit</param> ''' <remarks></remarks> @@ -1896,7 +1896,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus t_tc(0) = t_m(0) 'Als Startwert für das Thermoelement wird die Temperatur der thermischen Masse verwendet Else - 'Thermocouple-Heat-transfer + 'Falls Motor Aus wird nach Abkühlkurve gerechnet und Methode verlassen: |@@| If Engine-OFF, wait for Cooling-curve and exit method: If MODdata.EngState(jz) = tEngState.Stopped Then If NoCoolDown Then t_tc(jz) = t_tc(jz - 1) @@ -1909,7 +1909,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus vp_exh_tc = (myEXS.mpexh(jz) * myEXS.R_exh * (t_gas(jz) + 273.15)) / ((1 + (p_rel_bk / 1000)) * 100000) '!lokaler Volumenstrom im [m3/s] vms = vp_exh_tc / cs_pipe '!lokale Strömungsgeschwindigkeit [m/s] - '!Formelwerk Berechnung Wärmeübergang am umströmten Zylinder |@@| If Engine-OFF, wait for Cooling-curve and exit method: + '!Formula Calculating Heat-transfer-flow around the Cylinder Re = (cl_cyl * vms) / myEXS.kv_exh(t_gas(jz)) Nu_lam = 0.664 * (Re ^ 0.5) * (myEXS.Pr_exh ^ 0.333) 'Nusselt laminar Nu_turb = 0.037 * ((Re ^ 0.8) * myEXS.Pr_exh) / (1 + 2.443 * (Re ^ (-0.1)) * ((myEXS.Pr_exh ^ 0.667) - 1)) 'Nusselt turbulent @@ -1918,10 +1918,10 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus alpha_conv = Nu_ave * myEXS.hc_exh(t_gas(jz)) / cl_cyl alpha_tot = 1 / ((1 / alpha_conv) + ((d_soot * 0.001) / myEXS.hc_soot)) - 'Formula Calculating Heat-transfer-flow around the Cylinder 'Simplified solution of the Heat-flow-equation for the t-sensor + 'entspricht einer Diffgl. für ein PT1 glied |@@| corresponds to a Diffgl. for a PT1 section(glied) k_pt1 = (m_tc * myEXS.cp_steel) / (alpha_tot * surf_tc) - 'Zeitdiskrete Lösung der PT1-Diffgl |@@| corresponds to a Diffgl. for a PT1 section(glied) + 'Discrete-time Solution of the PT1-Diffgl t_tc(jz) = (1 / (k_pt1 + 1)) * (t_gas(jz) + (k_pt1 * t_tc(jz - 1))) End If @@ -1988,7 +1988,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus i = 1 End If - ''Discrete-time Solution of the PT1-Diffgl + ''Extrapolation for LastTemp > TempAR(0) 'If TempAr(0) < LastTemp Then ' 'TODO: StatusMSG(8, "Extrapolation of Cool Down Temperature! t = " & jz & ", Temp(t-1) = " & LastTemp) ' i = 1 @@ -2000,9 +2000,9 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ' i += 1 'Loop - 'Extrapolation for LastTemp > TempAR(0) - 'Extrapolation for LastTemp < TempAR(Adim) + + 'lbInt: 'Interpolation If TempAr(i) - TempAr(i - 1) = 0 Then t = tAr(i - 1) @@ -2010,7 +2010,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus t = (LastTemp - TempAr(i - 1)) * (tAr(i) - tAr(i - 1)) / (TempAr(i) - TempAr(i - 1)) + tAr(i - 1) End If - 'Einen Zeitschritt vor ( = 1 Sekunde) + 'Einen Zeitschritt vor ( = 1 Sekunde) |@@| One Time-step forward(vor)( =1 second) t += 1 i = 0 @@ -2038,19 +2038,19 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Implements KonvInterf - 'Klasse initialisiert als Unterelement von TempMod |@@| One Time-step forward(vor)( =1 second) + 'Class initialized as a Subelement of TempMod Dim DatKonvOut As New cFile_V3 'PHEM SCR model result file Dim PathKonvOut As String = "" Dim t_SCR As Single - 'c Class initialized as a Subelement of TempMod - Dim ct_up As Single, cNOxraw As Single, cNOx60s As Single, cSV As Single 'c Prefix "c" means: use Cycle-value for Characteristic-correction + Dim ct_up As Single, cNOxraw As Single, cNOx60s As Single, cSV As Single + 'c Index "cc" means: Value of Charachteristic-curve (-> "c" - "cc" is the Derivative, corrected) Dim denox_cc As Single, t_up_cc As Single, NOxraw_cc As Single, NOx60s_cc As Single, SV_cc As Single, deNOxmin As Single Dim deNOx_cor As Single '! deNOx-Wert nach Korrektur as single, vor End-Filterung as single Dim deNOx As Single '! Endwert zur Berechnung von NOx-tailpipe as single - 'Index "cc" means: Value of Charachteristic-curve (-> "c" - "cc" is the Derivative, corrected) + 'Specify Filename for per-second Output-file Dim pt_SCR(izykt) As Single Dim pdeNOx(izykt) As Single @@ -2102,7 +2102,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Return False End If - 'Specify Filename for per-second Output-file + 'Abort if given no NOx If Not MAP.EmDefRef.ContainsKey(tMapComp.NOx) Then WorkerMsg(tMsgID.Err, "'NOx' not defined in emission map!", MsgSrc) Return False @@ -2123,7 +2123,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus DatKonvIn.ReadLine() iz = 0 - 'Abort if given no NOx + 't-SCR (° C), deNOx (1-NOx-Exhaust/NOx-Raw), t-upstream (°C), NOx-raw (g/h)/kW_Nominal-power, total NOx over 60sec before g/h)/kW_Nominal-power, space velocity (1/h) Do While Not DatKonvIn.EndOfFile iz = iz + 1 line = DatKonvIn.ReadLine @@ -2146,9 +2146,9 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Public Sub Konv(ByVal jz As Integer) Implements KonvInterf.Konv ' ----------------------------------------------------------------------- - ' t-SCR (° C), deNOx (1-NOx-Exhaust/NOx-Raw), t-upstream (°C), NOx-raw (g/h)/kW_Nominal-power, total NOx over 60sec before g/h)/kW_Nominal-power, space velocity (1/h) ' Program to simulate SCR-fleet-model - ' Note: deNOx values less than zero are possible: + ' Note: deNOx values less than zero are possible: + ' this corresponds to higher NOx-raw level than in the Base-map ' ----------------------------------------------------------------------- ' Dim is0 As Long @@ -2159,18 +2159,18 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus eNOx = MODdata.Em.EmDefComp(tMapComp.NOx).FinalVals ' ' ----------------------------------------------------------------- - ' this corresponds to higher NOx-raw level than in the Base-map - ' ' 1.) Calculation of per-second Values ​​for Input-variables of the SCR-model + ' ' a.) t_SCR: combined-weight of t_upstream and t_downstream - ' Temperaturmodelwerte (zB bei Kaltstart) werden nicht überschrieben |@@| SCR-model-internally there are Temperatures between 50 ° C and 500 ° C limits + ' SCR-Model-intern werden dabei Temperaturen zwischen 50°C und 500°C begrenzt |@@| SCR-model-internally there are Temperatures between 50 ° C and 500 ° C limits + ' Temperature-model-values (eg Cold-start) will not be overwritten t_SCR = ((1 - Sharetdown) * myEXS.TempMod(id - 1).t_tc(jz)) + (Sharetdown * myEXS.TempMod(id).t_tc(jz)) t_SCR = Math.Max(50.001, t_SCR) t_SCR = Math.Min(499.999, t_SCR) ' - ' Temperature-model-values (eg Cold-start) will not be overwritten - ' b.) t_up, NOxraw, SV. 20s Moving-average in the past + ' b.) t_up, NOxraw, SV. 20s Moving-average in the past + ' Formula applied also to the first 20 seconds ' ct_up = 0 cNOxraw = 0 @@ -2184,21 +2184,21 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus cNOxraw = cNOxraw / (jz - Math.Max(0, jz - 19) + 1) cSV = cSV / (jz - Math.Max(0, jz - 19) + 1) ' - ' Formula applied also to the first 20 seconds - ' c.) NOx60s: Sum over the last 60s of the specific NOx-raw emissions + ' c.) NOx60s: Sum over the last 60s of the specific NOx-raw emissions + ' Formula applied to the first 60 seconds cNOx60s = 0 For is0 = Math.Max(0, jz - 59) To jz cNOx60s = cNOx60s + (eNOx(is0) / myEXS.p_rated) Next is0 - ' Formula applied to the first 60 seconds + ' for seconds 1-59 must Extrapolate total-value cNOx60s = cNOx60s / (Math.Min(60, jz + 1) / 60.0) ' ----------------------------------------------------------------- ' ' ' - ' for seconds 1-59 must Extrapolate total-value + ' Calculation of deNOxmin value from Characteristic-curves at 50 ° C For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pdeNOx(is0) @@ -2210,9 +2210,9 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ' ' ' ----------------------------------------------------------------- - ' Calculation of deNOxmin value from Characteristic-curves at 50 ° C + ' 2.) Calculation deNOx ' - ' 2.) Calculation deNOx + ' a.) deNOx of characteristic: For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pdeNOx(is0) @@ -2222,10 +2222,10 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Call myEXS.Intlin(such, izpl) denox_cc = such - 'c a.) deNOx of characteristic: + 'c b.) If correction criteria are met: deNOx-correction compared against Characteristic If ((t_SCR > tminCor) And (t_SCR < tmaxCor)) Then 'c - 'c b.) If correction criteria are met: deNOx-correction compared against Characteristic + 'c t_up from characteristics: For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pt_up(is0) @@ -2235,7 +2235,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Call myEXS.Intlin(such, izpl) t_up_cc = such 'c - 'c t_up from characteristics: + 'c NOx_raw of characteristics: For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pNOxraw(is0) @@ -2245,7 +2245,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Call myEXS.Intlin(such, izpl) NOxraw_cc = such 'c - 'c NOx_raw of characteristics: + 'c Sum of the NOxraw in the last 60 seconds from characteristics: For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pNOx60s(is0) @@ -2255,7 +2255,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Call myEXS.Intlin(such, izpl) NOx60s_cc = such 'c - 'c Sum of the NOxraw in the last 60 seconds from characteristics: + 'c Raumgeschwindigkeit aus Kennlinie: |@@| Space/Velocity from(aus) characteristics: For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pSV(is0) @@ -2273,7 +2273,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus deNOx = Math.Max(Math.Min(denox_cc, DeNOxMax), deNOxmin) End If - 'Schreiben der Ergebnisse auf die standardisierten Variablen eEmKomp (iSchad, jz) und Qp_reak(jz) |@@| Space/Velocity from(aus) characteristics: + 'Schreiben der Ergebnisse auf die standardisierten Variablen eEmKomp (iSchad, jz) und Qp_reak(jz) |@@| Write the results on the standardized variables eEmKomp (iSchad, jz) and Qp_reak (jz) For iSchad = 2 To 8 KonvRate(iSchad) = 0 Next iSchad @@ -2309,26 +2309,26 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ''' <summary> - ''' SCR Modell |@@| Write the results on the standardized variables eEmKomp (iSchad, jz) and Qp_reak (jz) + ''' SCR model ''' </summary> ''' <remarks></remarks> Class cScrMod_10sMW 'SCR Modell Implements KonvInterf - 'SCR model + 'Class initialized as a Subelement of TempMod Dim DatKonvOut As New cFile_V3 'PHEM SCR model result file Dim PathKonvOut As String = "" Dim t_SCR As Single - 'c Class initialized as a Subelement of TempMod - Dim ct_up As Single, cNOxraw As Single, cNOx30s As Single, cSV As Single 'c Prefix "c" means: use Cycle value for Characteristic-correction + Dim ct_up As Single, cNOxraw As Single, cNOx30s As Single, cSV As Single + 'c Index "cc" means: Value of Characteristic (-> "c" - "cc" is the Derivative, corrected) Dim denox_cc As Single, t_up_cc As Single, NOxraw_cc As Single, NOx30s_cc As Single, SV_cc As Single, deNOxmin As Single Dim deNOx_cor As Single '! deNOx-Wert nach Korrektur as single, vor End-Filterung as single Dim deNOx As Single '! Endwert zur Berechnung von NOx-tailpipe as single - 'Index "cc" means: Value of Characteristic (-> "c" - "cc" is the Derivative, corrected) + 'Specify Filename for per-second Output-file Dim pt_SCR(izykt) As Single Dim pdeNOx(izykt) As Single @@ -2382,7 +2382,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Return False End If - 'Specify Filename for per-second Output-file + 'Abort if no NOx given If Not MAP.EmDefRef.ContainsKey(tMapComp.NOx) Then WorkerMsg(tMsgID.Err, "'NOx' not defined in emission map!", MsgSrc) Return False @@ -2402,7 +2402,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus DatKonvIn.ReadLine() iz = 0 - 'Abort if no NOx given + 't-SCR (°C), deNOx(1-NOx-Auspuff/NOx-Roh), -t-upstream(°C), NOx-Roh (g/h)/kW_Nennleistg, Summe NOx ueber 60Sek vorher g/h)/kW_Nennleistg, Raumgeschwindigkeit (1/h) |@@| t-SCR (° C), deNOx (1-NOx-Exhaust/NOx-raw), t-upstream (° C), NOx-raw (g/h) / kW_Nominal-power, total NOx over 60sec before g/h)/kW_Nominal-power, space velocity (1/h) Do While Not DatKonvIn.EndOfFile iz = iz + 1 line = DatKonvIn.ReadLine @@ -2426,9 +2426,9 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Public Sub Konv(ByVal jz As Integer) Implements KonvInterf.Konv ' ----------------------------------------------------------------------- - ' Programm zur Simulation SCR-Flottendurchschnitt |@@| t-SCR (° C), deNOx (1-NOx-Exhaust/NOx-raw), t-upstream (° C), NOx-raw (g/h) / kW_Nominal-power, total NOx over 60sec before g/h)/kW_Nominal-power, space velocity (1/h) ' Program to Simulate SCR-fleet-model - ' Note: deNOx with values less than zero are possible: + ' Note: deNOx with values less than zero are possible: + ' this corresponds to higher NOx-raw level than in the Base-map ' ----------------------------------------------------------------------- ' Dim is0 As Long @@ -2440,18 +2440,18 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ' ' ----------------------------------------------------------------- - ' this corresponds to higher NOx-raw level than in the Base-map - ' ' 1.) Calculation of per-second Values ​for Input-variables of the SCR model + ' ' a) t_SCR: combined-weight of the t_upstream and t_downstream - ' Temperaturmodelwerte (zB bei Kaltstart) werden nicht überschrieben |@@| SCR model internally there are temperatures between 50 ° C and 500 ° C limits + ' SCR-Model-intern werden dabei Temperaturen zwischen 50°C und 500°C begrenzt |@@| SCR model internally there are temperatures between 50 ° C and 500 ° C limits + ' Temperature-model values (eg cold start) will not be overwritten t_SCR = ((1 - Sharetdown) * myEXS.TempMod(id - 1).t_tc(jz)) + (Sharetdown * myEXS.TempMod(id).t_tc(jz)) t_SCR = Math.Max(50.001, t_SCR) t_SCR = Math.Min(499.999, t_SCR) ' - ' Temperature-model values (eg cold start) will not be overwritten - ' b.) t_up, NOxraw, SV. 20s moving average in the past + ' b.) t_up, NOxraw, SV. 20s moving average in the past + ' Formula applies to the first 20 seconds ' ct_up = 0 cNOxraw = 0 @@ -2467,8 +2467,8 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus cNOxraw = cNOxraw / (jz - Math.Max(1, jz - 9) + 1) cSV = cSV / (jz - Math.Max(1, jz - 9) + 1) ' - ' Formula applies to the first 20 seconds - ' c.) NOx60s: Sum over the last 60s of the specific NOx-raw emissions + ' c.) NOx60s: Sum over the last 60s of the specific NOx-raw emissions + ' Formula applies to the first 60 seconds cNOx30s = 0 For is0 = Math.Max(0, jz - 29) To jz @@ -2476,14 +2476,14 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus cNOx30s = cNOx30s + (eNOx(is0) / myEXS.p_rated) End If Next is0 - ' Formula applies to the first 60 seconds + ' For seconds 1 to 59 must sum the projected values cNOx30s = cNOx30s / (Math.Min(30, jz + 1) / 30.0) ' ----------------------------------------------------------------- ' ' ' - ' For seconds 1 to 59 must sum the projected values + ' Calculation of the Characteristic-curves for deNOxmin values at 50 ° C For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pdeNOx(is0) @@ -2495,9 +2495,9 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ' ' ' ----------------------------------------------------------------- - ' Calculation of the Characteristic-curves for deNOxmin values at 50 ° C + ' 2.) Calculation of deNOx ' - ' 2.) Calculation of deNOx + ' a.) Characteristic of deNOx: For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pdeNOx(is0) @@ -2507,10 +2507,10 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Call myEXS.Intlin(such, izpl) denox_cc = such - 'c a.) Characteristic of deNOx: + 'c b.) If Correction-criteria are met: Correct deNOx against the Characteristic If ((t_SCR > tminCor) And (t_SCR < tmaxCor)) Then 'c - 'c b.) If Correction-criteria are met: Correct deNOx against the Characteristic + 'c Characteristic of t_up: For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pt_up(is0) @@ -2520,7 +2520,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Call myEXS.Intlin(such, izpl) t_up_cc = such 'c - 'c Characteristic of t_up: + 'c Characteristic-curve of the NOx_raw: For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pNOxraw(is0) @@ -2530,7 +2530,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Call myEXS.Intlin(such, izpl) NOxraw_cc = such 'c - 'c Characteristic-curve of the NOx_raw: + 'c Sum of NOxraw in the last 60 seconds of Characteristic-curve: For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pNOx60s(is0) @@ -2540,7 +2540,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Call myEXS.Intlin(such, izpl) NOx30s_cc = such 'c - 'c Sum of NOxraw in the last 60 seconds of Characteristic-curve: + 'c Characteristic-curve of Distnace-Speed(Raumgeschwindigkeit): For is0 = 1 To iSCRAnz myEXS.Xis(is0) = pt_SCR(is0) myEXS.Yis(is0) = pSV(is0) @@ -2558,7 +2558,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus deNOx = Math.Max(Math.Min(denox_cc, DeNOxMax), deNOxmin) End If - 'Characteristic-curve of Distnace-Speed(Raumgeschwindigkeit): + 'Write the results on the standardized variables eEmKomp(iSchad, jz) and Qp_reak(jz) For iSchad = 2 To 8 KonvRate(iSchad) = 0 Next iSchad @@ -2590,20 +2590,20 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ''' <summary> - ''' Write the results on the standardized variables eEmKomp(iSchad, jz) and Qp_reak(jz) + ''' KAT-model ''' </summary> ''' <remarks></remarks> Class c3WayCatMod 'DOC Modell Implements KonvInterf - 'KAT-model + 'Class initialized as a Sub-element of TempMod Dim iSchad As Long Dim id As Int16 Private myEXS As cEXS - 'Class initialized as a Sub-element of TempMod + 'Mapped-data 'Private Massflow As List(Of Single) 'Private Temp_KAT As List(Of Single) 'Private Massflow_Norm As List(Of Single) @@ -2624,7 +2624,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ''' <summary> - ''' Mapped-data + ''' Creating a new CAT module ''' </summary> ''' <param name="i">ID</param> ''' <param name="EXSref">EXS-Klasse</param> @@ -2639,13 +2639,13 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ''' <summary> - ''' Creating a new CAT module + ''' Interpolation-Function ''' </summary> - ''' <Interpolation-Function ''' <param name="x">Mass-flow(Massenstrom)</param> ''' <param name="y"> Temperature before(vor) KAT </param> ''' <param name="MapID">The MapID of the corresponding Exhaust-gas-component</param> ''' <returns>The interpolated value for x and y from the Map</returns> + ''' <remarks> It calculates the converted rate of the appropriate Exhaust-gas-component from the Mass-flow temperature Map</remarks> Private Function Intpol(ByVal x As Double, ByVal y As Double, ByVal MapID As tMapComp) As Double Try Return KonvRateMap(MapID).Intpol(x, y) @@ -2657,9 +2657,9 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ''' <summary> - ''' remarks> It calculates the converted rate of the appropriate Exhaust-gas-component from the Mass-flow temperature Map</remarks> + ''' Reading the Maps for Conversion-rates ''' </summary> - ''' <Reading the Maps for Conversion-rates + ''' <param name="Name">Filename</param> ''' <remarks></remarks> Public Function Read(ByVal Name As String) As Boolean Implements KonvInterf.Read Dim DatKonv As New cFile_V3 @@ -2713,10 +2713,10 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Next - 'param name="Name">Filename</param> + 'Units (are not evaluated) line = DatKonv.ReadLine - 'Units (are not evaluated) + 'Values Do While Not DatKonv.EndOfFile line = DatKonv.ReadLine @@ -2728,7 +2728,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus KonvRateMap(Sp0.Key).AddPoints(Massflow, Temp_KAT, CDbl(line(Sp0.Value))) Next - 'Values + 'Set KonvRaten to Zero when no component given For Each KonvRate0 In KonvRateMap If Not Spalten.ContainsKey(KonvRate0.Key) Then KonvRate0.Value.AddPoints(Massflow, Temp_KAT, 0) @@ -2739,7 +2739,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus DatKonv.Close() - 'Set KonvRaten to Zero when no component given + 'Triangulating For Each KonvRate0 In KonvRateMap If Not KonvRate0.Value.Triangulate() Then WorkerMsg(tMsgID.Err, "Triangulation-ERROR", MsgSrc) @@ -2747,7 +2747,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End If Next - 'Triangulating + 'define Dic. for modal Konvrate KonvRate = New Dictionary(Of tMapComp, List(Of Single)) KonvRate.Add(tMapComp.NOx, New List(Of Single)) KonvRate.Add(tMapComp.HC, New List(Of Single)) @@ -2760,12 +2760,12 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus ''' <summary> - ''' define Dic. for modal Konvrate + ''' Calculation of the Conversion-rate from Map ''' </summary> - ''' <Calculation of the Conversion-rate from Map ''' <param name="jz">Time</param> + ''' <remarks> Used to calculate the temperature of the Thermoelements on Kateingang (corresponds to Module-number i-1)!</remarks> Public Sub Konv(ByVal jz As Integer) Implements KonvInterf.Konv - 'remarks> Used to calculate the temperature of the Thermoelements on Kateingang (corresponds to Module-number i-1)!</remarks> + 'Conversion-rate calculated from Map Dim massflow As Single Dim temp As Single @@ -2781,7 +2781,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End Sub ''' <summary> - ''' Conversion-rate calculated from Map + ''' Header for Output-file ''' </summary> ''' <remarks></remarks> Public Sub Header() Implements KonvInterf.Header @@ -2793,9 +2793,9 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End Sub ''' <summary> - ''' Header for Output-file + ''' Data for Output-file ''' </summary> - ''' <Data for Output-file + ''' <param name="jz">Time</param> ''' <remarks></remarks> Public Sub Write(ByVal jz As Integer) Implements KonvInterf.Write DatKonvOut.WriteLine(jz & "," & MODdata.Em.EmDefComp(tMapComp.MassFlow).FinalVals(jz) & "," _ @@ -2816,7 +2816,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End Class ''' <summary> - ''' param name="jz">Time</param> + ''' Interface to Converter-classes cScrMod, cDocMod, etc. .. ''' </summary> ''' <remarks></remarks> Interface KonvInterf @@ -2832,11 +2832,11 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Sub Intlin(ByRef such As Single, ByVal izpl As Long) ''C - 'C Interface to Converter-classes cScrMod, cDocMod, etc. .. - 'C uebergeben wid "such" als X-Wert, der dann als berechneter Y-Wert wieder zurueck gegeben wird |@@| Subroutine of(zu) PHEM for linear Interpolation of a Polygon (eg called by Vissimzs.for) - 'C Zu Belegen sind vorher: |@@| It is given the X-value to "search", and it gives back the calculated Y-value - 'C Xis(j) und Yis(j) |@@| for previous Allocation: - 'c Xis(j) and Yis(j) + 'C Unterprogramm zu PHEM zur linearen INterpolation aus einem Polygonzug (z.B. in Vissimzs.for aufgerufen) |@@| Subroutine of(zu) PHEM for linear Interpolation of a Polygon (eg called by Vissimzs.for) + 'C uebergeben wid "such" als X-Wert, der dann als berechneter Y-Wert wieder zurueck gegeben wird |@@| It is given the X-value to "search", and it gives back the calculated Y-value + 'C Zu Belegen sind vorher: |@@| for previous Allocation: + 'C Xis(j) and Yis(j) + 'c Given the desired Value(search) and the Number of the existing Polygon-points (izpl) 'c 'C ' INCLUDE "com.inc"<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -2847,8 +2847,8 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus Dim x As Single 'C 'c - 'C Given the desired Value(search) and the Number of the existing Polygon-points (izpl) - 'c Search the closest points of the Revolutions from the input Full-load curve: + 'C Search the closest points of the Revolutions from the input Full-load curve: + 'c Distance to Input-points and Search those Points with the smallest Distance: aminabst = Math.Abs(such - Xis(1)) + 1 For ji = 1 To izpl x = such - Xis(ji) @@ -2859,24 +2859,24 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus End If Next ji 'c - 'C Distance to Input-points and Search those Points with the smallest Distance: + 'C Fix the second Interpolation-points (only interpolation, no extrapolation) 'C x = such - Xis(i1min) If (x >= 0) Then i2min = i1min + 1 If (i2min > izpl) Then - '!Fix the second Interpolation-points (only interpolation, no extrapolation) + '!Extrapolation up i2min = izpl - 1 End If Else i2min = i1min - 1 If (i2min < 1) Then - '!Extrapolation up + '!Extrapolation down i2min = 2 End If End If 'c - 'c Extrapolation down + 'c Sort the 2 Values by ascending n: 'c If (Xis(i2min) < Xis(i1min)) Then igel = i2min @@ -2884,7 +2884,7 @@ lb100: 'Rücksprunglabel für iterativen Berechnungsmodus i1min = igel End If 'c - 'c Sort the 2 Values by ascending n: + 'c Interpolation of the associated Maximum-power (P/Pnom) 'c If ((Xis(i2min) - Xis(i1min)) = 0) Then Xis(i2min) = Xis(i2min) + 0.000001 diff --git a/VECTO/MODcalc/cPower.vb b/VECTO/MODcalc/cPower.vb index e3df71518b51f42fcf8914cae2a31269020c0151..6651d2b8276faef2ece029edee9db15e83196a4f 100644 --- a/VECTO/MODcalc/cPower.vb +++ b/VECTO/MODcalc/cPower.vb @@ -18,7 +18,7 @@ Public Class cPower Private Bobi As Single Private Cobi As Single - 'Data per second + 'Per-second Data Private Clutch As tEngClutch Private VehState0 As tVehState Private EngState0 As tEngState @@ -3496,8 +3496,8 @@ lb10: If bCheck Then Gear = LastGear Else - 'Wenn innerhalb von 6 Sekunden einmal höher und einmal niedriger als voriger Gang |@@| If within 6 seconds it Shifts once above and once below the previous-Gear, - 'geschaltet wird, wird voriger Gang durchgehend beibehalten |@@| then maintain the previous-Gear throughout. + 'If within 6 seconds it Shifts once above and once below the previous-Gear, + 'then maintain the previous-Gear throughout. a = 0 b = 0 For ix = t To t + 6 @@ -3535,22 +3535,22 @@ lb10: Return 0 '<<< keine weiteren Checks!!! End If - 'wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet |@@| wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet + 'If v <0.1 m/s for more than 1 sec then shift to Gear=0 If t < t1 Then If (Vist < 0.1 And MODdata.Vh.V(t + 1) < 0.1) Then Return 0 '<<< keine weiteren Checks!!! End If End If - 'bei Beschleunigungsvorgaengen unter 1,5 m/s wird in 1. Gang geschaltet |@@| If v <0.1 m/s for more than 1 sec then shift to Gear=0 + 'at Acceleration processes below 1.5 m/s, then shift to 1st Gear If Vist < 1.5 And t < t1 Then If (Vist > 0.01 + MODdata.Vh.V(t - 1) And MODdata.Vh.V(t + 1) > 0.01 + Vist) Then Gear = 1 End If End If - 'ueberpruefung, ob Drehzahl ueber nenndrehzahl, dann muss immer hochgeschaltet werden |@@| at Beschleunigungsvorgaengen below 1.5 m/s is used in 1 Gear is engaged 'checking if Revolutions above Nominal-Revolutions, then always Upshift + 'otherwise lack the power! Do While fnn(Vist, Gear, Clutch = tEngClutch.Slipping) > 1 And Gear < VEH.ganganz Gear += 1 Loop @@ -3559,7 +3559,7 @@ lb10: End Function - 'otherwise lack the power! + 'EV-Gear-shifting model (based on Cars(PKW)) Private Function fGearEV(ByVal t As Integer) As Integer Dim gangX As Int16 @@ -3589,8 +3589,8 @@ lb10: Dim nx As Single Dim Vist0 As Single - '-----------------------------------EV-Gear-shifting model (based on Cars(PKW)) - 'Second 1 -------------------------------------- + '-----------------------------------Second 1 -------------------------------------- + 'First second: Find Gear / initialization If t = 0 Then gangX = -1 If (Vist <= 1.5) Then @@ -3617,27 +3617,27 @@ lb10: Return Gear End If - '--------------------------------First second: Find Gear / initialization + '--------------------------------From second 2 -------------------------------------- - '---------From second 2 -------------------------------------- - 'Start-values --------- + '---------Start-values --------- + 'gangX = Last Gear ie Starting-base for Shifting-model LastGear = MODdata.Gear(t - 1) gangX = LastGear Gear = LastGear t1 = MODdata.tDim itgangwL = -1 - 'gangX = Last Gear ie Starting-base for Shifting-model + 'Clutch-lock check << already happened in Power.Calc ''If bPplus And fn_norm(1) < Kuppln_norm Then bKupplSchleif = True - '-------------------Clutch-lock check << already happened in Power.Calc + '-------------------Calculate Gear for the next 6 seconds --------------------- '------------------------------------------------------------- Pvorher = MODdata.Pe(t - 1) tx = t Do - '-----------Calculate Gear for the next 6 seconds --------------------- + '-----------Shifting-function ---------- Vist0 = MODdata.Vh.V(t) V_norm = Vist0 / GVmax nx = fnU(Vist0, gangX, False) / VEH.nNenn @@ -3675,23 +3675,23 @@ lb10: Loop Until ix = 11 Or t > t1 t = t - ix + jpm + 1 - 'Shifting-function ---------- + 'Revolutions-limit for Upshift, n_normiert (Idle = 0, Nominal-Revolutions = 1) nnsaufi = Aaufi + Baufi * V_norm + Caufi * AP10 If (nnsaufi > 0.95) Then nnsaufi = 0.95 - 'Revolutions-limit for Upshift, n_normiert (Idle = 0, Nominal-Revolutions = 1) + 'Revolutions-limit for Downshift, n_normiert (Idle = 0, Nominal-Revolutions = 1) nnsobi = Aobi + Bobi * V_norm + Cobi * AP10 'Gelöscht LUZ 13.07.10: If (nnsaufi > 0.85) Then nnsaufi = 0.85 - 'Revolutions-limit for Downshift, n_normiert (Idle = 0, Nominal-Revolutions = 1) + 'Convert here of Revolutions units to use (n/n_nominal): nsa = (VEH.nLeerl / VEH.nNenn) + nnsaufi * (1 - (VEH.nLeerl / VEH.nNenn)) nsd = (VEH.nLeerl / VEH.nNenn) + nnsobi * (1 - (VEH.nLeerl / VEH.nNenn)) - 'Convert here of Revolutions units to use (n/n_nominal): + 'Revolutions with last Gear (gangX) 'nx = fnU(Vist, gangX, Clutch = tEngClutch.Slipping) / VEH.nNenn '----------------------------------- - ' ''Revolutions with last Gear (gangX) + ' ''Maximum permissible Gear-shifting every 2 seconds: If (t - itgangwL) < 3 And itgangwL > -1 Then GoTo lb10 - 'Maximum permissible Gear-shifting every 2 seconds: + 'Check whether Downshifting-gear, only when Revolutions decrease or Power increases bCheck = False Pjetzt = fPeGearEV(gangX, t) If Vist0 < Valt Then bCheck = True @@ -3700,7 +3700,7 @@ lb10: If nx < nsd Then gangX -= 1 End If - 'Check whether Downshifting-gear, only when Revolutions decrease or Power increases + 'Check whether Upshifting-gear, only when Revolutions increase or Power decreases bCheck = False If (Vist0 > Valt) Then bCheck = True If (Pjetzt < Pvorher) Then bCheck = True @@ -3708,7 +3708,7 @@ lb10: If nx > nsa Then gangX += 1 End If - 'Check whether Upshifting-gear, only when Revolutions increase or Power decreases + 'Correct Gear-selection If gangX > VEH.ganganz Then gangX = VEH.ganganz ElseIf gangX < 1 Then @@ -3717,16 +3717,16 @@ lb10: lb10: - 'Correct Gear-selection + 'Not idle when Power > 0 If gangX = 0 Then If Pjzx > 0.001 Then gangX = 1 End If - 'Not idle when Power > 0 + 'New Revolutions ''nn = fnn(Vist, gangX, Clutch = tEngClutch.Slipping) nn = fnn(Vist0, gangX, False) - 'New Revolutions + 'Check if Gear within Power/Revolutions limits. Drag-operation is not respected Select Case nn Case Is < Kuppln_norm If gangX > 1 Then @@ -3740,7 +3740,7 @@ lb10: End If End Select - 'Check if Gear within Power/Revolutions limits. Drag-operation is not respected + 'Save Gears in field for later checks Gcheck(t - tx) = gangX If gangX <> Gear Then itgangwL = t @@ -3752,7 +3752,7 @@ lb10: Loop Until t = tx + 11 Or t > t1 t = tx '------------------------------------------------------------- - 'Save Gears in field for later checks + 'Accept Gear gangX = Gcheck(0) For ix = t To t + 10 Gears(ix - t) = Gcheck(ix - t) @@ -3760,14 +3760,14 @@ lb10: Gear = Gears(0) - 'Accept Gear + 'Gang-Verlauf hinzufügen |@@| Add to Gang-sequence '---------------------------------------------------------------------------------- - '--------------------------------Checks Teil 1------------------------------------- |@@| Add to Gang-sequence - 'Checks Part 1 ------------------------------------- + '--------------------------------Checks Part 1 ------------------------------------- + 'Checks to Purge non-sensible Gear-shift: - ''Checks to Purge non-sensible Gear-shift: + ''Division into "IPhase(j)" stages: acceleration(=1), Deceleration(=2) and Cruise(=3): 'iphase = 0 'Select Case (beschl(jz - 2) + beschl(jz - 1) + beschl(jz)) / 3 ' Case Is >= 0.125 @@ -3777,9 +3777,9 @@ lb10: ' Case Else ' iphase = 3 'End Select - ' ============>> Division into "IPhase(j)" stages: acceleration(=1), Deceleration(=2) and Cruise(=3): + ' ============>> Already determined by VehState0 - 'Already determined by VehState0 + 'Search by last Gear-change itgangwL = -1 If t > 2 Then For ix = t - 1 To 1 Step -1 @@ -3790,16 +3790,16 @@ lb10: Next End If - 'Search by last Gear-change + 'Max permissible Gear-change every 3 seconds: If t - itgangwL <= 2 And t > 2 And LastGear <> 0 Then Return LastGear '<<< keine weiteren Checks!!! End If If Gear <> LastGear Then - 'Max permissible Gear-change every 3 seconds: 'Cruise-phases: - 'Verzoegerungsphasen: Hochschalten wird unterdrückt |@@| As long Speed-change since last Gear-shift is under 6% and Pe/Pnom below 6%, do not run: + 'Solange Geschwindigkeitsaenderung seit letztem Gangwechsel unter 6% und Pe/Pnenn aenderung unter 6% wird nicht geschaltet: |@@| As long Speed-change since last Gear-shift is under 6% and Pe/Pnom below 6%, do not run: 'Deceleration phases: Upshift suppressed + 'Acceleration phases: Downshift?(Zurückschalten) suppressed If itgangwL = -1 Then itgangwL = 0 bCheck = False Pjetzt = fPeGearEV(Gear, t) @@ -3820,8 +3820,8 @@ lb10: If bCheck Then Gear = LastGear Else - 'Acceleration phases: Downshift?(Zurückschalten) suppressed - 'durchgehend beibehalten |@@| If within 6 seconds switched back again to the previous Gear, stick + 'Wenn innerhalb von 6 Sekunden wieder in vorigen Gang zurueck geschaltet wird, wird der vorige Gang |@@| If within 6 seconds switched back again to the previous Gear, stick + 'durchgehend beibehalten |@@| to the previous Gear bCheck = False For ix = t + 1 To t + 6 If ix > t1 Then Exit For @@ -3833,8 +3833,8 @@ lb10: If bCheck Then Gear = LastGear Else - 'Wenn innerhalb von 6 Sekunden einmal höher und einmal niedriger als voriger Gang |@@| to the previous Gear - 'geschaltet wird, wird voriger Gang durchgehend beibehalten |@@| If within 6 seconds it Shifts once above and once below the previous-Gear, + 'Wenn innerhalb von 6 Sekunden einmal höher und einmal niedriger als voriger Gang |@@| If within 6 seconds it Shifts once above and once below the previous-Gear, + 'geschaltet wird, wird voriger Gang durchgehend beibehalten |@@| then maintain the previous-Gear throughout. a = 0 b = 0 For ix = t To t + 6 @@ -3851,14 +3851,14 @@ lb10: End If End If - '--------------------------------Checks Teil 2------------------------------------- |@@| then maintain the previous-Gear throughout. - 'Checks Part 2 ------------------------------------- + '--------------------------------Checks Part 2 ------------------------------------- 'Suppress Gear-shift from 2 to 1 when v > 2.5 m/s + 'NEU LUZ 040210: Hochschalten nur wenn im 2. Gang über Kuppeldrehzahl |@@| NEW LUZ 040210: Upshift only when in 2 Gear over Clutch-revolutions If Gear = 1 And LastGear > 1 And Vist >= 2.5 Then If fnn(Vist, 2, False) > Kuppln_norm Then Gear = 2 End If - 'bei verzoegerungsvorgaengen unter 2,5 m/s wird in Leerlauf geschaltet |@@| NEW LUZ 040210: Upshift only when in 2 Gear over Clutch-revolutions + 'bei verzoegerungsvorgaengen unter 2,5 m/s wird in Leerlauf geschaltet |@@| at decelerations below 2.5 m/s, shift to Idle bCheck = True For ix = t To t + 2 If ix > t1 Then Exit For @@ -3872,22 +3872,22 @@ lb10: Return 0 '<<< keine weiteren Checks!!! End If - 'wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet |@@| at decelerations below 2.5 m/s, shift to Idle + 'wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet |@@| If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 If t < t1 Then If (Vist < 0.1 And MODdata.Vh.V(t + 1) < 0.1) Then Return 0 '<<< keine weiteren Checks!!! End If End If - 'bei Beschleunigungsvorgaengen unter 1,5 m/s wird in 1. Gang geschaltet |@@| If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 + 'at Acceleration below 1.5 m/s, then shift to 1st Gear If Vist < 1.5 And t < t1 Then If (Vist > 0.01 + MODdata.Vh.V(t - 1) And MODdata.Vh.V(t + 1) > 0.01 + Vist) Then Gear = 1 End If End If - 'ueberpruefung, ob Drehzahl ueber nenndrehzahl, dann muss immer hochgeschaltet werden |@@| at acceleration processes below 1.5 m/s is used in first Gear is engaged 'Check whether Revolutions over Nominal-Revolutions, then should always Upshift, + 'otherwise Power not enough! Do While fnn(Vist, Gear, Clutch = tEngClutch.Slipping) > 1 And Gear < VEH.ganganz Gear += 1 Loop @@ -3941,8 +3941,8 @@ lb10: - '-----------------------------------otherwise Power not enough! - 'Second 1 -------------------------------------- + '-----------------------------------Second 1 -------------------------------------- + 'First second: Find Gear/Initialization If t = 0 Then gangX = -1 If (MODdata.Vh.V(t) <= 1.5) Then @@ -3979,9 +3979,9 @@ lb10: End If - '--------------------------------First second: Find Gear/Initialization + '--------------------------------From second 2 -------------------------------------- - '---------From second 2 -------------------------------------- + '---------Start-values --------- gangX = MODdata.Gear(t - 1) LastGear = gangX GangXl = GangL(t - 1) @@ -4011,7 +4011,7 @@ lb10: - 'Start-values --------- + 'Compute power from jz to (jz + 6) ----------------- tx = t For t = tx To tx + 6 If t > t1 Then Exit For @@ -4024,13 +4024,13 @@ lb10: '----------------------------------------------------------------- ' - ' Compute power from jz to (jz + 6) ----------------- + ' Berechnung nach Drehzahl/Leistung-Modell |@@| Calculated towards a Revolutions/Power model ' ' -------------------------------------------------------------- - '(1) Nach Variante "schnelle Fahrweise" |@@| Calculated towards a Revolutions/Power model + '(1) "Fast Driving" variant - '1) "Fast Driving" variant 'Gear-shift only if v-change 5% since last Gear-shift + 'VECTO: Commented out START 'achek = 1 'If (MODdata.Vh.V(itgangwH) <> 0) Then ' avchek = Math.Abs(Vist0 / MODdata.Vh.V(itgangwH) - 1) @@ -4042,26 +4042,26 @@ lb10: 'Else ' achek = 1 'End If - 'VECTO: Commented out START - 'VECTO: Commented out END + + 'in ersten 10 Zyklussekunden kann zum Einregulieren immer geschlatet werden: |@@| the first 10 seconds of the cycle can always be used for balancing gear-shifting: If (t <= 9) Then achek = -1 - 'Bei Aenderung der Steigung kann ebenfalls immer geschaltet werden: |@@| the first 10 seconds of the cycle can always be used for balancing gear-shifting: + 'A Change in the Slope can always result in Gear-shift: achstg = Math.Abs(MODdata.Vh.Grad(t) - MODdata.Vh.Grad(itgangwH)) If (achstg > 0.001) Then achek = -1 - 'A Change in the Slope can always result in Gear-shift: + 'Downshift: If (n0 <= VEH.hinunter) Then If (achek < 0.9) Then gangX = gangX - 1 End If End If - 'Downshift: - ' Upshift: - ' dabei manchmal zu hoher gang -> Drehzahl und P_max viel zu nieder, daher nu bei niederen leistungen |@@| at Sloped-cycles with excessive speed the Gear i +1 is calculated - ' hochschalten erlaubt: |@@| sometimes Gear is too high -> Revolutions and P_max too low, so only at low Power + 'Upshift: + ' bei Steigungszyklen mit zu hohen Geschwindigkeiten wird geschw. i+1 erst nach gangwahl berechnet |@@| at Sloped-cycles with excessive speed the Gear i +1 is calculated + ' dabei manchmal zu hoher gang -> Drehzahl und P_max viel zu nieder, daher nu bei niederen leistungen |@@| sometimes Gear is too high -> Revolutions and P_max too low, so only at low Power + ' hochschalten erlaubt: |@@| Upshift allowed: If (Pe0 > 0.8) Then If (n0 < 0.9) Then achek = 1 @@ -4080,11 +4080,11 @@ lb10: GangH(t) = gangX ' ----------------------------------------------------------------- - '(2) Nach Variante "sparsame Fahrweise" |@@| Upshift allowed: + '(2) "Economical Driving" Variant - ' 2) "Economical Driving" Variant ' Downshift?(Zurueckschalten) happens only when Speed-change > 6% - 'Always Upshift + ' Always Upshift + 'VECTO: Commented out START 'achek = 1 'If (MODdata.Vh.V(itgangwL) <> 0) Then ' avchek = Math.Abs(Vist0 / MODdata.Vh.V(itgangwL) - 1) @@ -4096,15 +4096,15 @@ lb10: 'Else ' achek = 1 'End If - 'VECTO: Commented out START + 'VECTO: Commented out END - ' VECTO: Commented out END + ' in ersten 10 Zyklussekunden kann zum einregulieren immer geschlatet werden: |@@| The first 10 seconds cycle can always be used for balancing Gear-shift: If (t <= 9) Then achek = -1 - ' Bei Aenderung der Steigung kann ebenfalls immer geschaltet werden: |@@| The first 10 seconds cycle can always be used for balancing Gear-shift: + ' When slope changes always may result in Gear-shift: achstg = Math.Abs(MODdata.Vh.Grad(t) - MODdata.Vh.Grad(itgangwL)) If (achstg > 0.001) Then achek = -1 - ' When slope changes always may result in Gear-shift: + ' Downshift: If (GangXl > 1) Then cnl = fnU(Vist0, GangXl, False) / VEH.nNenn If (cnl <= VEH.lhinunter) Then @@ -4114,7 +4114,7 @@ lb10: End If End If - 'Downshift: + 'Upshift, only if checked not the highest Gear: If (GangXl < VEH.ganganz) Then 'C If (Pe0 > 0.8) Then @@ -4123,7 +4123,7 @@ lb10: End If End If 'C - 'C Upshift, only if checked not the highest Gear: + 'C Relative Revolutions: cnl = fnU(Vist0, GangXl + 1, False) / VEH.nNenn @@ -4134,12 +4134,12 @@ lb10: GangL(t) = GangXl - ' Relative Revolutions: - ' der "sparsamen (..l)" Variante: |@@| Select Revolutions-relationship for the "fast (h ..)" and + ' Auswahl des Drehzahlverhaeltnisses aus der "schnellen (..h)" und |@@| Select Revolutions-relationship for the "fast (h ..)" and + ' der "sparsamen (..l)" Variante: |@@| the "economical (.. l)" Variant: - ' Drehzahlverhhealtnisse nach "Modellmix": |@@| the "economical (.. l)" Variant: - ' anhand der erforderlichen maximalen Motorleistung ueber die |@@| Revolutions-relationship for "Modelmix": - ' naechsten 6 Sekunden |@@| according to the required maximum Engine-power over the + ' Drehzahlverhhealtnisse nach "Modellmix": |@@| Revolutions-relationship for "Modelmix": + ' anhand der erforderlichen maximalen Motorleistung ueber die |@@| according to the required maximum Engine-power over the + ' next 6 seconds P_maxg = Pe0 For ix = t To t + 5 If ix > t1 Then Exit For @@ -4147,28 +4147,28 @@ lb10: If (PeX > P_maxg) Then P_maxg = PeX Next - ' next 6 seconds - ' (Determine the proportions between the Fast and the Economical Driving-style + ' Determine the proportions between the Fast and the Economical Driving-style + ' (Hausberger model): pschnellm = 3.3333 * P_maxg - 1.6667 If (pschnellm > 1) Then pschnellm = 1 If (pschnellm < 0) Then pschnellm = 0 psparm = 1.0 - pschnellm - ' Hausberger model): - ' (pmodell wird aus Eingabefile gelesen, = Anteil, zu der die Drehzahl |@@| Mix the calculated Gears as specified in the input file: - ' nach "reales Modell" bestehen soll) |@@| from the Input-file it is read the pmodell = ratios of the revolutions + ' Mix der berechneten Gaenge gemaess Vorgabe in Eingabefile: |@@| Mix the calculated Gears as specified in the input file: + ' (pmodell wird aus Eingabefile gelesen, = Anteil, zu der die Drehzahl |@@| from the Input-file it is read the pmodell = ratios of the revolutions + ' nach "reales Modell" bestehen soll) |@@| towards a "real model") psparist = VEH.pspar + psparm * VEH.pmodell pschist = 1.0 - psparist - ' Ermittlung des "virtuellen" aktuellen Ganges nach Modell |@@| towards a "real model") + ' Ermittlung des "virtuellen" aktuellen Ganges nach Modell |@@| Determine the "virtual" up-to-date Gears from the Model Gear = Math.Round((pschist) * GangH(t) + (psparist) * GangL(t), 0, MidpointRounding.AwayFromZero) If (Gear > VEH.ganganz) Then Gear = VEH.ganganz If (Gear < 1) Then Gear = 1 - ' ueberpruefung, ob Drehzahl ueber nenndrehzahl, dann muss immer hochgeschaltet werden |@@| Determine the "virtual" up-to-date Gears from the Model ' check if Revolutions over Nominal-Revolutions, then must always upshift, + ' otherwise Power not enough! lb88: n0 = fnU(Vist0, Gear, False) / VEH.nNenn If (n0 > 1) Then @@ -4178,8 +4178,8 @@ lb88: End If End If - ' otherwise Power not enough! ' Check whether required Power is over P_max (s) + ' then Downshift?(zurueckgeschaltet): For ix = 1 To VEH.ganganz n0 = fnU(Vist0, ix, False) / VEH.nNenn @@ -4205,17 +4205,17 @@ lb88: End If Next - ' then Downshift?(zurueckgeschaltet): + ' Eigentliche Ueberpruefung ob ueber P_max(n) |@@| Check whether Actual over P_max (s) lb909: Pivoll = FLD.Pfull(fnn(MODdata.Vh.V(t), Gear, ClutchSlip), LastPe) / VEH.Pnenn - 'falls schlechte Vollastkurve ohne Moment in leerlauf wird korrigiert: |@@| Check whether Actual over P_max (s) + 'falls schlechte Vollastkurve ohne Moment in leerlauf wird korrigiert: |@@| if bad Full-load-curve without Torque, then correct in Idle: If (Pivoll < 0.06) Then Pivoll = 0.06 - ' Ueberpruefung, ob hoehere Leistung erforderlich ist als Maximalleistung bei nh |@@| if bad Full-load-curve without Torque, then correct in Idle: - ' dann wird zurueckgeschaltet: |@@| Checking whether required Power is higher than maximum power at nh + ' Ueberpruefung, ob hoehere Leistung erforderlich ist als Maximalleistung bei nh |@@| Checking whether required Power is higher than maximum power at nh + ' dann wird zurueckgeschaltet: |@@| then Gear-shift-back?(zurueckgeschaltet): If (Pe0 > Pivoll) Then If t = tx Then OverPfull = True @@ -4253,16 +4253,16 @@ lb909: '' Exit Function ''End If - 'c Ende "Modell"-Basisgangwahl |@@| then Gear-shift-back?(zurueckgeschaltet): + 'c Ende "Modell"-Basisgangwahl |@@| End "model"-Gear-selection basis '--------------------------------------------------- - 'Kuppelschleif-check |@@| End "model"-Gear-selection basis + 'Kuppelschleif-check |@@| Clutch-lock check ''If bPplus And fn_norm(1) < Kuppln_norm Then bKupplSchleif = True - '--------------------------------Checks Teil 1------------------------------------- |@@| Clutch-lock check - 'Checks Part 1 ------------------------------------- + '--------------------------------Checks Part 1 ------------------------------------- 'Checks to Purge non-sensible Gear-shift: + 'Division into "IPhase(j)" stages: Acceleration(=1), Deceleration(=2) and Cruise(=3): iphase = 0 If t > 1 Then Select Case (MODdata.Vh.a(t - 2) + MODdata.Vh.a(t - 1) + MODdata.Vh.a(t)) / 3 @@ -4287,7 +4287,7 @@ lb909: End Select End If - 'Division into "IPhase(j)" stages: Acceleration(=1), Deceleration(=2) and Cruise(=3): + 'Search by last Gear-change itgangwL = 0 For ix = t - 1 To 1 Step -1 If MODdata.Gear(ix) <> MODdata.Gear(ix - 1) Then @@ -4296,15 +4296,15 @@ lb909: End If Next - 'Search by last Gear-change + 'Maximum permissible Gear-shifts every 3 seconds: If t - itgangwL <= 3 And t > 2 Then Return LastGear '<<< keine weiteren Checks!!! End If - 'Maximum permissible Gear-shifts every 3 seconds: 'Cruise-phases: 'As long Speed-change since last Gear-shift is below 6% and Pe/Pnom below 6% then do not Gear-shift: 'Deceleration-phases: Upshift suppressed + 'Acceleration phases: Downshift?(Zurückschalten) suppressed bCheck = False Pjetzt = fPeGearMod(Gear, t) Pvorher = MODdata.Pe(itgangwL) @@ -4323,9 +4323,9 @@ lb909: If (iphase = 2) And Gear > MODdata.Gear(t - 1) Then bCheck = True If bCheck Then Gear = LastGear - 'Acceleration phases: Downshift?(Zurückschalten) suppressed 'If within 6 seconds switched back again to the previous Gear, then 'stick to previous Gear + 'VECTO: Exception: on Full-load curve If Not OverPfull Then bCheck = False For ix = t + 1 To t + 6 @@ -4336,8 +4336,8 @@ lb909: End If - 'VECTO: Exception: on Full-load curve 'If within the 6 seconds, it shifts once to higher and once to lower-Gear than the previous one, then + 'stick to the previous Gear. a = 0 b = 0 If (Gear <> LastGear) Then @@ -4353,14 +4353,14 @@ lb909: End If End If - '--------------------------------stick to the previous Gear. - 'Checks Part 2 ------------------------------------- + '--------------------------------Checks Part 2 ------------------------------------- 'Shifting from 2nd to 1st Gear is suppressed when v > 1.5 m/s + 'NEU LUZ 040210: Hochschalten nur wenn im 2. Gang über Kuppeldrehzahl |@@| NEW LUZ 040210: Upshifting only when in 2nd Gear over the Clutch-revolutions If Gear = 1 And LastGear > 1 And Vist >= 1.5 Then If fnn(Vist, 2, False) > Kuppln_norm Then Gear = 2 End If - 'bei verzoegerungsvorgaengen unter 1.5 m/s wird in Leerlauf geschaltet |@@| NEW LUZ 040210: Upshifting only when in 2nd Gear over the Clutch-revolutions + 'bei verzoegerungsvorgaengen unter 1.5 m/s wird in Leerlauf geschaltet |@@| at decelerations below 1.5 m/s, shift to Idle bCheck = False For ix = t To t + 2 If ix > t1 Then Exit For @@ -4372,7 +4372,7 @@ lb20: Return 0 '<<< keine weiteren Checks!!! End If - 'wenn v mehr als 1 Sek. < 0.1 m/s wird auf Gang=0 geschaltet |@@| at decelerations below 1.5 m/s, shift to Idle + 'If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 If t < t1 Then If (Vist < 0.1 And MODdata.Vh.V(t + 1) < 0.1) Then Return 0 '<<< keine weiteren Checks!!! @@ -4380,8 +4380,8 @@ lb20: End If - 'If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 'Check if Revolutions over Nominal-revolutions, then should always Upshift, + 'otherwise Power not enough! Do While fnn(Vist, Gear, ClutchSlip) > 1 And Gear < VEH.ganganz Gear += 1 Loop @@ -4421,7 +4421,7 @@ lb20: End If End If - 'otherwise Power not enough! + 'Speed look-ahead If t = MODdata.tDim Then v1 = v v2 = v @@ -4434,8 +4434,8 @@ lb20: End If End If - 'Speed look-ahead 'Checks Gears for Cars(PKW) .... + 'Schalten von 2. in 1. Gang wird bei v>2,5 m/s unterdrueckt |@@| Gear-shifting from 2nd to 1st is suppressed at v > 2.5 m/s If (g = 1) Then If (g0 > g) Then If (v >= 2.5) Then @@ -4444,7 +4444,7 @@ lb20: End If End If - 'Bei verzoegerungsvorgaengen unter 2,5 m/s wird in Leerlauf geschaltet |@@| Gear-shifting from 2nd to 1st is suppressed at v > 2.5 m/s + 'Bei verzoegerungsvorgaengen unter 2,5 m/s wird in Leerlauf geschaltet |@@| At decelerations below 2.5 m/s, shift to Idle If (v < 2.5) Then If (v <= v0 And v1 <= v) Then If (v2 <= v1) Then @@ -4453,12 +4453,12 @@ lb20: End If End If - 'Wenn v mehr als 1 Sek. <0.1 m/s wird auf Gang=0 geschaltet |@@| At decelerations below 2.5 m/s, shift to Idle + 'If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 If (v < 0.1 And v1 < 0.1) Then g = 0 End If - 'If v < 0.1 m/s for more than 1 sec, then shift to Gear=0 + 'When Acceleration below 1.5 m/s, then shift to 1st Gear If (v < 1.5) Then If v > v0 And v1 > v Then g = 1 @@ -4485,12 +4485,12 @@ lb20: Return g0 End Function - 'When Speed?(Beschleunigungsvorgaengen) below 1.5 m/s, then shift to 1st Gear + 'Function calculating the Power easily for Gear-shift-model Private Function fPeGearMod(ByVal Gear As Integer, ByVal t As Integer) As Single Return fPvD(t) / VEH.Pnenn End Function - 'Function calculating the Power easily for Gear-shift-model + 'Function calculating the Power easily for EV-shift-model Private Function fPeGearEV(ByVal Gear As Integer, ByVal t As Integer) As Single Dim PaM As Single Dim nU As Single @@ -4505,7 +4505,7 @@ lb20: nU = fnU(V, Gear, False) If Nvorg Then - 'Function calculating the Power easily for EV-shift-model + 'Revolutions-setting PaM = (VEH.I_mot * MODdata.dnUvorg(t) * 0.01096 * MODdata.nUvorg(t)) * 0.001 Else PaM = ((VEH.I_mot * (VEH.AchsI * VEH.Igetr(Gear) / (0.5 * VEH.Dreifen)) ^ 2) * a * V) * 0.001 @@ -4549,7 +4549,7 @@ lb20: #Region "Leistungsberechnung" - '--------------Revolutions-setting + '--------------Power in-front?(vor) of Diff = At Wheel ------------- Private Function fPvD(ByVal t As Integer) As Single Return fPr(MODdata.Vh.V(t)) + fPair(MODdata.Vh.V(t), t) + fPaFZ(MODdata.Vh.V(t), MODdata.Vh.a(t)) + fPs(MODdata.Vh.V(t), t) End Function @@ -4558,12 +4558,12 @@ lb20: Return fPr(v) + fPair(v, t) + fPaFZ(v, a) + fPs(v, t) End Function - '----------------Power in-front?(vor) of Diff = At Wheel ------------- + '----------------Rolling-resistance---------------- Private Function fPr(ByVal v As Single) As Single Return CSng((VEH.Loading + VEH.Mass + VEH.MassExtra) * 9.81 * (VEH.Fr0 + VEH.Fr1 * v + VEH.Fr2 * v ^ 2 + VEH.Fr3 * v ^ 3 + VEH.Fr4 * v ^ 4) * v * 0.001) End Function - '----------------Rolling-resistance---------------- + '----------------Drag-resistance---------------- Private Function fPair(ByVal v As Single, ByVal t As Integer) As Single Dim vair As Single Dim Cd As Single @@ -4588,24 +4588,24 @@ lb20: End Function - '--------Drag-resistance---------------- + '--------Vehicle Acceleration-capability(Beschleunigungsleistung) -------- Private Function fPaFZ(ByVal v As Single, ByVal a As Single) As Single - 'Vehicle Acceleration-capability(Beschleunigungsleistung) -------- - ' Previously (PHEM 10.4.2 and older) the m_raeder was used for Massered instead, with Massered = m_raeder + I_Getriebe * (Iachs / (0.5 * Dreifen)) ^ 2 + 'Previously (PHEM 10.4.2 and older) the m_raeder was used for Massered instead, with Massered = m_raeder + I_Getriebe * (Iachs / (0.5 * Dreifen)) ^ 2 + ' The missing part (I_Getriebe * (Iachs / (0.5 * Dreifen)) ^ 2) is now considered by fPaG(V,a) Return CSng(((VEH.Mass + VEH.MassExtra + VEH.m_raeder_red + VEH.Loading) * a * v) * 0.001) End Function - '----------------The missing part (I_Getriebe * (Iachs / (0.5 * Dreifen)) ^ 2) is now considered by fPaG(V,a) + '----------------Slope resistance ---------------- Private Function fPs(ByVal v As Single, ByVal t As Integer) As Single fPs = CSng(((VEH.Loading + VEH.Mass + VEH.MassExtra) * 9.81 * MODdata.Vh.Grad(t) * 0.01 * v) * 0.001) End Function - '----------------Slope resistance ---------------- + '----------------Ancillaries(Nebenaggregate) ---------------- Private Function fPaux(ByVal t As Integer, ByVal nU As Single) As Single Return CSng(VEH.Paux0 * VEH.Pnenn + MODdata.Vh.Padd(t) + VEH.PauxSum(t, nU)) End Function - '-------------------Ancillaries(Nebenaggregate) ---------------- + '-------------------Transmission(Getriebe)------------------- Private Function fPlossGB(ByVal PvD As Single, ByVal V As Single, ByVal Gear As Integer) As Single Dim Pdiff As Single Dim P As Single @@ -4630,12 +4630,12 @@ lb20: n = nU / VEH.nNenn - 'Transmission(Getriebe)------------------- + 'Leistung nach Getriebe (Getriebeausgang) |@@| Power to Transmission (Transmission-output) P = Math.Abs(PvD) + Pdiff - 'Verluste berechnet (eignet sich nur für Schaltgetriebe) |@@| Power to Transmission (Transmission-output) - ' Calculate Losses (suitable only for Manual-transmission(Schaltgetriebe)) + 'Calculate Losses (suitable only for Manual-transmission(Schaltgetriebe)) ' Interpolation of the Transmission-power-loss + ' Between 1 and 8 Gear, as well as between 9 and 16 Gear: If (Gear <= 8) Then iTemp = VEH.Igetr(1) P1_getr = VEH.Pnenn * 0.0025F * (-0.45F + 36.03F * (n / iTemp) + 14.97F * (P / VEH.Pnenn)) @@ -4659,8 +4659,8 @@ lb20: Case Else 'tTransLossModel.Detailed - '***Between 1 and 8 Gear, as well as between 9 and 16 Gear: - ' Differential + '***Differential + ' Power after Differential (before Transmission) P = PvD + Pdiff Return Math.Max(VEH.IntpolPeLoss(Gear, nU, P), 0) @@ -4679,7 +4679,7 @@ lb20: Case tTransLossModel.Basic - 'Power after Differential (before Transmission) + 'Pdiff anrad = (60 * V) / (VEH.Dreifen * Math.PI) Pdiff = VEH.fGetr * VEH.Pnenn * 0.0025 * (-0.47 + 8.34 * (anrad / VEH.nNenn) + 9.53 * (Math.Abs(PvD) / VEH.Pnenn)) If (Pdiff <= 0) Then Pdiff = 0 @@ -4688,8 +4688,8 @@ lb20: Case Else 'tTransLossModel.Detailed - '***Differenzial - ' Differential + '***Differential + ' Power before Differential Return Math.Max(VEH.IntpolPeLoss(0, (60 * V) / (VEH.Dreifen * Math.PI) * VEH.Igetr(0), PvD), 0) End Select @@ -4741,7 +4741,7 @@ lb20: Return VEH.RtPeLoss(Vist, Gear) End Function - '----------------Power before Differential + '----------------Gearbox inertia ---------------- Private Function fPaG(ByVal V As Single, ByVal a As Single) As Single Dim Mred As Single Mred = CSng(VEH.I_Getriebe * (VEH.AchsI / (0.5 * VEH.Dreifen)) ^ 2) diff --git a/VECTO/MODcalc/cVh.vb b/VECTO/MODcalc/cVh.vb index 3156c26e7668faa9e0e251d7df2515b1363fd29d..458f52bce2f48998009bb621c36511edbfd97375 100644 --- a/VECTO/MODcalc/cVh.vb +++ b/VECTO/MODcalc/cVh.vb @@ -2,7 +2,7 @@ Public Class cVh - 'Aus DRI-Datei + 'From DRI file Private lV As List(Of Single) 'Ist-Geschw. in Zwischensekunden. Private lV0ogl As List(Of Single) 'Original DRI-Geschwindigkeit. Wird nicht geändert. Private lV0 As List(Of Single) 'DRI-Geschwindigkeit. Bei Geschw.-Reduktion in Zeitschritt t wird LV0(t+1) reduziert. @@ -12,10 +12,10 @@ Public Class cVh Private lVairVres As List(Of Single) Private lVairBeta As List(Of Single) - 'From DRI file + 'Calculated Private la As List(Of Single) - 'Calculated + 'WegKor |@@| Route(Weg)Correct Private WegIst As Single Private Weg As List(Of Single) Private WegX As Integer @@ -55,7 +55,7 @@ Public Class cVh Dim L As List(Of Double) Dim Val As Single - 'Geschwindigkeit |@@| Route(Weg)Correct + 'Speed If DRI.Vvorg Then L = DRI.Values(tDriComp.V) @@ -66,7 +66,7 @@ Public Class cVh If lV(s) < 0.001 Then lV(s) = 0 '<= aus Leistg Next - 'Speed + 'Original-speed is longer by 1 lV0.Add(DRI.Values(tDriComp.V)(MODdata.tDim + 1)) If DRI.Scycle Then For s = 0 To MODdata.tDim + 1 @@ -76,7 +76,7 @@ Public Class cVh lV0ogl.Add(DRI.Values(tDriComp.V)(MODdata.tDim + 1)) End If - 'Original-speed is longer by 1 + 'Strecke (aus Zwischensekunden sonst passiert Fehler) |@@| Segment (from Intermediate-seconds, otherwise Error) Weg.Add(lV(0)) For s = 1 To MODdata.tDim Weg.Add(Weg(s - 1) + lV(s)) @@ -84,7 +84,7 @@ Public Class cVh End If - 'Steigung |@@| Segment (from Intermediate-seconds, otherwise Error) + 'Slope If DRI.GradVorg Then L = DRI.Values(tDriComp.Grad) For s = 0 To MODdata.tDim @@ -96,7 +96,7 @@ Public Class cVh Next End If - 'Slope + 'Gear - but not Averaged, rather Gang(t) = DRI.Gear(t) If DRI.Gvorg Then L = DRI.Values(tDriComp.Gears) For s = 0 To MODdata.tDim @@ -109,7 +109,7 @@ Public Class cVh Next End If - 'Gear - but not Averaged, rather Gang(t) = DRI.Gear(t) + 'Padd If DRI.PaddVorg Then L = DRI.Values(tDriComp.Padd) For s = 0 To MODdata.tDim @@ -121,7 +121,7 @@ Public Class cVh Next End If - 'Beschl. berechnen + 'Calculate Acceleration If DRI.Vvorg Then L = DRI.Values(tDriComp.V) For s = 0 To MODdata.tDim @@ -129,7 +129,7 @@ Public Class cVh Next End If - 'Calculate Acceleration + 'Vair specifications: Not in Intermediate-seconds! If DRI.VairVorg Then L = DRI.Values(tDriComp.VairVres) @@ -154,7 +154,7 @@ Public Class cVh Dim s As Integer Dim L As List(Of Double) - 'Vair specifications: Not in Intermediate-seconds! + 'Speed If DRI.Vvorg Then L = DRI.Values(tDriComp.V) @@ -166,7 +166,7 @@ Public Class cVh If lV(s) < 0.001 Then lV(s) = 0 '<= aus Leistg Next - 'Speed + 'Strecke |@@| Segment Weg.Add(lV(0)) For s = 1 To MODdata.tDim Weg.Add(Weg(s - 1) + lV(s)) @@ -174,7 +174,7 @@ Public Class cVh End If - 'Steigung |@@| Segment + 'Slope If DRI.GradVorg Then L = DRI.Values(tDriComp.Grad) For s = 0 To MODdata.tDim @@ -186,7 +186,7 @@ Public Class cVh Next End If - 'Slope + 'Gear - not Averaged, rather Gear(t) = DRI.Gear(t) If DRI.Gvorg Then L = DRI.Values(tDriComp.Gears) For s = 0 To MODdata.tDim @@ -199,7 +199,7 @@ Public Class cVh Next End If - 'Gear - not Averaged, rather Gear(t) = DRI.Gear(t) + 'Padd If DRI.PaddVorg Then L = DRI.Values(tDriComp.Padd) For s = 0 To MODdata.tDim @@ -211,7 +211,7 @@ Public Class cVh Next End If - 'Beschl. berechnen + 'Calculate Acceleration If DRI.Vvorg Then la.Add(DRI.Values(tDriComp.V)(1) - DRI.Values(tDriComp.V)(0)) For s = 1 To MODdata.tDim - 1 @@ -254,7 +254,7 @@ Public Class cVh Public Sub DistCorrection(ByVal t As Integer) - 'Calculate Acceleration + 'TODO: If veh faster than cycle ... Dim v As Single Dim a As Single @@ -270,13 +270,13 @@ Public Class cVh - 'TODO: If veh faster than cycle ... + 'Falls Zeitschritt wiederholen näher an Wegvorgabe als aktueller Weg => Zeitschritt wiederholen |@@| If the repeating Time-step is closer to the Specified-route than the Actual-route => Repeat Time-step If (Math.Abs(WegIst + Vsoll(t) - Weg(WegX)) < Math.Abs(WegIst - Weg(WegX))) And v > 0.1 Then Duplicate(t + 1) MODdata.tDim += 1 - 'Falls nächsten Zeitschritt löschen näher an Wegvorgabe als aktueller Weg => Nächsten Zeitschritt löschen |@@| If the repeating Time-step is closer to the Specified-route than the Actual-route => Repeat Time-step + 'Falls nächsten Zeitschritt löschen näher an Wegvorgabe als aktueller Weg => Nächsten Zeitschritt löschen |@@| If the next Time-step to Delete closer to specified Route than the Actual-route => Delete Next Time-step 'ElseIf WegX < MODdata.tDimOgl - 1 AndAlso t < MODdata.tDim - 1 AndAlso WegIst > Weg(WegX + 1) AndAlso Math.Abs(WegIst - Weg(WegX + 1)) <= Math.Abs(WegIst - Weg(WegX)) Then ' Do @@ -288,7 +288,7 @@ Public Class cVh Else - 'Keine Korrektur |@@| If the next Time-step to Delete closer to specified Route than the Actual-route => Delete Next Time-step + 'No correction WegX += 1 End If diff --git a/VECTO/M_Lese.vb b/VECTO/M_Lese.vb index ebd305814c9320bba925701b2d35d311dcdba888..28d0d7f9f77ec0ad8b0f4b7b679d4a525a423980 100644 --- a/VECTO/M_Lese.vb +++ b/VECTO/M_Lese.vb @@ -32,7 +32,7 @@ Module M_Lese Return False End Try - 'VECTO: Defaultwerte für Parameter die nicht mehr in der .GEN/.VECTO sind werden beim Einlesen über SetDefault belegt. |@@| VECTO: Default values for the parameters are no longer in GEN/.VECTO are to be occupied in reading about SetDefault. + 'VECTO: Defaultwerte für Parameter die nicht mehr in der .GEN/.VECTO sind werden beim Einlesen über SetDefault belegt. |@@| VECTO: Default values for the parameters are no longer in GEN/.VECTO but are allocated when Read about SetDefault. CycleFiles.Clear() diff --git a/VECTO/My Project/AssemblyInfo.vb b/VECTO/My Project/AssemblyInfo.vb index ce2c78cdc97e865c3b5bb632a5d49b40405a28d4..9deeb8d7a99ea443f91bb8d2aecb4174c3ec0abe 100644 --- a/VECTO/My Project/AssemblyInfo.vb +++ b/VECTO/My Project/AssemblyInfo.vb @@ -2,12 +2,12 @@ Imports System.Reflection Imports System.Runtime.InteropServices -' Allgemeine Informationen über eine Assembly werden über die folgenden ' Below is the General Information about the Attributes ' controlling the Assembly. Change these attribute values to modify the information - ' associated with the Assembly. +' Review the values of the Assembly Attributes + <Assembly: AssemblyTitle("VECTO")> <Assembly: AssemblyDescription("")> <Assembly: AssemblyCompany("TUG")> @@ -17,18 +17,18 @@ Imports System.Runtime.InteropServices <Assembly: ComVisible(False)> -'Review the values of the Assembly Attributes +'The following GUID is for the ID of the Typelib if this project is exposed to COM <Assembly: Guid("175c31e7-2d95-4afb-afec-c4d7719177db")> -' The following GUID is for the ID of the Typelib if this project is exposed to COM +' Version information for an assembly consists of the following four values: ' -' Version information for an assembly consists of the following four values: ' Major Release ' Minor Release ' Build Number +' Revision ' -' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern ' You can specify all the values or use the defaults for Build and Revision Numbers +' by entering "*" in them: ' <Assembly: AssemblyVersion("1.0.*")> <Assembly: AssemblyVersion("1.0.0.0")>