-
Notifications
You must be signed in to change notification settings - Fork 37
Molecular Dynamics
There are many micro and nano flow problems where standard continuum fluid equations, such as Navier-Stokes, are invalid. Examples include interfacial flows, non-continuum flows in nanopores and unknown constitutive relations in rheological fluids.
Molecular dynamics (MD) is one method for simulating these problems. MD is a discrete, deterministic method that simulates the temporal and spatial dynamics of matter (solid, liquid and gas). Matter is explicitly modelled by atoms or molecules which move according to Newton's second law of motion and which interact together through potentials or force-fields.
The MD implementation within mdFoam+ is more complex than can be described in a single online page entry, however the basic MD method it employs can be.
If you consider a cubic box of side length L, filled with N molecules. In MD you start with an initial condition (at time t=0) that consists of specifying all positions (r_i), masses (m_i) and velocities (v_i), where i is an index running over all molecules in the system, i = 1,2,...,N. Applying periodic boundary conditions is perhaps the simplest and most widely-used boundary condition (although mdFoam+ can deal with non-periodic boundary conditions very easily). Periodicity is an important feature in several MD ensembles, since it allows modelling of an infinite system using a finite system of molecules, while maintaining conservation of mass, momentum and energy at the boundaries.
Molecules move according to Newtonian laws based on forces they accumulate due to interacting with other molecules and any boundary conditions. Numerical integration can be carried out using a typical velocity-Verlet scheme.
For a single MD time-step the simulation proceeds as follows:
- Update half of the velocity for all N molecules in the simulation.
- Update the position (r_i) of all molecules.
- Create periodic images of molecules external to the main cell.
- Compute the intermolecular forces of all molecules using an appropriate force field.
- Compute the acceleration (a_i) of all molecules.
- Update the second half of the velocity for all N molecules based on the value of a_i.
Download the MNF OpenFOAM software and run the water simulation tutorial case. Documentation and user-guide on this tutorial can be found here.
mdFoam+ has been used in the past to deal with various micro/nano flow problems:
- flows of water in nanotubes of various materials
- nanodroplets on moving surfaces
- measurements of contact angles of droplets on surfaces with different wetting characteristics
- gas flows in nano/micro confined channels for direct measurement of mean free paths and Knudsen effects
- flows in complex networks, nano/micro channels
- measurements of slip,
- precise insertion and deletion of molecules using the FADE algorithm
- moving propulsion elements of nano swimmers
- evaporation and electrowetting of salt water droplets on heated surfaces
- concurrent hybrid MD-continuum simulations (e.g. IMM, HMM-FWC, )
- multi-MD subdomains coupled with a 1D CFD formulation
- thermal transpiration in nano channels
mdFoam+ provides a number of attractive features:
- it is implemented in the OpenFOAM software, which is widely used in both academia and industry. The same familiar case folder system is maintained for running MD simulations;
- coupling between mdFoam+ and any other CFD solver in hybrid/multiscale algorithms is straightforward;
- a wide range of MD initialisation tools are available, within a robust framework in place of introducing new initialising models;
- a wide range of standard pair-potentials are available, implemented within a framework that allows new potential models to be added very easily;
- a wide range of control-like models are available (such as density control, thermostating, velocity control etc), implemented within a robust framework that allows new controllers to be added very easily;
- a wide range of measurement models are available, implemented within a robust framework that allows new measurements models to be added very easily;
- the standard set of boundary conditions (e.g. cyclic, reflective, deletion), implemented within a robust framework that allows new boundary models to be added very easily;
- mdFoam+ is running on the Tier 2 ARCHIE-WeSt and Tier 1 ARCHER supercomputers;