uesgraphs.examples.e11_model_generation_example
Modelica Model Generation using UESGraphs
This module demonstrates the automated generation of Modelica models for district heating networks. The generated models can be directly simulated in Dymola, but require exactly AixLib version 2.1.0. Other versions are not compatible and will cause simulation errors.
Model Variants:
For each network (Pinola and IBPSA), three model variants are generated:
Open Loop with Variable Supply Temperature (suffix: _open_loop_dT_var) - High temperature network (80°C supply / 50°C return) - Table-based ground temperature - Direct heating substations
Variable Ground Temperature Model (suffix: _t_ground_var) - Same as variant 1 but uses Kusuda ground temperature model - More detailed soil temperature calculation
Low Temperature Network (suffix: _low_temp_network) - Low temperature regime (20°C supply / 10°C return) - Heat pump substations (Carnot-based) - Includes substation parameters (COP, nominal temperatures)
Functions:
- model_generation_pinola(dir_source, dir_dest):
Generates three variants of Modelica models for the Pinola network
- model_generation_ibpsa(dir_source, dir_dest):
Generates three variants of Modelica models for the IBPSA network
- create_dirs(dir_project):
Creates standardized directory structure for model files and results
Model Parameters:
Simulation time: 603900 seconds
Time step: 900 seconds
Nominal pressure: 5e5 Pa
Heat pump COP (nominal): 4.5
Network pressure difference: 4e5 Pa (supply-return)
Components Used:
Supply: AixLib.Fluid.DistrictHeatingCooling.Supplies.OpenLoop.SourceIdeal
- Demand: AixLib.Fluid.DistrictHeatingCooling.Demands.OpenLoop.VarTSupplyDp
AixLib.Fluid.DistrictHeatingCooling.Demands.OpenLoop.HeatPumpCarnot
Pipes: AixLib.Fluid.DistrictHeatingCooling.Pipes.PlugFlowPipeEmbedded
Medium: AixLib.Media.Specialized.Water.ConstantProperties_pT
Notes:
All models use plug flow pipe models with embedded heat losses
Ground coupling can be either table-based or using the Kusuda model
Directory structure is automatically created for inputs, models, and results
Models are exported in Modelica format (.mo files)
Direct simulation in Dymola is possible, but strictly requires AixLib v2.1.0
Functions
|
Creates input, model, result and visualization directories |
|
|
|
Run example model generation for Ibpsa network |
|
Run example model generation for Pinola network |
- uesgraphs.examples.e11_model_generation_example.model_generation_pinola(dir_source, dir_dest)[source]
Run example model generation for Pinola network
- uesgraphs.examples.e11_model_generation_example.model_generation_ibpsa(dir_source, dir_dest)[source]
Run example model generation for Ibpsa network
- uesgraphs.examples.e11_model_generation_example.create_dirs(dir_project)[source]
Creates input, model, result and visualization directories
- Parameters:
dir_project (str) – Base directory of the example where the directories will be created
- Returns:
dir_input (str) – Directory for input files
dir_model (str) – Directory for model files
dir_result (str) – Directory for result files
dir_visualization (str) – Directory for plots