Lotus 3
Lotus 3
(
flow area[mm2]= F1[Pa]*0.0024000[[N/mm2] ]−360[N] )
*70000[mm2/m]. (10.6)
where: F1 = Instantaneous inlet system pressure;
F2 = Waste-gate opening pressure;
?F = Pressure difference between waste-gate opening and fully open; Af = Waste-gate flow
area when fully open.
Select the actuator element and use the level control toggle, shown below, to drop into the control
element level.
Now select a User Function element from the 1D Control Elements toolkit and place it between the IN1
and OUT signal boundaries, as shown in Figure 10.6.
Select the User Function element and click on the pad icon, shown below, to open the user defined
function menu. The data entry window shown in Figure 10.7 should now appear.
122122 Getting Started Using Lotus Engine Simulation Tutorial 9
‘Turbocharged Model with a Waste-gate and Charge-cooler’
The User Function control element allows the entry of a generic user defined maths function based on
Fortran syntax. This can be used to perform any maths-based action on the input signal provided it can
be written as a single Fortran string using the supported intrinsic functions. The input signal is
represented in the string as ‘F1’. We will use this function to enter the relationship that we have
developed above for waste-gate flow area verses inlet pressure, given in equation 10.6. We can simply
enter this equation in the Define Fortran String entry box, using the string ‘F1’ to represent the input
signal IN1. In this box type (((F1*0.002)-360.0)/4000.0)*70000.0, as shown in Figure 10.7. We can test
the integrity of the equation we have just entered by pressing the Test String button. This will solve the
equation we have entered in the Define Fortran String entry box, using a value of 1.0 for F1. The Test
Result should be –6299.96484.
The equation that we have entered in the User Function control element will give us a value between
0 and 700 mm2 for the waste-gate flow area when the inlet system pressure is between 1.8 and 2.0 bar.
However, when the inlet system pressure falls outside this range the waste-gate area returned will be
either negative or greater than 700 mm2. We can limit the output from the actuator using the Limit
control function. Select a Limit control element from the 1D Control Elements toolkit and place it
between the User Function control element and the OUT signal boundary, as shown in Figure 10.8. In
the Limit control element property sheet, alter the Maximum Value to 700.0 and the Minimum Value to
0.0, as shown in Figure 10.9.
Use the level control toggle, shown below, to return to engine model element level.
Getting Started Using Lotus Engine Simulation 123
Tutorial 9 ‘Turbocharged Model with a Waste-gate and Charge-cooler’
Select the actuator element and alter the Actuator Variable to Minimum C.S.A., the Actuator Group
Type to Single, the Actuator Apply Type to By Value, and the Actuator Solve Type to Per Time Step,
as shown in Figure 10.10.
We have now fully defined the control system for our waste-gate. You may like to add two additional
.TRS plot sensors, so that the inlet plenum pressure and waste-gate cross-sectional area can be
monitored during the simulation run. If you can’t remember how to add a plot sensor then refer to the
Monitoring Turbocharger Speed section of the previous tutorial. If .TRS plot sensors are added it is
recommended that the Plot Associate Type is set to Crank Angle and the Plot Sample Size (deg) is set
to 20, so that the plot files are in the same format as the existing compressor speed .TRS plot created
in the previous tutorial. Remember to give the plot files a name.
Change the file descriptions and set the Test No. to Tutorial9 then save the data file to Tutorial_9.sim.
Submit the job in the normal way using the launch icon from the solver control dialogue box, having
remembered to set the .mrs and .prs file names.
Once the job has finished, the Batch Job Finished window will appear. This prompts the user to load
the simulation results into the various post-processing options within LOTUS ENGINE SIMULATION.
We can press the Cancel button, without selecting any of the options.
We shall use the graphical viewer to compare the .MRS results obtained from Tutorial 8 with or model
with the waste-gate. Open the .MRS file viewer by clicking on the icon shown below.
124124 Getting Started Using Lotus Engine Simulation Tutorial 9
‘Turbocharged Model with a Waste-gate and Charge-cooler’
Select File / Load Results Exclusive from the .MRS viewer menubar. The file browser window will
appear. Now select the file Tutorial8.mrs and click on Open to load the .MRS results from the previous
tutorial. Now select File / Load Results Shuffle from the .MRS viewer menubar (the shuffle option will
move the currently held .MRS file along one position and add the newly opened file at position 1). The
file browser window will appear again. Now select the file Tutorial9.mrs and click on Open to load the
.MRS results from the present tutorial.
This plot (see Fig. 10.12) shows the BSFC (brake specific fuel consumption), BMEP (brake mean
effective pressure), Torque, and Power produced by the engine. It is clear from the performance
summary results, shown in Figure 10.12, that the addition of our waste-gate has limited the BMEP of
the engine, between 3000 and 6000 rev/min, to about 16 bar. It is interesting to note that the wastegate
has had no effect on the engine performance below 2000 rev/min.
Getting Started Using Lotus Engine Simulation 125
Tutorial 9 ‘Turbocharged Model with a Waste-gate and Charge-cooler’
Select Display / Plot / Plot 8 from the .MRS graph viewer menu bar. The viewer window should now
change to display the plots shown in Figure 10.13. If the screen appears blank, see the section entitled
Viewing the Results in tutorial 8, to find out how to specify the ,MRS plotting options to display the
turbocharger operating parameters. Comparison of the results for tutorial 8 with those for tutorial 9
reveals that the pressure in the plenum directly upstream of the turbine is now limited to about 2.6 bar.
Also, the inlet system pressure is below 2.0 bar across the entire engine speed range. We can also see
that at 1000 and 2000 rev/min the inlet system pressure is below 1.8 bar, thus our waste-gate doesn’t
open at these two engine speeds. This is the reason that engine performance, at these two speeds,
remains unaffected by the addition of a waste-gate. The addition of the waste-gate has also limited
compressor speed.
Modern electronic control systems allow the maximum boost pressure to vary with engine speed. We
will modify our simple waste-gate, so that we can vary the pressure at which the valve begins to open.
We will be simply altering the spring preload, given by equation (10.1). We could just as easily use the
technique employed here to vary any other property of our waste gate, it is probably easier to start from
equation (10.7). Close the .MRS Viewer window and return to the Builder Interface, if you haven’t done
so already. We need to add a sensor to detect crankshaft speed. Click on cylinder number 4 and then
select On for the Harness Connector option in the element properties menu. Pick a Sensor from the
Sensors & Actuators toolkit and place it in the model window. Using the harness wires, connect this
sensor to cylinder number 4 and the waste-gate actuator, as shown in Figure 10.14. Click on the sensor
and select Crank Speed (rpm) as the Sensed Parameter and set the Sensor Group Type to Single.
126126 Getting Started Using Lotus Engine Simulation Tutorial 9
‘Turbocharged Model with a Waste-gate and Charge-cooler’
Select the actuator element and use the level control toggle, shown below, to drop into the control
element level.
Now select a 1D Table element from the 1D Control Elements toolkit and place it next to the IN2 signal
boundary. Delete the existing 1D User Function element. Now select a 2D User Function element from
the 2D Control Elements toolkit and place it next to the 1D Table so that the output signal of the 1D
Table is connected to the Y input of the 2D User Function element. Connect the existing Limit element
to the output of the 2D User Function element. Now connect the OUT signal boundary to the
1 output of the Limit element. Finally connect the
the IN signal boundary to the X input of the 2D User Function element using a Virtual Link. Your
control element network should now appear similar to the one shown in Figure 10.15.
Select the 1D Table element and click on LookUp Data to open the data entry window, shown in Figure
10.16. In this table we need to enter the pressure at which the waste-gate valve will begin to open. Enter
6 in the No. of Values box. In the X column we shall type a number of engine speeds (note that we do
not need to enter speeds corresponding to test points, as the Look-Up Table elements will linearly
interpolate the data entered between speed points. They can also be set to extrapolate the data if the
current speed is beyond the range of the data entered, or simply use the closest speed point data).
Enter the speed points as 1000, 2000, 4000, 5000, 6000 and 7000. In the Y column we shall enter the
opening pressures (in N/m²) for each of the speeds in column X. Enter 180000, 200000, 200000,
180000, 170000 and 160000 for the Y column data. Close the data entry window and ensure that the
LookUp Type option is set to Extrapolate Only.
Select the 2D User Function element and click on the pad icon to open the data entry window, shown
in Figure 10.17. We need to replace the previous value we had for the spring preload, which was 360
N, with our 1D Table output multiplied by the diaphragm area. The equation we need to type into the
Define Fortran String entry box becomes ((F1-F2)/(20000.0))*700.0, as shown in Figure 10.17. The
string ‘F1’ represents the input signal IN1, which is the inlet system pressure, and the string ‘F2’
represents the output signal from our 1D Table. We can test the integrity of the equation we have just
entered by pressing the Test String button. This will solve the equation we have entered in the Define
Fortran String entry box, using a value of 1.0 for both F1 and F2. The Test Result should be 0.00000.
Use the level control toggle, shown below, to return to engine model element level.
Change the file descriptions and set the Test No. to Tutorial9b then save the data file to
Tutorial_9b.sim.
Submit the job in the normal way using the launch icon from the solver control dialogue box, having
remembered to update the .mrs and .prs file names.
Once the job has finished, the Batch Job Finished window will appear. This prompts the user to load
the simulation results into the various post-processing options within LOTUS ENGINE SIMULATION.
Tick the box to Load Graphics Results (.mrs) / Load Results Shuffle (the shuffle option will move the
currently held .MRS file along one position and add the newly opened file at position 1). Open the
.MRS graphical viewer. Select the Autoscale option from the View menu within this window. If you still
have the Tutorial9.mrs file loaded, this will produces the window shown in Figure 10.18 (if you haven’t
128128 Getting Started Using Lotus Engine Simulation Tutorial 9
‘Turbocharged Model with a Waste-gate and Charge-cooler’
got the Turotial9.mrs file open, select File / Load Results (position) / Position 2 from the .MRS
viewer menubar then select the file Turotial9.mrs from the file browser window).
We can see, from the results shown in the .MRS file, that our modified waste-gate has had no effect on
the engine performance at 1000, 2000 and 5000 rev/min. This would be anticipated at 1000 and 5000
rev/min, as we have set the opening pressure to be equal to the original opening pressure at these
speeds. The performance of the engine at 2000 rev/min remains unaltered, despite us changing the
opening pressure of the waste-gate, because at 2000 rev/min and below, the inlet system pressure is
insufficient to open the waste-gate. It is clear that the increased opening pressure at 3000 and 4000
rev/min has increased the BMEP of the engine at these speeds. Similarly, the reduced opening pressure
at 6000 and 7000 rev/min has reduced the BMEP of the engine. If we examine the boost pressure
across the speed range we will see that our modified waste-gate is working as expected.
We noted earlier, whilst viewing the instantaneous waste-gate flow area in the.TRS plot file output, that
it oscillated with a period of roughly 180°. This occurs because the simple control system we have
constructed contains no damping. In reality the waste-gate valve cannot respond instantly to variations
in inlet system pressure as a finite time is required to accelerate, and decelerate, the valve mass. Also,
the inlet system pressure is usually fed to the actuator diaphragm via a relatively long pipe with a small
diameter, which acts to damp the inlet pressure fluctuations ‘felt’ by the waste-gate. There are a number
of ways we can damp the motion of the waste-gate valve using the Sensors & Actuators elements within
LOTUS ENGINE SIMULATION.
We shall damp the waste-gate motion by damping the inlet pressure signal passed to the waste-gate
actuator. Click on the inlet pressure Sensor element and then use the level control toggle to drop into
the control element level. Add an Integrator control element and User Function control element
1 between the IN and OUT signal boundaries, as shown
in Figure 10.18.
Getting Started Using Lotus Engine Simulation 129
Tutorial 9 ‘Turbocharged Model with a Waste-gate and Charge-cooler’
Select the Integrator element and change the Integrate w.r.t. option to Crank Degrees and the Integral
Period (crank deg) to 180 in the element property sheet, as shown in Figure 10.19. This element
integrates the input signal over the specified period.
Now click on the User Function element and open the data entry window. We need to divide the output
signal from the Integrator element by the number of degrees the signal has been summed over, other
wise the signal will be 180 times too high! Enter F1/180.0 in Define Fortran String entry box. Test the
integrity of the equation we have just entered by pressing the Test String button. This will solve the
equation we have entered in the Define Fortran String entry box, using a value of 1.0 for F1. The Test
Result should be 0.00556.
Use the level control toggle, shown below, to return to engine model element level.
Change the file descriptions and set the Test No. to Tutorial9c then save the data file to
Tutorial_9c.sim.
Submit the job in the normal way using the launch icon from the solver control dialogue box, having
remembered to set the .mrs and .prs file names.
Once the job is successfully running we can monitor its progress using the job status tab on the solver
control window and by viewing the .TRS plots that we have defined, as shown in Figure 10.20. You will
now notice that the frequency of the waste-gate flow area variation is lower than before (c.f. Figure
10.20 with Figure 10.11). However, whilst the motion of the waste-gate is damped, more engine cycles
need to be simulated to achieve cyclic convergence.
Exercise
Instead of using the Integrator control element to damp the waste-gate motion, try adding a Limit
Change element prior to the output of the waste-gate actuator element. Begin by either deleting the two
control elements we added to the pressure sensor, or re-load the Tutorial_9b.sim file. Add a Limit
Change element to the end of actuator control network, as shown in Figure 10.21. Alter the Limit
Change w.r.t. to Crank Degrees, the Rate of Change to 0.2 and the Limit Type to –ve direction only.
2
This will have the effect of only allowing the waste-gate are to decrease by 0.2 mm per degree CA,
without limiting the opening rate. A comparison of Figure 10.22 with Figure 10.11 shows the effect that
this has on the waste-gate area during the simulation. Try altering the waste-gate control strategy and
damping mechanism to see the effect that they have on the waste-gate. To save time you may prefer
to investigate the effect at just one or two engine speeds.
11
Tutorial 10. Modelling a Multi-Cylinder
Turbocharged Diesel Engine
Overview
This chapter introduces the user to modelling high-speed diesel
engines. Due to the large amount of data which needs to be entered
an example of a small turbocharged direct-injection diesel engine is
studied. Examples describing the building of most of the individual
features of this model, such as the pipe network, the turbocharger,
and the waste-gate, and the use of .trs plots, have been described
in the earlier tutorials. In this chapter it is assumed that the user has
completed the earlier tutorials. The new features of this model are
the use of a diesel fuel injection system, the definition of a diesel
combustion model, and the use of a chargecooler.
Exercise, 135
Description of the Model
Load the example model tutorial_10.sim from the Examples sub-folder created
during the install process. If the model does not appear use the Control A
command to centre the model. The builder window should appear as shown in
Figure. 11.1.
134134 Getting Started Using Lotus Engine Simulation Tutorial 10
‘Modelling a Multi-Cylinder Turbocharged Diesel Engine’
The model represents a 1.45 litre three-cylinder direct-injection diesel engine fitted with a turbocharger,
waste-gate and charge-cooler. Clicking on the fuel tank icon shown below
reveals the ‘fuel system’ and ‘fuel type’ property sheet shown in Figure 11.2.
Figure 11.2. Property sheet for ‘fuel system’ and ‘fuel type’ definition.
Getting Started Using Lotus Engine Simulation 135
Tutorial 10 ‘Modelling a Multi-Cylinder Turbocharged Diesel Engine’
A direct-injection fuel system has been specified so that the fuel will be injected directly into the cylinder.
The fuel type has been set to Diesel and the default properties for that fuel have been assumed – these
are shown in the greyed-out boxes of the property sheet.
The nature of the combustion process in diesel engines differs from that in spark-ignition engines and
different options are available to cater for this in Lotus Engine Simulation. The energy release in a
cylinder is characterised by the rfaction of the mass of the fuel burnt at any particular crank angle
position. This parameter is referred to as the ‘mass fraction burnt’ and is defined as
In Lotus Engine Simulation the variation of mass fraction burnt during the combustion event can be
specified directly at each engine operating condition or it can be modelled using a Wiebe function. If the
latter approach is adopted a two-part Wiebe function is the most suitable way of modelling the
combustion event in direct injection diesel engines. This model includes separate terms for the premixed
and diffusion controlled periods of the combustion process. The mathematical details of this and the
other models available in Lotus Engine Simulation can be found in the On-line Help (Help
Topics/Contents/Theory/Combustion Models).
The heat release model using the two-part Wiebe function is defined from the data screen shown in
Figure 11.3 which is generated by clicking on the Combustion Model button of the cylinder property
sheet.
The shape of the cumulative mass fraction burnt curve and the rate of heat release (burn rate) curve,
defined by the coefficients entered, can be seen by clicking on the graph icon on this screen. This
generated the plots shown in Figure 11.4.
136136 Getting Started Using Lotus Engine Simulation Tutorial 10
‘Modelling a Multi-Cylinder Turbocharged Diesel Engine’
The significance of the coefficients used in this model are described in the On-line Help (Help
Topics/Contents/Theory/Combustion Models).
Figure 11.4. Variation of cumulative mass fraction burnt and heat release rate with fraction of the
combustion period.
To view the data defining the phasing and period of the combustion event click on the Steady-State
Teat Data icon shown below.
Clicking on the Heat - Phase tab reveals the data screen shown in Figure. 11.5.
Getting Started Using Lotus Engine Simulation 137
Tutorial 10 ‘Modelling a Multi-Cylinder Turbocharged Diesel Engine’
It can be seen that the User Defined Heat Release Phase option has been selected and the phase
angle, which denotes the start of combustion in a diesel engine, has been set-up to vary with engine
speed. Use the On-line Help (Help Topics/Contents/Theory/Combustion Models) to clarify the different
definitions of Heat Phase for the different combustion systems available in Lotus Engine Simulation.
Note that a positive value of the Phase angle indicates that the start of combustion will occur before
top-dead-centre whereas a negative value indicates that the start of combustion will occur after topdead-
centre. The start of combustion has been set as Common to all cylinders in this model but can be varied
between cylinders if desired.
Clicking on the Heat – Period tab produces the data screen shown in Figure 11.6. In this table the
Period Option has been set to User Defined Combustion Duration. .The Release Period has been set
for the individual engine speed as shown in the table.
138138 Getting Started Using Lotus Engine Simulation Tutorial 10
‘Modelling a Multi-Cylinder Turbocharged Diesel Engine’
The final pieces of data required to define the diesel combustion event are the Combustion Efficiency
and the quantity of fuel injected to each cylinder per cycle (Fuelling Rate). The data window in which
this information can be specified is accessed by clicking on the Fuelling tab, and is shown in Figure
11.7.
Click on the other tabs in the Steady-State Test Data to examine the rest of the parameters that have
been set. Now close the Steady-State Test Data window.
reveals the top-level property sheet of the Charge-Cooler data, shown in Figure. 11.8.
Clicking on the Properties icon produces the data window in which the information characterising the
charge-cooler performance is given, as shown in Fig. 11.9.
Getting Started Using Lotus Engine Simulation 139
Tutorial 10 ‘Modelling a Multi-Cylinder Turbocharged Diesel Engine’
The performance of the cooler is defined by its efficiency, or effectiveness, as a heat exchanger, and
by the pressure-drop / mass flow rate characteristic of the device. The effectiveness of the cooler is
defined as
The waste-gate model has been set up in a similar way to that described in Chapter 10. Click on the
sensor and the actuator to investigate the waste-gate control structure. The maximum opeing area of
the device is 200 mm2.
Familiarise yourself with the rest of the model data by viewing the property sheets for the other elements.
The plot sensor attached to the right-hand side of the turbocharger, shown in Figure 11.10, is sensing
compressor speed, defined as N / T /Tref , where T is the compressor inlet temperature and Tref is the
reference temperature (298 K). The plot sensor attached to the inlet plenum, shown in Figure
11.11, is sensing compressor outlet pressure, while that attached to the turbocharger waste-gate is
sensing the flow area of the restriction (Figure 11.12).
The model can now be run by submitting the job in the normal way (see Chapter 2 – Tutorial 1).
Remember to use the .trs sensor plots to monitor the progress of the run, as described in Chapter 10.
Discussion of Results
Steady state test points have been set up at 1000, 2000, 3000, 4000, and 4500 rev/min. By monitoring
the output from the .trs plot sensors the user will see that only a minimal amount of boost is produced
by the compressor (about 1.2 bar absolute – compressor outlet pressure) at 1000 rev/min. and the
waste-gate does not open.
At 2000 rev/min the compressor outlet pressure has increased considerably to about 1.85 bar – the
waste-gate is now open. Plot the performance results for the engine as described in Chapter 2 – they
should appear as shown in Figure 11.13.
Getting Started Using Lotus Engine Simulation 141
Tutorial 10 ‘Modelling a Multi-Cylinder Turbocharged Diesel Engine’
Figure 11.13. Variation of power, torque, BMEP, and BSFC with engine speed.
The torque curve is characteristic of a small high-speed direct-injection diesel engine, rising rapidly as
the engine to a maximum value of 174 Nm at around 2000 rev/min, and then gradually dropping as
Getting Started Using Lotus Engine Simulation 135
Tutorial 10 ‘Modelling a Multi-Cylinder Turbocharged Diesel Engine’ the engine speed increases. The
maximum power produced by the engine is about 55 kW (74 hp) at 4000 rev/min.
Exercise
Plot the output data from the .trs sensors at 2000 and 4500 rev/min.
136 Getting Started Using Lotus Engine Simulation Tutorial 10
‘Modelling a Multi-Cylinder Turbocharged Diesel Engine’
12
Tutorial 11. Modelling the Transient Response of a
Turbocharged Diesel Engine
Overview
This chapter introduces the user to the modelling of engine transient
performance using the model considered in Tutorial 10 as the starting point.
The model is first run at reduced load with the engine speed set at 2000
rev/min. The set-up procedure for a transient event is then described starting
from this operating condition.
Load the model tutorial_10.sim and save the file as tutorial_11.sim. Open the Steady State Test
Data icon and turn all the Test Points off by clicking on the Solve column and selecting All Off from the
pop-up menu which appears. Now turn on Test Point 2 by clicking on the 2000 rev/min row of the Solve
column and using the same pop-up menu to select On.
Now click on the Fuelling tab and reduce the Fuelling Rate at 2000 rev/min to 40 mm3/inj. as shown
in Figure 12.2. Now close the Steady State Test Data. Open the Text File Descriptions data window
from the Data\File Descriptions option on the drop-down menus at the top of the interface window and
change the Test No. entry to tutorial_11 as shown in Figure 12.3. Click OK and save the file. Now run
the job, clicking on the Use Test No. option in the job submission window to set the name of the output
files.
When the job has run open the .mrs file in the text viewer (as described in Chapter 2) and find the
BMEP values for the cylinders (shown in Figure 12.4). The average value of BMEP should be about
10.8 and this can be used to set the load level in the transient event which will be defined later. Close
the text file viewer.
Click on each cylinder of the model and enter the mass properties of the piston / connecting rod
components, as shown in Figure 12.5. Note that if the connecting rod inertia is set to zero an inertia
value is calculated from the lumped rotating and reciprocating masses of the connecting rod. If an inertia
value is set for the rod a residual inertia value is calculated as the difference between the lumped inertia
and the actual inertia value specified.
The next task is to add a shaft to the model in order to represent the engine crankshaft. First click on
the cylinder at the top of the model (cylinder 3) and turn on the Mechanical Link Connector by choosing
this option from the data property sheet for the cylinder, as shown in Figure 12.5. The user will need to
use the vertical scroll bar on the right-hand side of the cylinder data property sheet in order to access
this list box. The cylinder should now appear as shown in Fig. 12.6.
Getting Started Using Lotus Engine Simulation 149
Tutorial 11 ‘Modelling the Transient Response of a Turbocharged Diesel Engine’
Figure 12.5. Mechanical property data for piston / connecting rod assembly.
Now use the down-arrow at the bottom of the builder tool box to move down the
menu tabs until the Mechanical Links tab can be seen, as shown in Figure 12.7.
Select a virtual link from the tool box and attach it to the mechanical link connector
on cylinder 3.
Now select a shaft, flip the connectivity arrow by selecting the Flip Flow Direction
option from the right-mouse button menu for the shaft, and attach it to the
mechanical link connector. Set the rotational inertia of the shaft as 0.12 kg m2 –
this value represents the inertia of the crankshaft, valve train and accessory
system attached to the engine. Because the speed ratio of these systems differs
from that of the crankshaft their referred inertia needs to be calculated and added
to that of the crankshaft. The referred inertia can be calculated using the square
of the speed ratio between the systems multiplied by the actual inertia.
Select the Loads tab from the tool kit menu, as shown in Figure 12.9, and
select the transient load icon. Attach it to the top of the mechanical link
connector after using the Flip Flow Direction option to move the
connection point to the bottom of the icon.
The mechanical link / cylinder assembly should now appear as shown in Figure
12.10.
The transient event can now be defined by clicking on the transient load icon to
reveal the data property sheet shown in Figure 12.11.
Now click on the Transient Case Data button in order to generate the data
window shown in Figure 12.12.
Set the Length Type as Cycles and Length to 80 cycles. Now define the Load
Inertia as 0.25 kg m2.
Set the Update Speed option as By Time Step – this will cause the program
to perform the engine acceleration calculation at every calculation time
step. This option is not really necessary for the type of simulation performed
in this tutorial but has been selected in order to introduce this feature which
can resolve the intra-cycle speed fluctuation of the engine during a transient
event.
The transient Event Type can now be set as Load vs Cycles and the Event Units set as MEP (mean
effective pressure). Now set the No of Points to 2 and define the start of the event (Start Point) to be
point 1. Turning the List Data option to On enter the values in the spreadsheet as shown in Figure
12.13. In this case the load has been set as constant throughout the transient event. The value used
here is that obtained from the initial steady state run at the start of the tutorial.
Create a component Group containing all the cylinders and turn on the Harness Connector for cylinder
3 and click on the Sensors and Actuators tab on the tool kit (use the down-arrow until this becomes
visible). Attach an actuator and timer as shown in Figure 12.14. Set the Timer Type to Transient (cycle)
in order to record the transient cycle number and set the actuator properties as shown in Figure 12.15.
Figure 12.14. Attaching a transient timer, fuelling actuator, and engine speed sensor.
Now set up a one-dimensional look-up table as shown in Figure 12.16 in order to define the schedule
for the volume of fuel injected to the cylinders per cycle. Also attach a transient plot sensor to sense
engine speed during the transient event, as shown in Figure 12.14, and set its properties as shown in
Figure 12.17, using an appropriate file name.
Also change all the steady state plot sensors to be transient sensors and rename the files they
produce so as not to overwrite the files produced by running tutorial_10.sim.
Getting Started Using Lotus Engine Simulation 153
Tutorial 11 ‘Modelling the Transient Response of a Turbocharged Diesel Engine’
The user is now in a position to run the model. Note that ideally maps for defining the combustion
phasing and duration as functions of engine speed and load should be used with sensors and actuators
in order to simulate the changes occurring to the combustion process during a transient event.
154154 Getting Started Using Lotus Engine Simulation Tutorial 11 ‘Modelling the
Transient Response of a Turbocharged Diesel Engine’
Start the simulation. The model will run at the 2000 rev/min point at part load as a steady state simulation
in order to initialise the transient event. When the transient event starts [as indicated by (trans)
appearing in the Cycle No. box] use the .trs plots to monitor the progress of the job. Figure 12.18 shows
the boost pressure rising as the quantity of fuel injected is raised during the transient.
Discussion of Results
Figure 12.19 shows that the waste-gate does not open during the part-load operating period at the start
of the transient and begins to open as the fuelling rate is built up and the boost pressure increases.
Figure 12.20 shows the engine speed increasing as the fuelling is increased. Because The Speed
Update By time step option was selected when defining the transient event (see Figure 12.8) the
intracycle speed variation can be obtained – this is plotted in Figure 12.21.
Exercise
Decrease the load inertia and re-run the model.
Getting Started Using Lotus Engine Simulation 155
Tutorial 11 ‘Modelling the Transient Response of a Turbocharged Diesel Engine’
13
Overview
This tutorial shows the user how to produce a model of a two-
stroke engine.
This tutorial assumes that the user is now familiar with the
LOTUS ENGINE SIMULATION interface, and thus many of
actions required to complete this tutorial are only briefly
described. It is recommended that the earlier tutorials should
be completed before this tutorial is attempted.
Exercise, 156
Building the Model
We will begin by creating a new model. To ensure that all existing data is
removed select File / New from the LOTUS ENGINE SIMULATION
menubar, as shown in Figure 13.1.
Now select a Cylinder from the toolkit and place it in the builder window. Change both the Bore
and the Stroke of this cylinder 54.0mm in the cylinder property sheet. Also, change the Con-
rod Length to 110.0mm and the Compression Ratio to 14.0. Change the Open Cycle heat
Select a Piston Ported Valve from the Intake Components toolkit and connect it to the inlet
side of the cylinder, as shown in Figure 13.3. Change the properties of the piston ported inlet
valve to those shown in Figure 13.4.
Now select a Piston Ported Valve from the Exhaust Components toolkit and connect it to the
exhaust side of the cylinder. Change the properties of the piston ported exhaust valve to those
shown in Figure 13.4.
Getting Started Using Lotus Engine Simulation 161
Tutorial 12 ‘Two-Stroke Engine Model’
Figure 13.4. Setting the properties of the piston ported inlet valve.
Now select a Variable Volume Plenum element from the Intake Components toolkit and
connect it to the piston ported inlet valve, as shown in Figure 13.5. We will use the variable
volume plenum element to represent the crankcase volume of the engine. The speed ratio of
the variable plenum element can be set, relative to the speed of the crankshaft. Care should
be taken when using this facility, as non-integer speed ratios may cause the phasing of the
plenum, with respect to the crankshaft, to change between engine cycles, thus preventing
cyclic convergence to be achievable. The phasing of the variable volume plenum element, with
respect to cylinder number 1, can be set. A phase angle of 0° would correspond to the minimum
volume of the plenum coinciding with T.D.C. of cylinder 1.
Ensure that the properties of the variable volume plenum element, so that they correspond to
those given in Figure 13.6.
Select a Disc Valve element from the Intake Components toolkit and connect it to the variable
volume plenum, as shown in Figure 13.7. We shall accept the default parameters for the disc
valve flow area and timing.
Select a Pipe element Pipes toolkit and connect the downstream end to the variable volume
plenum. Change the length of the pipe to 100 mm and the diameter to 38.0 mm. Add an Inlet
Boundary to the upstream end of the pipe, as shown in Figure 13.8.
Now add a pipe to the exhaust port. Click on the All Dimensions pad icon to open the pipe
dimensions menu shown in Figure 13.9. Enter 7 in the No of Values box, then enter the lengths
and diameters given in Figure 13.9.
Close the Pipe Dimensions window and click on the Pipe Graphical Display icon, which will
open the window shown in Figure 13.10.
Getting Started Using Lotus Engine Simulation 163
Tutorial 12 ‘Two-Stroke Engine Model’
To complete the model, add an Exit Boundary to the end of the exhaust pipe. Your model
should now look similar to the one shown in Figure 13.11.
Now we need to specify the test points at which the model will be run. We shall use the
Steady State Test Data Wizard to create these automatically for us. Select Data / Test
Conditions / Steady State Create Wizard from the LOTUS ENGINE SIMULATION menubar.
This will open the Steady State Test Data Wizard window, shown in Figure 13.12. Create 6
new test points, 2000, 4000, 6000, 8000, 10000 and 12000 rev/min. Set the inlet and exhaust
boundary conditions to 15 °C and 1.01 bar. Also set the Fuel/Air ratio to 1.1. Click on Apply to
create the new test points and close the window.
164 Getting Started Using Lotus Engine Simulation
Tutorial 12 ‘Two-stroke Engine Model’
Open the Steady State Test Data Summary spreadsheet (Hint: this can be opened using the
F12 shortcut key). Change the Heat Release Phase to 12.0 and the Heat Release Period to
23.0 for all of the test points. Set the Combustion Option to in the Fuelling menu to None. Also
set the friction data to the values given in Figure 13.13.
Change the maximum number of calculation cycles for each test to 20. Also change the Plotting
Options so that the Cylinder data, Penum data and all Pipe data are all stored.
Getting Started Using Lotus Engine Simulation 165
Tutorial 12 ‘Two-Stroke Engine Model’
Change the file descriptions and set the Test No. to Tutorial12 then save the data file to
Tutorial_12.sim.
Submit the job in the normal way using the launch icon from the solver control dialogue box,
having remembered to set the .mrs and .prs file names.
Once the job has finished, the Batch Job Finished window will appear. This prompts the user
to load the simulation results into the various post-processing options within LOTUS ENGINE
SIMULATION. Load the .MRS results and .PRS results into their respective graphical viewers.
We can now view the predicted performance of the engine using the .MRS viewer, as shown
in Figure 13.14, and the instantaneous pressures, mass flow etc. using the .PRS viewer.
Exercise
Delete the disc valve and replace it with a reed valve, as shown in Figure 13.15.
166 Getting Started Using Lotus Engine Simulation
Tutorial 12 ‘Two-stroke Engine Model’
Change the properties of the reed valve element to those given in Figure 13.16.
Change the file descriptions and set the Test No. to Tutorial12b then save the data file to
Tutorial_12b.sim.
Submit the job in the normal way using the launch icon from the solver control dialogue box,
having remembered to set the .mrs and .prs file names.
Once the job has finished, the Batch Job Finished window will appear. This prompts the user
to load the simulation results into the various post-processing options within LOTUS ENGINE
SIMULATION. Load the .MRS results (use the shuffle option to retain the results from
Tutorial12.sim) and .PRS results into their respective graphical viewers.
Compare the results of the reed valve engine with those for the disc valve controlled version,
as shown in Figure 13.17.
Use the .PRS file viewer to observe the variation of the reed valve flow area at the various
engine speeds, as shown in Figure 13.18 (you may like to change the X-axis range of the PRS
plots to from 0 to 360 to –180 to 180, which will move the TDC point to the centre of the X-
axis).
Alter the parameters of the reed valve and observe the influence on the flow area of the valve
and the engine performance.
Getting Started Using Lotus Engine Simulation 167
Tutorial 12 ‘Two-Stroke Engine Model’
Figure 13.17. Comparison between the predicted performance of the engine with the disc
valve and with the reed valve.
Figure 13.18. Flow area variation of the reed valve at 8000 rev/min.
14
Tutorial 13. Co-simulation with Simulink™
Overview
This tutorial shows the user how to produce an LES model
which co-simulates with Simulink™.
We will begin by creating a new Simulink™ model. From the Matlab™ window
select File / New from the LOTUS ENGINE SIMULATION menubar, as
shown in Figure 14.1. A new Simulink model window will appear.
Figure 14.1. Creating a new Simulink model.
From the simulink library, select the LES Solver link mask (Fixed time-step), as shown in Figure
14.2. Drag this component into the simulink model window.
Figure 14.2. Select the LES Solver link mask (Fixed time-step).
The fundamental difference in the operation between the fixed time-step and the varying
timestep elements is the number of times the LES solver loops through before returning values
to Simulink. The LES solver does not operate with a constant calculation time-step size, the
time step continuously being refined to balance run time against solution accuracy. Thus, if you
choose to run Simulink in fixed time-step mode Simulink passes to the LES solver the required
time at which it requires LES to next return the sensor values. LES will run till it reaches this
time, modifying the LES solution time step if necessary to match the target time. In this mode
Simulink controls the time-step increment at which the Simulink model is updated.
If you choose to run in variable time-step mode LES will modify its time-step as per a standalone
calculation at each calculation step it will return sensor values back to Simulink and set the next
time-step value based on the current LES solver time-step. Thus in this mode the Simulink
Model is updated every LES solver time-step and the LES solver defines each incremental
time-step size based on its internal calculation rules. Typically the ‘varying time-step’ mode
takes significantly longer to run because of the increased amount of com
‘traffic’ between the two applications.
170 Getting Started Using Lotus Engine Simulation
Tutorial 12 ‘Two-stroke Engine Model’
The LES library items should automatically be added to the Simulink library during the LES
installation. If this section does not appear in the library browser they can be added by adding
the path in which they are located to the Matlab path file. This can be done from the Matlab
command line using the ‘addpath’ command. You will need to add to the front of the path
definition string the path to the Lotus Engineering software install folder on your local machine
and the subfolder that contains the LES supplied Simulink components. This would typically
be;
C:\Lesoft\matlab_components
Thus the Matlab path statement can be modified by typing the following at the Matlab
commoand prompt
addpath (‘C:\Lesoft\matlab_components’)
To check that this has modified the Matlab path file simply type ‘path’ at the Matlab command
prompt. This will invoke a list of the current directories specified in the file. The newly added
directory should appear at the top of this list.
Double click on the LES Solver link mask. This will open the LES solver link mask subsystem
window, as shown in Figure 14.3.
Double clicking on the LES solver link mask will open the LES link block parameters menu, as
shown in Figure 14.4. The first parameter entered into this menu defines the Lotus Engine
Simulation model file to use, this should include the full pathname and would normally have a
*.sim extension. We shall call our *.sim file ‘Tutorial6_simulink.sim’. Enter this in the first box of
the block parameters menu. You need to add the your directory structure (pathnames) to the
beginning of this filename.
The second field defines the output *.mrs file name. The full pathname is not compulsory for
this field. If omitted it will be created in the same folder as the data file. Enter
‘Tutorial6_simulink.mrs’ in this box.
The third field defines the output *.prs file name. Again, the full pathname is not compulsory for
this field. If omitted it will be created in the same folder as the data file. As with a normal LES
run if multiple speed points are calculated a *.prs file will be created for each speed with the
appropriate integer number appended to the supplied file name. Enter
‘Tutorial6_simulink.prs’ in this box.
The forth and fifth fields together define which test point(s) will be run. The options include a
steady-state single speed point, steady-state power curve, or transient. Obviously for a
particular test to be selected it must exist in the LES model file. To run a single steady-state
speed point enter the required LES test point number in field 4 and enter a zero in field 5. To
run a complete steady-state speed sweep set the test point number in field 4 to zero and enter
a zero in field 5. To run a transient analysis enter the required steady state start test point No.
in field 4 and the required transient test case No. in field 5. We shall run a single speed, so
enter 6 in the forth field and 0 in the fifth field.
Select a scope from the Simulink component library (Simulink/Sinks/Scope) and place this in
the Simulink model window. Open the scope window by double clicking on the scope icon.
Click on the scope parameters symbol and change the number of axes to 3, as shown in Figure
14.5.
172 Getting Started Using Lotus Engine Simulation
Tutorial 12 ‘Two-stroke Engine Model’
Now select a look-up table from the Simulink component library (Simulink/Functions &
Tables/Look-Up Table) and place this in the simulink model window. Double click on the lookup
table element. This will open the data entry window for the look-up table element. We will enter
the same MOP data that we entered into the 1D table for tutorial 6. Enter the input data (speed)
as 1000, 2000, 3000, 4000, 5000, 6000, 6500 and 7000 and the output values (MOP) as 90,
90, 90, 95, 105, 120, 125, 125 (see Figure 14.6).
We can connect the model elements together. Connect the first output of the LES Solver link
mask to the first input of the scope element. Connect the second output of LES Solver link mask
to the second input of the scope element and to the input of the look-up table element. Connect
the output of the scope element to the first input of LES Solver link mask and to the third input
of the scope element. The Simulink model should appear similar to that shown in Figure 14.7.
Finally we need to specify the Simulink simulation parameters. Select Simulation / Simulation
parameters from the Simulink model window menubar. This will open the Simulink simulation
parameters window, shown in Figure 14.8. Set the calculation start time to 0.0 seconds and the
stop time to 1.0 seconds. The Simulation ‘Stop Time’ should be set sufficiently large that the
run is stopped by the LES solver rather than by Simulink. If the Simulink ‘Stop-time’ stops the
run before the LES has finished a warning is given in the Matlab command window. Set the
Simulink solver option to ‘Fixed-step’ and ‘discrete (no continuous states)’. Set the fixed step
size to ‘0.00001’ seconds and ensure that the mode is set to ‘Auto’.
We will use the model created in Tutorial 6 as the basis for this LES model. Open this file (if
you have not got a copy of Tutorial_6.sim then follow the directions given in Chapter 7 and
construct the model).
Now select the Simulink interface element from the ‘External Interfaces’ tab on the toolkit and
place it in the model window, as shown in Figure 14.9. The Simulink interface element can be
moved and connected to the model just like any other builder element. The Engine Model treats
the Simulink interface element as a separate processor that sits between sensors and
actuators. Thus, the only allowed connections to the Simulink interface element are wires from
sensors on the signal in-side the and wires to actuators on the signal out-side.
Due to the orientation of the existing sensor and actuator elements within the LES model it is
worth fliping the flow direction of the Simulink interface element, to do this select the Simulink
interface element and press the right mouse button, then select ‘Flip Flow Direction’ from the
pop-up menu. Now select the actuator element and move down to data level 2 and delete the
1-D look-up table (if you are unsure how to do this refer to Tutorial 6). Reconnect the IN and
OUT signal boundaries together and return to level 1.
Now connect the output signal of the Simulink interface element to the input of the actuator and
connect the output of the sensor to the input signal boundary of the Simulink interface element,
as shown in Figure 14.10.
Figure 14.10. Connecting the Simulink interface element.
Add an additional sensor to the model and connect this from the cylinder 1 and the input signal
boundary of the Simulink interface element. Modify the properties of the sensor to sense
cylinder pressure.
Select the Simulink interface element and from the Simulink interface element property sheet,
shown in Figure 14.11, select the file browser. From the file browser window select the Simulink
model file ‘Tutorial6_simulink.mdl’, as shown in Figure 14.12, then select open.
Press the ‘Connections Edit/Display’ from the Simulink interface element property sheet. The
‘External Connection (SIMULINK)’ window will open, as shown in Figure 14.13. Now connect
the signal from the cylinder pressure sensor to the Out1-Port on the ‘demux’ (connector No. 2
on the ‘demux’ – connector No. 1 is used by the ‘stop’ signal). To make the required connections
select the arrowhead of the required sensor and drag it to the required demux port. To remove
a sensor to demux connection selected the connected arrowhead and move it back to the
unconnected position. In this way all of the sensors can be connected to the required demux
ports. Connect the crank speed signal to the Out2-Port.
The actuator connections are made by selecting the arrowhead of the required mux port and
dragging it to the required actuator connection. Connect the In1-Port ‘mux’ signal to the valve
MOP actuator input signal. Your connections
It is not necessary to fill all the ports or fill in any particular order provided that you connect to
the ones linked in the Simulink model.
176 Getting Started Using Lotus Engine Simulation
Tutorial 12 ‘Two-stroke Engine Model’
Figure 14.13. Define the sensor and actuator connections to the Simulink model file.
Once complete exit the connections display and save your model as ‘Tutorial6_simulink.sim’
(the file name and location must correspond with the text entered in the first field of the LES
solver link block parameters menu of the Simulink model file). You must save the model since
Simulink runs the saved file and not that in the LES interface memory.
The LES solver used for the co-simulation is a modification of the standard solver. An additional
C++ wrapper has been added to provide the necessary interfaces and procedure entry points
for the com standard. This alternative solver (filename lesolveCpp.exe) needs to be added to
the system registry in-order for the executable to be identified by the com events. If LES C++
version of the solver has not previously been registerred on your machine it will be necessary
to register it now. Instructions of how this is done are given below. If your solver is already
registered you can omit the remainder of this section.
To register the solver open the Solver Control display in LES and select the ‘Solver Settings’
tab. The executable that needs to be identified in the registry is lesolveCpp.exe. This will be in
your Lesoft Install folder. Standard users will have the toggle next to ‘Default Executable File’
checked, this then allows the interface to look for the solver in the same folder that it was started
from. This also allows the interface to look for the Com solver in the same way when you register
it. Thus if the ‘Default Executable File’ toggle is checked simply select the ‘Register Solver’
button to carry out the Registry update. If you are using an alternative default solver location
and have the ‘User Defined Executable File’ option set. Then you must first point the user
executable at the required lesolveCpp.exe file.
Figure 14.14. Registering the Solver.
When you select the ‘Register Solver’ button you will be asked to check that the file name and
path is correct before carrying out the Registry update. You will be informed of a successful
completion by the dialogue box shown in Figure 14.15. If you do not receive the ‘success’
message check with your local IT support for specific site variations and to check you have the
necessary privileges. You will only need to register the solver once on a particular machine.
Subsequent solver updates will need to be re-registered to be effected. This registration is only
necessary if you want to use the Com interface link. The standard solver (LesolveFtn.exe) does
not require to be entered into the registry as it does not support com interfaces.
The LES com interface is licensed separately from the standard solver and users wishing to
use this interface should check for the relevant licensed feature, (solver-external). To check
view your licence file (normally lotuspass.lic) in any text editor such as notepad, ensure you
don’t change any of the text. The external com interface requires the FEATURE ‘solverexternal’
to be present. If you are not licensed on this feature refer to your local support.
The com enabled solver requires a significantly higher machine memory than the standard
solver. The recommended amount is 256 mbytes of RAM.
Before running the Simulink model, ensure that the current directory setting of Matlab is the in
which the LES model and the Simulink model are stored in, as shown in Figure 14.16.
To run the model, return to the Simulink model window and select ‘Start’ from the Simulation
menu on the Simulink model toolbar or click on the ‘Start simulation’ icon. The simulation should
then proceed displaying the % complete along the bottom. Note that because of the Stop time
setting being greater than the required LES run time (to ensure LES controls the end point), the
% bar will not normally reach 100% before the Simulink run ends.
If your simulink model fails to start then the following is suggested as a troubleshooting
procedure:
1. Does the LES filename and location correspond to with the text entered in the first
field of the LES solver link block parameters menu of the Simulink model file.
2. Is the solver registered.
3. Are you licensed to run LES and the LES external interface.
4. Can Simulink find the required S-function m-files, (ensure that the folder conatining
them is listed in the Matlab path file. Type ‘Path’ at the matlab command prompt to
view the current directories present. If the directory is not listed add it by typing
‘Addpath (‘directory’)’ at the Matlab command prompt).
5. Does the LES model run standalone, (i.e. without the Simulink co-simulation).
6. Try starting Matlab from (or ‘changing directory to’ via the Matlab command
window) the same folder as your target LES *.sim file.
If the co-simulation job crashes the LES solver can sometimes be left as a live process. As only
one Com version of the LES solver can run at a time subsequent attempts to run the LES Com
solver will fail until the old process has been deleted. To check for this and to delete the process
depends on the version of Windows being used. The example given in Figure 14.17 for
Windows NT, other versions of Windows follow similar route but with slight differences in
display.
To check for a hung LES solver process, open the task manager using Ctrl+Alt+Del and
selecting the ‘Task Manager’ option. Select the ‘Processes’ tab and look for ‘LESOLV~1.exe’
(or ‘lesolveCpp.exe’). If located select and using the right mouse select from the options menu
‘End Process’.
Figure 14.17. failed run – using Task Manager to end the process.
Once the simulation is under way the signals passed to the Simulink scope element can be
viewed by double clinking on the cope element to open the scope window, which is shown in
Figure 14.18. It may be necessary to autoscale the scope axes.
Figure 14.18. Example of monitoring LES run using the Simulink scope.
The monitoring of a LES – Simulink co-Simulation can be carried out using the same tools in
LES as for a standalone LES simulation. The ‘Job Status’ panel on the LES Solver Control
display can be used to the LES side of the co-simulation using either the conventional bar chart
display or any available trs plots. The ‘job Messages’ section can also be used in exactly the
same way as for a standalone run.
180 Getting Started Using Lotus Engine Simulation
Tutorial 12 ‘Two-stroke Engine Model’
Because the analysis is not started from within LES the ‘prompt on completion of job’ option will
not function.
The LES job status monitoring uses the simulation log file to track progress. For a standalone
LES run the monitoring of this log is initiated as part of the job submission. For a cosimulation
run, because it is initiated by Simulink, LES does not know to start monitoring the log file. Thus
to monitor a co-simulation run you need to point the interface at the log file. To do this once the
job has been started from Simulink, return to the job status panel in LES and select the ‘Scan’
button, as shown in Figure 14.19. The file browser will open in your Windows ‘Temp’ folder
where the log file is located. The co-simulation log file is always given the index
99 to indicate the difference between it and the standalone simulation log files that increment
from ‘1’. Select the log file ‘_Engin_Batch99.log’ from the browser. The status display will now
show the status of the current co-simulation job.
Once the job has finished the *.mrs files and *.prs files can be opened in exactly the same was
as for a standalone LES simulation.