Defining Initial/Boundary Conditions for a Pipe

There are two ways by which species mass can enter a Pipe:

   Through a mass flux link from another pathway to the Pipe; and/or

   By defining an initial condition and/or a boundary for the 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.

   Initial Inventory. This is the default, and represents the initial inventory of each species. This field only accepts vectors by species with dimensions of mass. Moreover, this input cannot be specified as a function of time (if it is, GoldSim will display a fatal error when you try to run the model).

   Cumulative Input. This option provides a mechanism for simultaneously specifying an initial condition and a rate of mass addition (that may change with time). This field only accepts vectors by species with dimensions of mass.  It represents the cumulative amount of mass of each species added to the Pipe at a given time.  Hence, if it is constant, it represents an initial condition.  If it increases with time, its rate of change represents a specified rate of addition. Correct use of the "Cumulative Input" is summarized in the table below:

 

To specify this:

Enter the following into the "Cumulative Input" field:

An initial condition (at the beginning of the Pipe)

A constant vector 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, Reservoir or Integrator element (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.

   Input Rate.  The third option is used to specify a rate of mass addition (that may change with time).  This field only accepts vectors by species with dimensions of mass/time.  It represents the rate at which mass of each species is added to the Pipe over the next timestep. 

   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:

   In the first approach, you simply provide an Input Rate to the Pipe:

Graphical user interface, application, email

Description automatically generated

   In the second approach, you define a “Source_Cell” that looks like this:

Graphical user interface, text, application

Description automatically generated

The volume is set to an arbitrarily small number (it is not used to compute concentrations since the concentration is fixed). A Defined Concentration is specified for this Source_Cell that will flow into Pipe.  That is, the Source_Cell has an outflow to the Pipe:

Graphical user interface, text, application

Description automatically generated

The Pipe itself has no Input Rate specified.

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:

Chart, line chart

Description automatically generated

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).

Learn more about:

Related Topics…