Skip to content

Commit

Permalink
Clearifications in README
Browse files Browse the repository at this point in the history
  • Loading branch information
HomesGH authored Aug 1, 2023
1 parent e2338ee commit d62d980
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions examples/DropletCollision/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
Two spherical liquid droplets (LJTS) are set in vapor next to each other. A macroscopic velocity was assigned to them so that they will collide eventually.

## Setup
The provided script will setup the initial checkpoint including the two droplets. To make the script run, make sure that the ls1 python toolbox [ppls1](https://github.com/ls1mardyn/ls1-mardyn/tree/master/tools/ppls1/ppls1) works properly. Change the paths in the python script according to the present system.
The provided [script](dropColl_MD_setup.py) will setup the initial checkpoint including the two droplets. To make the script run, make sure that the ls1 python toolbox [ppls1](../../tools/ppls1/ppls1) works properly. Change the [paths](dropColl_MD_setup.py#L314-L321) in the python script once according to the present system. In the following, only the settings in the [configuration section](dropColl_MD_setup.py#L292-L295) (e.g. radius) have to be changed. By running the script, all the setup of the main simulation will be done automatically.

## Steps
The script will execute three steps, represented in the specified working folder as `s1_Bulk-Liquid`, `s2_Droplet-Equi`, and `s3_Droplet_Collision`.
The script will execute the two initialization steps of the simulation, represented in the specified working folder as `s1_Bulk-Liquid` and `s2_Droplet-Equi`. It will also prepare the main simulation `s3_Droplet_Collision` for execution.
1. Equilibration of a bulk liquid
2. Bulk liquid is replicated and a droplet is cut out of it. An equilibration simulation for the droplet is executed. Make sure, the steps of equilibration were sufficient (check `Upot` over timesteps).
2. Bulk liquid is replicated and a droplet is cut out of it. An equilibration simulation for the droplet is executed. Make sure, the number of steps of equilibration was sufficient by checking if `Upot` is constant (besides normal fluctuations) over timesteps). Depending on the droplet size, this step can require a lot of RAM. A future workaround could be to use the object generators of ls1 mardyn for setting up the drop.
3. The droplet is duplicated and a macroscopic velocity is assigned respectively.
4. The production simulation as to be started manually from the folder `s3_Droplet_Collision`. Before, the whole simulation folder could be copied to a supercomputer.
4. The production simulation has to be started manually from the folder `s3_Droplet_Collision`. Before, the whole simulation folder could be copied to a supercomputer.

## Variability
Just change the parameters like radius or velocity in the python script. The script should take care about the rest.
Expand Down
8 changes: 6 additions & 2 deletions examples/DropletCollision/dropColl_MD_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,19 @@ def duplicate_droplet(in_file_path, out_file_path):
#%% Main program which can be called from the command line
if __name__ == '__main__':


###########################################################################
############################## CONFIGURATION ##############################
###########################################################################

#%% Initial conditions

radius = 30 # Approximate radius of droplet
v_rel = 2.0 # Relative velocity of droplets; each droplet gets 0.5*v_rel assigned
temperature = 0.7 # Initial temperature of system
distance = 10 # Distance between droplets measured between surfaces


############################ END CONFIGURATION ############################

# Other
num_reps = 10
timestep = 0.003647347
Expand Down
2 changes: 0 additions & 2 deletions tools/ppls1/ppls1/exp/chp.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ def exp_chp_bin_DF(fname, chp, append=False):
else:
writeMode = 'wb'

#numParticles=len(chp)
#print('numParticles=',numParticles)
with open(fname, writeMode) as f:
ba=bytearray()
for pi, row in chp.iterrows():
Expand Down

0 comments on commit d62d980

Please sign in to comment.