three minerals-2acid by newton raphson
TRANSCRIPT
-
7/31/2019 Three Minerals-2acid by Newton Raphson
1/18
THREE MINERALSTWO ACID MODEL-1D
For the 3 minerals2 acid model with the following stoichiometry,
Solve the system of equations numerically and plot the result at the end of the simulation
Where
-
7/31/2019 Three Minerals-2acid by Newton Raphson
2/18
Solution
The discretization was carried out for fully implicit solution.
Note that,
[ ]
[ ]
Where represents location and represents time
We have
[ ]Similarly for the second mineral
[ ]
[ ]
-
7/31/2019 Three Minerals-2acid by Newton Raphson
3/18
[
]
For the third mineral
[ ]
Discretizing the concentrations using central differencing
( ) (
)[ ]
Where
So,
-
7/31/2019 Three Minerals-2acid by Newton Raphson
4/18
[ ]
Then we have
[ ]
Doing the same for the second acid,
( ) (
)
Then this gives
To solve all these equations simultaneously,
-
7/31/2019 Three Minerals-2acid by Newton Raphson
5/18
[ ]
[ ]
[ ]
[ ]
Then we implement Newton Raphsons iteration
The derivative of residual function of concentration of acid 1 at with respect to the variables at
[ ]
-
7/31/2019 Three Minerals-2acid by Newton Raphson
6/18
The derivative of residual function of concentration of acid 2 at with respect to the variables at
The derivative of residual function of mineral 1 volume fraction at with respect to thevariables at
[ ]
[ ]
-
7/31/2019 Three Minerals-2acid by Newton Raphson
7/18
The derivative of residual function of mineral 2 volume fraction at with respect to thevariables at
[ ]
[ ]
The derivative of residual function of mineral 3 volume fraction at with respect to thevariables at
* +[ ]
[
]
[ ]
-
7/31/2019 Three Minerals-2acid by Newton Raphson
8/18
Then for the differentiation of the residuals at with respect to variables at neighboring grids
The derivative of residual function of concentration of acid 1 at with respect to the variables at {
The derivative of residual function of concentration of acid 2 at with respect to the variables at
{
-
7/31/2019 Three Minerals-2acid by Newton Raphson
9/18
The derivative of residual function of mineral 1 volume fraction at with respect to thevariables at neighboring grids
The derivative of residual function of mineral 2 volume fraction at with respect to thevariables at neighboring grids
-
7/31/2019 Three Minerals-2acid by Newton Raphson
10/18
The derivative of residual function of mineral 3 volume fraction at with respect to thevariables at neighboring grids
Adapting the boundary cells for boundary conditions
The injection dimensionless concentration is 1 for acid 1 and zero for acid 2.
For the first cell,
( ) [ ]
-
7/31/2019 Three Minerals-2acid by Newton Raphson
11/18
[ ]
Then we have
[ ]
The residual is thus
[ ]
And
[ ]
Repeating the same for the second acid dimensionless concentration
For
-
7/31/2019 Three Minerals-2acid by Newton Raphson
12/18
( )
Then this gives
So
-
7/31/2019 Three Minerals-2acid by Newton Raphson
13/18
All derivatives for the residuals of the mineral volume fractions remain the same
The derivatives respect to the neighbors give
For the last cell, since the effluent concentration is unknown, we use backward differencing for
the space differential coefficient
-
7/31/2019 Three Minerals-2acid by Newton Raphson
14/18
[ ]
[ ]
Then we have
[ ]
The residual is thus
[ ]
And
[ ]
-
7/31/2019 Three Minerals-2acid by Newton Raphson
15/18
Repeating the same for the second acid dimensionless concentration
Then this gives
Thus
-
7/31/2019 Three Minerals-2acid by Newton Raphson
16/18
All derivatives for the residuals of the mineral volume fractions remain the same
The derivatives respect to the neighbors give
-
7/31/2019 Three Minerals-2acid by Newton Raphson
17/18
So the 5 variables will be taken to the new time level all together. In the MATLAB code, theconcentration of acid 1 will be referred to as that of acid 2 will be the mineral 1volume fraction as that of mineral 2 will be and for mineral 3 we will have it atWe will be solving a system of the form
[ ]
[ ]
[ ]
[ ]
-
7/31/2019 Three Minerals-2acid by Newton Raphson
18/18
We conduct matrix multiplication of f and its transpose and use this as the error that must be
driven below the tolerance, the maximum value of the three is used
[| || || || || |]
Using the input data below, the numerical simulation was done using the MATLAB file below
and the results follows