RMPCDMD
Functions/Subroutines
mpcd Module Reference

Routines to perform MPCD dynamics. More...

Functions/Subroutines

double precision function, dimension(3) rand_sphere (state)
 Return random point on the surface of a sphere. More...
 
subroutine, public simple_mpcd_step (particles, cells, state, alpha)
 Perform a collision. More...
 
subroutine, public mpcd_at_step (particles, cells, state, temperature)
 Perform a collision. More...
 
subroutine, public wall_mpcd_step (particles, cells, state, wall_temperature, wall_v, wall_n, thermostat, bulk_temperature, alpha)
 Collisions in partially filled cells at the walls use the rule of Lamura et al (2001) [2]. More...
 
double precision function, public compute_temperature (particles, cells, tz)
 Compute the temperature of a mpcd solvent. More...
 
subroutine, public compute_rho (particles, rhoz)
 Compute density profile along z. More...
 
subroutine, public compute_vx (particles, vx)
 Compute x-velocity profile along z. More...
 
subroutine, public mpcd_stream_periodic (particles, cells, dt)
 Stream MPCD particles in a periodic system. More...
 
subroutine, public mpcd_stream_xforce_yzwall (particles, cells, dt, g)
 Stream MPCD particles with a force in the x-direction and specular or bounce-back conditions in y. More...
 
subroutine yzwall_collision (x0, v0, x, v, im, L, t, bc, g)
 Collide a particle in y and z with constant acceleration in x. More...
 
pure integer function change_23 (i)
 Return 2 for 3 and 3 for 2. More...
 
subroutine, public bulk_reaction (p, c, from, to, rate, tau, state)
 Apply a bulk unimolecular RMPCD reaction. More...
 
subroutine, public mpcd_stream_nogravity_zwall (particles, cells, dt)
 

Detailed Description

Routines to perform MPCD dynamics.

User manual: algorithms

MPCD collisions are implemented in simple_mpcd_step and wall_mpcd_step, that takes into account a wall in the z-direction.

Streaming is achieved by the mpcd_stream_periodic, mpcd_stream_xforce_yzwall and mpcd_stream_nogravity_zwall routines. Only a single stream routine should be used, depending on the simulation setup. A further call to md_vel is needed in the presence of forces.

Function/Subroutine Documentation

subroutine, public mpcd::bulk_reaction ( type(particle_system_t), intent(inout)  p,
type(cell_system_t), intent(inout)  c,
integer, intent(in)  from,
integer, intent(in)  to,
double precision, intent(in)  rate,
double precision, intent(in)  tau,
type(threefry_rng_t), dimension(:), intent(inout)  state 
)

Apply a bulk unimolecular RMPCD reaction.

Definition at line 569 of file mpcd.f90.

pure integer function mpcd::change_23 ( integer, intent(in)  i)
private

Return 2 for 3 and 3 for 2.

This routine is used for computing alternate dimensions y and z in collision detection.

Definition at line 558 of file mpcd.f90.

subroutine, public mpcd::compute_rho ( type(particle_system_t), intent(in)  particles,
type(histogram_t), intent(inout)  rhoz 
)

Compute density profile along z.

Definition at line 374 of file mpcd.f90.

double precision function, public mpcd::compute_temperature ( type(particle_system_t), intent(inout)  particles,
type(cell_system_t), intent(in)  cells,
type(profile_t), intent(inout), optional  tz 
)

Compute the temperature of a mpcd solvent.

User manual: algorithms - temperature-computation

Definition at line 315 of file mpcd.f90.

subroutine, public mpcd::compute_vx ( type(particle_system_t), intent(in)  particles,
type(profile_t), intent(inout)  vx 
)

Compute x-velocity profile along z.

Definition at line 389 of file mpcd.f90.

subroutine, public mpcd::mpcd_at_step ( class(particle_system_t), intent(inout)  particles,
class(cell_system_t), intent(in)  cells,
type(threefry_rng_t), dimension(:), intent(inout)  state,
double precision, intent(in)  temperature 
)

Perform a collision.

MPCD with Anderson thermostat defined in Ref. [5] to collide the particles cell-wise.

User manual: algorithms - mpcd

Definition at line 130 of file mpcd.f90.

subroutine, public mpcd::mpcd_stream_nogravity_zwall ( type(particle_system_t), intent(inout)  particles,
type(cell_system_t), intent(in)  cells,
double precision, intent(in)  dt 
)

Definition at line 609 of file mpcd.f90.

subroutine, public mpcd::mpcd_stream_periodic ( type(particle_system_t), intent(inout)  particles,
type(cell_system_t), intent(in)  cells,
double precision, intent(in)  dt 
)

Stream MPCD particles in a periodic system.

Definition at line 404 of file mpcd.f90.

subroutine, public mpcd::mpcd_stream_xforce_yzwall ( type(particle_system_t), intent(inout)  particles,
type(cell_system_t), intent(in)  cells,
double precision, intent(in)  dt,
double precision, intent(in)  g 
)

Stream MPCD particles with a force in the x-direction and specular or bounce-back conditions in y.

MPCD particles near the walls must not be in the interaction range of a colloid, this is not verified programmatically.

Definition at line 428 of file mpcd.f90.

double precision function, dimension(3) mpcd::rand_sphere ( type(threefry_rng_t), intent(inout)  state)
private

Return random point on the surface of a sphere.

Ref. [4]

Definition at line 42 of file mpcd.f90.

subroutine, public mpcd::simple_mpcd_step ( class(particle_system_t), intent(inout)  particles,
class(cell_system_t), intent(in)  cells,
type(threefry_rng_t), dimension(:), intent(inout)  state,
double precision, intent(in), optional  alpha 
)

Perform a collision.

Use the rule defined in Ref. [3] to collide the particles cell-wise.

User manual: algorithms - mpcd

Definition at line 67 of file mpcd.f90.

subroutine, public mpcd::wall_mpcd_step ( class(particle_system_t), intent(inout)  particles,
class(cell_system_t), intent(in)  cells,
type(threefry_rng_t), dimension(:), intent(inout)  state,
double precision, dimension(2), intent(in), optional  wall_temperature,
double precision, dimension(3,2), intent(in), optional  wall_v,
integer, dimension(2), intent(in), optional  wall_n,
logical, intent(in), optional  thermostat,
double precision, intent(in), optional  bulk_temperature,
double precision, intent(in), optional  alpha 
)

Collisions in partially filled cells at the walls use the rule of Lamura et al (2001) [2].

Definition at line 184 of file mpcd.f90.

subroutine mpcd::yzwall_collision ( double precision, dimension(3), intent(inout)  x0,
double precision, dimension(3), intent(inout)  v0,
double precision, dimension(3), intent(inout)  x,
double precision, dimension(3), intent(inout)  v,
integer, dimension(3), intent(inout)  im,
double precision, dimension(3), intent(in)  L,
double precision, intent(in)  t,
integer, dimension(3), intent(in)  bc,
double precision, intent(in), optional  g 
)
private

Collide a particle in y and z with constant acceleration in x.

Periodic boundary conditions are applied in x

Definition at line 475 of file mpcd.f90.