Sliced
pysammos.macroscopic_fields.sliced package
Granular Temperature module
pysammos.macroscopic_fields.sliced.granular_temperature module
- pysammos.macroscopic_fields.sliced.granular_temperature.calc_slices(y0, y1, dy, n=5)[source]
Calculate the slice positions in the y-direction.
Inputs
- y0float
The minimum y position of the domain.
- y1float
The maximum y position of the domain.
- dyfloat
The slice height.
n : int, optional
Outputs
- Z_knp.ndarray
The center positions of the slices.
- Z_k_mnp.ndarray
The sub-slice positions within each slice.
- mnp.ndarray
The sub-slice indices.
Notes
The slices are defined from y0 to y1 with a height of dy. Each slice is further divided into 2n sub-slices for more detailed calculations. Each slice center Z_k is calculated as the average of the top and bottom of the slice. The sub-slice positions Z_k_m are calculated based on the sub-slice indices m.
- pysammos.macroscopic_fields.sliced.granular_temperature.granular_temperature(Z_k, Z_k_m, W, n, m, velocity_all, diam_all, density_all, mass_all, particle_positions_all)
Inputs
- dyfloat
The slice height.
- y0float
The minimum y position of the domain.
- y1float
The maximum y position of the domain.
- velocity_allnp.ndarray
The particle velocities.
- diam_allnp.ndarray
The particle diameters.
- density_allnp.ndarray
The particle densities.
- mass_allnp.ndarray
The particle masses.
- particle_positions_allnp.ndarray
The particle positions.
Outputs
- k_WeightedT_Nnp.ndarray
The granular temperature computed using the Kim & Kamrin (2020) method.
- k_WeightedT_LAMMPSnp.ndarray
The granular temperature computed using the LAMMPS method.
Notes
The granular temperature is computed using two methods:
The Kim & Kamrin (2020) method, which uses a weighted average of the velocity fluctuations.
The LAMMPS method, which uses the average of the squared velocity fluctuations.
Utils module
- pysammos.macroscopic_fields.sliced.utils.Wm(m, n)
- pysammos.macroscopic_fields.sliced.utils.area(particle_radius, distance_to_plane)
- pysammos.macroscopic_fields.sliced.utils.particles_band(y_particle_pos, particle_radius, lower_plane, upper_plane)