osmose - lua workshop 2014 · osmose is a tool for the design and the analysis of energy systems
TRANSCRIPT
![Page 1: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/1.jpg)
OSMOSEMULTI-OBJECTIVE OPTIMIZATION OF INTEGRATED ENERGY
SYSTEMS
Presented by Renaud Kern (Teti, Lausanne, Switzerland)
![Page 2: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/2.jpg)
OSMOSE IS A TOOL FOR THE DESIGN ANDTHE ANALYSIS OF ENERGY SYSTEMS.
![Page 3: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/3.jpg)
PROJECT EXEMPLEIn projects/jam.lua file
-- osmose is also a luarocklocal osmose = require 'osmose'
-- Create a project named 'Jam' of type 'MER' (Minimum Energy Requirement)local project = osmose.Project('Jam', 'MER')
-- Load some modelsproject:load({cip="ET.Cip"}, {utilities="ET.generic_utilities"},{cm1="ET.CookingMixing"}, {cm2="ET.CookingMixing", with='CM2_inputs.csv'})
-- Solve with GLPK (GNU Linear Programming Kit)project:solve()
-- Do something with the resultsproject:postCompute('jam_postcompute')
Run withlua projects/jam.lua
![Page 4: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/4.jpg)
In ET/cip.lua file
MODEL EXEMPLE 1/2
-- Create a modellocal lib = osmose.Model 'Cip'
-- Let's give some inputs in the modellib.inputs = {-- Percentage of the mass flowrate of the raw water that is recovered from the process. raw_water_rate = {default = 50, min = 50, max = 50, unit = '%m/m'},-- Mass flowrate of cleaning liquid distributed to the process. (CW1)distributed_water_flow = {default = 10, min = 5, max = 10, unit = 't/h'},}
-- Let's define some output of the modellib.outputs = {-- Mass flowrate of the raw water that is recovered from the process.raw_water_flow = {unit = 't/h', job = "(raw_water_rate/100) * distributed_water_flow"}
![Page 5: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/5.jpg)
MODEL EXEMPLE 2/2-- Add a unit named 'CipUnit' of type 'Process'. -- Units define the smallest entity possible in the model.lib:addUnit("CipUnit", {type = 'Process', addToProblem='j1'})
-- Add 3 streams to the unit. -- Streams are supplied by heat transfert and are defined by a enthalpy-temperature profile.cip["CipUnit"]:addStreams({cleaning_agent = qt{'cleaning_agent_temp', 0,'tank_temp','cleaning_agent_load',3, 'water_h'fresh_water = qt{'source_temp', 0,'tank_temp','fresh_water_load', 3,'water_h'},discharge = ht{{'return_temp'},{'discharge_load'},{'max_temp'}, {0},{ 3}, {'water_h'})
return lib
![Page 6: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/6.jpg)
EXEMPLE OUTPUT 1
![Page 7: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/7.jpg)
EXEMPLE OUTPUT 2
![Page 8: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/8.jpg)
EXTERNAL TOOL 1
GNU LINEAR PROGRAMMING KIT (GLPK)
![Page 9: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/9.jpg)
EXTERNAL TOOL 2
GNUPLOT
![Page 10: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/10.jpg)
EXTERNAL TOOL 3
DAKOTA
![Page 11: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/11.jpg)
BUT WHERE ARE MY EGGS?
![Page 12: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/12.jpg)
t = {'a','b'} print('a'==t[1])
![Page 13: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/13.jpg)
BUT WHERE IS MY UML?
![Page 14: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/14.jpg)
LUA FOR WINDOWS...
![Page 15: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/15.jpg)
WE NEED AN IDE
![Page 16: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/16.jpg)
Graphical programming
HTTP Connection
Parallel
![Page 17: Osmose - Lua Workshop 2014 · osmose is a tool for the design and the analysis of energy systems](https://reader031.vdocuments.mx/reader031/viewer/2022031302/5be7e37709d3f2db738d232e/html5/thumbnails/17.jpg)
THANK YOUhttp://leni.epfl.ch/en
https://github.com/ipese/osmose