Defining Initial and/or Boundary Conditions for a Cell

There are four 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 Cell:

  1. By defining an initial condition and/or a boundary condition for the Cell;
  2. By defining discrete changes to the inventory in a Cell;
  3. Through a mass flux link An interconnnection between two transport pathways that defines the rate at which species move between the pathways. from another pathway to the Cell; and/or
  4. By associating the Cell with a Source.

Below we discuss the first item, defining an initial and/or boundary condition for a Cell.

An initial condition/boundary condition for a Cell is specified within the "Cell Inventory" section of the dialog. The first field in this section provides four options:

To specify this: Enter the following into the "Cumulative Input" field:
An initial condition 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 Cell 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 Cell.
Note: A Defined Concentration boundary condition does not use the specified volume of the first fluid to compute a concentration (it simply applies a specified concentration). However, you should still specify a volume (e.g., 1 m3). If you specify a zero volume, it will generate a warning message when you run the model.
Warning: If you select a Defined Concentration boundary condition and leave the input field blank, GoldSim will assume a zero concentration for all species.
Warning: A Defined Concentration boundary condition can act as both a source and a sink. As a simple example, specifying a concentration of zero would turn the Cell into a sink for mass. Not only would diffusive gradients be toward the Cell, but any mass entering the Cell (by any mechanism) would be removed from the system (in order to maintain a zero concentration).
Warning: Solubility limits are not applied in Cells with a Defined Concentration. If the Defined Concentration for a species is above the solubility limit, the solubility limit is ignored, the Defined Concentration is applied, and a warning is written to the Run Log Text that is stored with a GoldSim model once it has been run. It contains basic information regarding the simulation, and any warning or error messages that were generated..

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 Cell 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 second 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. There is also an Initial_Concentration in the Cell, which has a Constant_Volume and constant outflow rate (equal to the inflow rate). You could model this in two ways, as illustrated in the example below:

The example in the top uses the Cumulative Input option for the "Cell Inventory" in Cell1:

The Cumulative_Input Integrator element is defined as follows (with an initial mass and a mass input rate):

The example on the bottom defines a "Source_Cell" that looks like this:

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 Cell2. That is, the Source_Cell has an outflow to Cell2:

Cell2 looks like this:

It has an Initial Inventory, as well as an inflow from the Source_Cell.

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 mass in Cell1 and Cell2), they look like this:

What we see is that the mass that is input "externally" (using the Cumulative Input) lags by one timestep. This is because in this approach (or in the absence of an initial condition, using an Input Rate), 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).