Defining Initial/Boundary
Conditions for an External Pathway
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 an External pathway A transport pathway element that provides a mechanism by which external program modules for contaminant transport (e.g., analytical, finite elelement, or finite difference models) can be directly integrated into GoldSim.:
- 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 pathway; and/or
- By defining an initial condition and/or a boundary condition (in the form of a cumulative input) for the pathway.
In this section, we discuss defining an initial and/or boundary condition for an External pathway.
An initial condition/boundary condition for an External Pathway is specified using the drop-list toward the bottom of the External Pathway dialog. This drop-list provides three options:
- Initial Inventory. This is the default, and represents the initial inventory of each species. This field only accepts vectors by species with dimensions An output attribute for an element that defines the dimensionality (in terms of Length, Time and other fundamental dimensions) of the output. 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 External Pathway 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 | 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 an External Pathway 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 Pathway over the next timestep A discrete interval of time used in dynamic simulations..
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 Pathway.
Note: GoldSim passes the initial condition/boundary condition to the External pathway function by adding it to the first advective Inflow (or in the absence of Inflows, the first Diffusive Influx) to the External pathway. A separate vector is only sent to the External pathway function if there are no Inflows or Influxes into the pathway.
Learn more
- Adding Input and Output Arguments for an External Pathway
- Defining Initial/Boundary Conditions for an External Pathway
- Locking onto an External Pathway DLL File
- Running the External Pathway DLL in a Separate Process
- Specifying the External Pathway Function
- When is the External Pathway Function Called?