Random excitation

anandmds's picture
Submitted by anandmds on Tue, 08/18/2015 - 13:42

I want to know if it is possible to excite the imported geometry in a random manner, as opposed to the command " WIGGLE" which excites my imported base in a simple sinusoidal manner only. I need to randomly vibrate my geometry. Is it possible in LIGGGHTS ? or where can I find this feature, please help.

regards,

Anand

JoshuaP | Tue, 08/18/2015 - 14:34

take a look at mesh_mover.cpp under the function MeshMoverWiggle::initial_integrate()

there is the sine function. replace it with a random function:
rand() % 1; for random values between 0 and 1

kind regards
Joshua

anandmds's picture

anandmds | Wed, 08/19/2015 - 09:11

Thanks joshua, Also please tell me, if I can create a new function of sine (...) to rand ( ) and have both co-existing, or do I have to replace sine (...) with rand (...) ?

regards
Anand

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

JoshuaP | Wed, 08/19/2015 - 11:10

no it would just be easier ti just replace it. You can also create a new class with your random excitation, just copy everything that starts with MeshMoverWiggle:: and rename it like MeshMoverExcitation::Therefore u need also to add some lines in the mesh_mover.h file. just for first testing I would copy the mesh_mover.cpp also somewhere else (not in the src folder) to have a saved file and edit the sine into a random function in the src file. Then go with terminal in the src folder and do again make fedora or what ever OS u using.
If everything goes wrong just git clone liggghts again and u have the original files.
Good luck with it.
regards
Joshua

anandmds's picture

anandmds | Wed, 08/19/2015 - 11:19

Thanks a lot josh, I'll do that. I'll get back to you if I have any doubts

regards
Anand

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

anandmds's picture

anandmds | Fri, 09/11/2015 - 08:37

Hey there, I did what you suggested Joshua (replaced sin() with rand() , it's working al-right (no errors reported during simulation), but when I view it in Ovito, I still see only the sinusoidal excitation that was there before, and not some random excitation I was hoping to see. Please could you explain where I am going wrong or could you post the random function that is to be replaced ?

regards,

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

JoshuaP | Tue, 09/15/2015 - 10:18

did you rebuild the src? You have to go into the src directory and do make again.

regards,
Joshua

anandmds's picture

anandmds | Wed, 09/16/2015 - 07:48

Okay, I did not rebuild the src. Hey I'm sorry for the trouble, but I'm very new to the linux environment. It will be very helpful if you could tell me how to " do make " again, like what is the procedure. There are a lot of files in the MAKE folder of src, and I have no clue, what to do with them.
Thanks for your help

regards,

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

JoshuaP | Wed, 09/16/2015 - 10:02

open a terminal in the /src directory.
you do first
make clean-all
this is not mandatory if you work on one system, but if you sharing the src on different systems you have to do it.
then do
make openmpi

this should work. I mean, I'm using make fedora but this is because I have fedora system. I think openmpi should work on linux.

regards,
joshua

anandmds's picture

anandmds | Mon, 09/21/2015 - 06:54

Hey, I used the "make openmpi" in the terminal set to the "src" directory of LIGGGHTS, but, I'm getting the following error after it worked for some time.

anand@mechmat-04:~/LIGGGHTS-PUBLIC/src$ make openmpi
make[1]: Entering directory `/home/anand/LIGGGHTS-PUBLIC/src/Obj_openmpi'
mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -DFFT_FFTW3 -M ../mesh_mover.cpp > mesh_mover.d
make[1]: Leaving directory `/home/anand/LIGGGHTS-PUBLIC/src/Obj_openmpi'
make[1]: Entering directory `/home/anand/LIGGGHTS-PUBLIC/src/Obj_openmpi'
mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -DFFT_FFTW3 -c ../compute_voronoi_atom.cpp
In file included from ../compute_voronoi_atom.cpp:53:0:
../compute_voronoi_atom.h:56:21: fatal error: voro++.hh: No such file or directory
#include "voro++.hh"
^
compilation terminated.
make[1]: *** [compute_voronoi_atom.o] Error 1
make[1]: Leaving directory `/home/anand/LIGGGHTS-PUBLIC/src/Obj_openmpi'
make: *** [openmpi] Error 2

Please help.
regards,

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

anandmds's picture

anandmds | Tue, 09/22/2015 - 05:34

Hey I downloaded the missing voro++.hh packages and many others that were missing. But this time, the error is in the mesh_mover.cpp file in which I made the changes of rand() function. While running its showing many parameters are unused and exiting prematurely.

regards,

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

JoshuaP | Tue, 09/22/2015 - 09:50

do you maybe mixed up a newer version of LIGGGHTS with an mesh_mover.cpp from an old version? Or try make clean-all before using make openmpi.

anandmds's picture

anandmds | Tue, 09/22/2015 - 12:13

thanks man, I'll check it out and get back to you. Also can you tell me how to calculate packing fraction, after they have been poured and settled down in the container ?? . Can voronoi/atom be used ? or what will voronoi/atom give me ? please help.

regards,

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

anandmds's picture

anandmds | Tue, 09/22/2015 - 12:52

By the way, I forgot to mention that the voronoi/atom command is giving me the following error: " ERROR: Invalid compute style (../modify.cpp:982) "
sorry for the inconvenience.

regards,

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

JoshuaP | Tue, 09/22/2015 - 17:11

why do you need voronoi? Make without it, if not used. I think the density can be calculated with the paraview plugin from user richti83.

anandmds's picture

anandmds | Wed, 09/23/2015 - 06:52

I need to find packing fraction after the particles are inserted in the container i.e. total volume of all the particles. / volume of section of cylinder up to which particles fill up. For that I need to know upto what height the particles fill after they are inserted in my cylindrical container. I'm looking for a way to find that.

regards,

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

anandmds's picture

anandmds | Wed, 09/23/2015 - 07:48

Hey, never mind, I devised a method to find the "z- coordinate" of the top most particle. I run my simulation in "Ovito" and freeze it when my particles are filled and settled. I note down the corresponding file that is frozen in the simulation and form that file, I check out the maximum "z - coordinate" and proceed with my calculations. Thanks for the support

regards,

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

anandmds's picture

anandmds | Fri, 10/02/2015 - 08:23

Hey people, I want to know how to specify a constant temperature to a specific imported geometry , so that it conducts the heat to the particles that are in contact with it. Also I tried tried the following command " pair_style gran model hertz tangential history heating_tangential_history on heating_normal_hertz on " adding extra inputs of " heating_tangential_history " and " heating_normal_hertz " assuming that it would invoke the surface conduction properties for the particles, which is required for temperature update of the particles. But I'm getting error as

ERROR: Unknown argument or wrong keyword order: 'heating_tangential_history' (../pair_gran_base.h:120)

So, how do I get the particles to conduct heat and change its temperature too, simultaneously , because of the hot geometry (floor) beneath them ?? Please help.

regards,

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras

anandmds's picture

anandmds | Thu, 10/08/2015 - 13:37

hey folks, please ignore the previous query, as I got a solution to that. But, please let me know how to find the temperature change of the imported geometry because of the particles inside.

regards,

Anand.M
M.S. Mechanical Engineering,
I.I.T. Madras