1. SETTING UP THE PROBLEM
* #NCELL is number of cells ;
INTEGER #NCELL 20 #WK 200 #NTSTEP 200 ;
INTEGER #NSNAPS 12 ;
* L=Length of pipe (m), U=velocity (m/s) ;
PARAMETER H L 5 U 1 Tmp;
This section of the code defines the pipe length and velocity and sets up the number of sections to be used in the model and the required workspace (see manual for details). It also declares some parameters used in the calculation and the number of equal spaced samples of the concentrations along the pipe to be recorded.
DEFINITIONS PARAMETER A0 10 C0 1 ;
This section defines parameters for the initial concentrations of A and C and assigns their initial values.
PARAMETER K1f 1.0 K1r 0.25 K2f 0.25 K2r 0.08 K3f 100.0 ;
This section defines parameters and values for the reaction rate constants.
* ++ Diffusion coefficients ++ ;
PARAMETER DA 0.1 DB 0.1 DC 0.2 DD 0.1 DE 0.2
This section defines parameters and values for the diffusion constants for the components
* ++ Transport coefficients ++ ; PARAMETER TFA TBA TFB TBB TFC TBC TFD TBD TFE TBE
This section defines parameters for the transport coefficients
* ++ Output Parameters ++ ;
PARAMETER A_0 A_19 B_0 B_19 C_0 C_19 D_0 D_19 E_0 E_19 ;
This section defines parameters to be used for outputting the end concentration values.
PARAMETER <#WK> WORK ;
PARAMETER <#NCELL> DIST ;
PARAMETER <#NTSTEP> OUTT1 ;
PARAMETER <12> OUTT2 ;
PARAMETER TINCR ;
This section defines array parameters for use in the calculation and for storing the computed output times.
VARIABLE <#NCELL> A B C D E ;
This section defines variable arrays for use in the integration. This array stores the concentrations of each component in each section of the model.