Features and Capabilities of External Pathways

Because your external module is completely defined and created by you, External pathways are extremely flexible. You determine the manner in which the External Pathway operates on the contaminant mass it receives: the External Pathway may be a simple one-dimensional representation, or could be a complex three-dimensional model.

You also define the manner in which the External Pathway is linked to the rest of the GoldSim pathway network by specifying the input mass flux links (i.e., the pathway(s) which discharge mass to the External Pathway) and the output mass flux links (i.e., the pathway(s) to which the External Pathway discharges mass).  GoldSim then automatically calls the function representing the External Pathway at the appropriate times, passing the appropriate information back and forth between GoldSim and the function. 

Integrating external contaminant transport pathways into GoldSim requires that you develop a "wrapper" (or "shell") around your existing function, and compile it into a DLL.  In most cases, this will require only a limited number of programming modifications.  GoldSim supports both 32-bit and 64-bits DLLs.

   Warning: Because GoldSim "loses control" of any species mass that it sends to an External Pathway, it obviously cannot apply solubility and mass balance constraints, and cannot force the reactions defined in the GoldSim model to be applied inside the pathway.  Hence, it becomes the responsibility of the author of the function called by the External pathway to do so.

The steps involved in creating and using an External pathway are as follows:

1.  Code  the function(s) to be used by the External pathway(s) in your model;

2.  Compile the functions into a DLL (multiple functions can be included in the same DLL);

3.  Create an External pathway element within GoldSim and specify the DLL and the specific function within the DLL to be used;

4.  Specify within GoldSim how the External pathway is linked to the pathway network (via mass flux links);

5.  Specify any additional input and output arguments that are to be sent to and received from the function.

The details of the first two steps are discussed in Appendix C of the Contaminant Transport Module.  The other steps are discussed in the following sections topics listed below.

Related Topics…

Learn more about: