Defining Initial/Boundary Conditions for a Pipe

There are two ways by which species The chemical (or non-chemical, such as bacterial or viral) constituents that are stored and transported through an environmental system in a contaminant transport model. In GoldSim, the Species element defines all of the contaminant species being simulated (and their properties). mass can enter a Pipe:

In this section, we discuss defining an initial and/or boundary condition for a Pipe.

An initial condition/boundary condition for a Pipe is specified using the drop-list directly below the Discrete Changes field within the Pipe dialog. This drop-list provides three options:

In all three of these cases, if the Source Zone Length is zero (the default), the mass is applied at the beginning of the Pipe. If the Source Zone Length is greater than zero, the mass is distributed uniformly over the specified length.

To specify this: Enter the following into the "Cumulative Input" field:
An initial condition (at the beginning of the Pipe) A constant vector A one-dimensional array. with dimensions of mass (in this case, however, it would be more transparent to use the "Initial Inventory" option).
An initial condition and a constant rate of addition An expression such as: Initial + Rate * Etime, where Initial is a constant vector (with dimensions of mass) and Rate is a constant vector (with dimensions of mass/time).
An initial condition and a time-variable rate of addition The output of a Pool A stock element that integrates and conserves flows of materials. A Pool is a more powerful version of a Reservoir (it has additional features to more easily accommodate multiple inflows and outflows)., Reservoir A stock element that integrates and conserves flows of materials. or Integrator element An stock element that integrates rates. (with output dimensions of mass) with a specified Initial Value and (time-variable) Rate of Change.
Warning: The Cumulative Input must stay constant or increase with elapsed time. That is, you cannot remove mass from a Pipe using the Cumulative Input field. If the value ever begins to decrease with time, a fatal error occurs.
Note: One way to easily enter a vector of data into an input field without having to create a separate element is to use GoldSim's vector constructor function. For example, entering "vector(1g)" into the Cumulative Input field results in an initial condition of 1 g of each species being present in the Pipe.

Although the Input Rate and Cumulative Input options provide a quick and convenient way to enter mass input rates, if mass input rates into a Pipe are changing with time (e.g., because the inflow concentration is changing), a slightly more accurate way (both numerically and conceptually) to specify such a boundary condition is to create a "Source Cell" that is defined using a Defined Concentration.

As an example, consider a case in which you have a boundary condition with a constant inflow rate (Flow_Rate) and a time-varying Inflow_Concentration. The Pipe has a constant outflow rate (equal to the inflow rate). You could model this in two ways:

If we run this model (for 100 days with a 5 day timestep) and compare the results for these two different approaches to representing the boundary condition (in terms of the concentration leaving the Pipe), they look like this:

What we see is that the mass that is input "externally" (using the Input Rate) lags by one timestep. This is because in this, due to the way the external boundary condition must be applied when solving the pathway equations, a one timestep lag is introduced. Hence, the second approach is a more accurate representation (although for a small timestep, the differences would likely be insignificant). Conceptually, however, this is a bit more accurate way to represent the boundary condition (since the boundary condition is actually treated as part of the pathway network).