KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Variables
sp_statistics Namespace Reference

Variables

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']
 
 height_factor = real_probe_height / thickness
 
tuple porosity_factor = (1.0-target_porosity)/(1.0-porosity)
 
float gram_factor = 1000.0
 
 initial_radii = np.array(f['0'].get('radius'))
 
 initial_radii_3 = np.power(initial_radii,3)
 
float initial_masses = 4.0/3.0 * np.pi * density * gram_factor * height_factor * porosity_factor * initial_radii_3
 
 initial_mass = np.sum(initial_masses)
 
list all_times = []
 
list all_pressures = []
 
list all_sps = []
 
int failure_step = 175
 
int max_step = 2*failure_step
 
 times = np.zeros(max_step+1)
 
int p_rate = 5e10
 
float psi_factor = 0.000145038
 
list pressures = [p_rate*t*psi_factor for t in times]
 
 t_f = times[failure_step]
 
float max_num_bonds = 6.0
 
 sps = np.zeros(max_step+1)
 
 all_radii = np.array(f[str(i)].get('radius'))
 
 continuum_bonds = np.array(f[str(i)].get('current_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
 
 weak_radius = interface_radius
 
 internal_radii = np.where(distance_2<weak_radius**2,all_radii,0.0)
 
 external_radii = np.where(distance_2>=weak_radius**2,all_radii,0.0)
 
 cont_internal_radii = np.where(continuum_bonds>numbonds,internal_radii,0.0)
 
 cont_external_radii = np.where(continuum_bonds>0.0,external_radii,0.0)
 
 total_radii_3 = np.power(cont_internal_radii+cont_external_radii,3)
 
float masses = 4.0/3.0 * np.pi * density * gram_factor * height_factor * porosity_factor * total_radii_3
 
 current_mass = np.sum(masses)
 
 current_sp = initial_mass - current_mass
 
list exp_times = []
 
list exp_pressures = []
 
list exp_sps = []
 
 fields = line.strip().split()
 
string graph_name = 'sp_bonds_t.pdf'
 
list graph_labels
 
 productions
 
 label
 
 loc
 
 prop
 
 bbox_inches
 

Variable Documentation

◆ all_pressures

list sp_statistics.all_pressures = []

◆ all_radii

sp_statistics.all_radii = np.array(f[str(i)].get('radius'))

◆ all_sps

list sp_statistics.all_sps = []

◆ all_times

list sp_statistics.all_times = []

◆ bbox_inches

sp_statistics.bbox_inches

◆ cont_external_radii

sp_statistics.cont_external_radii = np.where(continuum_bonds>0.0,external_radii,0.0)

◆ cont_internal_radii

sp_statistics.cont_internal_radii = np.where(continuum_bonds>numbonds,internal_radii,0.0)

◆ continuum_bonds

sp_statistics.continuum_bonds = np.array(f[str(i)].get('current_continuum_bonds'))

◆ current_mass

sp_statistics.current_mass = np.sum(masses)

◆ current_sp

sp_statistics.current_sp = initial_mass - current_mass

◆ density

sp_statistics.density = f.attrs['density']

◆ distance_2

sp_statistics.distance_2 = xs_2 + ys_2

◆ exp_pressures

list sp_statistics.exp_pressures = []

◆ exp_sps

list sp_statistics.exp_sps = []

◆ exp_times

list sp_statistics.exp_times = []

◆ external_radii

sp_statistics.external_radii = np.where(distance_2>=weak_radius**2,all_radii,0.0)

◆ external_radius

sp_statistics.external_radius = f.attrs['external_radius']

◆ f

sp_statistics.f = h5py.File(file_name, 'r')

◆ failure_step

int sp_statistics.failure_step = 175

◆ fields

sp_statistics.fields = line.strip().split()

◆ file_name

string sp_statistics.file_name = 'sp_data.hdf5'

◆ gram_factor

float sp_statistics.gram_factor = 1000.0

◆ graph_labels

list sp_statistics.graph_labels
Initial value:
1 = ['SP up to 0 intact bonds',
2  'SP up to 1 intact bonds',
3  'SP up to 2 intact bonds',
4  'SP up to 3 intact bonds',
5  'SP up to 4 intact bonds',
6  'SP up to 5 intact bonds',
7  'ctw16 experiment',
8  ]

◆ graph_name

string sp_statistics.graph_name = 'sp_bonds_t.pdf'

◆ height_factor

sp_statistics.height_factor = real_probe_height / thickness

◆ initial_mass

sp_statistics.initial_mass = np.sum(initial_masses)

◆ initial_masses

float sp_statistics.initial_masses = 4.0/3.0 * np.pi * density * gram_factor * height_factor * porosity_factor * initial_radii_3

◆ initial_radii

sp_statistics.initial_radii = np.array(f['0'].get('radius'))

◆ initial_radii_3

sp_statistics.initial_radii_3 = np.power(initial_radii,3)

◆ interface_radius

sp_statistics.interface_radius = f.attrs['interface_radius']

◆ internal_radii

sp_statistics.internal_radii = np.where(distance_2<weak_radius**2,all_radii,0.0)

◆ internal_radius

sp_statistics.internal_radius = f.attrs['internal_radius']

◆ label

sp_statistics.label

◆ loc

sp_statistics.loc

◆ masses

float sp_statistics.masses = 4.0/3.0 * np.pi * density * gram_factor * height_factor * porosity_factor * total_radii_3

◆ max_num_bonds

float sp_statistics.max_num_bonds = 6.0

◆ max_step

int sp_statistics.max_step = 2*failure_step

◆ p_rate

int sp_statistics.p_rate = 5e10

◆ porosity

sp_statistics.porosity = f.attrs['porosity']

◆ porosity_factor

tuple sp_statistics.porosity_factor = (1.0-target_porosity)/(1.0-porosity)

◆ pressures

sp_statistics.pressures = [p_rate*t*psi_factor for t in times]

◆ productions

sp_statistics.productions

◆ prop

sp_statistics.prop

◆ psi_factor

float sp_statistics.psi_factor = 0.000145038

◆ real_probe_height

sp_statistics.real_probe_height = f.attrs['real_probe_height']

◆ sps

sp_statistics.sps = np.zeros(max_step+1)

◆ t_f

sp_statistics.t_f = times[failure_step]

◆ target_porosity

sp_statistics.target_porosity = f.attrs['target_porosity']

◆ test_id

sp_statistics.test_id = f.attrs['test_id']

◆ thickness

sp_statistics.thickness = f.attrs['thickness']

◆ times

sp_statistics.times = np.zeros(max_step+1)

◆ total_radii_3

sp_statistics.total_radii_3 = np.power(cont_internal_radii+cont_external_radii,3)

◆ volume

sp_statistics.volume = f.attrs['volume']

◆ weak_radius

sp_statistics.weak_radius = interface_radius

◆ xs

sp_statistics.xs = np.array(f[str(i)].get('x'))

◆ xs_2

sp_statistics.xs_2 = np.power(xs,2)

◆ ys

sp_statistics.ys = np.array(f[str(i)].get('y'))

◆ ys_2

sp_statistics.ys_2 = np.power(ys,2)