Particle insertion

Submitted by tkulju on
ckloss

In reply to by anonymous_stub (not verified)

What you can also do (actually I would recommend that) is to use the newer fix insert/stream command where all assumptions about gravity have been dropped - it has a separate tutorial case

Christoph

Fri, 26 Aug 2011 - 14:46 Permalink
tkulju

In reply to by anonymous_stub (not verified)

I'm having a little troubles with the fix insert/stream. For one stream it works fine, but for several streams it collapses (Segmentation Fault error).
Below is the snip of my code:

group ins_group region reg

fix ins_mesh1 all mesh/gran ins_face.stl 1 1.0 -0.080 0.291 -0.15 0.0 0.0 0.0
fix ins_mesh2 all mesh/gran ins_face.stl 1 1.0 -0.080 0.246 -0.15 0.0 0.0 0.0
fix ins_mesh3 all mesh/gran ins_face.stl 1 1.0 -0.080 0.201 -0.15 0.0 0.0 0.0

# first inlet
fix ins1 ins_group insert/stream seed 100001 distributiontemplate pdd2 nparticles 5000 &
vel constant 0. 0.0 1.0 particlerate 1000 &
overlapcheck yes &
insertion_face ins_mesh1 extrude_length 0.010

# second inlet
fix ins2 ins_group insert/stream seed 100002 distributiontemplate pdd2 nparticles 5000 &
vel constant 0. 0.0 1.0 particlerate 1000 &
overlapcheck yes &
insertion_face ins_mesh2 extrude_length 0.010

#third inlet
fix ins3 ins_group insert/stream seed 100003 distributiontemplate pdd2 nparticles 5000 &
vel constant 0. 0.0 1.0 particlerate 1000 &
overlapcheck yes &
insertion_face ins_mesh3 extrude_length 0.010

It usually crashes right after second inlet. I tried to unfix ins_mesh{1,2,3}, but it does not seem to help. Below is the output, if it's any help:


# second inlet
fix ins2 ins_group insert/stream seed 100001 distributiontemplate pdd2 nparticles 5000 vel constant 0. 0.0 1.0 particlerate 1000 overlapcheck yes insertion_face ins_mesh2 extrude_length 0.010
INFO: fix insert/stream: 'extrude_length' was provided, but is re-calculated using 'insert_every'
Particle insertion: 10.000000 particles every 20000 steps - particle rate 1000.000000 (mass rate 0.000524)
5000 particles (mass 0.002618) within 10000000 steps
[host:30372] *** Process received signal ***
[host:30372] Signal: Segmentation fault (11)
[host:30372] Signal code: Address not mapped (1)
[host:30372] Failing at address: 0xa8
[host:30372] [ 0] /lib64/libpthread.so.0 [0x30d720eb10]
[host:30372] [ 1] /opt/share/apps/LIGGGHTS/liggghtsdev/src/lmp_fedora(_ZN9LAMMPS_NS18FixPropertyPerAtomC1EPNS_6LAMMPSEiPPc+0x422) [0x566ad2]
[host:30372] [ 2] /opt/share/apps/LIGGGHTS/liggghtsdev/src/lmp_fedora(_ZN9LAMMPS_NS6Modify7add_fixEiPPc+0x1c58) [0x5cdf1a]
[host:30372] [ 3] /opt/share/apps/LIGGGHTS/liggghtsdev/src/lmp_fedora(_ZN9LAMMPS_NS6Modify24add_fix_property_peratomEiPPc+0x40) [0x5d0276]
[host:30372] [ 4] /opt/share/apps/LIGGGHTS/liggghtsdev/src/lmp_fedora(_ZN9LAMMPS_NS15FixInsertStream11post_createEv+0xa3) [0x52ff31]
[host:30372] [ 5] /opt/share/apps/LIGGGHTS/liggghtsdev/src/lmp_fedora(_ZN9LAMMPS_NS6Modify7add_fixEiPPc+0x3002) [0x5cf2c4]
[host:30372] [ 6] /opt/share/apps/LIGGGHTS/liggghtsdev/src/lmp_fedora(_ZN9LAMMPS_NS5Input3fixEv+0x1d) [0x5b3d87]
[host:30372] [ 7] /opt/share/apps/LIGGGHTS/liggghtsdev/src/lmp_fedora(_ZN9LAMMPS_NS5Input15execute_commandEv+0x52a) [0x5b5976]
[host:30372] [ 8] /opt/share/apps/LIGGGHTS/liggghtsdev/src/lmp_fedora(_ZN9LAMMPS_NS5Input4fileEv+0x2b6) [0x5b6f46]
[host:30372] [ 9] /opt/share/apps/LIGGGHTS/liggghtsdev/src/lmp_fedora(main+0x5f) [0x5be90f]
[host:30372] [10] /lib64/libc.so.6(__libc_start_main+0xf4) [0x30d661d994]
[host:30372] [11] /opt/share/apps/LIGGGHTS/liggghtsdev/src/lmp_fedora(__gxx_personality_v0+0x339) [0x46f419]
[host:30372] *** End of error message ***

