LIGGGHTS® - Developer Forum

Topics related to developing with LIGGGHTS® can be discussed here: discussion about implementation details, C++, MPI and debugging tools

rmass not changing due to radii grow

Submitted by Silias on Thu, 03/08/2012 - 19:39

Hi everybody,

I'm wondering why rmass is not changing while I let my radii of the particles grow?
A logical reason might be, that rmass is calculated (by the formula 4/3*PI*radius^3) just once - at the beginning of the simulation.
Is that right?
Where can I find it in the code?

By the way:
What does the "r" mean in "rmass"? :)

kind regards,
Sebastian

where to allocate array for particle properties

Submitted by Silias on Thu, 02/23/2012 - 13:31

Hi everybody,

I'd like to allocate memory in a fix for an array to store certain particle properties.

I thought I define the array within the headerfile with following line:

double *particle_prop_;

Then I wanted to allocate memory in the constructor of the fix, like:

int nlocal = atom->nlocal;
particle_prop_ = (double*)memory->create_1d_double_array(nlocal, 0,"particle_prop_");

and later I wanted to use the array in a method for some calculations.

modify "particleToInsert.ccp/h" file for a sph-case

Submitted by Nate on Mon, 02/13/2012 - 13:17

Dear LIGGGHTS-Developers,

"insert/stream" is a command that can be used for granular simulation (example insert_stream). I would like to set up a similar simulation like the example "insert_stream" but for sph. The aim of this is to simulate a water jet that impacts on a wall.

For this reason it is necessary to modify the "particleToInsert.ccp/h" and some other files. I think the first things which have to be modified are the insertion properties in the "particleToInsert.h" file.

Is anybody familiar with an adjustment like that?

setting new parameter

Submitted by Masayuki on Mon, 01/23/2012 - 21:18

Hi,

I want to introduce new parameter to the LIGGGHTS code. I have tried to define the parameter but I couldn't that. So, first, I should understand, for example, how Young's modulus is got from LIGGGHTS code such as "in.cohesion" to inside of the LIGGGTHS code such as "pair_gran_hooke_history.cpp". Please tell me how to get parameters from LIGGGHTS code to inside or please tell me the flow of the variable from "in.cohesion" to "pair_gran_hooke_history".

Regards,

Masa

using valgrind to debug LIGGGHTS code

ckloss's picture
Submitted by ckloss on Thu, 12/22/2011 - 09:09

valgrind is a very useful memory debugger which can be used to find segfaults and other memory errors.
you can run it on ubuntu by

valgrind liggghts < in.script &> LOG

this will print debugging information into the LOG file. if you compile LIGGGHTS with the '-d' flag, it will also show you the code line which causes the trouble. if running in parallel, you should use

mpirun -np X valgrind liggghts < in.script &> LOG

Christoph

making a new fix wall/gran subtype

dbreton's picture
Submitted by dbreton on Wed, 12/21/2011 - 22:03

I have put together a sort-of-working sintering pair interaction, and now I would like to make a wall/gran/sinter fix to contain and compact my sintering particles. My pair/gran/sinter pair style is based on pair/gran/hooke/history/stiffness and so I have tried to simply re-create/re-name the wall/gran/hooke/history/stiffness to be compatible with my particles (since wall and particle interaction must be the same).

Fix breakparticle/force

Submitted by tkulju on Thu, 12/01/2011 - 09:39

Hi Christoph!
Thanks for the new release! I noticed something in fix breakparticle/force-code, which is buzzing me. In the fix_breakparticle_force.cpp:362 v_ins is defined, but it is never used (?). Instead v_insert is used in set_x_v_omega(...) (fix_breakparticle_force.cpp:371), which is (0,0,0), if it is not given in start-up script. Correct me if I'm wrong, but shouldn't the created particles have a momentum conserved velocity, instead of zero velocity what they now have?

Thanks,
Timo

Pages

Subscribe to RSS - LIGGGHTS® - Developer Forum