speccon example code: speccon1d_vrc_stone_column_luetal2010_linear_depth_dependent_load.pyΒΆ

# speccon1d_vrc example (if viewing this in docs, plots are at bottom of page)

# Stone column with vertical and radial drainage in both the column and soil
# with a linear depth dependent load.
# Compare with Lu et al. (2010)
# The orignal solution of Lu et al. (2010)
# is implemented separately in
# geotecha.consolidation.luetal2010.

# Lu, Meng-Meng, Kang-He Xie, and Biao Guo. 2010. 'Consolidation
# Theory for a Composite Foundation Considering Radial and Vertical
# Flows within the Column and the Variation of Soil Permeability
# within the Disturbed Soil Zone'. Canadian Geotechnical
# Journal 47 (2): 207-17. doi:10.1139/T09-086.

# This file should be run with python.  It will not work if run with the
# speccon1d_vr.exe script program.

from __future__ import division, print_function
import numpy as np
from geotecha.speccon.speccon1d_vrc import Speccon1dVRC
import matplotlib.pyplot as plt

#Expected values
#t = time values
#avp = average excess pore pressure
#z = depth values
#por = excess pore pressure at time t and depth z.
#settle = settlement
z = np.array(
      [  0.        ,   0.52631579,   1.05263158,   1.57894737,
         2.10526316,   2.63157895,   3.15789474,   3.68421053,
         4.21052632,   4.73684211,   5.26315789,   5.78947368,
         6.31578947,   6.84210526,   7.36842105,   7.89473684,
         8.42105263,   8.94736842,   9.47368421,  10.        ])

t = np.array(
      [  0.01      ,   0.02682696,   0.07196857,   0.19306977,
         0.51794747,   1.38949549,   3.72759372,  10.        ])

por = np.array(
      [[  0.00000000e+00,   0.00000000e+00,   0.00000000e+00,
          0.00000000e+00,   0.00000000e+00,   0.00000000e+00,
          0.00000000e+00,   0.00000000e+00],
       [  7.89228647e-01,   5.95605081e-01,   3.45180214e-01,
          1.45086414e-01,   3.87034741e-02,   6.22454961e-03,
          1.77078924e-04,   1.43687608e-08],
       [  7.96538802e-01,   7.36765027e-01,   5.43243863e-01,
          2.64106848e-01,   7.53853307e-02,   1.23885715e-02,
          3.52947563e-04,   2.86393684e-08],
       [  7.63335940e-01,   7.21032673e-01,   6.02081861e-01,
          3.44060865e-01,   1.08397586e-01,   1.84334052e-02,
          5.26403940e-04,   4.27143400e-08],
       [  7.29713572e-01,   6.92695455e-01,   6.00390659e-01,
          3.87619399e-01,   1.36715907e-01,   2.43039516e-02,
          6.96262634e-04,   5.64975294e-08],
       [  6.95775756e-01,   6.63349493e-01,   5.83533464e-01,
          4.05920023e-01,   1.59999892e-01,   2.99500475e-02,
          8.61362911e-04,   6.98947834e-08],
       [  6.61562468e-01,   6.33306767e-01,   5.63371982e-01,
          4.10051442e-01,   1.78478629e-01,   3.53274233e-02,
          1.02057668e-03,   8.28145851e-08],
       [  6.27109888e-01,   6.02658407e-01,   5.41694866e-01,
          4.07122205e-01,   1.92737402e-01,   4.03982068e-02,
          1.17281621e-03,   9.51686793e-08],
       [  5.92450906e-01,   5.71486570e-01,   5.18804995e-01,
          4.00550761e-01,   2.03496720e-01,   4.51309920e-02,
          1.31704159e-03,   1.06872675e-07],
       [  5.57615569e-01,   5.39866473e-01,   4.94874905e-01,
          3.91708348e-01,   2.11448996e-01,   4.95005419e-02,
          1.45226780e-03,   1.17846622e-07],
       [  5.22631498e-01,   5.07867389e-01,   4.70059586e-01,
          3.81151043e-01,   2.17175591e-01,   5.34872189e-02,
          1.57757144e-03,   1.28015557e-07],
       [  4.87524266e-01,   4.75553569e-01,   4.44503337e-01,
          3.69184261e-01,   2.21132065e-01,   5.70762492e-02,
          1.69209703e-03,   1.37310015e-07],
       [  4.52317753e-01,   4.42985091e-01,   4.18341611e-01,
          3.56052829e-01,   2.23673736e-01,   6.02569148e-02,
          1.79506281e-03,   1.45666508e-07],
       [  4.17034470e-01,   4.10218657e-01,   3.91702685e-01,
          3.42007224e-01,   2.25094585e-01,   6.30217519e-02,
          1.88576606e-03,   1.53027950e-07],
       [  3.81695874e-01,   3.77308340e-01,   3.64710698e-01,
          3.27369324e-01,   2.25661289e-01,   6.53658065e-02,
          1.96358784e-03,   1.59344056e-07],
       [  3.46322658e-01,   3.44306315e-01,   3.37509937e-01,
          3.12652496e-01,   2.25633199e-01,   6.72859799e-02,
          2.02799719e-03,   1.64571681e-07],
       [  3.10935041e-01,   3.11265280e-01,   3.10458620e-01,
          2.98729021e-01,   2.25265480e-01,   6.87804759e-02,
          2.07855473e-03,   1.68675114e-07],
       [  2.75553321e-01,   2.78364929e-01,   2.84983294e-01,
          2.86931417e-01,   2.24796770e-01,   6.98483537e-02,
          2.11491559e-03,   1.71626325e-07],
       [  2.40506692e-01,   2.48198353e-01,   2.65188774e-01,
          2.78890365e-01,   2.24426139e-01,   7.04891842e-02,
          2.13683177e-03,   1.73405155e-07],
       [  2.19037471e-01,   2.33939883e-01,   2.57448777e-01,
          2.76020588e-01,   2.24286918e-01,   7.07028069e-02,
          2.14415381e-03,   1.73999451e-07]])

