How to define per-atom variable in multisphere

Submitted by Boyang on Tue, 05/15/2018 - 06:31

Hi,

I use the compute multi-sphere command to calculate body position, and later I would like to exert a force on each multi-sphere body depends on their position in vertical space(z direction). This used to work for me in only sphere system. For the multi-sphere system,I use similar syntax like following

compute zp all multisphere property xcm
variable prs atom -20.*c_zp[3]
fix pressure crystal setforce 0.0 0.0 v_prs

The error message I got is ERROR: Mismatched compute in variable formula (../variable.cpp:1140)
I couldn't seem to find a suitable variable form for per-body property for multi-sphere. Is this Doable?

P.S. Is there a way to add surface charges on particles so they can form a looser packing?

I really appreciate your time and help!

Best regards,

richti83's picture

richti83 | Wed, 05/16/2018 - 14:11

This is not known to work as the compute does not store an array [body_id][dimension] which could be accessed by equal style variables
You have to use ..

compute xcm_single_1 all multisphere/single id 1 property xcm # NEW compute style in LIGGGHTS 380 to acces position of COM of a single clump-id
compute xcm_single_2 all multisphere/single id 2 property xcm # NEW compute style in LIGGGHTS 380 to acces position of COM of a single clump-id
compute xcm_single_3 all multisphere/single id 3 property xcm # NEW compute style in LIGGGHTS 380 to acces position of COM of a single clump-id
compute xcm_single_4 all multisphere/single id 4 property xcm # NEW compute style in LIGGGHTS 380 to acces position of COM of a single clump-id
compute xcm_single_5 all multisphere/single id 5 property xcm # NEW compute style in LIGGGHTS 380 to acces position of COM of a single clump-id
compute xcm_single_6 all multisphere/single id 6 property xcm # NEW compute style in LIGGGHTS 380 to acces position of COM of a single clump-id
#.....
variable Px1 equal c_xcm_single_1[1]
variable Py1 equal c_xcm_single_1[2]
variable Pz1 equal c_xcm_single_1[3]
# and so on

.. to access center of each clump on script level.

I'm not sure if it is a good idea to apply fix setforce to particles which are part of a Multisphere as the integrator sums all particle forces and than your force contributes multiple times to the rigid. From my point of view it would be better to use Multisphere::add_external_force() (see multisphere.h) but this would require to write a new fix setforce_multisphere which calls this method on codelevel ....

what do you want to achive with this approach ??

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

Boyang | Tue, 05/22/2018 - 22:50

Hi Christian,

Thank you very much for the reply! really appreciate the help.

I'm trying to study the pressure effect on particles movement and possible fluid phase movement for different packing density and particle size distribution. What I wish to achieve in the original post is to observe if the fine particles travel through the pores created by large particles under a pressure applied at top. I'm not familiar with and just started looking into CFDEMcoupling approach and didn't success with multisphere in my code. I decided to try to apply force on individual particles in dem only, on a second thought, maybe it's better to apply a moving wall on the top and apply pressure that way.

Also, I'm wondering if there's a way to form a looser packing, is it achievable by setting charges on particles so they settle further from one another or increasing repulsive force between them.

Thanks,