- Timo

Mon, 29 Aug 2011 - 14:14 Permalink
ckloss

In reply to by anonymous_stub (not verified)

Ok I think I know what is causing this. Check out the next version (1.4.2) to be released in the course of the next days and tell me if it helped.
Christoph

Wed, 31 Aug 2011 - 16:27 Permalink
tkulju

In reply to by anonymous_stub (not verified)

Hi!
I installed the 1.4.3-version, but the fix insert/stream doesn't seem to work with multiple inlets. Now it gives an error:
ERROR: Error in fix property/atom. There is already a fix that registers a variable of the same name

Heres a snap of script:

fix face1 all mesh/gran face.stl 1 1.0 -0.080 0.201 -0.1 0. 0. 0.
fix face2 all mesh/gran face.stl 1 1.0 -0.080 0.249 -0.1 0. 0. 0.
fix face3 all mesh/gran face.stl 1 1.0 -0.080 0.291 -0.1 0. 0. 0.

group ins_group region reg

fix ins1 ins_group insert/stream seed 100001 distributiontemplate pdd2 nparticles 5000 &
vel constant 0. 0. 0.5 particlerate 1000 &
overlapcheck yes insertion_face face1 extrude_length 0.6
#insert_every 1000 &

fix ins2 ins_group insert/stream seed 100002 distributiontemplate pdd2 nparticles 5000 &
vel constant 0. 0. 0.5 particlerate 1000 &
overlapcheck yes insertion_face face2 extrude_length 0.6
#insert_every 1000 &

fix ins3 ins_group insert/stream seed 100003 distributiontemplate pdd2 nparticles 5000 &
vel constant 0. 0. 0.5 particlerate 1000 &
overlapcheck yes insertion_face face3 extrude_length 0.6
#insert_every 1000 &

Again, with a single inlet it seems to work.

- Timo

Mon, 12 Sep 2011 - 12:05 Permalink
ckloss

In reply to by anonymous_stub (not verified)

Try replacing the files in the /src directory with the files I attached to this thread and recompile:
node/497

If it helps, I will include this in the next release

Christoph

Mon, 12 Sep 2011 - 14:40 Permalink
tkulju

In reply to by anonymous_stub (not verified)

...and the error message for immediate crash is, if it's any help

WARNING: Dangerous build in triangle neighbor list.
[host:04252] *** Process received signal ***
[host:04252] Signal: Segmentation fault (11)
[host:04252] Signal code: Address not mapped (1)
[host:04252] Failing at address: 0x8
[host:04252] [ 0] /lib64/libpthread.so.0 [0x30d720eb10]
[host:04252] [ 1] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS23FixWallGranHertzHistory24deriveContactModelParamsEiddRdS1_S1_S1_S1_S1_+0x92) [0x5a1c1a]
[host:04252] [ 2] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS23FixWallGranHookeHistory13compute_forceEiddddddPdS1_d+0xfb) [0x5a29e3]
[host:04252] [ 3] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS11FixWallGran15post_force_evalILi0EEEvi+0x156b) [0x5a147b]
[host:04252] [ 4] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS11FixWallGran10post_forceEi+0x13) [0x59e307]
[host:04252] [ 5] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS6Modify10post_forceEi+0x46) [0x5c9ac2]
[host:04252] [ 6] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS6Verlet3runEi+0x3a8) [0x68ab74]
[host:04252] [ 7] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS3Run7commandEiPPc+0x668) [0x66ab6c]
[host:04252] [ 8] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS5Input15execute_commandEv+0xfb1) [0x5b717d]
[host:04252] [ 9] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS5Input4fileEv+0x2b6) [0x5b7cc6]
[host:04252] [10] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(main+0x5f) [0x5bf6ef]
[host:04252] [11] /lib64/libc.so.6(__libc_start_main+0xf4) [0x30d661d994]
[host:04252] [12] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(__gxx_personality_v0+0x339) [0x46f6c9]
[host:04252] *** End of error message ***

