Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit a4847fb8 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge pull request #8 in VECTO/vecto-dev from...

Merge pull request #8 in VECTO/vecto-dev from ~EMQUARIMA/vecto-dev-ff:feature/VECTO-1082-include-waste-heat-recovery-systems to develop

* commit 'd26024d6': (28 commits)
  fix: set ignition state in torque converter if locked
  renaming property engine stop/start activation delay, separate reader and class for ESS driver data
  re-compiled user manual, adding whr do fc-map
  updating engine file to new file format
  correcting wrong naming in engine form
  adding missing units to aux columns in mod data
  updating user manual (WHR, ESS), some clarifications on ESS and WHR in .vmod and .vsum
  removing testcase no longer relevant, re-activating ng-ci fuel in testcase
  updating engineering job xml testdata
  adding note regarding whr to gui
  make engineering xml with dual fuel and whr work, some refactoring
  adding testcase for whr with engineering xml
  adding dual fuel and whr to xml in engineering mode, adapting schema and adding sample files
  updating writing engineering xml
  updating test files
  updating testdata (vmod and vsum) - new columns for whr
  updatgin engineering schema, updating manufacturer report (added whr type)
  adding dual fuel for json job files in engineering mode
  adding testcase for dual fuel in engineering mode
  adding whr to gui (.vecto jobs in declaration and engineering mode)
  ...
parents b06bf224 d26024d6
No related branches found
Tags Build/v0.7.3.2171
No related merge requests found
Showing
with 1541 additions and 165 deletions
......@@ -54,11 +54,18 @@ The Cold/Hot Emission Balancing Factor is an additional correction factor that i
In engineering a single correction factor for correcting WHTC, Cold/Hot Balancing, ... can be specified.
</div>
###Dual Fuel Engines
If the engine is operated in dual-fuel mode, enabling the checkbox "Dual Fuel Engine" shows an additional tab for providing the fuel type, fuel consumption map, and fuelconsumption correction factors for the second fuel. For dual-fuel engines the result files (.vmod, .vsum, XML reports) contain the fuel consumption for each fuel separately and the total CO2 emissions.
###Waste Heat Recovery
In case the engine is equipped with a waste heat recovery system (WHR) the WHR type can be selected from the drop-down list. For WHR systems that generate mechanlical power no further input is required - the WHR shall be considered in the fuel consumption map already. For WHR systems with electrical power output the generated electrical power needs to be provided in the [Fuel Consumption Map](#fuel-consumption-map-.vmap) of the primary fuel. The final fuel consumption is at the end corrected for the electric energy generated by the WHR system (see [fuel consumption correction](#engine-fuel-consumption-correction))
###Chart Area
The Chart Area shows the fuel consumption map and the selected full load curve.
The Chart Area shows the fuel consumption map and the selected full load curve. The fuel consumption map of the primary fuel is plotted in red and if provided the secondary fuel is plotted in green.
###Controls
......
......@@ -24,7 +24,7 @@ Parameters in [Job File](#job-file):
###Engine Stop/Start
If engine stop/start is enabled in the Vehicle, the engine is turned off during vehicle stops to reduce the fuel consumption. During vehicle stops the energy demand for certain auxiliaires and for starting the engine is accumulated. In a post-processing step the final [fuel consumption is corrected](#engine-stopstart-fuel-consumption-correction) to consider the energy demand for the auxiliaries and engine start.
If engine stop/start is enabled in the Vehicle, the engine is turned off during vehicle stops to reduce the fuel consumption. During vehicle stops the energy demand for certain auxiliaires and for starting the engine is accumulated. In a post-processing step the final [fuel consumption is corrected](#engine-fuel-consumption-correction) to consider the energy demand for the auxiliaries and engine start.
<div class="declaration">
In declaration mode, the engine is switched on after a period of 120 seconds of engine-off.
......
##Engine Stop/Start Fuel Consumption Correction
##Engine Fuel Consumption Correction
The energy demand of the auxiliaries during engine-off periods as well as for starting the engine is accumulated (see [Engine Stop/Start](#advanced-driver-assistant-systems-eco-roll-engine-stopstart)). The total fuel consumption is corrected in a post-processing step according to the *vehline* approach. Therefore, for every engine operating point with a positive fuel consumption the fuel consumption is plotted over the engine power. The slope (k) of the linear regression of the fuel consumption is used to compute the additional fuel that is needed for the energy demand during engine-off periods and engine starts.
The final fuel consumption is corrected in a post-processing to reflect systems not directly modeled in VECTO (e.g. electric waste heat recovery sysmtes) or to account for systems not active all the time for different reasons (e.g., engine stop-start).
###Engine Stop/Start Correction
As the energy demand of auxiliaries is modeled as an average power demand over the whole simulated cycle, the energy demand certain auxiliaries during engine-off periods needs to be compensated during engine-on periods. This is done using the [Vehicle-Line approach](##vehicle-line-approach). The energy demand of the auxiliaries that shall be active also during engine-off periods as well as the energy demand for starting the engine is accumulated (see [Engine Stop/Start](#advanced-driver-assistant-systems-eco-roll-engine-stopstart)) during the simulation. The final fuel consumption is corrected for this "missing" energy
###Electric Waste Heat Recovery Systems
VECTO currently does not model the vehicle's electric system. The power demand of all electric consumers is calculated to the equivalent mechanical power demand considering the alternator's efficiency. Thus, the electric power of an electric WHR system cannot be considered directly but the final fuel consumption is corrected for the generated electric power. During the cycle the electric power generated by the WHR system is accumulated. This electric energy is converted to the equivalent mechanical energy that the combustion engine "does not need to provide" considering the alternator's efficiency.
###Vehicle-Line Approach
The total fuel consumption is corrected in a post-processing step according to the *vehline* approach. Therefore, for every engine operating point where the engine is switched on and has a positive fuel consumption the fuel consumption is plotted over the engine power. The slope (k) of the linear regression of the fuel consumption is used to compute the additional fuel that is needed for the energy demand during engine-off periods and engine starts.
![](pics/FC_Correction.PNG)
$\Delta FC = k * (E_{aux,ICE,off} + E_{ICE,start})$
$\Delta FC = k * (E_{aux,ICE,off} + E_{ICE,start} - E_{WHR,corr}/\eta_{alternator})$
$FC_{final} = FC_{final,mod} + \Delta FC$
......@@ -3,7 +3,7 @@ The FC map is used to interpolate the base fuel consumption before corrections
- Filetype: .vmap
- Header: **engine speed [rpm], torque [Nm], fuel consumption [g/h]**
- Header: **engine speed [rpm], torque [Nm], fuel consumption [g/h]**, *whr power \[W\]* (required only if an electric WHR system is used)
- Requires at least 3 data entries
- The map must cover the full engine range between full load and motoring curve.
......
......@@ -6,11 +6,15 @@ In Vecto 3 the structure of the modal data output has been revised and re-struct
Every line in the .vmod file represents the simulation interval from time - dt/2 to time + dt/2. All values represent the average power/torque/angular velocity during this simulation interval. If a certain power value can be described as function of the vehicle's acceleration the average power is calculated by
$P_{avg} = \frac{1}{simulation interval} \int{P(t) dt}$.
**Note:** Columns for the torque converter operating point represent the torque/angular speed at the end of the simulation interval!
###Quantities:
The following table lists the columns in the .vmod file:
***Quantities:***
**Note:** For dual-fuel vehicles the fuel consumption columns are present for each fuel (e.g., FC-Map_Diesel CI, FC-Map_NG CI).
| **Name** | **Unit** | **Description** |
| ----------------- | ---------------------- | -------------------------- |
......@@ -57,8 +61,10 @@ $P_{avg} = \frac{1}{simulation interval} \int{P(t) dt}$.
| P_roll | [kW] | Rolling resistance power loss. |
| P_veh_inertia | [kW] | Power loss due to the vehicle's inertia |
| P_aux_<XXX> | [kW] | Power demand for every individual auxiliary. Only if the run has auxiliaries. |
| P_aux_ESS_mech | [kW] | Power demand for the auxiliaries considered during engine off periods, multiplied by the engine start/stop utility factor. The final fuel consumption (.vsum) is correctedd for this power demand in a [post-processing step](#engine-stopstart-fuel-consumption-correction). |
| P_ice_start | [kW] | Power demand for starting the engine after an engine-off period multiplied by the engine start/stop utility factor. P_ice_start = [E_ice_start](#advanced-driver-assistant-systems-eco-roll-engine-stopstart) / dt. The final fuel consumption (.vmod) is corrected for this power demand in a [post-processing step](#engine-stopstart-fuel-consumption-correction). |
| P_WHR_el | [kW] | Power generated by an electric WHR system, interpolated from WHR map. |
| P_WHR_el_corr | [kW] | Power generated by an electric WHR system after applying |
| P_aux_ESS_mech | [kW] | Power demand of the auxiliaries considered during engine off periods, multiplied by the engine start/stop utility factor. The final fuel consumption (.vsum) is correctedd for this power demand in a [post-processing step](#engine-fuel-consumption-correction). This power demand has no influence on FC-Map. |
| P_ice_start | [kW] | Power demand for starting the engine after an engine-off period multiplied by the engine start/stop utility factor. P_ice_start = [E_ice_start](#advanced-driver-assistant-systems-eco-roll-engine-stopstart) / dt. The final fuel consumption (.vmod) is corrected for this power demand in a [post-processing step](#engine-fuel-consumption-correction). This power demand has no influence on FC-Map. |
| P_PTO_consum | [kW] | Power demand from the PTO consumer. Only if the vehicle has a PTO consumer. |
| P_PTO_transmission| [kW] | Power demand from the PTO transmission. Only if the vehicle has a PTO consumer. |
| AA_NonSmartAlternatorsEfficiency | [Fraction] | Non-Smart Alternators Efficiency, Advance Auxiliaries Module |
......@@ -81,11 +87,11 @@ $P_{avg} = \frac{1}{simulation interval} \int{P(t) dt}$.
| T_TC_in | [Nm] | Torque converter operating point: input torque |
| n_TC_in | [rpm] | Torque converter operating point: input speed |
| FC-Map | [g/h] | Fuel consumption interpolated from FC map. |
| FC-AUXc | [g/h] | Fuel consumption after [Auxiliary-Start/Stop Correction](#engine-fuel-consumption-calculation) (based on FC) |
| FC-WHTCc | [g/h] | Fuel consumption after [WHTC Correction](#engine-fuel-consumption-calculation) (based on FC-AUXc) |
| FC-AAUX | [g/h] | Fuel consumption computed by the AAUX module considering smart auxiliaries |
| FC-ESS | [g/h] | Fuel consumption considering engine stop/start. During engine-on periods equals FC-AAUX, during engine-off periods the fuel consumption for supplying all auxiliaries at idling speed multiplied by (1 - engine stop/start utility factor) - see [Engine Stop/Start](#advanced-driver-assistant-systems-eco-roll-engine-stopstart) |
| FC-Final_mod | [g/h] | Instantaneous final fuel consumption value after all applicable corrections |
| FC-NCVc | [g/h] | Fuel consumption corrected for different NCV values in VECTO and VECTO Engine (FC-NCVc = FC-Map * LowerHeatingValueVectoEngine(fuel) / LowerHeatingValueVecto(fuel) ) |
| FC-WHTCc | [g/h] | Fuel consumption after [WHTC Correction](#engine-fuel-consumption-calculation) (FC-WHTCc = FC-NCVc * WHTCCorrectionFactor(cycle, fuel) ) |
| FC-AAUX | [g/h] | Fuel consumption computed by the AAUX module considering smart auxiliaries. (FC-AAUX = FC-WHTCc if the AAUX model is not used, otherwise the fuel consumption as calculated by the AAUX model) |
| FC-ESS | [g/h] | Fuel consumption considering engine stop/start not always activated. (FC-ESS = FC-AAUX if the engie is on, FC-ESS = FC(P_aux) * (1 - engine stop/start utility factor) if the combustion engine is off - see [Engine Stop/Start](#advanced-driver-assistant-systems-eco-roll-engine-stopstart) |
| FC-Final_mod | [g/h] | Instantaneous final fuel consumption value after all applicable corrections. (FC-Final_mod = FC-ESS) |
P_eng_FCmap = T_eng_fcmap * n_eng_avg
......
##Summary Results (.vsum)
The .vsum file includes total / average results for each calculation run in one execution (ie. click of [START Button](#main-form)). The file is located in the directory of the fist run .vecto file.
***Quantities:***
###Quantities:
**Note:** For dual-fuel vehicles the fuel consumption columns are present for each fuel (e.g., FC-Map_Diesel CI, FC-Map_NG CI).
| Name | Unit | Description |
|-----------------------|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
......@@ -17,12 +19,13 @@ The .vsum file includes total / average results for each calculation run in one
| speed | [km/h] | Average vehicle speed |
| altitudeDelta | [m] | Altitude difference between start and end of cycle |
| FC-Map | [g/h], [g/km] | Average fuel consumption before all corrections, interpolated from [Fuel Map](#engine-fuel-consumption-calculation), based on torque and engine speed. |
| FC-NCVc | [g/h], [g/km] | Average fuel consumption after correcting for the [net calorific value](#engine-correction-factors) (Based on FC-Map) |
| FC-WHTCc | [g/h], [g/km] | Average fuel consumption after [WHTC Correction](#engine-fuel-consumption-calculation) (Based on FC-NCVc) |
| FC-AAUX | [g/h], [g/km] | Average fuel consumption after Smart Auxiliary Correction (*still in development*) (Based on FC-WHTCc) |
| FC-NCVc | [g/h], [g/km] | Average fuel consumption after correcting for the [net calorific value](#engine-correction-factors) (Based on FC-Map from .vmod) |
| FC-WHTCc | [g/h], [g/km] | Average fuel consumption after [WHTC Correction](#engine-fuel-consumption-calculation) (Based on FC-NCVc from .vmod) |
| FC-AAUX | [g/h], [g/km] | Average fuel consumption after Smart Auxiliary Correction (*still in development*) (Based on FC-WHTCc from .vmod) |
| FC-ESS | [g/h], [g/km] | Average fuel consumption including fuel consumption during engine-off periods (Based on FC-ESS from .vmod) |
| FC-ESS_Corr | [g/h], [g/km] | Average fuel consumption including fuel consumption during engine-off periods corrected for energy demand during engine-off periods not accounted (Based on FC-ESS, E_aux_ess_mech, E_ice_start, k_vehline) |
| FC-Final | [g/h], [g/km], [l/100km], [l/100tkm], [l/100m^3km] | Final average fuel consumption after ALL corrections. Value for calculation of CO~2~ value. If Loading = 0[kg] the column [l/100tkm] is left empty. |
| FC-WHR_Corr | [g/h], [g/km] | Average fuel consumption including fuel consumption deduction due to electric power generated by an electric WHR system (FC-WHR_Corr = FC-ESS - E_WHR_el / eta_alternator * k_vehline)
| FC-ESS_Corr | [g/h], [g/km] | Average fuel consumption including fuel consumption during engine-off periods corrected for energy demand during engine-off periods not accounted (FC-ESS_Corr = FC-WHR_Corr + (E_aux_ess_mech + E_ice_start) * k_vehline) |
| FC-Final | [g/h], [g/km], [l/100km], [l/100tkm], [l/100m^3km] | Final average fuel consumption after ALL corrections (FC-Final = FC-ESS_Corr). Fuel consumption for calculation of CO~2~ value. If Loading = 0[kg] the column [l/100tkm] is left empty. |
| CO2 | [g/km], [g/tkm], [g/m^3km] | Average CO~2~ emissions (based on FC-Final value). Output for [l/100tkm] is empty when Loading = 0[kg]. |
| P_wheel_in_pos | [kW] | Average positive power at the wheels |
| P_fcmap_pos | [kW] | Average positive power at engine (all non-negative values averaged over the whole cycle duration) |
......@@ -39,16 +42,17 @@ The .vsum file includes total / average results for each calculation run in one
| E_angle_loss | [kWh] | Total torque converter energy loss |
| E_axl_loss | [kWh] | Total transmission energy losses at the axlegear |
| E_brake | [kWh] | Total work dissipated in mechanical braking (sum of service brakes, retader and additional engine exhaust brakes) |
| E_vehicle_inertia | [kWh] | Total work of wheels inertia and vehicle mass |
| E_vehicle_inertia | [kWh] | Total work of wheels inertia and vehicle mass |
| E_air | [kWh] | Total work of air resistance |
| E_roll | [kWh] | Total work of rolling resistance |
| E_grad | [kWh] | Total work of gradient resistance |
| E_PTO_CONSUM | [kWh] | Total energy demand of the pto consumer (if a pto consumer was used). |
| E_PTO_TRANSM | [kWh] | Total energy demand of the pto transmission (if a pto transmission was used). |
| E_aux_ess_mech | [kWh] | Total work of auxiliaries during engine stop and thus not considered in FC-Map and FC-AAUX |
| E_ice_start | [kWh] | Total work for starting the combustion engine, not considered in FC-Map and FC-AAUX |
| ice_starts | [-] | Number of times the combustion engine is started |
| k_vehline | [g/kWh] | Slope of the regression line used for the [fuel consumption correction](#engine-stopstart-fuel-consumption-correction) |
| E_WHR_el | [kWh] | Total electric energy generated by an electrical WHR system |
| E_aux_ess_mech | [kWh] | Total work of auxiliaries during engine stop and thus not considered in FC-Map and FC-AAUX. Considered in FC-ESS_Corr via [fuel consumption correction](#engine-fuel-consumption-correction) (Based on P_aux_ESS_mech in .vmod) |
| E_ice_start | [kWh] | Total work for starting the combustion engine, not considered in FC-Map and FC-AAUX. Considered in FC-ESS_Corr via [fuel consumption correction](#engine-fuel-consumption-correction) (Based on P_ice_start in .vmod) |
| ice_starts | [-] | Number of times the combustion engine is started |
| k_vehline | [g/kWh] | Slope of the regression line used for the [fuel consumption correction](#engine-fuel-consumption-correction) |
| a | [m/s^2^] | Average acceleration |
| a_pos | [m/s^2^] | Average acceleration in acceleration phases (a~3s~ \> 0.125 \[m/s^2^\], a~3s~ = 3-seconds-averaged acceleration) |
| a_neg | [m/s^2^] | Average deceleration in deceleration phases (a~3s~ \< 0.125 \[m/s^2^\], a~3s~ = 3-seconds-averaged acceleration) |
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Documentation/User Manual/pics/ENG-Editor.PNG

55.5 KiB | W: | H:

Documentation/User Manual/pics/ENG-Editor.PNG

64.3 KiB | W: | H:

Documentation/User Manual/pics/ENG-Editor.PNG
Documentation/User Manual/pics/ENG-Editor.PNG
Documentation/User Manual/pics/ENG-Editor.PNG
Documentation/User Manual/pics/ENG-Editor.PNG
  • 2-up
  • Swipe
  • Onion skin
engine speed [rpm], torque [Nm], fuel consumption [g/h]
550,-135.5,0.00
550,0,.15
550,213.4,3412.9
550,426.8,58.3
550,640.2,8316.2
550,853.6,1043.98
550,1067,1282.36
550,1188,1422.87
550,1401.4,1662.86
610,-138,0.00
610,0,.15
610,213.4,3412.9
610,426.8,58.3
610,640.2,8316.2
610,853.6,1043.98
610,1067,1282.36
610,1188,1422.87
610,1401.4,1662.86
751,-141.775,0.00
750.9,0,1649.5
750.9,213.4,4157.9
750.9,426.8,7149.9
750.9,640.2,1003.70
750.9,853.6,1295.70
750.9,1067,1605.52
750.9,1280.4,1923.13
750.9,1493.8,2240.01
750.9,1544.879,2321.39
751,1758.279,2639.29
902,-147.59,0.00
901.8,0,221.07
901.8,213.4,5204.6
901.8,426.8,8515.6
901.8,640.2,1180.47
901.8,853.6,1541.05
901.8,1067,190.8
901.8,1280.4,2274.29
901.8,1493.8,2654.38
901.8,1707.2,3053.46
901.8,1901.757,3435.27
902,2115.157,3840.32
1063,-155.445,0.00
1062.7,0,276.80
1062.7,213.4,6228.0
1062.7,426.8,9836.4
1062.7,640.2,136.2
1062.7,853.6,1785.49
1062.7,1067,2207.27
1062.7,1280.4,2616.11
1062.7,1493.8,3052.55
1062.7,1707.2,3501.91
1062.7,1920.6,399.1
1062.7,2134,4543.81
1063,2347.4,5054.25
1204,-165.44,0.00
1203.6,0,3086.0
1203.6,213.4,6943.2
1203.6,426.8,1104.03
1203.6,640.2,1550.46
1203.6,853.6,2033.58
1203.6,1067,251.7
1203.6,1280.4,2978.22
1203.6,1493.8,3464.22
1203.6,1707.2,3978.61
1203.6,1920.6,452.5
1203.6,2134,5112.90
1204,2347.4,5673.28
1367,-183.37,0.00
1367.1,0,3845.4
1367.1,213.4,7981.4
1367.1,426.8,1279.66
1367.1,640.2,177.8
1367.1,853.6,2285.42
1367.1,1067,2830.28
1367.1,1280.4,3373.99
1367.1,1493.8,3939.38
1367.1,1707.2,4583.63
1367.1,1920.6,5207.87
1367.1,2134,5829.64
1367,2347.4,6453.05
1490,-200.5,0.00
1489.6,0,437.34
1489.6,213.4,886.14
1489.6,426.8,1409.08
1489.6,640.2,1951.82
1489.6,853.6,2509.28
1489.6,1067,3087.36
1489.6,1280.4,3686.54
1489.6,1493.8,4309.55
1489.6,1707.2,5024.98
1489.6,1920.6,5703.52
1489.6,2041.712,6060.95
1490,2255.112,6731.18
1612,-218.62,0.00
1612.2,0,490.40
1612.2,213.4,9810.8
1612.2,426.8,1540.39
1612.2,640.2,2130.13
1612.2,853.6,2749.23
1612.2,1067,3358.09
1612.2,1280.4,4011.46
1612.2,1493.8,4691.47
1612.2,1707.2,5466.61
1612.2,1915.434,6186.29
1612,2128.834,6949.19
1735,-235.225,0.00
1734.7,0,558.69
1734.7,213.4,1104.11
1734.7,426.8,1694.92
1734.7,640.2,2350.02
1734.7,853.6,3015.95
1734.7,1067,3674.11
1734.7,1280.4,4392.38
1734.7,1493.8,5129.52
1734.7,1707.2,5946.93
1734.7,1789.259,6273.13
1735,2002.659,7093.52
1857,-253.69,0.00
1857.3,0,667.38
1857.3,213.4,1251.85
1857.3,426.8,1868.78
1857.3,640.2,2565.23
1857.3,853.6,3300.30
1857.3,1067,4043.80
1857.3,1280.4,4811.75
1857.3,1493.8,5584.85
1857.3,1587.631,5943.41
1857,1801.031,6721.53
1957,-270.69,0.00
1957.3,0,667.38
1957.3,213.4,1251.85
1957.3,426.8,1868.78
1957.3,640.2,2565.23
1957.3,853.6,3300.30
1957.3,1067,4043.80
1957.3,1280.4,4811.75
1957.3,1493.8,5584.85
1957.3,1587.631,5943.41
1957,1801.031,6721.53
engine speed [rpm], torque [Nm], fuel consumption [g/h], whr power [W]
500,-135.5,0, 200
500,0,1355, 200
500,213.4,3412.291, 200
500,426.8,5830.1, 200
500,640.2,8316.426, 200
500,853.6,10439.87, 200
500,1067,12823.69, 200
500,1188,14228.79, 200
500,1401.4,16628.66, 200
600,-138,0, 200
600,0,1355, 200
600,213.4,3412.291, 200
600,426.8,5830.1, 200
600,640.2,8316.426, 200
600,853.6,10439.87, 200
600,1067,12823.69, 200
600,1188,14228.79, 200
600,1401.4,16628.66, 200
751,-141.775,0, 200
750.9,0,1649.255, 200
750.9,213.4,4157.795, 200
750.9,426.8,7149.494, 200
750.9,640.2,10037.08, 200
750.9,853.6,12957.07, 200
750.9,1067,16055.22, 200
750.9,1280.4,19231.36, 200
750.9,1493.8,22400.17, 200
750.9,1544.879,23213.92, 200
751,1758.279,26392.93, 200
902,-147.59,0, 200
901.8,0,2210.735, 200
901.8,213.4,5204.867, 200
901.8,426.8,8515.462, 200
901.8,640.2,11804.75, 200
901.8,853.6,15410.55, 200
901.8,1067,19081.7, 200
901.8,1280.4,22742.96, 200
901.8,1493.8,26543.87, 200
901.8,1707.2,30534.68, 200
901.8,1901.757,34352.75, 200
902,2115.157,38403.27, 200
1053,-155.445,0, 200
1052.7,0,2768.035, 200
1052.7,213.4,6228.407, 200
1052.7,426.8,9836.041, 200
1052.7,640.2,13624.5, 200
1052.7,853.6,17854.95, 200
1052.7,1067,22072.71, 200
1052.7,1280.4,26161.13, 200
1052.7,1493.8,30525.55, 200
1052.7,1707.2,35019.18, 200
1052.7,1920.6,39913.3, 200
1052.7,2134,45438.16, 200
1053,2347.4,50542.53, 200
1204,-165.44,0, 200
1203.6,0,3086.704, 200
1203.6,213.4,6943.027, 200
1203.6,426.8,11040.37, 200
1203.6,640.2,15504.65, 200
1203.6,853.6,20335.89, 200
1203.6,1067,25176.6, 200
1203.6,1280.4,29782.22, 200
1203.6,1493.8,34642.24, 200
1203.6,1707.2,39786.14, 200
1203.6,1920.6,45254.8, 200
1203.6,2134,51129.03, 200
1204,2347.4,56732.88, 200
1367,-183.37,0, 200
1367.1,0,3845.344, 200
1367.1,213.4,7981.742, 200
1367.1,426.8,12796.69, 200
1367.1,640.2,17789.2, 200
1367.1,853.6,22854.21, 200
1367.1,1067,28302.84, 200
1367.1,1280.4,33739.91, 200
1367.1,1493.8,39393.87, 200
1367.1,1707.2,45836.33, 200
1367.1,1920.6,52078.71, 200
1367.1,2134,58296.41, 200
1367,2347.4,64530.56, 200
1490,-200.5,0, 200
1489.6,0,4373.424, 200
1489.6,213.4,8861.484, 200
1489.6,426.8,14090.86, 200
1489.6,640.2,19518.29, 200
1489.6,853.6,25092.8, 200
1489.6,1067,30873.69, 200
1489.6,1280.4,36865.42, 200
1489.6,1493.8,43095.57, 200
1489.6,1707.2,50249.81, 200
1489.6,1920.6,57035.25, 200
1489.6,2041.712,60609.5, 200
1490,2255.112,67311.83, 200
1612,-218.62,0, 200
1612.2,0,4904.015, 200
1612.2,213.4,9810.482, 200
1612.2,426.8,15403.9, 200
1612.2,640.2,21301.35, 200
1612.2,853.6,27492.32, 200
1612.2,1067,33580.96, 200
1612.2,1280.4,40114.61, 200
1612.2,1493.8,46914.77, 200
1612.2,1707.2,54666.14, 200
1612.2,1915.434,61862.91, 200
1612,2128.834,69491.99, 200
1735,-235.225,0, 200
1734.7,0,5586.953, 200
1734.7,213.4,11041.15, 200
1734.7,426.8,16949.24, 200
1734.7,640.2,23500.23, 200
1734.7,853.6,30159.59, 200
1734.7,1067,36741.18, 200
1734.7,1280.4,43923.85, 200
1734.7,1493.8,51295.21, 200
1734.7,1707.2,59469.31, 200
1734.7,1789.259,62731.31, 200
1735,2002.659,70935.23, 200
1857,-253.69,0, 200
1857.3,0,6673.839, 200
1857.3,213.4,12518.56, 200
1857.3,426.8,18687.88, 200
1857.3,640.2,25652.39, 200
1857.3,853.6,33003.08, 200
1857.3,1067,40438.09, 200
1857.3,1280.4,48117.52, 200
1857.3,1493.8,55848.59, 200
1857.3,1587.631,59434.17, 200
1857,1801.031,67215.39, 200
1957,-270.69,0, 200
1957.3,0,6673.839, 200
1957.3,213.4,12518.56, 200
1957.3,426.8,18687.88, 200
1957.3,640.2,25652.39, 200
1957.3,853.6,33003.08, 200
1957.3,1067,40438.09, 200
1957.3,1280.4,48117.52, 200
1957.3,1493.8,55848.59, 200
1957.3,1587.631,59434.17, 200
1957,1801.031,67215.39, 200
{
"Header": {
"CreatedBy": "",
"Date": "2019-08-07T08:51:47.3653905Z",
"AppVersion": "3",
"FileVersion": 5
},
"Body": {
"SavedInDeclMode": false,
"EngineOnlyMode": false,
"VehicleFile": "Class5_Tractor.vveh",
"EngineFile": "Engine_325kW_12.7l_WHR.veng",
"GearboxFile": "AMT_12.vgbx",
"AuxiliaryAssembly": "Classic",
"AuxiliaryVersion": "CLASSIC",
"AdvancedAuxiliaryFilePath": "",
"Aux": [
{
"ID": "ES",
"Type": "Electric System",
"Path": "Alt.vaux",
"Technology": []
}
],
"Padd": 5000.0,
"VACC": "Truck.vacc",
"EngineStopStartAtVehicleStopThreshold": 120.0,
"EngineStopStartMaxOffTimespan": 120.0,
"EngineStopStartUtilityFactor": 0.8,
"LAC": {
"Enabled": true,
"PreviewDistanceFactor": 10.0,
"DF_offset": 2.5,
"DF_scaling": 1.5,
"DF_targetSpeedLookup": "",
"Df_velocityDropLookup": "",
"MinSpeed": 50.0
},
"OverSpeedEcoRoll": {
"Mode": "Off",
"MinSpeed": 50.0,
"OverSpeed": 5.0,
"UnderSpeed": 5.0
},
"Cycles": [
"Long_Haul+ES.vdri"
]
}
}
\ No newline at end of file
{
"Header": {
"CreatedBy": "",
"Date": "2019-08-07T11:36:49.3518015Z",
"AppVersion": "3",
"FileVersion": 5
},
"Body": {
"SavedInDeclMode": false,
"EngineOnlyMode": false,
"VehicleFile": "Class5_Tractor_ESS.vveh",
"EngineFile": "Engine_325kW_12.7l_WHR.veng",
"GearboxFile": "AMT_12.vgbx",
"AuxiliaryAssembly": "Classic",
"AuxiliaryVersion": "CLASSIC",
"AdvancedAuxiliaryFilePath": "",
"Aux": [
{
"ID": "ES",
"Type": "Electric System",
"Path": "Alt.vaux",
"Technology": []
}
],
"Padd": 5000.0,
"VACC": "Truck.vacc",
"EngineStopStartAtVehicleStopThreshold": 2.0,
"EngineStopStartMaxOffTimespan": 120.0,
"EngineStopStartUtilityFactor": 0.8,
"LAC": {
"Enabled": true,
"PreviewDistanceFactor": 10.0,
"DF_offset": 2.5,
"DF_scaling": 1.5,
"DF_targetSpeedLookup": "",
"Df_velocityDropLookup": "",
"MinSpeed": 50.0
},
"OverSpeedEcoRoll": {
"Mode": "Overspeed",
"MinSpeed": 50.0,
"OverSpeed": 5.0,
"UnderSpeed": 5.0
},
"Cycles": [
"Long_Haul+ES.vdri"
]
}
}
\ No newline at end of file
{
"Header": {
"CreatedBy": "",
"Date": "2019-08-07T15:15:30.9500516Z",
"AppVersion": "3",
"FileVersion": 5
},
"Body": {
"SavedInDeclMode": false,
"EngineOnlyMode": false,
"VehicleFile": "Class5_Tractor_ESS.vveh",
"EngineFile": "Engine_325kW_12.7l_WHR_DF.veng",
"GearboxFile": "AMT_12.vgbx",
"AuxiliaryAssembly": "Classic",
"AuxiliaryVersion": "CLASSIC",
"AdvancedAuxiliaryFilePath": "",
"Aux": [
{
"ID": "ES",
"Type": "Electric System",
"Path": "Alt.vaux",
"Technology": []
}
],
"Padd": 5000.0,
"VACC": "Truck.vacc",
"EngineStopStartAtVehicleStopThreshold": 2.0,
"EngineStopStartMaxOffTimespan": 120.0,
"EngineStopStartUtilityFactor": 0.8,
"LAC": {
"Enabled": true,
"PreviewDistanceFactor": 10.0,
"DF_offset": 2.5,
"DF_scaling": 1.5,
"DF_targetSpeedLookup": "",
"Df_velocityDropLookup": "",
"MinSpeed": 50.0
},
"OverSpeedEcoRoll": {
"Mode": "Overspeed",
"MinSpeed": 50.0,
"OverSpeed": 5.0,
"UnderSpeed": 5.0
},
"Cycles": [
"Long_Haul+ES.vdri"
]
}
}
\ No newline at end of file
{
"Header": {
"CreatedBy": "",
"Date": "2019-08-07T11:11:55.0948566Z",
"AppVersion": "3",
"FileVersion": 8
},
"Body": {
"SavedInDeclMode": false,
"VehCat": "Tractor",
"LegislativeClass": "Unknown",
"CurbWeight": 8229.0,
"CurbWeightExtra": 7500.0,
"Loading": 19300.0,
"MassMax": 18.0,
"rdyn": 492.0,
"CdCorrMode": "CdofVdecl",
"CdCorrFile": "",
"Retarder": {
"Type": "secondary",
"Ratio": 1.0,
"File": "Default.vrlm"
},
"Angledrive": {
"Type": "None",
"Ratio": 0.0,
"LossMap": ""
},
"PTO": {
"Type": "None",
"LossMap": "",
"Cycle": ""
},
"TorqueLimits": {},
"IdlingSpeed": 0.0,
"AxleConfig": {
"Type": "4x2",
"Axles": [
{
"Inertia": 14.9,
"Wheels": "315/70 R22.5",
"AxleWeightShare": 0.2,
"TwinTyres": false,
"RRCISO": 0.0055,
"FzISO": 33350.0,
"Type": "VehicleNonDriven"
},
{
"Inertia": 14.9,
"Wheels": "315/70 R22.5",
"AxleWeightShare": 0.25,
"TwinTyres": true,
"RRCISO": 0.0065,
"FzISO": 33350.0,
"Type": "VehicleDriven"
},
{
"Inertia": 19.2,
"Wheels": "385/65 R22.5",
"AxleWeightShare": 0.18333,
"TwinTyres": false,
"RRCISO": 0.0055,
"FzISO": 41690.0,
"Type": "VehicleNonDriven"
},
{
"Inertia": 19.2,
"Wheels": "385/65 R22.5",
"AxleWeightShare": 0.18333,
"TwinTyres": false,
"RRCISO": 0.0055,
"FzISO": 41690.0,
"Type": "VehicleNonDriven"
},
{
"Inertia": 19.2,
"Wheels": "385/65 R22.5",
"AxleWeightShare": 0.18334,
"TwinTyres": false,
"RRCISO": 0.0055,
"FzISO": 41690.0,
"Type": "VehicleNonDriven"
}
]
},
"EngineStopStart": true,
"EcoRoll": "WithEngineStop",
"PredictiveCruiseControl": "None",
"CdA": 5.3,
"VehicleHeight": 0.0
}
}
\ No newline at end of file
{
"Header": {
"CreatedBy": "",
"Date": "2019-08-07T08:51:30.3162470Z",
"AppVersion": "3",
"FileVersion": 5
},
"Body": {
"SavedInDeclMode": false,
"ModelName": "325kW 12.7l Engine",
"Displacement": "12740",
"IdlingSpeed": 600.0,
"Inertia": 5.1498,
"Fuels": [
{
"WHTC-Urban": 0.0,
"WHTC-Rural": 0.0,
"WHTC-Motorway": 0.0,
"WHTC-Engineering": 1.0,
"ColdHotBalancingFactor": 0.0,
"CFRegPer": 1.0,
"FuelType": "DieselCI",
"FuelMap": "325kW_WHR.vmap",
}
],
"RatedPower": 0.0,
"RatedSpeed": 0.0,
"MaxTorque": 0.0,
"FullLoadCurve": "325kW.vfld",
"WHRType": "ElectricalOnly",
"WHRCorrectionFactors": {
"Urban": 0.0,
"Rural": 0.0,
"Motorway": 0.0,
"ColdHotBalancingFactor": 0.0,
"CFRegPer": 0.0,
"EngineeringCorrectionFactor": 1.02
}
}
}
\ No newline at end of file
{
"Header": {
"CreatedBy": "",
"Date": "2019-08-07T15:06:44.7357177Z",
"AppVersion": "3",
"FileVersion": 5
},
"Body": {
"SavedInDeclMode": false,
"ModelName": "325kW 12.7l Engine",
"Displacement": "12740",
"IdlingSpeed": 600.0,
"Inertia": 5.1498,
"Fuels": [
{
"WHTC-Urban": 0.0,
"WHTC-Rural": 0.0,
"WHTC-Motorway": 0.0,
"WHTC-Engineering": 1.0,
"ColdHotBalancingFactor": 0.0,
"CFRegPer": 1.0,
"FuelMap": "325kW_WHR.vmap",
"FuelType": "EthanolPI"
},
{
"WHTC-Urban": 1.0,
"WHTC-Rural": 1.0,
"WHTC-Motorway": 1.0,
"WHTC-Engineering": 1.024,
"ColdHotBalancingFactor": 1.0,
"CFRegPer": 1.0,
"FuelMap": "325kW_DF.vmap",
"FuelType": "DieselCI"
}
],
"RatedPower": 0.0,
"RatedSpeed": 0.0,
"MaxTorque": 0.0,
"FullLoadCurve": "325kW.vfld",
"WHRType": "ElectricalOnly",
"WHRCorrectionFactors": {
"Urban": 0.0,
"Rural": 0.0,
"Motorway": 0.0,
"ColdHotBalancingFactor": 0.0,
"CFRegPer": 0.0,
"EngineeringCorrectionFactor": 1.02
}
}
}
\ No newline at end of file
......@@ -34,7 +34,7 @@ using System.Globalization;
using System.IO;
using System.Linq;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.InputData.Reader;
using TUGraz.VectoCore.InputData.Reader.ComponentData;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Utils;
......
......@@ -46,6 +46,7 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RP/@EntryIndexedValue">RP</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SI/@EntryIndexedValue">SI</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=VTP/@EntryIndexedValue">VTP</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=WHR/@EntryIndexedValue">WHR</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=WHTC/@EntryIndexedValue">WHTC</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XML/@EntryIndexedValue">XML</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XSD/@EntryIndexedValue">XSD</s:String>
......
This diff is collapsed.
......@@ -10,6 +10,7 @@ Imports TUGraz.VectoCommon.Models
Imports TUGraz.VectoCommon.Utils
Imports TUGraz.VectoCore.InputData.FileIO.JSON
Imports TUGraz.VectoCore.InputData.Reader
Imports TUGraz.VectoCore.InputData.Reader.ComponentData
Imports TUGraz.VectoCore.Models.Declaration
Imports TUGraz.VectoCore.Models.SimulationComponent.Data
Imports TUGraz.VectoCore.Models.SimulationComponent.Data.Engine
......@@ -36,6 +37,10 @@ Public Class EngineForm
Public JobDir As String = ""
Private _changed As Boolean = False
Private _contextMenuFiles As String()
Private SecondFuelTab As TabPage
'Before closing Editor: Check if file was changed and ask to save.
Private Sub F_ENG_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
......@@ -51,14 +56,36 @@ Public Class EngineForm
PnWhtcDeclaration.Enabled = Cfg.DeclMode
PnWhtcEngineering.Enabled = Not Cfg.DeclMode
pnWHRDeclaration.Enabled = Cfg.DeclMode
pnWhrEngineering.Enabled = Not Cfg.DeclMode
pnWhtcFuel2.Enabled = cfg.DeclMode
pnEngCFFuel2.Enabled = not cfg.DeclMode
cbFuelType.Items.Clear()
cbFuelType.ValueMember = "Value"
cbFuelType.DisplayMember = "Label"
cbFuelType.DataSource =
[Enum].GetValues(GetType(TUGraz.VectoCommon.Models.FuelType)).Cast (Of TUGraz.VectoCommon.Models.FuelType).Select(
[Enum].GetValues(GetType(FuelType)).Cast (Of FuelType).Select(
Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
cbFuelType2.Items.Clear()
cbFuelType2.ValueMember = "Value"
cbFuelType2.DisplayMember = "Label"
cbFuelType2.DataSource =
[Enum].GetValues(GetType(FuelType)).Cast (Of FuelType).Select(
Function(type) New With {Key .Value = type, .Label = type.GetLabel()}).ToList()
cbWHRType.Items.Clear()
cbWHRType.ValueMember = "Value"
cbWHRType.DisplayMember = "Label"
cbWHRType.DataSource = [Enum].GetValues(GetType(WHRType)).cast(Of WHRType).select(Function(type) new With {Key .Value = type, .Label = type.GetLabel()}).ToList()
_changed = False
SecondFuelTab = tbDualFuel.TabPages(1)
tbDualFuel.TabPages.Remove(SecondFuelTab)
NewEngine()
End Sub
......@@ -79,7 +106,7 @@ Public Class EngineForm
gbxType = gbx.Type
End If
End If
TbInertia.Text = DeclarationData.Engine.EngineInertia((TbDispl.Text.ToDouble(0.0)/1000.0/1000.0).SI (Of CubicMeter),
gbxType).ToGUIFormat()
End Sub
......@@ -152,13 +179,20 @@ Public Class EngineForm
TbName.Text = ""
TbDispl.Text = ""
TbInertia.Text = ""
TbNleerl.Text = ""
TbIdleSpeed.Text = ""
TbMAP.Text = ""
TbFLD.Text = ""
TbWHTCurban.Text = ""
TbWHTCrural.Text = ""
TbWHTCmw.Text = ""
tbWHREngineering.Text = ""
tbWHRColdHot.Text = ""
tbWHRRegPer.Text = ""
tbWHRRural.Text = ""
tbWHRUrban.Text = ""
tbWHRMotorway.Text = ""
DeclInit()
_engFile = ""
......@@ -197,21 +231,66 @@ Public Class EngineForm
TbName.Text = engine.Model
TbDispl.Text = (engine.Displacement*1000*1000).ToGUIFormat()
TbInertia.Text = engine.Inertia.ToGUIFormat()
TbNleerl.Text = engine.EngineModes.First().IdleSpeed.AsRPM.ToGUIFormat()
TbMAP.Text = GetRelativePath(engine.EngineModes.First().Fuels.First().FuelConsumptionMap.Source, basePath)
TbFLD.Text = GetRelativePath(engine.EngineModes.First().FullLoadCurve.Source, basePath)
TbWHTCurban.Text = engine.EngineModes.First().Fuels.First().WHTCUrban.ToGUIFormat()
TbWHTCrural.Text = engine.EngineModes.First().Fuels.First().WHTCRural.ToGUIFormat()
TbWHTCmw.Text = engine.EngineModes.First().Fuels.First().WHTCMotorway.ToGUIFormat()
TbWHTCEngineering.Text = engine.WHTCEngineering.ToGUIFormat()
TbColdHotFactor.Text = engine.EngineModes.First().Fuels.First().ColdHotBalancingFactor.ToGUIFormat()
tbRegPerCorrFactor.Text = engine.EngineModes.First().Fuels.First().CorrectionFactorRegPer.ToGUIFormat()
Dim enginemode As IEngineModeEngineeringInputData = engine.engineModes.First()
TbIdleSpeed.Text = enginemode.IdleSpeed.AsRPM.ToGUIFormat()
TbFLD.Text = GetRelativePath(enginemode.FullLoadCurve.Source, basePath)
tbMaxTorque.Text = engine.MaxTorqueDeclared.ToGUIFormat()
tbRatedPower.Text = (engine.RatedPowerDeclared.Value()/1000).ToGUIFormat()
tbRatedSpeed.Text = engine.RatedSpeedDeclared.AsRPM.ToGUIFormat()
dim fuel1 As IEngineFuelEngineeringInputData = enginemode.Fuels.First()
TbMAP.Text = GetRelativePath(fuel1.FuelConsumptionMap.Source, basePath)
TbWHTCurban.Text = fuel1.WHTCUrban.ToGUIFormat()
TbWHTCrural.Text = fuel1.WHTCRural.ToGUIFormat()
TbWHTCmw.Text = fuel1.WHTCMotorway.ToGUIFormat()
TbWHTCEngineering.Text = fuel1.WHTCEngineering.ToGUIFormat()
TbColdHotFactor.Text = fuel1.ColdHotBalancingFactor.ToGUIFormat()
tbRegPerCorrFactor.Text = fuel1.CorrectionFactorRegPer.ToGUIFormat()
cbFuelType.SelectedValue = fuel1.FuelType
If (enginemode.Fuels.Count > 1) Then
cbDualFuel.Checked = True
If (tbDualFuel.TabPages.Count < 2) then
tbDualFuel.TabPages.Add(SecondFuelTab)
End If
Dim fuel2 As IEngineFuelEngineeringInputData = enginemode.Fuels(1)
tbMapFuel2.Text = GetRelativePath(fuel2.FuelConsumptionMap.Source, basePath)
tbWhtcUrbanFuel2.Text = fuel2.WHTCUrban.ToGUIFormat()
tbWhtcRuralFuel2.Text = fuel2.WHTCRural.ToGUIFormat()
tbWhtcMotorwayFuel2.Text = fuel2.WHTCMotorway.ToGUIFormat()
tbEngineeringCFFuel2.Text = fuel2.WHTCEngineering.ToGUIFormat()
tbColdHotFuel2.Text = fuel2.ColdHotBalancingFactor.ToGUIFormat()
tbRegPerFuel2.Text = fuel2.CorrectionFactorRegPer.ToGUIFormat()
cbFuelType2.SelectedValue = fuel2.FuelType
Else
cbDualFuel.Checked = False
If (tbDualFuel.TabPages.Count >1) then
tbDualFuel.TabPages.Remove(SecondFuelTab)
End If
End If
cbFuelType.SelectedValue = engine.EngineModes.First().Fuels.First().FuelType
cbWHRType.SelectedValue = engine.WHRType
gbWHR.Enabled = engine.WHRType.IsElectrical()
If (engine.WHRType.IsElectrical()) Then
Dim whr As IWHRData = enginemode.Wasteheatrecoverydata
If (Cfg.DeclMode) then
tbWHRRural.Text = whr.RuralCorrectionFactor.ToGUIFormat()
tbWHRUrban.Text = whr.UrbanCorrectionFactor.ToGUIFormat()
tbWHRMotorway.Text = whr.MotorwayCorrectionFactor.ToGUIFormat()
tbWHRColdHot.Text = whr.BFColdHot.ToGUIFormat()
tbWHRRegPer.Text = whr.CFRegPer.ToGUIFormat()
Else
tbWHREngineering.Text = whr.EngineeringCorrectionFactor.ToGUIFormat()
end if
End If
DeclInit()
......@@ -247,26 +326,44 @@ Public Class EngineForm
If Trim(engine.ModelName) = "" Then engine.ModelName = "Undefined"
engine.Displacement = TbDispl.Text.ToDouble(0)
engine.EngineInertia = TbInertia.Text.ToDouble(0)
engine.IdleSpeed = TbNleerl.Text.ToDouble(0)
engine.IdleSpeed = TbIdleSpeed.Text.ToDouble(0)
engine.PathFld = TbFLD.Text
engine.PathMap = TbMAP.Text
engine.WHTCUrbanInput = TbWHTCurban.Text.ToDouble(0)
engine.WHTCRuralInput = TbWHTCrural.Text.ToDouble(0)
engine.WHTCMotorwayInput = TbWHTCmw.Text.ToDouble(0)
engine.WHTCEngineeringInput = TbWHTCEngineering.Text.ToDouble(0)
engine.correctionFactorRegPerInput = tbRegPerCorrFactor.Text.ToDouble(0)
engine.ColdHotBalancingFactorInput = TbColdHotFactor.Text.ToDouble(0)
engine.PrimaryEngineFuel.PathMap = TbMAP.Text
engine.PrimaryEngineFuel.WHTCUrbanInput = TbWHTCurban.Text.ToDouble(0)
engine.PrimaryEngineFuel.WHTCRuralInput = TbWHTCrural.Text.ToDouble(0)
engine.PrimaryEngineFuel.WHTCMotorwayInput = TbWHTCmw.Text.ToDouble(0)
engine.PrimaryEngineFuel.WHTCEngineeringInput = TbWHTCEngineering.Text.ToDouble(0)
engine.PrimaryEngineFuel.correctionFactorRegPerInput = tbRegPerCorrFactor.Text.ToDouble(0)
engine.PrimaryEngineFuel.ColdHotBalancingFactorInput = TbColdHotFactor.Text.ToDouble(0)
engine.PrimaryEngineFuel.FuelTypeInput = CType(cbFuelType.SelectedValue, FuelType)
If (cbDualFuel.Checked) Then
engine.DualFuelInput = True
engine.SecondaryEngineFuel.PathMap = tbMapFuel2.Text
engine.SecondaryEngineFuel.WHTCUrbanInput = tbWhtcUrbanFuel2.Text.ToDouble(0)
engine.SecondaryEngineFuel.WHTCRuralInput = tbWhtcRuralFuel2.Text.ToDouble(0)
engine.SecondaryEngineFuel.WHTCMotorwayInput = tbWhtcMotorwayFuel2.Text.ToDouble(0)
engine.SecondaryEngineFuel.WHTCEngineeringInput = tbEngineeringCFFuel2.Text.ToDouble(0)
engine.SecondaryEngineFuel.correctionFactorRegPerInput = tbRegPerFuel2.Text.ToDouble(0)
engine.SecondaryEngineFuel.ColdHotBalancingFactorInput = tbColdHotFuel2.Text.ToDouble(0)
engine.SecondaryEngineFuel.FuelTypeInput = CType(cbFuelType2.SelectedValue, FuelType)
End If
engine.WHRTypeInput = CType(cbWHRType.SelectedValue, WHRType)
engine.WHRUrbanInput = tbWHRUrban.Text.ToDouble(0)
engine.WHRRuralInput = tbWHRRural.Text.ToDouble(0)
engine.WHRMotorwayInput = tbWHRMotorway.Text.ToDouble(0)
engine.WHRColdHotInput = tbWHRColdHot.Text.ToDouble(0)
engine.WHRRegPerInput = tbWHRRegPer.Text.ToDouble(0)
engine.WHREngineeringInput = tbWHREngineering.Text.ToDouble(0)
engine.ratedPowerInput = (tbRatedPower.Text.ToDouble(0)*1000).SI (Of Watt)()
engine.ratedSpeedInput = tbRatedSpeed.Text.ToDouble(0).RPMtoRad()
engine.maxTorqueInput = tbMaxTorque.Text.ToDouble(0).SI (Of NewtonMeter)()
engine.FuelTypeInput = CType(cbFuelType.SelectedValue, TUGraz.VectoCommon.Models.FuelType)
If Not engine.SaveFile Then
MsgBox("Cannot safe to " & file, MsgBoxStyle.Critical)
Return False
......@@ -335,7 +432,7 @@ Public Class EngineForm
Change()
End Sub
Private Sub TbNleerl_TextChanged(sender As Object, e As EventArgs) Handles TbNleerl.TextChanged
Private Sub TbNleerl_TextChanged(sender As Object, e As EventArgs) Handles TbIdleSpeed.TextChanged
UpdatePic()
Change()
End Sub
......@@ -395,6 +492,7 @@ Public Class EngineForm
Private Sub UpdatePic()
Dim fullLoadCurve As EngineFullLoadCurve = Nothing
Dim fcMap As FuelConsumptionMap = Nothing
Dim fcMap2 As FuelConsumptionMap = Nothing
Dim engineCharacteristics As String = ""
......@@ -417,7 +515,17 @@ Public Class EngineForm
Catch ex As Exception
End Try
If fullLoadCurve Is Nothing AndAlso fcMap Is Nothing Then Exit Sub
Try
If (cbDualFuel.Checked) then
Dim fcFile As String =
If(Not String.IsNullOrWhiteSpace(_engFile), Path.Combine(Path.GetDirectoryName(_engFile), tbMapFuel2.Text), tbMapFuel2.Text)
If File.Exists(fcFile) Then fcMap2 = FuelConsumptionMapReader.Create(VectoCSVFile.Read(fcFile))
End if
Catch ex As Exception
End Try
If fullLoadCurve Is Nothing AndAlso fcMap Is Nothing AndAlso fcmap2 Is nothing Then Exit Sub
'Create plot
......@@ -452,6 +560,17 @@ Public Class EngineForm
fullLoadCurve.N95hSpeed.AsRPM)
End If
If Not fcMap2 Is Nothing Then
Dim series As Series = New Series
series.Points.DataBindXY(fcMap2.Entries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(),
fcMap2.Entries.Select(Function(x) x.Torque.Value()).ToArray())
series.ChartType = SeriesChartType.Point
series.MarkerSize = 3
series.Color = Color.Green
series.Name = "Map 2"
chart.Series.Add(series)
End If
If Not fcMap Is Nothing Then
Dim series As Series = New Series
series.Points.DataBindXY(fcMap.Entries.Select(Function(x) x.EngineSpeed.AsRPM).ToArray(),
......@@ -498,9 +617,8 @@ Public Class EngineForm
#Region "Open File Context Menu"
Private _contextMenuFiles As String()
Private Sub OpenFiles(ParamArray files() As String)
Private Sub OpenFiles(ParamArray files() As String)
If files.Length = 0 Then Exit Sub
......@@ -547,4 +665,37 @@ Public Class EngineForm
End If
End Sub
Private Sub cbWHRType_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cbWHRType.SelectedIndexChanged
gbWHR.Enabled = CType(CType(sender, ComboBox).SelectedValue, WHRType).IsElectrical()
End Sub
Private Sub btMapFuel2_Click(sender As Object, e As EventArgs) Handles btMapFuel2.Click
If FuelConsumptionMapFileBrowser.OpenDialog(FileRepl(tbMapFuel2.Text, GetPath(_engFile))) Then _
tbMapFuel2.Text = GetFilenameWithoutDirectory(FuelConsumptionMapFileBrowser.Files(0), GetPath(_engFile))
End Sub
Private Sub btMapOpenFuel2_Click(sender As Object, e As EventArgs) Handles btMapOpenFuel2.Click
Dim fldfile As String
fldfile = FileRepl(TbFLD.Text, GetPath(_engFile))
If fldfile <> NoFile AndAlso File.Exists(fldfile) Then
OpenFiles(FileRepl(tbMapFuel2.Text, GetPath(_engFile)), fldfile)
Else
OpenFiles(FileRepl(tbMapFuel2.Text, GetPath(_engFile)))
End If
End Sub
Private Sub cbDuaFuel_CheckedChanged(sender As Object, e As EventArgs) Handles cbDualFuel.CheckedChanged
If (cbDualFuel.Checked) Then
If (tbDualFuel.TabPages.Count < 2) then
tbDualFuel.TabPages.Add(SecondFuelTab)
End If
Else
If (tbDualFuel.TabPages.Count > 1) then
tbDualFuel.TabPages.Remove(SecondFuelTab)
End If
End If
End Sub
End Class
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment