how to read multiple input data files with read_data command

Submitted by naren on Wed, 12/10/2014 - 07:48

Hello All,

I want to read multiple input data files using read_data command in my simulation. How can i do this?
These data files correspond to different parts of my geometry.

Can someone please help me on this.

Thanks,

Narendra

JoshuaP | Wed, 12/10/2014 - 09:48

Hi,

if you want to read multiple input scripts use "include" . read_data is for getting initial position of atoms, I think.

regards

naren | Wed, 12/10/2014 - 10:02

Hi,

Thanks for the reply. I want to give multiple data files of intial position only (i have only one input script).

Thanks,
Narendra

richti83's picture

richti83 | Wed, 12/10/2014 - 13:56

you can use the read_data command more than once when you append add after the filename of your position-data-file. But you need to make sure that in the 2nd file no Atom-ID of the first file is used. (fileA 1..100, fileB 101.200, fileC 201..)
note: with the add suffix no simulation box is created, so use first read data without add and following with add or use create_box command and only read data add command.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

naren | Thu, 12/11/2014 - 11:18

Hi Christian,

Many thanks for your reply. I have two more doubts.

1) I have two different type particles in two different position-data-files. I am grouping them seperately (type 1 and type 2). Now i want to keep type 1 particles stationary and i want to move type 2 particles with a fixed velocity. When i am running the input script, i am getting the following error.

39248 atoms in group inner
43148 atoms in group outer
ERROR: More than one fix freeze (../fix_freeze.cpp:65)

how can i do this?

2) Can we use both .stl files and position-data-files (with read_data command) in a single input script?

thanks for your time,

regards,
Narendra

richti83's picture

richti83 | Thu, 12/11/2014 - 13:54

Particles can be in more than one group, I would

group wall type 1 2
group inner type 1
group outer type 2
fix freeze wall freeze #all wall particles won't move
fix move inner move ... #only move particles in group inner by constant velocity

2) yes you can, but when your wall particles overlap the stl geomety it would be a good idea to exclude the wall particles from the neighbourlist of the stl geometry to save computation time. At the moment this is not possible due to a lack of support in fix_neighlist_gran, BUT I've a patch for this :-):

abstract_mesh.h, line 78ff

+ //let the mesh know his type
+ inline int atomTypeWall()
+ { return wall_type_;}
+
+ inline void setType(int type) {
+ wall_type_=type;
+ }

line 147

+ int wall_type_;

fix_mesh.cpp line 166

mesh_->setType(atom_type_mesh_);

fix_neighlist_mesh.cpp line 266

+ int *type = atom->type;

and line 292

- if(! (mask[iAtom] & groupbit))
+ if(! (mask[iAtom] & groupbit) || (neighbor->exclusion(type[iAtom],mesh_->atomTypeWall())))

and line 322

- if(! (mask[iAtom] & groupbit))
+ if(! (mask[iAtom] & groupbit) || (neighbor->exclusion(type[iAtom],mesh_->atomTypeWall())))

neighbor.cpp line 2127

+int Neighbor::exclusion(int itype, int jtype) const {
+ int m;
+
+ if (nex_type && ex_type[itype][jtype]) return 1;
+ return 0;
+}

neighbor.h line 213

int exclusion(int itype, int jtype) const; //simple test only by material-type, used in fix_neighlist_mesh

Then you can use in your inputscipt neigh_modify exclude type 1 3, exclude type 2 3, exclude 3 1, exclude 3 2 (asuming your stl wall is type 3 and your particle walls are type 1 & 2)

Maybe the core developer can add the neighbor mesh exclude by type function in one of the next releases.

Best,
Christian

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

ckloss's picture

ckloss | Thu, 12/11/2014 - 19:06

Hi all,

yes, a neighbor mesh exclude can be realized.
I'll do this for the next release

Best wishes
CHristoph

naren | Mon, 12/15/2014 - 13:22

Thank you Christian and Christoph.