Virtual Cell Math Framework Validation Test Procedure

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

  • Equations:


    dC1/dt = D d2 C1/ dx2

    where D = 40 um/sec

  • Test Functions:


    Exact solution: C1(x,t) = e-t sin ( x D1-0.5 )

  • Test Domain:


    x : [0, 10],    t : [0,1]

  • Test Results:
   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

  • Equations:
    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
7.52343e-05
4.71149e-05
3
0.0001 
16
16
1.71446e-05
1.09724e-05
3
0.0001 
32
32
9.43182e-05
4.79112e-05
3
0.01
4
4
0.000325077
0.000198937
5
0.001
8
8
6.71967e-05
4.35744e-05
5
0.0001
16
16
1.46529e-05
9.82362e-06
5
0.0001
32
32
3.25585e-05
1.67154e-05
5
0.01
4
4
0.000325077
0.000198937
8
0.001
8
8
6.67188e-05
4.33642e-05
8
0.0001
16
16
1.45523e-05
9.77879e-06
8
0.0001
32
32
1.02423e-05
5.59038e-06
8

Test12 - 1 dimension, Neumann, no membranes, unsteady, exact solution, FD

  • Equations:


    dC1/dt = D d2 C1/ dx2

    where D = 40 um2/sec

  • Test Functions:


    Exact solution: C1(x,t) = e-t sin ( x D1-0.5 )

  • Test Domain:


    x : [0, 10],    t : [0,1]

  • Test Results:
     

     
     
     

       time step 
       num x 
      L2 error(C1
    0.01 
    10 
    0.00499093
    0.001 
    40 
    0.000595826
    0.0001 
    160 
    6.62657e-5
    0.00001 
    640 
    7.04596e-6
    0.00001
    4
    0.0478399
    0.00001
    8
    0.00819489
    0.00001
    16
    0.00172755
    0.00001
    32
    0.000394072
    0.00001
    64
    9.01582e-5

Test13 - 2 dimensions, Neumann, 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)
    matrix iterations
    0.001
    4
    4
    0.21916
    0.698395
    3
    0.0001
    8
    8
    0.0276746
    0.08109
    3
    0.00001
    16
    16
    0.00162605
    0.00561297
    3
    0.000001
    32
    32
    6.64146e-05
    0.000302742
    3
    0.001
    4
    4
    0.104132
    0.4964112
    7
    0.0001
    8
    8
    0.0100662
    0.0472073
    7
    0.00001
    16
    16
    0.000871217
    0.0041468
    7
    0.000001
    32
    32
    5.55875e-05
    0.000280527
    7

     Data From original verification code

    t : [0, 0.0100001], x : [0, 0.5], y : [0, 0.5], z : [0, 0.1]
     

    time step
    num x
    num y
    dx=dy
    L2 error(C1)
    L2 error(C2)
    matrix iterations
    1e-7
    4
    4
    0.16667
    0.00728974
    0.0277443
    15
    1e-7
    8
    8
    0.0714286
    0.00131631
    0.00493816
    15
    1e-7
    16
    16
    0.0333333
    0.000276788
    0.00102473
    15
    1e-7
    32
    32
    0.016129
    5.65476e-5
    0.000200578
    15

     

 Test14- 2 dimensions,Neumann, 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.143948
0.0219468
3
0.001 
8
8
0.0263322
0.00398757
3
0.0001 
16
16
0.0154681
0.00219154
3
0.0001 
32
32
0.174083
0.024064
3
0.01
4
4
0.407281
0.057236
8
0.001
8
8
0.0965299
0.0135239
8
0.0001
16
16
0.0237289
0.00332156
8
0.0001
32
32
8

Test15- 2 dimensions, Neumann(3 sides)-Dirichlet(1 side), 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
    0.00116144
    0.000201859
    0.17027
    2
    40
    40
    0.000275079
    4.78853e-05
    0.18221
    2
    80
    80
    6.73662e-05
    1.16889e-05
    0.28399
    2
    80
    80
    6.72673e-5
    1.16833e-5
    0.22934
    3

Test16- 3 dimensions, Neumann, no membranes, unsteady, exact solution, FD

  • Equations:
    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
    4
    0.00001
    8
    8
    8
    4
    0.00001
    16
    16
    16
    4

Test17 - 3 dimensions,Neumann, 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
    4
    0.001 
    8
    8
    8
    4
    0.0001 
    16
    16
    16
    4
    0.0001 
    32
    32
    32
    4

Test18 - 3 dimensions, Neumann (3 sides)-Dirichlet(1 side), no membranes, steady state, exact solution, FD

  • Equations:


    0 = D [ d2 C1/ dx2 + d2 C1/ dy2 + d2 C1/ dz2] - k1 C1 + k2 C2

    0 = 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) = (k2/K)( ePy + ePz )[ sin(P x) - sin( (P2 - K/D)0.5 x) ]

    C2(x) = (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
    4
    8
    8
    8
    4
    16
    16
    16
    4
    32
    32
    32
    4

Test19 - 1 dimension, Dirichlet, 1 membrane, unsteady, exact solution, FD

  • Geometry


    Feature A:    x : [0, xo]

    Feature B:    x : [xo, L]

  • Equations:


    Feature A:                                  dC1/dt = D d2 C1/ dx2

    Feature B:                                  dC1/dt = D d2 C1/ dx2

    Membrane Jump Condition:     Jx- =  Jx+ = - p(t) delta_C1(xo)

    where     p(t) = D0.5 e-t,     delta_C1(xo) = C1,xo+ - C1,xo-,     D = 40 um2/sec

  • Test Functions: (Exact Solution)


    C1,A(x,t) = e-t   sin(D-0.5  x)

    C1,B(x,t) = e-t   sin(D-0.5  x) + cos(D-0.5   xo)

  • Test Domain:


    x : [0, L],  xo=L/2,   t : [0, 1]

    where   L< pi D0.5,     xo < pi/2 D0.5

  • Test Results:


    L = 1,    xo = 7.5
     

      num x
    time step
       L2 error(C1
    4
    0.001
    2.48338e-6
    8
    0.0001
    4.63027e-7
    16
    0.00001
    1.00364e-7
    32
    0.000001
    2.34055e-8

Test20 - 1 dimensions, Dirichlet, 1 membrane, steady state, exact solution, FD

  • Geometry


    Feature A:    x : [0, xo]

    Feature B:    x : [xo, L]

  • Equations:


    0 = D d2 C1/ dx2 - k1 C1 + k2 C2

    0 = D d2 C2/ dx2 + k1 C1 - k2 C2

    Membrane Jump Conditions:     J1,x- =  J1,x+ = - p1 delta_C1(xo)

                                                         J2,x- =  J2,x+ = - p2 delta_C2(xo)

    where     p1 = 1,      p2 = 2,     delta_Ci(xo) = Ci,xo+ - Ci,xo-,

                   D = 40 um2/sec,   k1 = 10 sec-1,   k2 = 50 sec-1

  • Test Functions: (Exact Solution)


    C1,A(x) = (k2/K)(x + B) - [ (k1 p1 + k2 p2)/(K S (p1 - p2)) ] e-S (x-xo)

                        - D/(2 (p1-p2)) [ eS(x-xo) + e-S(x-xo) ]

    C2,A(x) = (k1/K)(x + B) + [ (k1 p1 + k2 p2)/(K S (p1 - p2)) ] e-S (x-xo)

                        + D/(2 (p1-p2)) [ eS(x-xo) + e-S(x-xo) ]

    C1,B(x) = (k2/K)(x + B) - [ (k1 p1 + k2 p2)/(K S (p1 - p2)) ] e-S (x-xo)

    C2,B(x) = (k1/K)(x + B) + [ (k1 p1 + k2 p2)/(K S (p1 - p2)) ] e-S (x-xo)

    where S = (K/D)0.5,    B = 400,   K = k1 + k2

  • Test Domain:


    x : [0, 1],   t : [0,inf],  xo = 0.5

  • Test Results:


    time step = 1e-5 sec,   tolerance = 1e-20,
     

      num x
    L2 error(C1)
    L2 error(C2
    exact flux
    1st order
    0th order
    exact flux
    1st order
    0th order
    4
    0.000123918
    0.00014724
    0.000114312
    0.000911158
    0.00132507
    0.000714143
    8
    2.52694e-5
    3.00115e-5
    2.27141e-5
    0.000184849
    0.000267643
    0.00013259
    16
    5.71979e-6
    6.79012e-6
    4.91554e-6
    4.1754e-5
    6.03637e-5
    3.17031e-5
    32
    1.36266e-6
    1.61719e-6
    1.08045e-6
    9.93788e-6
    1.43571e-5
    1.30275e-5
    64
    3.32686e-7
    3.94765e-7
    2.3909e-7
    2.42517e-6
    3.50239e-6
    6.88879e-6
    128
    8.21997e-8
    9.75304e-8
    6.97487e-8
    5.99075e-7
    8.65029e-7
    3.64571e-6
    256
    2.043e-8
    2.42393e-8
    3.4417e-8
    1.48879e-7
    2.14954e-7
    1.88333e-6
    512
    5.09203e-9
    6.04155e-9
    1.89984e-8
    3.71094e-8
    5.35768e-8
    9.57854e-7
    1024
    1.26085e-9
    1.49939e-9
    1.01259e-8
    9.26937e-9
    1.33761e-8
    4.83101e-7

Test21 - 1 dimension, Dirichlet, 1 membranes, unsteady, remainders, FD

  • Geometry


    Feature A:    x : [0, xo]

    Feature B:    x : [xo, L]

  • Equations:


    dC1/dt = D1 d2 C1/ dx2 - k1 C1 + k2 C2 + Remainder1(x,t)

    dC2/dt = D2 d2 C2/ dx2 + k1 C1 - k2 C2 + Remainder2(x,t)

    Membrane Jump Conditions:     J1,x- =  J1(xo) + FluxRemainder1,x-(t)

                                                         J1,x+ =  J1(xo) + FluxRemainder1,x+(t)

                                                         J2,x- =  J2(xo) + FluxRemainder2,x-(t)

                                                         J2,x+ =  J2(xo) + FluxRemainder2,x+(t)

    where     p1 = 1,      p2 = 2,     Ji(xo) = - pi ( Ci,xo+ - Ci,xo-),

                   D1 = 40 um2/sec,   D2 = 80 um2/sec,   k1 = 10 sec-1,   k2 = 50 sec-1

  • Test Functions:


    C1,A(x,t) = (1 + e-t )(1 + sin(x))

    C2,A(x,t) = (2 + e-t )(1 + cos(x))

    C1,B(x,t) = (1 + e-t )(1 + x2)

    C2,B(x,t) = (2 + e-t )(1 + x2 + x3)

  • Test Domain:


    x : [0, 10],    t : [0,1]

  • Test Results:
       time step 
      num x 
       L2 error(C1
       L2 error(C2
    0.001 
    4
    0.0010884
    0.00246813
    0.0001 
    8
    0.000220365
    0.000531194
    0.00001 
    16
    5.02635e-5
    0.000122366
    0.000001 
    32
    1.20332e-5
    2.93518e-5
    0.00001
    4
    0.00111403
    0.00248958
    0.00001
    8
    0.000222919
    0.00053344

Test22 - 2 dimensions, Dirichlet, membrane box, unsteady, remainders, FD

  • Geometry


    Feature A:    x : [0, xo]

    Feature B:    x : [xo, L]

  • Equations:


    dC1/dt = D1 [ d2 C1/ dx2 + d2 C1/ dy2 ] - k1 C1 + k2 C2 + Remainder1(x,t)

    dC2/dt = D2 [ d2 C2/ dx2 + d2 C2/ dy2 ] + k1 C1 - k2 C2 + Remainder2(x,t)

    Membrane Jump Conditions:     J1,x- =  J1(xo) + FluxRemainder1,x-(t)

                                                         J1,x+ =  J1(xo) + FluxRemainder1,x+(t)

                                                         J2,x- =  J2(xo) + FluxRemainder2,x-(t)

                                                         J2,x+ =  J2(xo) + FluxRemainder2,x+(t)

    where     p1 = 1,      p2 = 2,     Ji(xo) = - pi ( Ci,xo+ - Ci,xo-),

                   D1 = 40 um2/sec,   D2 = 80 um2/sec,   k1 = 10 sec-1,   k2 = 50 sec-1

  • Test Functions:


    C1,A(x,t) = (1 + e-t )(1 + sin(x) + sin(x))

    C2,A(x,t) = (2 + e-t )(1 + cos(x) + cos(y))

    C1,B(x,t) = (1 + e-t )(1 + x2 + y2)

    C2,B(x,t) = (2 + e-t )(1 + x2 + x3 + y2 + y3)

  • Test Results:


    x : [0, 1],    y : [0, 1],    t : [0,1]

     
       end time 
    time step
    num x
    num y
       L2 error(C1
       L2 error(C2
    matrix iterations
    1
    0.0001
    5
    5
    0.0127397
    0.00241818
    3
    1
    0.0001
    17
    17
    0.00464827
    0.000686862
    3
    1
    0.0001
    65
    65
    0.0545542
    0.00671147
    3
    0.1
    0.0001
    5
    5
    0.00920008
    0.00225338
    3
    0.1
    0.0001
    17
    17
    0.00257711
    0.00057819
    3
    0.1
    0.0001
    65
    65
    0.015251
    0.00476062
    3
    0.1
    0.0001
    5
    5
    0.00920008
    0.00225338
    6
    0.1
    0.0001
    17
    17
    0.00198409
    0.00044416
    6
    0.1
    0.0001
    65
    65
    0.0115942
    0.00293239
    6
    0.1
    0.0001
    5
    5
    0.00920008
    0.00225338
    12
    0.1
    0.0001
    17
    17
    0.00194973
    0.000435655
    12
    0.1
    0.0001
    65
    65
    0.0062685
    0.00139884
    12
    0.1
    0.0001
    65
    65
    0.00197077
    0.000444414
    24
    0.1
    0.0001
    65
    65
    0.000147128
    4.49302e-5
    48

Test23 - 1 dimension, Dirichlet, 1 membranes, unsteady, remainders, FD

  • Geometry


    Feature A:    x : [0, xo]

    Feature B:    x : [xo, L]

  • Equations:


    dC1/dt = D1 d2 C1/ dx2 - k1 C1 + k2 C2 + Remainder1(x,t)

    dC2/dt = D2 d2 C2/ dx2 + k1 C1 - k2 C2 + Remainder2(x,t)

    Membrane Jump Conditions:     J1,x- =  J1(xo) + FluxRemainder1,x-(t)

                                                         J1,x+ =  J1(xo) + FluxRemainder1,x+(t)

                                                         J2,x- =  J2(xo) + FluxRemainder2,x-(t)

                                                         J2,x+ =  J2(xo) + FluxRemainder2,x+(t)

    dM1/dt = - q1 M1 + q2 M2 + MembraneRemainder1(t)

    dM2/dt =  q1 M1 - q2 M2 + MembraneRemainder2(t)

    where     p1 = M1,      p2 = 2*M1,     Ji(xo) = - pi ( Ci,xo+ - Ci,xo-),

                   D1 = 40 um2/sec,   D2 = 80 um2/sec,   k1 = 10 sec-1,   k2 = 50 sec-1

  • Test Functions:


    C1,A(x,t) = (1 + e-t )(1 + sin(x))

    C2,A(x,t) = (2 + e-t )(1 + cos(x))

    C1,B(x,t) = (1 + e-t )(1 + x2)

    C2,B(x,t) = (2 + e-t )(1 + x2 + x3)

    M1(t) = [q2/(q1+q2)] (1 - e-(q1+q2) t )

    M2(t) = q1/(q1+q2) + [q2/(q1+q2)] e-(q1+q2) t

  • Test Domain:


    x : [0, 10],    t : [0,1]

  • Test Results:
       time step 
      num x 
       L2 error(C1
       L2 error(C2
    0.001 
    4
    0.0010884
    0.00246813
    0.0001 
    8
    0.000220365
    0.000531194
    0.00001 
    16
    5.02635e-5
    0.000122366
    0.000001 
    32
    1.20332e-5
    2.93518e-5
    0.00001
    4
    0.00111403
    0.00248958
    0.00001
    8
    0.000222919
    0.00053344

    Test24, 1 dimension, reaction, Dirichlet, 1 membrane, unsteady state, exact solution, FD

    • Geometry


      Feature A:    x : [a, xo]

      Feature B:    x : [xo, b]

    • Equations:


      d C1/ dt = D d2 C1/ dx2 - k1 C1 + k2 C2

      d C2/ dt = D d2 C2/ dx2 + k1 C1 - k2 C2

      Membrane Jump Conditions:     J1,x- =  J1,x+ = - p1 delta_C1(xo)

                                                           J2,x- =  J2,x+ = - p2 delta_C2(xo)

      where     p1 = 1,      p2 = 3,     delta_Ci(xo) = Ci,xo+ - Ci,xo-,

                     D = 40 um2/sec,   k1 = 0.04 sec-1,   k2 = 0.16 sec-1,   K = k1 + k2

    • Test Functions: (Exact Solution)


      C1,A(x, t) =e-2Kt [(k2/K) sin((2K/D)0.5  x) - (alpha)sin((K/D)0.5  x)

                                      + (beta) cos((K/D)0.5 (x-xo ))]

      C2,A(x, t) = e-2Kt [(k1/K) sin((2K/D)0.5  x)+ (alpha)sin((K/D)0.5  x)

                                      - (beta) cos((K/D)0.5 (x-xo ))]

      C1,B(x, t) =e-2Kt [(k2/K) sin((2K/D)0.5  x) - (alpha)sin((K/D)0.5  x))

      C2,B(x, t) = e-2Kt [(k1/K) sin((2K/D)0.5  x)+ (alpha)sin((K/D)0.5  x))

      where  alpha = 20.5( k1 p1 + k2 p2) cos((2K/D)0.5 (xo ))/(K(p1 - p2)cos((K/D)0.5 (xo ))),

                  beta = D(2K/D)0.5cos((K/D)0.5 (xo ))/(p1 - p2)

    • Test Domain:


      x : [11, 15.7],   t : [0, 1],  xo = 13.35

    • Test Results:
     
       time step 
      num x 
       L2 error(C1
       L2 error(C2
    0.001 
    6
    5.54079e-05
    0.000124547
    0.0001 
    12
    1.08754e-05
    2.40622e-05
    0.00001 
    24
    2.38839e-06
    5.24939e-06
    0.000001 
    48
    5.608e-07
    1.22769e-06