Comp2252 Modelling and Simulation. Worksheet 8. Purpose (a) To investigate the modelling of a hydroelectric power station. (b) To conduct simulations of a tworeservoir single-turbine (Francis) power station including measuring the power generated Level and Assets: in the folder CBP55_Content Code: All .uc classes in the folder CBP55 In particular, you will need the script file CBP55_Euler_HydroElectric.uc and the UDK level CBP55_Euler_Lab_Hydroelectric.udk. Background This workshop is follows on from the previous workshop concerning fluid flow in reservoirs. The code is mainly the same, with a slight adjustment to a flow equation since the first tank is at a fixed height above the datum line. Also the code for the turbine power generation needs to be inserted. Note that validation of the fluid flow part of the model does not need to be done, since this has already been done for the basis two-tank model. Associated Reading Reservoirs and HydroPower (revised notes) Activities 0 Setup. Install the code and the associated level. Compile the code. Note that complete code for the computation() function has not been included. 1 Writing code Working from the lecture notes and/or the associated reading material, add to your previous code for the two-tank model (previous workshop) to include the turbine power generation code and also to modify the flow code. Take care to add your code into the correct place in the computation() function. Look at the variables which are declared at the top of the class (global variables). Compile. 2 Verification. Load the single tank level and play the level. Observe the change in height of the water in the reservoirs. If it does not behave in a reasonable way, then your code has failed verification. You have probably made an error somewhere. 3 Initial Exploration. Conduct some initial experiments using the three parameter sets provided at the end of this document. These sets have been chosen to reveal some useful behaviour. For the third parameter set you should run the simulation for around half a minute, then reduce the inflow as suggested. 4 Plan your simulation study. Keep this short! There are several approaches to an interesting simulation study of a single tank. These involve changing the value of a single parameter. For example, you could investigate the effects of changing (a) The reservoir areas. This simulation would be useful in designing the power station. What happens to the generation of power over a period in time, if the top reservoir becomes larger and larger in area? Remember that the initial water height is the same, so a larger area means a larger water volume. (b) The area of the pipe connecting the reservoirs. What happens to the generation of power over time if this pipe becomes larger? What happens to the height in the reservoirs over a period in time? Again, this simulation would be useful in designing the power station You may of course to choose any other parameter. But remember only change one parameter over a sequence of simulation runs for a particular investigation. 5 Prepare for your study. Decide which variables and parameters you need to display on the HUD. Decide which parameters you want to change at the command line. Decide which variables you need to add to the log file. Add code into the appropriate functions to do this. 6 Conduct your simulation study and attempt to make some conclusions from the data you record. You may wish to look at plotting the following graphs: (i) Height of water against time (ii) Outflow against time. Finally, you should make some conclusions from the results of your simulations. Parameter Sets Parameter Set A reservoir Area 1 = 10.0 reservoir Area 2 = 2.0 reservoir Height1 = 2.0 reservoirHeight2 = 0.0 pipeAreaB = 0.1 pipeAreaC = 0.2 dischCoeff12 = 1.0 dischCoeff2 = 2.0 turbineCoeff = 1.0 inFlow = 0.0 initHeight1 = 1.0 initHeight2 = 1.0 Parameter Set B reservoir Area 1 = 50.0 reservoir Area 2 = 5.0 reservoir Height1 = 2.0 reservoirHeight2 = 0.0 pipeAreaB = 0.1 pipeAreaC = 0.2 dischCoeff12 = 1.0 dischCoeff2 = 2.0 turbineCoeff = 1.0 inFlow = 1.0 initHeight1 = 1.0 initHeight2 = 1.0 Parameter Set C reservoir Area 1 = 50.0 reservoir Area 2 = 5.0 reservoir Height1 = 2.0 reservoirHeight2 = 0.0 pipeAreaB = 0.1 pipeAreaC = 0.2 dischCoeff12 = 1.0 dischCoeff2 = 2.0 initHeight1 = 3.42 initHeight2 = 0.319 turbineCoeff = 1.0 inFlowInit = 1.0 inFlowFinal = 0.7