|
string | file_name = 'sp_data.hdf5' |
|
| f = h5py.File(file_name, 'r') |
|
| test_id = f.attrs['test_id'] |
|
| internal_radius = f.attrs['internal_radius'] |
|
| external_radius = f.attrs['external_radius'] |
|
| interface_radius = f.attrs['interface_radius'] |
|
| thickness = f.attrs['thickness'] |
|
| volume = f.attrs['volume'] |
|
| real_probe_height = f.attrs['real_probe_height'] |
|
| target_porosity = f.attrs['target_porosity'] |
|
| porosity = f.attrs['porosity'] |
|
| density = f.attrs['density'] |
|
int | failure_step = 300 |
|
int | max_step = failure_step |
|
| times = np.zeros(max_step) |
|
tuple | delta_probe_radius = (interface_radius-internal_radius)/5.0 |
|
tuple | probe_radius_1 = (internal_radius+delta_probe_radius*1)**2 |
|
tuple | probe_radius_2 = (internal_radius+delta_probe_radius*2)**2 |
|
tuple | probe_radius_3 = (internal_radius+delta_probe_radius*3)**2 |
|
tuple | probe_radius_4 = (internal_radius+delta_probe_radius*4)**2 |
|
int | interface_radius_2 = interface_radius**2 |
|
| avg_num_intact_bonds_0 = np.zeros(max_step) |
|
| avg_num_intact_bonds_1 = np.zeros(max_step) |
|
| avg_num_intact_bonds_2 = np.zeros(max_step) |
|
| avg_num_intact_bonds_3 = np.zeros(max_step) |
|
| avg_num_intact_bonds_4 = np.zeros(max_step) |
|
| avg_num_broken_bonds_0 = np.zeros(max_step) |
|
| avg_num_broken_bonds_1 = np.zeros(max_step) |
|
| avg_num_broken_bonds_2 = np.zeros(max_step) |
|
| avg_num_broken_bonds_3 = np.zeros(max_step) |
|
| avg_num_broken_bonds_4 = np.zeros(max_step) |
|
| continuum_bonds = np.array(f[str(i)].get('current_continuum_bonds')) |
|
| initial_continuum_bonds = np.array(f[str(i)].get('initial_continuum_bonds')) |
|
| xs = np.array(f[str(i)].get('x')) |
|
| ys = np.array(f[str(i)].get('y')) |
|
| xs_2 = np.power(xs,2) |
|
| ys_2 = np.power(ys,2) |
|
| distance_2 = xs_2 + ys_2 |
|
| num_intact_bonds_0 = np.where(distance_2<probe_radius_1,continuum_bonds,-100.0) |
|
| index_to_delete = np.where(num_intact_bonds_0<0.0)[0] |
|
| num_init_bonds_0 = np.where(distance_2<probe_radius_1,initial_continuum_bonds,-100.0) |
|
| num_broken_bonds_0 = num_init_bonds_0 - num_intact_bonds_0 |
|
| num_intact_bonds_1 = np.where(distance_2>=probe_radius_1,continuum_bonds,-100) |
|
| num_init_bonds_1 = np.where(distance_2>=probe_radius_1,initial_continuum_bonds,-100) |
|
| num_broken_bonds_1 = num_init_bonds_1 - num_intact_bonds_1 |
|
| num_intact_bonds_2 = np.where(distance_2>=probe_radius_2,continuum_bonds,-100) |
|
| num_init_bonds_2 = np.where(distance_2>=probe_radius_2,initial_continuum_bonds,-100) |
|
| num_broken_bonds_2 = num_init_bonds_2 - num_intact_bonds_2 |
|
| num_intact_bonds_3 = np.where(distance_2>=probe_radius_3,continuum_bonds,-100) |
|
| num_init_bonds_3 = np.where(distance_2>=probe_radius_3,initial_continuum_bonds,-100) |
|
| num_broken_bonds_3 = num_init_bonds_3 - num_intact_bonds_3 |
|
| num_intact_bonds_4 = np.where(distance_2>probe_radius_4,continuum_bonds,-100.0) |
|
| num_init_bonds_4 = np.where(distance_2>probe_radius_4,initial_continuum_bonds,-100.0) |
|
| num_broken_bonds_4 = num_init_bonds_4 - num_intact_bonds_4 |
|
| fig1 |
|
| axs1 |
|
| figsize |
|
string | graph_name = 'average_number_intact_bonds_probe_radius.pdf' |
|
| fig2 |
|
| axs2 |
|