How would you set up a gas dynamic simulation?

I am very interested in exploring what kind of checklist a modeler would follow to ensure that the model and scenario are correctly set up and defined for a dynamic simulation where a specific set of constraints is scrutinized. Are there some obvious pitfalls to avoid? Are there some consolidated good practices?

First, let me remind you that the initialization state is required to kick off the numerical method to identify a solution (if any) for the first time step of a dynamic analysis. SAInt allows the user to specify any valid and solved state file for the same network used in a dynamic simulation. The state file could be either the result of a steady state simulation or one obtained by a dynamic simulation (i.e., SAInt saves a *.gcon for any dynamic simulation taking a snapshot of the last time step). Alternatively, the user can “export” a specific time step from a dynamic simulation to a state file and use that as an initial condition.

Why this may be a pitfall? We have three aspects to consider:

1- When using a steady state initialization state, we start from a system where “we make the fundamental presumption that the flow through a system is constant and that the sum of the flows into the system precisely equals the flow out of the system with the exception of compressor fuel”. The mass continuity equation for the system is satisfied as well. The system is in equilibrium and frozen. Let’s take a 50 kilometer pipeline with a supply at one end and a demand at the other. A steady state solution implies that supply = demand. There is no time. At any point in the pipeline, the state of the gas is always in equilibrium.

2- In a dynamic simulation, time and changes matter a lot. And we want to describe how our system may evolve based on events occurring at certain moments. However, the possible solution for a time step is, on one side, conditional to the previous time step and the event set of events taking place. On the other hand, it is bound by physical relationships. A system may not “jump” from one time step to another or may need more time to adapt to a set of conditions. So, this implies that we need to have an initialization state that is a good approximation of the first-time step of our dynamic simulation. We cannot impose big jumps in parameters and expect the system to adapt to the new values immediately. It needs some time to move towards the new target from its initial state.

3- The set of conditions and parameters to be specified in SAInt for a steady state analysis do not cover all the requirements for a dynamic analysis. SAInt passes over the details from the initialization state to the solver to start the search for a solution to the dynamic problem, but some aspects need to be specified again or for the first time in the dynamic scenario. For example, the inventory level of a gas storage or LNG facility is not relevant in a steady-state analysis, and even if it is specified, it is not transferred to the dynamic analysis. Another example is temperature-related properties, which need to be re-specified in the dynamic scenario.

So my personal (short and general) check list for carrying out a dynamic analysis:

  • Always make sure that I have specified Pn and Tn in the GNET object.

  • Double-check that the viscosity and compressibility factor equations are the ones I want.

  • Check that the units of measure are the ones you need.

  • Remember to specify inventory levels for GSTR and LNG objects in the dynamic event scenario table.

  • Remember to specify network’s event again in the dynamic scenario table as they where in the steady state scenario (e.g., TAMB).

  • Use “reasonable initial conditions” so that we do not waste the initial part of the simulation to make the system reach a dynamic equilibrium trajectory.

  • Use a reasonable “burn-in period” (see below) before starting the events you want to study for the scenario.

  • Check that the set of events in the scenario does not take place in a super-quick sequence for the same object (i.e., two events for an object should be separated in the time of at least one time step).

  • Remember to check any new object added to a network for default values and change the default to your needs.

Whenever I have to address a dynamic simulation problem, I follow this practice: (1) have a steady state solution; (2) develop a “simplified” dynamic solution by transferring all the steady state conditions to a dynamic case and let the system “burn-in”, and (3) start my real dynamic simulation from the end of the burn-in period on.

Point two means that I extend the steady state in time by specifying that it has to evolve and by adding the missing dynamic events needed to address storage- or temperature-related properties. I let the system evolve, and because I do not add any other event, it will start to repeat the same trajectory over and over (i.e., a dynamic equilibrium trajectory) if I do not run out of supply in storage and LNG.