The difference is the different seed values (at least with seed-values 1,2001,10001).

- Timo

Tue, 13 Sep 2011 - 13:47 Permalink
ckloss

In reply to by anonymous_stub (not verified)

Hi Timo,

thanks for the info. Can you please post the full script so I can reproduce the problem? I would then post a patch for the next version

Thanks!
Christoph

Wed, 14 Sep 2011 - 16:49 Permalink
tkulju

In reply to by anonymous_stub (not verified)

Hi Christoph!
And sorry for the late reply. I suspect that there's some conflict between
insert/stream
and
check/timestep/gran
fixes. I commented out the
fix ts all check/timestep/gran 1000 0.1 0.1,
and there seems to be no problem anymore. I assume the files you attached are already in 1.4.4. version? Because that's what I'm using, and it's running fine.

- Timo

Fri, 30 Sep 2011 - 10:05 Permalink
ckloss

In reply to by anonymous_stub (not verified)

Hi timo,

>> the files you attached are already in 1.4.4. version
yes

>>some conflict between insert/stream and check/timestep/gran
I don't think so... If you don't mind posting the script, I would have a closer look

Christoph

Fri, 30 Sep 2011 - 10:44 Permalink
tkulju

In reply to by anonymous_stub (not verified)

Hi!
I don't know, is it relevant to this, but after some (990) iteration steps, I get the following error message

[host:04186] *** Process received signal ***
[host:04186] Signal: Segmentation fault (11)
[host:04186] Signal code: Address not mapped (1)
[host:04186] Failing at address: 0x10
[host:04186] [ 0] /lib64/libpthread.so.0 [0x30d720eb10]
[host:04186] [ 1] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS20FixCheckTimestepGran26calc_rayleigh_hertz_estimsEv+0x46f) [0x51e18f]
[host:04186] [ 2] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS20FixCheckTimestepGran11end_of_stepEv+0xe) [0x51e31a]
[host:04186] [ 3] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS6Modify11end_of_stepEv+0x5a) [0x5c9b88]
[host:04186] [ 4] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS6Verlet3runEi+0x3c5) [0x68ab91]
[host:04186] [ 5] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS3Run7commandEiPPc+0x668) [0x66ab6c]
[host:04186] [ 6] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS5Input15execute_commandEv+0xfb1) [0x5b717d]
[host:04186] [ 7] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(_ZN9LAMMPS_NS5Input4fileEv+0x2b6) [0x5b7cc6]
[host:04186] [ 8] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(main+0x5f) [0x5bf6ef]
[host:04186] [ 9] /lib64/libc.so.6(__libc_start_main+0xf4) [0x30d661d994]
[host:04186] [10] /opt/share/apps/LIGGGHTS/liggghtsdev-testing/src/lmp_fedora(__gxx_personality_v0+0x339) [0x46f6c9]
[host:04186] *** End of error message ***

Below is my insert fixes

fix ins1 nve_group insert/stream seed 1001 distributiontemplate pdd2 &
nparticles 5000 vel constant 0. 0. 0.5 massrate 2.158333e-3 &
overlapcheck yes maxattempt 2000 insert_every 10000 insertion_face face1

fix ins2 nve_group insert/stream seed 1002 distributiontemplate pdd2 &
nparticles 5000 vel constant 0. 0. 0.5 massrate 2.158333e-3 &
overlapcheck yes maxattempt 2000 insert_every 10000 insertion_face face2

fix ins3 nve_group insert/stream seed 1003 distributiontemplate pdd2 &
nparticles 5000 vel constant 0. 0. 0.5 massrate 2.158333e-3 &
overlapcheck yes maxattempt 2000 insert_every 10000 insertion_face face3

I looked at the post files until that point, and the particles were moving just fine. With pour/dev I haven't got this error message. And if I change the seed-value, it crashes right after the particles are inserted. Any idea, what's going on?

- Timo

Tue, 13 Sep 2011 - 13:37 Permalink

Hi!
Is it possible to insert group of particles, so that their initial velocity would be against gravity field? I've tried it with

fix pour/dev

command, but it gives me an error message:
ERROR: fix pour: z-velocity must not not be <0.

Thanks,

Timo