pors = np.array(
      [[  0.00000000e+00,   0.00000000e+00,   0.00000000e+00,
          0.00000000e+00,   0.00000000e+00,   0.00000000e+00,
          0.00000000e+00,   0.00000000e+00],
       [  7.98265249e-01,   6.02280763e-01,   3.48846036e-01,
          1.46450028e-01,   3.89711966e-02,   6.25182115e-03,
          1.77803047e-04,   1.44275125e-08],
       [  8.04958469e-01,   7.44525146e-01,   5.48786745e-01,
          2.66527204e-01,   7.58992543e-02,   1.24427410e-02,
          3.54390855e-04,   2.87564705e-08],
       [  7.70750724e-01,   7.28024224e-01,   6.07838241e-01,
          3.47083341e-01,   1.09119039e-01,   1.85137439e-02,
          5.28556530e-04,   4.28889926e-08],
       [  7.36222521e-01,   6.98859182e-01,   6.05684427e-01,
          3.90831257e-01,   1.37596322e-01,   2.44094094e-02,
          6.99109798e-04,   5.67285394e-08],
       [  7.01466480e-01,   6.68759478e-01,   5.88249405e-01,
          4.09050507e-01,   1.60988683e-01,   3.00793003e-02,
          8.64885178e-04,   7.01805728e-08],
       [  6.66511565e-01,   6.38030392e-01,   5.67535104e-01,
          4.12967356e-01,   1.79529598e-01,   3.54789280e-02,
          1.02474996e-03,   8.31532017e-08],
       [  6.31383980e-01,   6.06754538e-01,   5.45344771e-01,
          4.09776249e-01,   1.93812547e-01,   4.05702594e-02,
          1.17761198e-03,   9.55578099e-08],
       [  5.96107530e-01,   5.75006275e-01,   5.21977853e-01,
          4.02934712e-01,   2.04567392e-01,   4.53217848e-02,
          1.32242705e-03,   1.07309661e-07],
       [  5.60703952e-01,   5.42853653e-01,   4.97602332e-01,
          3.93827331e-01,   2.12495144e-01,   4.97082150e-02,
          1.45820614e-03,   1.18328479e-07],
       [  5.25193221e-01,   5.10359321e-01,   4.72368874e-01,
          3.83013415e-01,   2.18184090e-01,   5.37099045e-02,
          1.58402207e-03,   1.28538993e-07],
       [  4.89593822e-01,   4.77581368e-01,   4.46417701e-01,
          3.70798586e-01,   2.22094959e-01,   5.73121056e-02,
          1.69901588e-03,   1.37871456e-07],
       [  4.53923010e-01,   4.44574094e-01,   4.19880404e-01,
          3.57427248e-01,   2.24586872e-01,   6.05041516e-02,
          1.80240261e-03,   1.46262116e-07],
       [  4.18197047e-01,   4.11388738e-01,   3.92881583e-01,
          3.43149634e-01,   2.25956789e-01,   6.32786454e-02,
          1.89347666e-03,   1.53653659e-07],
       [  3.82431431e-01,   3.78074159e-01,   3.65541867e-01,
          3.28288385e-01,   2.26474003e-01,   6.56307069e-02,
          1.97161656e-03,   1.59995590e-07],
       [  3.46641110e-01,   3.44677496e-01,   3.38002457e-01,
          3.13360148e-01,   2.26400416e-01,   6.75573112e-02,
          2.03628921e-03,   1.65244590e-07],
       [  3.10840686e-01,   3.11246556e-01,   3.10621286e-01,
          2.99245141e-01,   2.25993744e-01,   6.90567301e-02,
          2.08705341e-03,   1.69364802e-07],
       [  2.75044905e-01,   2.77957796e-01,   2.84838107e-01,
          2.87289856e-01,   2.25495060e-01,   7.01280803e-02,
          2.12356290e-03,   1.72328080e-07],
       [  2.39581254e-01,   2.47431270e-01,   2.64804745e-01,
          2.79143152e-01,   2.25105505e-01,   7.07709762e-02,
          2.14556867e-03,   1.74114183e-07],
       [  2.17851776e-01,   2.33001039e-01,   2.56971289e-01,
          2.76235964e-01,   2.24959810e-01,   7.09852843e-02,
          2.15292064e-03,   1.74710909e-07]])

