.TransiEnt.Grid.Gas.UsersGuide

Information

Purpose of User's Guide

This User's Guide should enable you to get a quick start at gas grid simulation or give you some advice on how to improve your models.

  1. Try to avoid big nonlinear systems of equations. This can be done by always using volumes and pressure losses in an alternating fashion. Two pressure losses or two volumes next to each other lead to a bigger nonlinear system of equations. Use frictionAtInlet/frictionAtOutlet in the pipe models and the pressure losses in the junction models to control this. Note that ignoring this rule can sometimes lead to a faster model since adding pressure losses often adds a state. Before and after boundaries, no pressure loss should be necessary for numerical reasons.
  2. Static Cycles can help the initialization but are often not necessary if you use the physical pressure loss model PhysicalPL_L4_constVisc. Also experiment with the different initOptions.
  3. Use a discretization high enough to get adequate results but high discretization leads to long simulation times or even failing initialization.
  4. Use isothermal pipe and junction models where possible. This leads to less states.
  5. Use constantComposition if possible. If the composition is variable but only certain components vary independenty, e.g. in the case of mixing natural gas with hydrogen, use variableCompositionEntries.
  6. Try different solvers, especially Esdirk23a, Esdirk34a, Esdirk45a, Sdirk34hw, Radau IIa. Also experiment with different tolerances.
  7. Depending on the topology, using a sparse and/or a DAE solver can be faster.

Examples for a well-built topology can be found here.

Version History

User's Guid created by Carsten Bode (c.bode@tuhh.de), May 2020


Generated at 2024-12-03T19:25:34Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos