coating simulation

kunzhang's picture
Submitted by kunzhang on Thu, 02/13/2014 - 19:00

Hi All,

I would like to do a coating simulation, which means when two particles contact, one is coating particle, the other one is core particle (They could be defined in different groups or types), the coating particle will be deleted, while the mass of coating particle will be added to the mass of core particle.

Could anyone please give me some ideas how to work on the coding? I have checked the src directory under LIGGGHTS, probably, delete_atoms.cpp, fix_evaporate. cpp, and fix_heat_gran_conduction.cpp could be helpful, but I am not sure. Any hint and idea will be appreciated!

Thanks for the help!

Kun

richti83's picture

richti83 | Fri, 02/14/2014 - 17:30

A poor mans way on striplevel could be:

iterate over all atoms

store coords and diamater of atom[$i]
iterate over all other atoms
check if i overlap j
if yes, delete the smaller one
fix adapt the mass (and diameter ?) of the bigger one

For small systems this should work, let's say <10.000 particles, for >1Mio you should try to do this on code-level. Between 10.000 and 1 Mio you need to try it out :-)

I'm not sure if you can iterate over the contact list on skriptlevel (which would be more performant)

just my two cents
Christian

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

kunzhang's picture

kunzhang | Fri, 02/14/2014 - 18:21

Hi Christian,

Thanks for your replay. I have a question that what do you mean the "skriptlevel" or (scriptlevel?), it means doing it in the in.** files? Also, I would like to define two types or groups of particles, rather than delete the smaller one, since for my case, the core particles also have different sizes. Delete_atoms command has a function similar to this:

delete_atoms overlap cutoff group1-ID group2-ID

However, I think this command only can be operated once, however, I would like to write a fix style to do this coating durning timestep.

Thanks!

Kun

kunzhang

richti83's picture

richti83 | Fri, 02/14/2014 - 21:32

Hi,

Yes I meant scriptlevel, sorry it's late afternoon in germany.

You can insert the main particles in different groups like this:

#region and insertion
group 1 region reg
group 2 region reg
group 3 region reg
#distributions for insertion
region bc sphere 0 0 ${rb2} ${rb2} units box #sphere at 0/0/r r=d_bounding/2
fix pts1 1 particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant ${rp10}
fix pts2 2 particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant ${rp20}
fix pts3 3 particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant ${rp30}
fix pdd1 all particledistribution/discrete 1. 1 pts1 1
fix pdd2 all particledistribution/discrete 1. 1 pts2 1
fix pdd3 all particledistribution/discrete 1. 1 pts3 1
#random particle insertion
fix ins1 1 insert/pack seed 5330 distributiontemplate pdd1 &
maxattempt 200 &
insert_every once &
overlapcheck yes &
all_in yes &
vel constant 0. 0. 0. &
particles_in_region ${N1} &
region bc
fix ins2 2 insert/pack seed 5330 distributiontemplate pdd2 &
maxattempt 200 &
insert_every once &
overlapcheck yes &
all_in yes &
vel constant 0. 0. 0. &
particles_in_region ${N2} &
region bc
fix ins3 3 insert/pack seed 5330 distributiontemplate pdd3 &
maxattempt 200 &
insert_every once &
overlapcheck yes &
all_in yes &
vel constant 0. 0. 0. &
particles_in_region ${N3} &
region bc

where

variable fillfactor equal 1.1
variable N equal ${fillfactor}*1/16*($D*$D*$D)/(${rp2}*${rp2}*${rp2}) #magic formula :-) (N=V_s/V_p)
variable N1 equal $N/3
variable N2 equal ${N1}+$N/3
variable N3 equal ${N2}+$N/3

(the trick is to define N_frac_i=(N_frac_{i-1})+N_particles_in_fraction_i
this example is for a spheric pouring region, you can change this to region block.
This will add 3 groups (1..3) and every radius/fraction belongs to one unique group.

Hope that help,
best, Christian

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact