et = PolyLine([0,1], [1,1]) surcharge_vs_depth = PolyLine([0,1], [1,1]) surcharge_vs_time = PolyLine([0,0.15,0.3,0.45,4],[0.0,50,50,100,100]) ppress_z = np.%s avg_ppress_z_pairs = [[0,1]] settlement_z_pairs = [[0,1]] ppress_z_tval_indexes = [20, 60, 90] tvals = np.%s """ % (repr(z), repr(t))) a = Speccon1dVR(reader) a.make_all() # custom plots title = ("Tang and Onitsuka (2000) vertical and radial drainage") fig = plt.figure(figsize=(12, 5)) fig.suptitle(title) #z vs u ax1 = fig.add_subplot("131") ax1.set_xlabel('Excess pore pressure, kPa') ax1.set_ylabel('Depth') ax1.invert_yaxis() ax1.plot(por, z, ls=".", color='Blue', marker="+", ms=5, label='expected') ax1.plot(a.por, z, ls='-',
kv = PolyLine([0,1], [5,5]) et = PolyLine([0,0.5, 0.5, 1], [1,1, 0,0]) surcharge_vs_depth = [PolyLine([0,1], [1,1]), PolyLine([0,1], [1,1])] surcharge_vs_time = [PolyLine([0,0,10], [0,10,10]), PolyLine([0,0,10], [0,10,10])] ppress_z = np.linspace(0,1,100) avg_ppress_z_pairs = [[0,1]] settlement_z_pairs = [[0,1]] tvals = np.logspace(-2, 0.3,50) ppress_z_tval_indexes = np.arange(len(tvals))[::len(tvals)//7] """) a = Speccon1dVR(my_code) a.make_all() print('\nt', repr(a.tvals)) print('\nz', repr(a.ppress_z)) print('\npor', repr(a.por)) print('\navp', repr(a.avp)) print('\nset', repr(a.set)) my_code = textwrap.dedent("""\ #from geotecha.piecewise.piecewise_linear_1d import PolyLine #import numpy as np H = 1 drn = 0 dT = 1
ax1.set_xlabel('ppress') ax1.set_ylabel('depth') ax1.invert_yaxis() ax1.grid() ax2 = fig.add_subplot('132') ax2.set_xlabel('time') ax2.set_ylabel('average pore pressure') ax3 = fig.add_subplot('133') ax3.set_xlabel('time') ax3.set_ylabel('settlement') ax3.invert_yaxis() for h in h_values: a = Speccon1dVR(reader.format(h=repr(h), tprofile=tprofile)) a.make_all() label = '{}'.format(str(list(h))) ax1.plot(a.por[:, 0], a.ppress_z * a.H, label=label) ax2.plot(a.tvals, a.avp[0], label=label) ax3.plot(a.tvals, a.set[0], label=label) leg_title = 'layer thickness' ax1.set_title('ppress at t={:g} days'.format(tprofile)) leg1 = ax1.legend(title=leg_title, loc=6) leg1.draggable() leg2 = ax2.legend(title=leg_title) leg2.draggable() leg3 = ax3.legend(title=leg_title)