mus_particle_blob_module contains types for particle "blobs" representing data that can be used to quickly create groups (blobs) of particles with certain shapes like prisms, cylinders etc.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(mus_particle_blob_cylinder_type), | public, | save | :: | particleblob | |||
| type(mus_particle_blob_prism_type), | public, | save | :: | particleblob_prism |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | lx |
Vector spanning the prism in x-direction |
||
| real(kind=rk), | intent(in) | :: | ly |
Vector spanning the prism in y-direction |
||
| real(kind=rk), | intent(in) | :: | lz |
Vector spanning the prism in z-direction |
||
| real(kind=rk), | intent(in) | :: | d |
Distance between particles |
||
| type(grw_real2darray_type), | intent(inout) | :: | positions |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | lx |
Vector spanning the prism in x-direction |
||
| real(kind=rk), | intent(in) | :: | ly |
Vector spanning the prism in y-direction |
||
| real(kind=rk), | intent(in) | :: | lz |
Vector spanning the prism in z-direction |
||
| integer, | intent(in) | :: | Nx |
Number of particles in x-direction |
||
| integer, | intent(in) | :: | Ny |
Number of particles in y-direction |
||
| integer, | intent(in) | :: | Nz |
Number of particles in z-direction |
||
| type(grw_real2darray_type), | intent(inout) | :: | positions |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_prob_type), | intent(inout) | :: | blob | |||
| real(kind=rk), | intent(in) | :: | d |
Distance between particle positions. This should be chosen larger than one particle diameter to prevent overlap. |
||
| real(kind=rk) | :: | R |
Radius within which all positions must be located |
|||
| real(kind=rk) | :: | mu(2) |
Mean value of the probability distributions in x and y directions (mu_x, mu_y) |
|||
| real(kind=rk) | :: | sigma(2) |
Standard deviation of the probability distributions in x and y directions (sig_x, sig_y) |
|||
| integer, | intent(in) | :: | Nchosen |
Number of particles we plan to choose. This determines the size to which the chosen_positions array will be allocated |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_prob_type), | intent(inout) | :: | blob | |||
| real(kind=rk), | intent(in) | :: | d |
Distance between particle positions. This should be chosen larger than one particle diameter to prevent overlap. |
||
| real(kind=rk) | :: | xlim(2) |
Range of x-positions particles can have [xmin, xmax] |
|||
| real(kind=rk) | :: | ylim(2) |
Range of y-positions particles can have [ymin, ymax] |
|||
| real(kind=rk) | :: | mu(2) |
Mean value of the probability distributions in x and y directions (mu_x, mu_y) |
|||
| real(kind=rk) | :: | sigma(2) |
Standard deviation of the probability distributions in x and y directions (sig_x, sig_y) |
|||
| integer, | intent(in) | :: | Nchosen |
Number of particles we plan to choose. This determines the size to which the chosen_positions array will be allocated |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=labelLen), | public | :: | kind | ||||
| integer, | public | :: | seed | ||||
| real(kind=rk), | public | :: | mu(2) | ||||
| real(kind=rk), | public | :: | sigma(2) | ||||
| type(grw_real2darray_type), | public | :: | available_positions |
Positions that can be picked at random. Stored in a 2D array as [ [x1, x2, ... xn], [y1, y2, ...yn] ] So the i-th position is given by [x,y] = available_positions%val(1:2,i) |
|||
| type(grw_real2darray_type), | public | :: | chosen_positions | ||||
| type(grw_realarray_type), | public | :: | probabilities | ||||
| type(grw_realarray_type), | public | :: | bins |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=rk), | public | :: | origin(3) | ||||
| real(kind=rk), | public | :: | vec(3) | ||||
| real(kind=rk), | public | :: | radius | ||||
| real(kind=rk), | public | :: | particle_radius | ||||
| real(kind=rk), | public | :: | particle_mass | ||||
| real(kind=rk), | public | :: | particle_vel(6) | ||||
| real(kind=rk), | public | :: | particle_force(6) | ||||
| logical, | public | :: | init_particles_to_fluid_vel |
If this is TRUE, particles will be initialized to the local fluid velocity instead of particle_vel |
|||
| type(mus_particle_blob_prob_type), | public | :: | distribution |
Probability distribution to use to place particles inside the cylindrical blob |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=rk), | public | :: | origin(3) | ||||
| real(kind=rk), | public | :: | vec_x(3) | ||||
| real(kind=rk), | public | :: | vec_y(3) | ||||
| real(kind=rk), | public | :: | vec_z(3) | ||||
| integer, | public | :: | nx | ||||
| integer, | public | :: | ny | ||||
| integer, | public | :: | nz | ||||
| real(kind=rk), | public | :: | particle_radius | ||||
| real(kind=rk), | public | :: | particle_mass | ||||
| real(kind=rk), | public | :: | particle_vel(6) | ||||
| real(kind=rk), | public | :: | particle_force(6) | ||||
| logical, | public | :: | init_particles_to_fluid_vel |
If this is TRUE, particles will be initialized to the local fluid velocity instead of particle_vel |
|||
| type(mus_particle_blob_prob_type), | public | :: | distribution |
Probability distribution to use to place particles inside the cylindrical blob |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | n1(3) |
Unit vector describing the orientation to rotate from |
||
| real(kind=rk), | intent(in) | :: | n2(3) |
Unit vector describing orientation to rotate to |
||
| real(kind=rk), | intent(in) | :: | v(3) |
Vector to rotate |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | s |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_prob_type), | intent(inout) | :: | blob | |||
| real(kind=rk), | intent(in) | :: | d |
Distance between particle positions. This should be chosen larger than one particle diameter to prevent overlap. |
||
| real(kind=rk) | :: | R |
Radius within which all positions must be located |
|||
| real(kind=rk) | :: | mu(2) |
Mean value of the probability distributions in x and y directions (mu_x, mu_y) |
|||
| real(kind=rk) | :: | sigma(2) |
Standard deviation of the probability distributions in x and y directions (sig_x, sig_y) |
|||
| integer, | intent(in) | :: | Nchosen |
Number of particles we plan to choose. This determines the size to which the chosen_positions array will be allocated |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_prob_type), | intent(inout) | :: | blob | |||
| real(kind=rk), | intent(in) | :: | d |
Distance between particle positions. This should be chosen larger than one particle diameter to prevent overlap. |
||
| real(kind=rk) | :: | xlim(2) |
Range of x-positions particles can have [xmin, xmax] |
|||
| real(kind=rk) | :: | ylim(2) |
Range of y-positions particles can have [ymin, ymax] |
|||
| real(kind=rk) | :: | mu(2) |
Mean value of the probability distributions in x and y directions (mu_x, mu_y) |
|||
| real(kind=rk) | :: | sigma(2) |
Standard deviation of the probability distributions in x and y directions (sig_x, sig_y) |
|||
| integer, | intent(in) | :: | Nchosen |
Number of particles we plan to choose. This determines the size to which the chosen_positions array will be allocated |
Routine which fills the bins in mus_particle_blob_prob_type
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_prob_type), | intent(inout) | :: | blob |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_prob_type), | intent(inout) | :: | blob |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_prob_type), | intent(inout) | :: | blob |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | x |
Number to map to a bin |
||
| real(kind=rk), | intent(in) | :: | bins(:) |
Array containing the boundaries of each bin Should be monotonic increasing i.e. bin(0) < bin(1) < ... bin(Nbins) |
||
| integer, | intent(in) | :: | N |
Number of elements in bins array |
||
| integer, | intent(out) | :: | ibin |
so that bins(ibin) < x <= bins(ibin+1) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_real2darray_type), | intent(inout) | :: | me | |||
| integer, | intent(in) | :: | i | |||
| integer, | intent(in) | :: | j | |||
| integer, | intent(in) | :: | array_width |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_realarray_type), | intent(inout) | :: | me | |||
| integer, | intent(in) | :: | i | |||
| integer, | intent(in) | :: | j |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_real2darray_type), | intent(inout) | :: | me | |||
| integer, | intent(in) | :: | i | |||
| integer, | intent(in) | :: | array_width |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_realarray_type), | intent(inout) | :: | me | |||
| integer, | intent(in) | :: | i |
Fill_cylinder fills the dynamic array positions with coordinates of particles spaced a distance d apart inside a cylinder with faces z = 0 and z = L and radius R. For cylinders of different position and orientation, these coordinates can be transformed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | R |
Radius of the cylinder |
||
| real(kind=rk), | intent(in) | :: | L |
Length of the cylinder |
||
| real(kind=rk) | :: | d |
Distance between particles |
|||
| type(grw_real2darray_type), | intent(inout) | :: | positions |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | lx |
Vector spanning the prism in x-direction |
||
| real(kind=rk), | intent(in) | :: | ly |
Vector spanning the prism in y-direction |
||
| real(kind=rk), | intent(in) | :: | lz |
Vector spanning the prism in z-direction |
||
| real(kind=rk), | intent(in) | :: | d |
Distance between particles |
||
| type(grw_real2darray_type), | intent(inout) | :: | positions |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in) | :: | lx |
Vector spanning the prism in x-direction |
||
| real(kind=rk), | intent(in) | :: | ly |
Vector spanning the prism in y-direction |
||
| real(kind=rk), | intent(in) | :: | lz |
Vector spanning the prism in z-direction |
||
| integer, | intent(in) | :: | Nx |
Number of particles in x-direction |
||
| integer, | intent(in) | :: | Ny |
Number of particles in y-direction |
||
| integer, | intent(in) | :: | Nz |
Number of particles in z-direction |
||
| type(grw_real2darray_type), | intent(inout) | :: | positions |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_real2darray_type), | intent(inout) | :: | positions |
Output: coordinates of the particles |
||
| real(kind=rk), | intent(in) | :: | n1(3) |
Unit vector describing the input cylinder axis |
||
| real(kind=rk), | intent(in) | :: | n2(3) |
Unit vector describing the output cylinder axis. |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_real2darray_type), | intent(inout) | :: | positions |
Output: coordinates of the particles |
||
| real(kind=rk), | intent(in) | :: | translation_vec(3) |
Vector with which to translate positions by |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(grw_real2darray_type), | intent(in) | :: | positions |
Input: coordinates of the particles |
||
| integer, | intent(in) | :: | logUnit |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_cylinder_type), | intent(in) | :: | particleblob | |||
| integer, | intent(in) | :: | logUnit |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_prism_type), | intent(in) | :: | particleblob | |||
| integer, | intent(in) | :: | logUnit |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(mus_particle_blob_prob_type), | intent(in) | :: | particleblob | |||
| integer, | intent(in) | :: | logUnit |