User's Guide for Gas Grid Simulation
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.
- 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.
- 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.
- Use a discretization high enough to get adequate results but
high discretization leads to long simulation times or even failing
initialization.
- Use isothermal pipe and junction models where possible. This
leads to less states.
- 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.
- Try different solvers, especially Esdirk23a, Esdirk34a,
Esdirk45a, Sdirk34hw, Radau IIa. Also experiment with different
tolerances.
- 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 2026-04-15T18:18:36Z by OpenModelicaOpenModelica 1.26.3 using
GenerateDoc.mos