porc = np.array(
      [[  0.00000000e+00,   0.00000000e+00,   0.00000000e+00,
          0.00000000e+00,   0.00000000e+00,   0.00000000e+00,
          0.00000000e+00,   0.00000000e+00],
       [  6.63005088e-02,   6.15505219e-02,   5.19144605e-02,
          3.59973019e-02,   1.72856699e-02,   4.04282661e-03,
          1.19149107e-04,   9.66862273e-09],
       [  1.22965433e-01,   1.15955474e-01,   9.98133525e-02,
          7.04783427e-02,   3.42714449e-02,   8.05500561e-03,
          2.37484183e-04,   1.92711990e-08],
       [  1.70153250e-01,   1.61708605e-01,   1.41571416e-01,
          1.02262779e-01,   5.06813918e-02,   1.20063084e-02,
          3.54196764e-04,   2.87421334e-08],
       [  2.08997626e-01,   1.99597326e-01,   1.76889221e-01,
          1.30670788e-01,   6.62826679e-02,   1.58673244e-02,
          4.68489485e-04,   3.80167299e-08],
       [  2.40517864e-01,   2.30550690e-01,   2.06258176e-01,
          1.55481317e-01,   8.08966151e-02,   1.96098208e-02,
          5.79581531e-04,   4.70316335e-08],
       [  2.65634664e-01,   2.55416803e-01,   2.30322161e-01,
          1.76778346e-01,   9.44011160e-02,   2.32070515e-02,
          6.86713977e-04,   5.57252635e-08],
       [  2.85182535e-01,   2.74967949e-01,   2.49702454e-01,
          1.94798643e-01,   1.06725801e-01,   2.66340021e-02,
          7.89154975e-04,   6.40382333e-08],
       [  2.99921021e-01,   2.89910174e-01,   2.64976409e-01,
          2.09834718e-01,   1.17842977e-01,   2.98675715e-02,
          8.86204754e-04,   7.19137571e-08],
       [  3.10544922e-01,   3.00892067e-01,   2.76680722e-01,
          2.22189664e-01,   1.27757213e-01,   3.28866885e-02,
          9.77200401e-04,   7.92980371e-08],
       [  3.17693646e-01,   3.08512817e-01,   2.85316521e-01,
          2.32161302e-01,   1.36495718e-01,   3.56723712e-02,
          1.06152039e-03,   8.61406310e-08],
       [  3.21959813e-01,   3.13329670e-01,   2.91354230e-01,
          2.40038196e-01,   1.44100557e-01,   3.82077361e-02,
          1.13858880e-03,   9.23947971e-08],
       [  3.23897230e-01,   3.15864865e-01,   2.95238159e-01,
          2.46099306e-01,   1.50622814e-01,   4.04779696e-02,
          1.20787931e-03,   9.80178130e-08],
       [  3.24028345e-01,   3.16612127e-01,   2.97390842e-01,
          2.50614429e-01,   1.56118285e-01,   4.24702705e-02,
          1.26891869e-03,   1.02971268e-07],
       [  3.22851280e-01,   3.16042824e-01,   2.98217176e-01,
          2.53844434e-01,   1.60644109e-01,   4.41737757e-02,
          1.32129011e-03,   1.07221325e-07],
       [  3.20846534e-01,   3.14611826e-01,   2.98108366e-01,
          2.56040317e-01,   1.64255802e-01,   4.55794773e-02,
          1.36463594e-03,   1.10738951e-07],
       [  3.18483454e-01,   3.12763174e-01,   2.97445289e-01,
          2.57439400e-01,   1.67004390e-01,   4.66801399e-02,
          1.39866020e-03,   1.13500118e-07],
       [  3.16226545e-01,   3.10935568e-01,   2.96598289e-01,
          2.58256314e-01,   1.68933547e-01,   4.74702244e-02,
          1.42313055e-03,   1.15485964e-07],
       [  3.14541767e-01,   3.09564990e-01,   2.95911072e-01,
          2.58667378e-01,   1.70076867e-01,   4.79458238e-02,
          1.43787992e-03,   1.16682924e-07],
       [  3.13893026e-01,   3.09047380e-01,   2.95647805e-01,
          2.58790499e-01,   1.70455556e-01,   4.81046140e-02,
          1.44280759e-03,   1.17082821e-07]])

