Region Cylinder... Not Creating in exact place

Submitted by chow2003 on Sun, 06/23/2019 - 17:14

I want to create cylinder(at coordinates 0, y,0) of radius 12.25 cm and o.74 cm height for region to insert particles. but its not creating at exact position.

Please help me. Code below

### Initialization

# Preliminaries
soft_particles yes
units cgs
atom_style sphere
boundary p p p
newton off
communicate single vel yes

# Domain
region reg block -1 1 -1 1 -1 1 units box
create_box 3 reg

### Setup

# Material and interaction properties required
fix m1 all property/global youngsModulus peratomtype 250 250 250
fix m2 all property/global poissonsRatio peratomtype 0.25 0.25 0.25
fix m3 all property/global coefficientRestitution peratomtypepair 3 1 0.5 1 0.5 1 1 1 1 1
fix m4 all property/global coefficientFriction peratomtypepair 3 1 0.5 1 0.5 1 1 1 1 1
fix m5 all property/global characteristicVelocity scalar 0.1

###Particle Insertion

region bc1 cylinder y 0 0 12.25 0.10 0.74 units box

Daniel Queteschiner | Mon, 06/24/2019 - 15:40

What exactly do you mean by "but its not creating at exact position"?
Anyway, you want the cylinder to have a radius of 12.25 cm but your simulation domain is just 2 cm in size;
also, you state that the cylinder has a height of 0.74 cm, but in your script its height range is from 0.10 to 0.74 which results in a height of 0.64 cm.
Last but not least you don't show us the particle insertion commands you are using ... just saying ...

On a final note, please, post your question just once. Duplicate posts won't get you more or faster answers ...

chow2003 | Mon, 06/24/2019 - 15:49

Thank you for your reply. Its my code. I changed the Domain size still same problem persisting.

### Initialization

# Preliminaries
soft_particles yes
units cgs
atom_style sphere
atom_modify map array sort 10000 2.0
neigh_modify delay 0 every 1 check yes page 500000 one 50000
boundary m m m
newton off
communicate single vel yes
processors * * *

# Domain
region reg block -20 20 -20 20 -20 20 units box
create_box 3 reg

### Setup

# Material and interaction properties required
fix m1 all property/global youngsModulus peratomtype 250 250 250
fix m2 all property/global poissonsRatio peratomtype 0.25 0.25 0.25
fix m3 all property/global coefficientRestitution peratomtypepair 3 1 0.5 1 0.5 1 1 1 1 1
fix m4 all property/global coefficientFriction peratomtypepair 3 1 0.5 1 0.5 1 1 1 1 1
fix m5 all property/global characteristicVelocity scalar 0.1

###Particle Insertion

region bc1 cylinder y 0 0 12.225 0.1 0.74 units box

fix pts1 all particletemplate/sphere 12347 atom_type 1 density constant 1.8 radius constant 0.0047
fix pts2 all particletemplate/sphere 12373 atom_type 1 density constant 1.8 radius constant 0.00345
fix pts3 all particletemplate/sphere 12377 atom_type 1 density constant 1.8 radius constant 0.00255
fix pts4 all particletemplate/sphere 12379 atom_type 1 density constant 1.8 radius constant 0.0019
fix pts5 all particletemplate/sphere 12391 atom_type 1 density constant 1.8 radius constant 0.0014
fix pts6 all particletemplate/sphere 12401 atom_type 1 density constant 1.8 radius constant 0.001
fix pts7 all particletemplate/sphere 12409 atom_type 1 density constant 1.8 radius constant 0.00075
fix pts8 all particletemplate/sphere 12413 atom_type 1 density constant 1.8 radius constant 0.00055
fix pts9 all particletemplate/sphere 12421 atom_type 1 density constant 1.8 radius constant 0.0004
fix pts10 all particletemplate/sphere 12433 atom_type 1 density constant 1.8 radius constant 0.0003
fix pts11 all particletemplate/sphere 12437 atom_type 1 density constant 1.8 radius constant 0.0002
fix pts12 all particletemplate/sphere 12451 atom_type 1 density constant 1.8 radius constant 0.00015
fix pts13 all particletemplate/sphere 12457 atom_type 1 density constant 1.8 radius constant 0.0001

fix pdd1 all particledistribution/discrete/numberbased 15485959 13 pts1 0.007 pts2 0.045 pts3 0.1004 pts4 0.1322 pts5 0.1244 pts6 0.1007 pts7 0.0794 pts8 0.0655 pts9 0.0608 pts10 0.0601 pts11 0.0556 pts12 0.0449 pts13 0.124

fix ins all insert/rate/region seed 32452843 distributiontemplate pdd1 nparticles 10000000 massrate 1.66666667 insert_every 10 overlapcheck no vel constant 0. 0. -1. region bc1 ntry_mc 10000

run 20000
unfix ins

#######################

fix cad4 all mesh/surface/stress/servo file Simulation/Top_Plate.stl type 1 scale 0.01 curvature 1e-5 com 0 0 0 ctrlPV force axis 0 -1 0 target_val 1000 vel_max 1
fix meshwalls1 all wall/gran model hooke tangential history mesh n_meshes 1 meshes cad4

unfix meshwalls1
unfix cad4

fix cad1 all mesh/surface file Simulation/Rubber_Sample.stl type 1 scale 0.01 curvature 1e-5
fix cad2 all mesh/surface/stress/servo file Simulation/Sample_Holder.stl type 1 scale 0.01 curvature 1e-5 com 0 0 0 ctrlPV force axis 0 -1 0 target_val 30 vel_max 1
fix cad3 all mesh/surface file Simulation/Soil_plate.stl type 1 scale 0.01 curvature 1e-5

fix meshwalls1 all wall/gran model hooke tangential history mesh n_meshes 1 meshes cad2

###Rotate the Soil Plate

fix movecad3 all move/mesh mesh cad3 rotate origin -0.1369 0 -0.0462 axis 0 0 1 period 38.4846

# Define the physics
pair_style gran model hooke tangential history
pair_coeff * *

###Detailed Settings

#Integrator
fix integrate all nve/sphere

#Define the Gravity
fix grav all gravity 9.81 vector 0.0 -1.0 0.0

#TimeStep

timestep 0.00000312141

#Create imaging information

dump dumpstl all stl 10000 post/dump*.stl
dump dmp all custom 10000 post/dump*.flow id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius

##Execution and further settings

#run remainder
run 2000000 upto

Daniel Queteschiner | Tue, 06/25/2019 - 09:27

Still not sure what you're expecting to see vs. what you actually get ...
However, there are a few points in your script that might cause issues.
1) you issue a run command before setting up the pair style and integrator
2) you are using 'overlapcheck no' which may result in unphysical particle overlaps introducing a lot of energy into the system
3) are you sure that you want the initial particle velocity in z-direction? (I'm asking because gravity is in y-direction)
4) the first fix wall/gran will do nothing because you are immediately unfixing it again ...