| Purpose
This is the Validation Test Procedure for the Mathematics Framework of the Virtual Cell Project. This procedure describes specific testing performed on the Mathematics Framework to determine the correctness of the code and the accuracy of various algorithms. Questions or comments may be directed to schaff@neuron.uchc.edu.
Solution to Reaction Diffusion Equations
The numerical methods for the reaction diffusion equation must be validated for appropriate combinations of one, two or three dimensions Dirichlet or Neuman boundary conditions with or without membranes steady and unsteady solutions exact and calculated test functions finite difference and finite element
These solution must be validated using both remainders (artificially generated exact solutions) and, when possible, exact solutions.
|
Test #
|
dim
|
Boundary
|
membranes
|
reactions
|
state
|
solution
|
mesh
|
|
Test01
|
1
|
Dirichlet
|
no
|
1st Order
|
unsteady
|
remainders
|
FD
|
|
Test02
|
1
|
Dirichlet
|
no
|
no
|
unsteady
|
exact
|
FD
|
|
Test03
|
1
|
Dirichlet
|
no
|
1st Order
|
unsteady
|
exact
|
FD
|
|
Test04
|
2
|
Dirichlet
|
no
|
1st Order
|
unsteady
|
exact
|
FD
|
|
Test05
|
2
|
Dirichlet
|
no
|
no
|
unsteady
|
exact
|
FD
|
|
Test06
|
2
|
Dirichlet
|
no
|
1st Order
|
steady
|
exact
|
FD
|
|
Test07
|
3
|
Dirichlet
|
no
|
no
|
unsteady
|
exact
|
FD
|
|
Test08
|
3
|
Dirichlet
|
no
|
1st Order
|
unsteady
|
exact
|
FD
|
|
Test09
|
3
|
Dirichlet
|
no
|
1st Order
|
steady
|
exact
|
FD
|
|
Test10
|
3
|
Dirichlet
|
no
|
1st Order
|
unsteady
|
remainders
|
FD
|
|
Test11
|
2
|
Dirichlet
|
no
|
1st Order
|
unsteady
|
remainders
|
FD
|
|
Test12
|
1
|
Neumann
|
no
|
no
|
unsteady
|
exact
|
FD
|
|
Test13
|
2
|
Neumann
|
no
|
1st Order
|
unsteady
|
exact
|
FD
|
|
Test14
|
2
|
Neumann
|
no
|
1st Order
|
unsteady
|
remainders
|
FD
|
|
Test15
|
2
|
Neumann
|
no
|
1st Order
|
steady
|
exact
|
FD
|
|
Test16*
|
3
|
Neumann
|
no
|
1st Order
|
unsteady
|
exact
|
FD
|
|
Test17*
|
3
|
Neumann
|
no
|
1st Order
|
unsteady
|
remainders
|
FD
|
|
Test18*
|
3
|
Neumann
|
no
|
1st Order
|
steady
|
exact
|
FD
|
|
Test19
|
1
|
Dirichlet
|
1
|
no
|
unsteady
|
exact
|
FD
|
|
Test20
|
1
|
Dirichlet
|
1
|
1st Order
|
steady
|
exact
|
FD
|
|
Test21
|
1
|
Dirichlet
|
1
|
1st Order
|
unsteady
|
remainder
|
FD
|
|
Test22
|
2
|
Dirichlet
|
box in box
|
1st Order
|
unsteady
|
remainder
|
FD
|
|
Test23
|
1
|
Dirichlet
|
1(with membrane
species)
|
1st Order
|
unsteady
|
remainder
|
FD
|
|
Test24
|
1
|
Dirichlet
|
1
|
1st Order
|
unsteady
|
exact
|
FD
|
Test01 - 1 dimension, Dirichlet, no membranes, unsteady, remainders, FD
- Equations:
dC1/dt = D d2 C1/ dx2 - k1 C1 + k2 C2 + Remainder1(x,t)
dC2/dt = D d2 C2/ dx2 + k1 C1 - k2 C2 + Remainder2(x,t)
where D = 40 um2/sec, k1 = 10 sec-1, k2 = 50 sec-1
- Test Functions:
C1(x,t) = e-t (1 + sin(x + 1))
C2(x,t) = e-t (1 + cos(x + 1))
- Test Domain:
x : [0, 10], t : [0,1]
- Test Results:
|
time step
|
num x |
L2 error(C1) |
L2 error(C2) |
|
0.01
|
10
|
0.08266
|
0.0390591
|
|
0.001
|
40
|
0.00460041
|
0.00234898
|
|
0.0001
|
160
|
0.000308151
|
0.000158134
|
|
0.00001
|
640
|
2.1985e-5
|
1.12512e-5
|
Test02 - 1 dimension, Dirichlet, no membranes, unsteady, exact solution, FD
|
time step
|
num x
|
L2 error(C1)
|
|
0.01
|
10
|
0.00197603
|
|
0.001
|
40
|
0.000172504
|
|
0.0001
|
160
|
1.592e-5
|
|
0.00001
|
640
|
1.50969e-6
|
|
0.00001
|
4
|
0.00560882
|
|
0.00001
|
8
|
0.0010971
|
|
0.00001
|
16
|
0.000247447
|
|
0.00001
|
32
|
5.98753e-5
|
|
0.00001
|
64
|
1.56415e-5
|
Test03 - 1 dimension, Dirichlet, no membranes, unsteady, exact solutions, FD
- Equations:
dC1/dt = D d2 C1/ dx2 - k1 C1 + k2 C2
dC2/dt = D d2 C2/ dx2 + k1 C1 - k2 C2
where D = 40 um2/sec, k1 = 10 sec-1, k2 = 50 sec-1
- Test Functions:
C1(x,t) = (1/K) e-2Kt [ k2 sin((2K/D)0.5 x) + k1 sin((K/D)0.5 x) ]
C2(x,t) = (k1/K) e-2Kt [ sin((2K/D)0.5 x) - sin((K/D)0.5 x) ]
where K = k1 + k2
- Test Domain:
x : [0, a], t : [0,1]
where a < 0.5 pi sqrt(D/2K)
- Test Results:
x : [0, 0.5], t : [0, 0.01]
|
time step
|
num x |
L2 error(C1) |
L2 error(C2)
|
|
0.001
|
4
|
0.00333007
|
0.0147477
|
|
0.0001
|
8
|
0.000388162
|
0.00163811
|
|
0.00001
|
16
|
4.91031e-5
|
0.000199155
|
|
0.000001
|
32
|
7.1985e-6
|
2.78007e-5
|
|
0.0000001
|
64
|
1.27442e-6
|
6.68866e-6
|
Test04 - 2 dimensions, Dirichlet, no membranes, unsteady, exact solution, FD
- Equations:
dC1/dt = D [ d2 C1/ dx2 + d2 C1/ dy2 ] - k1 C1 + k2 C2
dC2/dt = D [ d2 C2/ dx2 + d2 C2/ dy2 ] + k1 C1 - k2 C2
where D = 40 um2/sec, k1 = 10 sec-1, k2 = 50 sec-1
- Test Functions: (Exact Solution)
C1(x,t) = (1/K) e-2Kt [ k2 sin((K/D)0.5 (x + y) ) + k1 sin((K/2D)0.5 (x + y) ) ]
C2(x,t) = (k1/K) e-2Kt [ sin((K/D)0.5 (x + y) ) - sin((K/2D)0.5 (x + y) ) ]
where K = k1 + k2
- Test Domain:
x : [0, a], y : [0, b], t : [0, 0.01]
where a = b = 0.5 (note: a + b < 0.5 pi sqrt(D/K) )
- Test Results:
t : [0, 0.01]
|
time step
|
num x
|
num y
|
L2 error(C1)
|
L2 error(C2)
|
|
0.001
|
4
|
4
|
0.0011852
|
0.00560584
|
|
0.0001
|
8
|
8
|
0.000241767
|
0.000784723
|
|
0.00001
|
16
|
16
|
2.81032e-5
|
9.15467e-5
|
|
0.000001
|
32
|
32
|
?
|
?
|
Test05 - 2 dimensions, Dirichlet, no membranes, unsteady, exact solution, FD
- Equations:
dC1/dt = D [ d2 C1/ dx2 + d2 C1/ dy2 ]
where D = 40 um2/sec,
- Test Functions: (Exact Solution)
C1(x,t) = e-t sin( (2D)-0.5 (x + y) )
- Test Domain:
x : [0, a], y : [0, b], t : [0,1]
where a = b =10 (note: a + b < pi sqrt(2D) )
- Test Results:
|
time step
|
num x
|
num y
|
L2 error(C1)
|
|
0.01
|
10
|
10
|
??
|
|
0.001
|
20
|
20
|
9.05786e-5
|
|
0.0001
|
40
|
40
|
1.38682e-5
|
|
0.00001
|
80
|
80
|
2.5669e-6
|
Test06 - 2 dimensions, Dirichlet, no membranes, steady state, exact solution, FD
- Equations:
dC1/dt = D [ d2 C1/ dx2 + d2 C1/ dy2 ] - k1 C1 + k2 C2
dC2/dt = D [ d2 C2/ dx2 + d2 C2/ dy2 ] + k1 C1 - k2 C2
where D = 40 um2/sec, k1 = 10 sec-1, k2 = 50 sec-1
- Test Functions: (Exact Solution)
C1(x,t) = (k2/K) ePy [ sin(P x) - sin( (P2 - K/D)0.5 x) ]
C2(x,t) = (1/K) ePy [ k1 sin(P x)+ k2 sin( (P2 - K/D)0.5 x) ]
where K = k1 + k2 , P = pi/(2 a)
- Test Domain:
x : [0, a], y : [0, b], t : [0,inf]
where a = 1, b = 0.5 (note: a < 0.5 pi sqrt(D/K), b = a/2)
- Test Results:
time step = 1e-5 sec, tolerance = 1e-10,
|
num x
|
num y
|
L2 error(C1)
|
L2 error(C2)
|
end time |
matrix iterations |
|
20
|
20
|
7.32543e-5
|
1.15737e-5
|
0.01013 |
2
|
|
40
|
40
|
1.77765e-5
|
2.84278e-6
|
0.01081
|
2
|
|
80
|
80
|
4.39095e-6
|
7.06993e-7
|
0.01682
|
2
|
|
80
|
80
|
4.38755e-6
|
7.06239e-7
|
0.01358
|
3
|
Test07 - 3 dimensions, Dirichlet, no membranes, unsteady, exact solution, FD
- Equations:
dC1/dt = D [ d2 C1/ dx2 + d2 C1/ dy2 + d2 C1/ dz2 ]
where D = 40 um2/sec,
- Test Functions: (Exact Solution)
C1(x,t) = e-t sin( (3D)-0.5 (x + y + z) )
- Test Domain:
x : [0, a], y : [0, b], z : [0, c], t : [0,1]
where a = b = c = 5 (note: a + b + c < 0.5 pi sqrt(3D))
- Test Results:
x: [0,1], y : [0, 1], z : [0, 1], t : [0, 1]
|
time step
|
num x
|
num y
|
num z
|
L2 error(C1)
|
matrix iterations
|
|
0.001
|
4
|
4
|
4
|
6.24844e-6
|
1
|
|
0.0001
|
8
|
8
|
8
|
9.5342e-6
|
1
|
|
0.001
|
4
|
4
|
4
|
1.7897e-7
|
2
|
|
0.0001
|
8
|
8
|
8
|
1.56886e-7
|
2
|
|
0.001
|
4
|
4
|
4
|
1.75313e-7
|
3
|
|
0.0001
|
8
|
8
|
8
|
3.12236e-8
|
3
|
x: [0,5], y : [0, 5], z : [0, 5], t : [0, 1]
|
time step
|
num x
|
num y
|
num z
|
L2 error(C1)
|
matrix iterations
|
|
0.001
|
4
|
4
|
4
|
1.99009e-5
|
1
|
|
0.0001
|
8
|
8
|
8
|
5.02036e-6
|
1
|
|
0.001
|
4
|
4
|
4
|
1.98598e-5
|
2
|
|
0.0001
|
8
|
8
|
8
|
4.97963e-6
|
2
|
|
0.001
|
4
|
4
|
4
|
1.98598e-5
|
3
|
|
0.0001
|
8
|
8
|
8
|
4.97963e-6
|
3
|
Test08 - 3 dimensions, Dirichlet, no membranes, unsteady, exact solution, FD
dC1/dt = D [ d2 C1/ dx2 + d2 C1/ dy2 + d2 C1/ dz2 ] - k1 C1 + k2 C2
dC1/dt = D [ d2 C1/ dx2 + d2 C1/ dy2 + d2 C1/ dz2 ] + k1 C1 - k2 C2
where D = 40 um2/sec, k1 = 10 sec-1, k2 = 50 sec-1
- Test Functions: (Exact Solution)
C1(x,t) = (1/K) e-2Kt [ k2 sin((2K/3D)0.5 (x + y + z) ) + k1 sin((K/3D)0.5 (x + y + z) ) ]
C2(x,t) = (k1/K) e-2Kt [ sin((2K/3D)0.5 (x + y + z) ) - sin((K/3D)0.5 (x + y + z) ) ]
where K = k1 + k2
- Test Domain:
x : [0, a], y : [0, b], z : [0, c], t : [0, 0.01]
where a = b = c = 0.5 ( note: a + b + c < 0.5 pi sqrt(3D/2K) )
- Test Results:
x: [0,0.5, y : [0, 0.5], z : [0, 0.5], t : [0, 0.01]
|
time step
|
num x
|
num y
|
num z
|
L2 error(C1)
|
L2 error(C2)
|
matrix iterations
|
|
0.0001
|
4
|
4
|
4
|
7.27345e-5
|
0.000338918
|
4
|
|
0.00001
|
8
|
8
|
8
|
1.34937e-5
|
5.94177e-5
|
4
|
|
0.000001
|
16
|
16
|
16
|
|
|
4
|
Test09 -3 dimensions, Dirichlet, no membranes, steady state, exact solution, FD
- Equations:
dC1/dt = D [ d2 C1/ dx2 + d2 C1/ dy2 + d2 C1/ dz2] - k1 C1 + k2 C2
dC2/dt = D [ d2 C2/ dx2 + d2 C2/ dy2+ d2 C2/ dz2] ] + k1 C1 - k2 C2
where D = 40 um2/sec, k1 = 10 sec-1, k2 = 50 sec-1
- Test Functions: (Exact Solution)
C1(x,t) = (k2/K)( ePy + ePz )[ sin(P x) - sin( (P2 - K/D)0.5 x) ]
C2(x,t) = (1/K)( ePy+ ePz )[ k1 sin(P x)+ k2 sin( (P2 - K/D)0.5 x) ]
where K = k1 + k2 , P = pi/(2 a)
- Test Domain:
x : [0, a], y : [0, b], y : [0, c], t : [0,inf]
where a = 1, b = c= 0.5 (note: a < 0.5 pi sqrt(D/K), b = a/2)
- Test Results:
time step = 1e-5 sec, tolerance = 1e-10,
|
num x
|
num y
|
num z
|
L2 error(C1)
|
L2 error(C2)
|
end time |
matrix iterations |
|
4
|
4
|
4
|
0.000892889
|
0.000124669
|
0.00597 |
4
|
|
8
|
8
|
8
|
0.000236968
|
3.64568e-5
|
0.00575
|
4
|
|
16
|
16
|
16
|
5.78812e-5
|
9.22472e-6
|
0.00571
|
4
|
|
32
|
32
|
32
|
1.42039e-5
|
2.29892e-6
|
0.00575
|
4
|
Test10 - 3 dimensions, Dirichlet, no membranes, unsteady, remainders, FD
- Equations:
dC1/dt = D [ d2 C1/ dx2 + d2 C1/ dy2 + d2 C1/ dz2 ] - k1 C1 + k2 C2 + Remainder1(x,y,z,t)
dC2/dt = D [ d2 C2/ dx2 + d2 C2/ dy2 + d2 C2/ dz2 ] + k1 C1 - k2 C2 + Remainder2(x,y,z,t)
where D = 40 um2/sec, k1 = 10 sec-1, k2 = 50 sec-1
- Test Functions:
C1(x,y,z,t) = (1 + e-t )(1 + sin(x + y + z))
C2(x,y,z,t) = (2 + e-t )(1 + cos(x + y + z))
- Test Domain:
x : [0, a], y : [0, b], z : [0, c], t : [0, T]
where a,b,c,T are arbitrary positive numbers
- Test Results:
x : [0, 1], y: [0, 1], z: [0, 1], t : [0, 1]
|
time step
|
num x
|
num y
|
num z
|
L2 error(C1)
|
L2 error(C2)
|
matrix iterations
|
|
0.01
|
4
|
4
|
4
|
0.000244817
|
6.30903e-5
|
4
|
|
0.001
|
8
|
8
|
8
|
5.92688e-5
|
1.99093e-5
|
4
|
|
0.0001
|
16
|
16
|
16
|
1.37372e-5
|
4.89236e-6
|
4
|
|
0.00001
|
32
|
32
|
32
|
?? too long ??
|
?? too long ??
|
4
|
Test11- 2 dimensions, Dirichlet, no membranes, unsteady, remainders, FD
- Equations:
dC1/dt = D [ d2 C1/ dx2 + d2 C1/ dy2 ] - k1 C1 + k2 C2 + Remainder1(x,y,t)
dC2/dt = D [ d2 C2/ dx2 + d2 C2/ dy2 ] + k1 C1 - k2 C2 + Remainder2(x,y,t)
where D = 40 um2/sec, k1 = 10 sec-1, k2 = 50 sec-1
- Test Functions:
C1(x,y,t) = (1 + e-t )(1 + sin(x + y ))
C2(x,y,t) = (2 + e-t )(1 + cos(x + y ))
- Test Domain:
x : [0, a], y: [0, b], t : [0, T]
where a,b,c,T are arbitrary positive numbers
- Test Results:
x : [0, 1], y : [0, 1], t : [0, 1]
|
time step
|
num x
|
num y
|
L2 error(C1)
|
L2 error(C2)
|
matrix iterations
|
|
0.01
|
4
|
4
|
0.000325152
|
0.000198966
|
3
|
|
0.001
|
8
|
8
| |