avp = np.array(
      [[  5.20011862e-01,   4.91272969e-01,   4.33747613e-01,
         3.29460228e-01,   1.80717037e-01,   4.59547722e-02,
         1.36505235e-03,   1.10771491e-07]])

settle = np.array(
      [[ 0.00867514,  0.01698889,  0.03363015,  0.06379901,  0.10682829,
        0.14581308,  0.15871225,  0.15910711]])






########################################################
##luetal2010 input to generate expected data
#    import numpy as np
#    from geotecha.consolidation.luetal2010 import luetal2010
#    rc=0.1
#    re=0.9
#    H=10
#    rs=0.15
#    ks=0.5
#    kv=1.0
#    kvc=2000
#    kh=1.0
#    khc=2
#    mvs=0.1
#    mvc=0.0005
#    gamw=10
#    utop=0.9
#    ubot=0.2
#    nterms=100
#    z = np.linspace(0,10,20)# np.array([0, 3.0, 6.0, 9.0, 10.0])
#    t = np.logspace(np.log10(0.01), np.log10(10), 8)#np.array([0.1, 0.8, 2.0])
#
#    por, pors, porc, avp, settle = luetal2010(
#                z,t, rc, re, H, rs, ks,
#                 kv, kvc, kh, khc,
#                 mvs, mvc, gamw, utop, ubot, nterms)
#    #Note for avp and settle you'll need to add an extra [] around the existing [].
#    for v in ['z', 't', 'por', 'pors', 'porc', 'avp', 'settle']:
#        print('{} = np.{}\n'.format(v, repr(eval(v))).replace("array([","array(\n      ["))
#########################################################

