basic principles of thermofluid modelling · • openmodelica workshop 2015: modelling of energy...
TRANSCRIPT
![Page 1: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/1.jpg)
Modelling and Simulation of InnovativeModelling and Simulation of InnovativePower Generation Systems in OpenModelica: Power Generation Systems in OpenModelica:
The Case of PreFlexMS The Case of PreFlexMS
Francesco CasellaFrancesco Casella(([email protected]@polimi.it))
Stefano TrabucchiStefano Trabucchi([email protected])([email protected])
![Page 2: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/2.jpg)
2
A bit of history
• OpenModelica Workshop 2014: ThermoPower Library Simulation
– ThermoPower library mostly covered
– Modelica.Media models covered, including IF97
– Test models and examples working
– Up to 40X slower than Dymola on non-trivial test cases
![Page 3: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/3.jpg)
3
A bit of history
• OpenModelica Workshop 2014: ThermoPower Library Simulation
– ThermoPower library mostly covered
– Modelica.Media models covered, including IF97
– Test models and examples working
– Up to 40X slower than Dymola on non-trivial test cases
• OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica
– Laid out requirements for use of OMC in energy system modellling
– Some initial interesting results on cryogenic system simulation
![Page 4: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/4.jpg)
4
A bit of history
• OpenModelica Workshop 2014: ThermoPower Library Simulation
– ThermoPower library mostly covered
– Modelica.Media models covered, including IF97
– Test models and examples working
– Up to 40X slower than Dymola on non-trivial test cases
• OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica
– Laid out requirements for use of OMC in energy system modellling
– Some initial interesting results on cryogenic system simulation
Where are we now?
![Page 5: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/5.jpg)
5
Outline
• The Horizon 2020 PreFlexMS project
• The Plant Model
• Dynamic Controllability Analysis
• Dynamic Simulations
• Sharing the model with 3rd parties
• Outlook and conclusions
![Page 6: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/6.jpg)
6
Solar Power Generation Systems
Photovoltaic (PV) systems
+ Low and decreasing costs
+ Exploit direct and diffuse radiation
+ Trivial operation and maintenance
![Page 7: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/7.jpg)
7
Solar Power Generation Systems
Photovoltaic (PV) systems
+ Low and decreasing costs
+ Exploit direct and diffuse radiation
+ Trivial operation and maintenance
- Only produce power when the sun is available
- Battery storage too expensive
![Page 8: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/8.jpg)
8
Solar Power Generation Systems
Solar-Thermal Systems with Thermal Storage
+ Thermal storage can provide 10 hrs or more of full power production
+ Power production decoupled from solar irradiation
+ Steam power generation technology well-known
![Page 9: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/9.jpg)
9
Solar Power Generation Systems
Solar-Thermal Systems with Thermal Storage
+ Thermal storage can provide 10 hrs or more of full power production
+ Power production decoupled from solar irradiation
+ Steam power generation technology well-known
- Effective system design requires the use of molten salts as working fluid
- Current designs based on flat subsidized rates (no incentives to flexibility)
![Page 10: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/10.jpg)
10
Energy Markets and Prices
![Page 11: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/11.jpg)
11
The PreFlexMS Horizon 2020 Project
Predictable, Flexible solar power generation using Molten Salts
• Predictable
– Advanced meteo forecast of DNI
– Market price-based dispatch optimization
– Exploiting thermal storage (production shifting)
![Page 12: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/12.jpg)
12
The PreFlexMS Horizon 2020 Project
Predictable, Flexible solar power generation using Molten Salts
• Predictable
– Advanced meteo forecast of DNI
– Market price-based dispatch optimization
– Exploiting thermal storage (production shifting)
• Flexible– Fast plant start-up (30 min from standby to full load)
– Fast load changes (> 10% / min)
![Page 13: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/13.jpg)
13
The PreFlexMS Horizon 2020 Project
Predictable, Flexible solar power generation using Molten Salts
• Predictable
– Advanced meteo forecast of DNI
– Market price-based dispatch optimization
– Exploiting thermal storage (production shifting)
• Flexible– Fast plant start-up (30 min from standby to full load)
– Fast load changes (> 10% / min)
• Molten Salt
– Working fluid: 60% NaNO3 40% KNO3 (common fertilizer)
– Solidifies below 245 °C
![Page 14: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/14.jpg)
14
The PreFlexMS Horizon 2020 Project
Predictable, Flexible solar power generation using Molten Salts
• Predictable
– Advanced meteo forecast of DNI
– Market price-based dispatch optimization
– Exploiting thermal storage (production shifting)
• Flexible– Fast plant start-up (30 min from standby to full load)
– Fast load changes (> 10% / min)
• Molten Salt
– Working fluid: 60% NaNO3 40% KNO3 (common fertilizer)
– Solidifies below 245 °C
Competitive with gas-fired flexible CCPPs
![Page 15: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/15.jpg)
15
The PreFlexMS Horizon 2020 Project
Predictable, Flexible solar power generation using Molten Salts
• Main Industrial Partner: GE (formerly Alstom Power)
• 13 Consortium Partners
• Total Budget: 17.8 M€ costs, 14.3 EU funding
• Duration: 2015-2019
• Experimental demonstration on pilot-scale plant in 2019(?)
![Page 16: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/16.jpg)
16
Focus of our flexibility study
State of the art: drum-type steam generator
preheatdrum
sh
rh
cond
ev
![Page 17: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/17.jpg)
17
Focus of our flexibility study
State of the art: drum-type steam generator
preheatdrum
sh
rh
cond
Innovation: once-through steam generator
ev
preheat sh
rh
cond
ev
![Page 18: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/18.jpg)
18
Challenges and research questions
• First design ever of a once-through steam generator using Molten Salt
• No previous operational experience
• Dynamic behaviour of circulation-type MS plants different
• Dynamic behaviour of gas- or coal-fired once-through boilers different
![Page 19: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/19.jpg)
19
Challenges and research questions
• First design ever of a once-through steam generator using Molten Salt
• No previous operational experience
• Dynamic behaviour of circulation-type MS plants different
• Dynamic behaviour of gas- or coal-fired once-through boilers different
Q1: What is the dynamic behaviour of this plant?
Q2: Is this plant easy or difficult to control?
Q3: Which control strategies are more appropriate?
Q4: Can we start-up the plant from warm stand-by to full load in 30 mins?
Q5: What is the maximum load change rate we can afford?
Dynamic model required
![Page 20: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/20.jpg)
20
Modelica model of the PreFlexMS power block – Top view
![Page 21: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/21.jpg)
21
Simplified model with HP part only – Top view
![Page 22: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/22.jpg)
22
Once-through steam generator model
![Page 23: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/23.jpg)
23
Single heat exchanger model
![Page 24: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/24.jpg)
24
Preheater train model
![Page 25: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/25.jpg)
25
Main Features of the models
• Full model
– Number of equations: 9655
– Number of states: 278
• Simplified HP model
– Number of equations: 6974
– Number of states: 207
• Heavy use of Modelica.Media IF97 water/steam medium model
• Highly nonlinear, very stiff
• Some flow rates are zero or near zero in certain time intervals → numerically challenging
• Models initially developed in Dymola in 2015
• Tested and used with OpenModelica since Apr 2016
![Page 26: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/26.jpg)
26
Activity #1:
Dynamic Response Analysisfor Control System Design
![Page 27: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/27.jpg)
27
Outline of activities
• The model is ran to steady-state and checked against design and off-design operating points
• The model is linearized around steady-state points at different load values
• Transfer functions are computed
• Bode plots of the transfer functions are inspected and checkedfor nonlinear behaviour @ different loads
• RGA matrix is computed to assess controllability with decentralizedPID controllers
• Transmission zeros are computed and checked fornon-minimum phase behaviour → bandwitdth limitations
• PID controllers are tuned based on the transfer functions
• Advanced centralized linear MPC controllers are designed usingthe state-space linearized models
• Performance of designed controllers is checked by simulation
Quality of linearized modelsis essential!
![Page 28: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/28.jpg)
28
Step response around an equilibrium point
Problems with the quality of the numerically linearized model!
![Page 29: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/29.jpg)
29
OpenModelica to the rescue?
Unstable linearized model!
![Page 30: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/30.jpg)
30
Use the Source, Luke!
![Page 31: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/31.jpg)
31
Let’s get to the source of the problem
• Original version of the code
• Changed scaling
• Added parameter for deltaX
![Page 32: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/32.jpg)
32
Step response around an equilibrium point
Problem solved!
![Page 33: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/33.jpg)
33
All’s well that end well
• Problem raised Oct 19, 2016
• Problem fixed Oct 20, 2016 (thanks Willi!)
• Advantages for research work
– All methods are in plain sight
– Understand exactly what the tool does
– Improve the code according to one’s need
• Maybe industrial settings prefer turnkey solutions?(not necessarily; hint: Rudiger Franke’s work within ABB)
• What is the value of this aspect of open-source development forindustrial partners of the OSMC?
![Page 34: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/34.jpg)
34
Activity #2:
Evaluation of control performance by simulation
![Page 35: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/35.jpg)
35
Outline of activities
• Decentralized PID-based control designedbased on the results of dynamic analysis
• Control system modelled in Modelica, using the IndustrialControlSystems library (2nd library award winner @ 2012 Modelica Conference)
![Page 36: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/36.jpg)
36
Control system model
![Page 37: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/37.jpg)
37
Control system model - cont’d
![Page 38: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/38.jpg)
38
Outline of activities
• Decentralized PID-based control designedbased on the results of dynamic analysis
• Control system modelled in Modelica, using the IndustrialControlSystems library (2nd library award winner @ 2012 Modelica Conference)
• Performance is evaluated in multiple scenarios
– Warm-keeping
– Transition to minimum load (20%)
– 100%-20% load change @10%/min
– 20%-100% load change @ 10%/min
– Other ramp load changes (dispatching)
– Extra power supply for primary frequency control
– etc…
![Page 39: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/39.jpg)
39
Outline of activities
• Decentralized PID-based control designedbased on the results of dynamic analysis
• Control system modelled in Modelica, using the IndustrialControlSystems library (2nd library award winner @ 2012 Modelica Conference)
• Performance is evaluated in multiple scenarios
– Warm-keeping
– Transition to minimum load (20%)
– 100%-20% load change @10%/min
– 20%-100% load change @ 10%/min
– Other ramp load changes (dispatching)
– Extra power supply for primary frequency control
– etc…
![Page 40: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/40.jpg)
40
Performance comparison
Dymola 2017 OMC 1.11.0 dev163 (*)
OMC 1.12.0Dev189 (*)
Build code time [s]
12 88(52 FE)
84(49 FE)
Simulation time [s]
115 310 253
# of steps 3978 4310 4178
# of Jac comp. 930 956 815
• Hardware: Intel i7-4810MQ @ 2.8 GHz 8 GB
• Solver: DASSL on causalized system, tol = 10-5
• Simulation results are matching within the solver tolerance
(*) using wrapFunctionCalls
![Page 41: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/41.jpg)
41
Performance comparison
Dymola 2017 OMC 1.11.0 dev163 (*)
OMC 1.12.0Dev189 (*)
Build code time [s]
12 88(52 FE)
84(49 FE)
Simulation time [s]
115 310 253
# of steps 3978 4310 4178
# of Jac comp. 930 956 815
• Hardware: Intel i7-4810MQ @ 2.8 GHz 8 GB
• Solver: DASSL on causalized system, tol = 10-5
• Simulation results are matching within the solver tolerance
Acceptable for serious use
Large margins for improvement
(*) using wrapFunctionCalls
![Page 42: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/42.jpg)
42
Activity #3:
Sharing the model with other project partners
![Page 43: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/43.jpg)
43
PreFlexMS partner goals
• Politecnico di Milano– Analysis and design of control issues– Validation of control performance by simulation
• AGH University of Technology (Krakow)– Design of machine-learning systems for performance prediction– Need of models to tuning and validation by simulation
• DLR– Complete virtual power plant model
– Development and testing of model-based dispatch optimizer
• EC-Systems (Poland)– Software integration and deployment
Re-use Modelica models
Avoid extra license fees
![Page 44: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/44.jpg)
44
The solution
+
![Page 45: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/45.jpg)
45
The solution
• Suitable interfaces added to the power block model
• FMUs 2.0 for ME generated by OMC
• FMUs embedded in Simulink system models using Modelon’s FMI Toolbox
![Page 46: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/46.jpg)
46
The solution
• Suitable interfaces added to the power block model
• FMUs 2.0 for ME generated by OMC
• FMUs embedded in Simulink system models using Modelon’s FMI Toolbox
• Exported models work and produce the expected results
• Some numerical problems at reduced loads
– Maybe ode15s worse than DASSL?
– Generated code can be improved?
– Modelica models can be made more robust?
• No feedback from the FMU → extensive logging would be helpful
• Work currently in progress to improve the situation
![Page 47: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/47.jpg)
47
Outlook and Conclusions
![Page 48: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/48.jpg)
48
• Our experience with OMC during the PreFlexMS project was positive
• OMC can handle non-trivial power generation system modelswithout problems
• The performance is acceptable
#1: OMC can be used for serious work
![Page 49: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/49.jpg)
49
• The PreFlexMS model was initially developed in Dymola
• Minor improvement was required to also run in OMC
• Same code base on SVN for use with both tools
• Even for users of commercial tools, OMC can provide advantageswithout the need of switching to its exclusive use
– Alternative tool for troubleshooting
– Generation of royalty-free simulation code (e.g., FMUs)
– Massive deployment of simulation code on the cloud for optimization purposes
– ...
#2: OMC can work side-by-sidewith other Modelica tools
![Page 50: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/50.jpg)
50
• FMU/ME compiled with OMC run successfully
• FMUs compiled with OMC carry no license limitations
• The current support of FMU/CS (only forward Euler) is not enough for this kind of models
• Full support of logging in FMUs is absolutely necessary for troubleshooting
#3: OMC can be used as a royalty-free simulation code generator
![Page 51: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/51.jpg)
51
• We faced a (potentially fatal) numerical issue with linearized models
• Access to the code allowed to understand exactly how the current implementation worked and how to fix it
• The (small) fix was implemented and delivered overnight
#4: Open-Source code allows to better understand problems
and solve them
![Page 52: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/52.jpg)
52
• We faced a (potentially fatal) numerical issue with linearized models
• Access to the code allowed to understand exactly how the current implementation worked and how to fix it
• The (small) fix was implemented and delivered overnight
• Alternative model to commercial tool vendors business model
– Source code is a trade secret
– As little as possible is revealed about how the code works
– Turn-key customer care by commercial tool vendors
• Discussion?
#4: Open-Source code allows to better understand problems
and solve them
![Page 53: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/53.jpg)
53
• Simulations of steam-based power generation systems still 2 times slower than using Dymola
• Time to build executable simulation code is still about 7 times larger than using Dymola
● New front-end will reduce the factor to 3-4 (June? Sept.?)● Further optimization of the code generation process required
• The wrapFunctionCalls optimization is crucial for good performanceit should be activated by default in 1.12.0
• GUI still not up to the task
– Too slow when opening models
– Some problems with rendering of diagrams
– No replaceable medium support yet
– No hierarchical model editing yet
#5: Still much work to do to achieve competitive performance
![Page 54: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/54.jpg)
54
Acknowledgements
This work was supported by the European Commision, H2020 program, under Grant 654984
Many thanks to all the OMC developers,particularly Willi Braun, for their support
![Page 55: Basic Principles of Thermofluid Modelling · • OpenModelica Workshop 2015: Modelling of Energy Systems with OpenModelica – Laid out requirements for use of OMC in energy system](https://reader033.vdocuments.net/reader033/viewer/2022042804/5f5241811ff1b0372a2653c5/html5/thumbnails/55.jpg)
55
Thank you for your kind attention!