Add a new property of particles

kunzhang's picture
Submitted by kunzhang on Fri, 12/13/2013 - 19:28

Hi All,

Anyone could please instruct me how to add a new property of particles, such as moisture around the particles. I think it could be similar as define a property like temperature of particle, which is already in the LIGGGHTS. But I have no idea about the procedure of working on a new property. Any help or hint would be highly appreciated! If possible, a detailed example is best for me to learn it.

Thanks so much!

Kun
--------------------------------------------------------------------------------------------------------------
Hi All,

As previous post, following fix_heat_gran.h/.cpp and fix_heat_gran_conduction.h/.cpp, property of particle moisture could be defined in coding similar as temperature (temp). Then I would like to continue coding as when two particle contact, moisture will transfer between these two particle, and fix_scalar_transportation_equation is also modified as:

if(capacity_flag)
{
for (int i = 0; i < nlocal; i++)
{
if (mask[i] & groupbit){
capacity = fix_capacity->compute_vector(type[i]-1);

if(fabs(capacity) > SMALL) {quantity[i] += (flux[i] + source[i]) * dt / (rmass[i]*capacity);} else {quantity[i] += (flux[i] + source[i]);}

}
}
}
So I set capacity=0 to use:
quantity[i] += (flux[i] + source[i]);

And flux=0.01 as trial case defined in fix_MC_gran_liquid_bridge in my own file.

However, when two particles with diameter of 0.02 and timestep of 0.0005 are used, the flux for the first contact is 0.1, which is 10 times as defined. And when particle diameter is defined as 0.03, the flux for the contact is 0.13, which is 10 times as defined. It seems the flux depend on diameter and timesteps which is not desirable.

Could anyone please let me know where to find out this bugs?

Thanks!

Kun

Luton | Wed, 07/08/2015 - 16:32

Hello Christian,

I am dealing with similar issue to Kun's regarding "Add a new property of particles". I tried to follow the link you've given to "how to add a new property/atom (in this case the color of a particle)" but the link seems to be broken. I looked in chapter 7 in the manual as you refereed to but I could not find any thing with this regard.

Could you please give me the new link if the direction has been changed.

Thanks and Regards,

Luton

kunzhang's picture

kunzhang | Tue, 02/18/2014 - 17:39

Hi All,

I updated this post as above, new property of atom could defined as the way given by Christian, also, it could be defined in the .cpp/.h files. However, I have a new problem for calculation of flux and quantity shown above. Could anyone please help me fix this problems?

Thanks very much!

Kun

kunzhang