reader = ("""\
H = 10
drn = 1
#re=0.9, rc=0.1, rs=0.15, kh/ks=2, n=9, s=1.5, kap=2.0
#mu=1.87284145852, eta = 2/re**2/mu=1.3183901879341955

mvs = 0.1
mvc = 0.0005
mvref = mvs*9**2/(9**2 - 1 + mvs/mvc)
mv = PolyLine([0,1], [1,1])


khref = 1.0
etref = 1.3183901879341955
n=9
dTh = khref * etref/mvref/10 #khref/mvref/gamw * etref
kh = khc=PolyLine([0,1], [1,1])
et = PolyLine([0,1], [1,1])

khcref = 2.0
dThc = 8*khcref / (mvref * 10) /0.1**2
khc = PolyLine([0,1], [1,1])

kvref = 1.0
dTv = kvref/mvref/10/ H**2
kv = PolyLine([0,1], [1,1])

kvcref = 2000
kvc = PolyLine([0, 1], [1, 1])
dTvc=kvcref/H**2/mvref/10

neig = 40

surcharge_vs_depth = [PolyLine([0,1], [0.9,0.2])]
surcharge_vs_time = [PolyLine([0,0,10], [0,1,1])]

ppress_z = np.%s
tvals = np.%s
avg_ppress_z_pairs = [[0,1]]
settlement_z_pairs = [[0,1]]

    """ % (repr(z/10), repr(t)))


a = Speccon1dVRC(reader)
a.make_all()


# custom plots
title = ("Lu et al (2010) Stone column, load is linear with depth")
fig = plt.figure(figsize=(13,6))
fig.suptitle(title)
#z vs u
ax1 = fig.add_subplot("141")
ax1.set_xlabel('Excess pore pressure \nin soil, kPa')
ax1.set_ylabel('Depth')
ax1.invert_yaxis()
ax1.plot(pors, z,
         ls=".", color='Blue', marker="+", ms=5,
         label='expected')
ax1.plot(a.pors, z,
         ls='-', color='red', marker='o', ms=5, markerfacecolor='None',
         markeredgecolor='red',
         label='calculated')


# avp vs t
ax2 = fig.add_subplot("143")
ax2.set_xlabel('Time')
ax2.set_ylabel('Average excess pore press \n (soil and column), kPa')
ax2.set_xscale('log')
ax2.set_xlim((0.01, 10))
ax2.plot(t, avp[0],
         ls=".", color='Blue', marker="+", ms=5,
         label='expected')
ax2.plot(t, a.avp[0],
         ls='-', color='red', marker='o', ms=5, markerfacecolor='None',
         markeredgecolor='red',
         label='calculated')


# settlement vs t
ax3 = fig.add_subplot("144")
ax3.set_xlabel('Time')
ax3.set_ylabel('Settlement')
ax3.invert_yaxis()
ax3.set_xscale('log')
ax3.set_xlim((0.01, 10))
ax3.plot(t, settle[0],
         ls=".", color='Blue', marker="+", ms=5,
         label='expected')
ax3.plot(t, a.set[0],
         ls='-', color='red', marker='o', ms=5, markerfacecolor='None',
         markeredgecolor='red',
         label='calculated')

leg = ax3.legend()
leg.draggable()


ax4 = fig.add_subplot("142")
ax4.set_xlabel('Excess pore pressure \nin column, kPa')
ax4.set_ylabel('Depth')
ax4.invert_yaxis()
ax4.plot(porc, z,
         ls=".", color='Blue', marker="+", ms=5,
         label='expected')
ax4.plot(a.porc, z,
         ls='-', color='red', marker='o', ms=5, markerfacecolor='None',
         markeredgecolor='red',
         label='calculated')

fig.subplots_adjust(top=0.90, bottom=0.15, left=0.1, right=0.94, wspace=0.4)
#fig.tight_layout()
plt.show()

(Source code, png, hires.png, pdf)

../../_images/speccon1d_vrc_stone_column_luetal2010_linear_depth_dependent_load.png