Hi everyone,
I am having a serious problem with my modelling regarding bonds and group commands on LIGGGHTS. I have a big number of particles (says 50.000) which are devided into a number of groups ( 300 ex.,). In each group, particles are bonded together (by bon_gran, provided by Christian). These groups of particles then interact each other under loading. However I was not aware that LIGGGHTS or LAMMPS does not allow to define more than 32 groups in one program while for fix/bond/create/gran, I have no way to use this command without group assignment. Does anyone has experience or idea to solve this problem, please? Is there any solution to either upgrade a number of groups allowed Or apply bonding to particles without grouping? Alternative solutions are highly appriciated.
Thank very much,
Regards,
Nathan,
richti83 | Tue, 01/13/2015 - 11:59
Try it with type
Hi Nathan,
I think number of groups is limited to 2^5 because it is used as a bitmask, I think one would need to change a lot of code to expand this.
But you can use 300 atom types I think.
Offcourse your material properties matrix for peratomtypepairs will explode to N^2, but you can can create it with an spreadsheet application and string concatination or a little vba macro.
than in create_bond only allow type n to be bonded with type n 300 times for n=[1..300]. (can be done in a loop at scriptlevel)
Let me know if this a way it works.
Christian
NTT1508 | Wed, 01/14/2015 - 11:48
The best so far
Hi Christian,
It is a good solution for my problem though defining material/properties becomes quite cumbersome. N^2 (90000) of elements is a huge number while they are actually the same. Obviously spread sheet would be helpful in this case. I think group and atom types based assignments can combine to reduce the complexity of input. I have tried loop for several atom types in script and it works well.
Yes, might a special project be needed to extent capacity of grouping once day.
Thank for your clever idea, Christian.
Regards,
Nathan,
NTT1508 | Thu, 01/22/2015 - 08:22
Loop on LIGGGHTS in relation to CFDEM coupling
Hi Christian,
I make a loop for create_bond with respect to different types of atoms. It run well. However when I use such LIGGGHTS script for CFDEM coupling, it turn into crash. If I replace the loop by step-by -step create_bond commands for several number of atom types, CFDEM coupling run without any problem. It makes me headache though I have tried to arrange the loop in the script at different position. I think the coupling doesnot work when I use a loop by jump-lable with internal run inside. Please take a look at my script and advice me on that.
Below here is a part of my script including create_bond loop for 5 atom types. If I replace this loop by 5 individual lines of fix/bond/create respect to 5 atom types, CFDEM coupling works smoothly. Additionally, my LIGGGHTS script with loop can run well independently to CFDEM. Probably this problem is inherent to CFDEM coupling rather than LIGGGHTS.
######################################
#Ignore the header part
...
bond_style gran
bond_coeff 1 5e-5 5e+10 5e+10 1 1e+10 1e+10
timestep 1.E-8
fix ts all check/timestep/gran 1 0.2 0.2
#walls
fix xwalls1 all wall/gran model hertz tangential history primitive type 6 xplane -90E-6
.... (fix wall/gran commands not shown fully)
read_data BallCordinate_Form.data add
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
set group all density 1450 diameter 50E-6
mass * 1.0 #Dummy, not come into effect # * for all atom types
#Total number of atom types excluding wall type
variable a equal 5
#=====================================================================================================================
#Create a loop to generate a bond among the same type atoms
#=====================================================================================================================
label BondCreate
variable l loop $a
fix JFbond_$l all bond/create/gran 1 $l $l 5.01e-5 1 6
run 1
next l
jump in.liggghts_init BondCreate
#======================================================================================================================
#cfd coupling
fix cfd1 all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force
fix integr all nve/sphere
....
#Run ...
##############################
Thank very much.
Regards,
Nathan,
richti83 | Thu, 01/22/2015 - 13:00
To make a guess
As I never used CFDCoupling this way I can only guess that the cfdemsolver does not find the inputscript (can you show me a detailed error message of the crash ?)
A first try would to replace jump scriptname label to jump SELF label, this advises liggghts to reload the current script and go to the label.
On the other hand: try to avoid the jump when it leads to a crash and use an include snipped.
eg: create your 5..300 fix bond create commands with spreadsheet and copy it to make_bond.lmp, than in you init.lmp use include make_bond.lmp this keeps the main skript handy.
NTT1508 | Fri, 01/23/2015 - 05:19
you are superior programmer
Hi Christian,
Many thanks. At least I have one more solution for my model with respect to your suggestion. Include command works well. But Jump SELF not work. Problem might not be due to LIGGGHTS because its script run well without CFDEM coupling. See a part of error report below.
[1] #0 Foam::error::printStack(Foam::Ostream&)[0] #0 Foam::error::printStack(Foam::Ostream&) at ??:?
[1] #1 Foam::sigFpe::sigHandler(int) at ??:?
[0] #1 Foam::sigFpe::sigHandler(int) at ??:?
[1] #2 at ??:?
[0] #2 in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #3 in LAMMPS_NS::FixCheckTimestepGran::calc_rayleigh_hertz_estims()"/lib/x86_64-linux-gnu/libc.so.6"
[0] #3 LAMMPS_NS::FixCheckTimestepGran::calc_rayleigh_hertz_estims() at ??:?
[0] #4 LAMMPS_NS::FixCheckTimestepGran::end_of_step() at ??:?
[1] #4 LAMMPS_NS::FixCheckTimestepGran::end_of_step() at ??:?
[0] #5 LAMMPS_NS::Modify::end_of_step() at ??:?
[1] #5 LAMMPS_NS::Modify::end_of_step() at ??:?
[0] #6 LAMMPS_NS::Verlet::run(int) at ??:?
[1] #6 LAMMPS_NS::Verlet::run(int) at ??:?
[0] #7 LAMMPS_NS::Run::command(int, char**) at ??:?
[1] #7 LAMMPS_NS::Run::command(int, char**) at ??:?
[0] #8 void LAMMPS_NS::Input::command_creator(LAMMPS_NS::LAMMPS*, int, char**) at ??:?
[1] #8 void LAMMPS_NS::Input::command_creator(LAMMPS_NS::LAMMPS*, int, char**) at ??:?
[0] #9 LAMMPS_NS::Input::execute_command() at ??:?
[1] #9 LAMMPS_NS::Input::execute_command() at ??:?
[1] #10 LAMMPS_NS::Input::file() at ??:?
[0] #10 LAMMPS_NS::Input::file() at ??:?
[0] #11 LAMMPS_NS::Input::file(char const*) at ??:?
[1] #11 LAMMPS_NS::Input::file(char const*) at ??:?
[0] #12 Foam::twoWayMPI::twoWayMPI(Foam::dictionary const&, Foam::cfdemCloud&) at ??:?
[1] #12 Foam::twoWayMPI::twoWayMPI(Foam::dictionary const&, Foam::cfdemCloud&) at ??:?
[0] #13 at ??:?
[1] #13 Foam::dataExchangeModel::adddictionaryConstructorToTable::New(Foam::dictionary const&, Foam::cfdemCloud&)Foam::dataExchangeModel::adddictionaryConstructorToTable::New(Foam::dictionary const&, Foam::cfdemCloud&) at ??:?
[0] #14 Foam::dataExchangeModel::New(Foam::dictionary const&, Foam::cfdemCloud&) at ??:?
[1] #14 Foam::dataExchangeModel::New(Foam::dictionary const&, Foam::cfdemCloud&) at ??:?
[0] #15 Foam::cfdemCloud::cfdemCloud(Foam::fvMesh const&) at ??:?
[1] #15 Foam::cfdemCloud::cfdemCloud(Foam::fvMesh const&) at ??:?
[0] #16 at ??:?
[1] #16
[0] at ??:?
[0] #17 __libc_start_main[1] at ??:?
[1] #17 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #18 in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #18
[0] at ??:?
[eis-c2pvq12:08674] *** Process received signal ***
[eis-c2pvq12:08674] Signal: Floating point exception (8)
[eis-c2pvq12:08674] Signal code: (-6)
I think I should post on CFDEM forum. It's currently not a matter to me because I have another solution as you advised. But I still want to know why the loop cause coupling fail.
Thank Christian, a superior programmer.
Have a good weekend,
Regards,
Nathan,
richti83 | Fri, 01/23/2015 - 10:26
fix check timestep
Hi Nathan,
the error says something gone bad in fix check timestep, could you try without this fix ?
[1] #3 in LAMMPS_NS::FixCheckTimestepGran::calc_rayleigh_hertz_estims()"/lib/x86_64-linux-gnu/libc.so.6"
[0] #3 LAMMPS_NS::FixCheckTimestepGran::calc_rayleigh_hertz_estims() at ??:?
NTT1508 | Sun, 01/25/2015 - 00:11
Time Check
Hi Christian,
What a good lesson for me again! Coupling works well when I place time/check after fix/couple/cfd. Probably in coupling, time step is determined on domain of CFD, not DEM. So time check should be placed after fix/couple/cfd. However it cannt be explainable for coupling without loop in that time/check is positioned before fix/couple/cfd and they run well.
Thank very much.
Best regards,
Nathan,