二/三维晶粒建模软件neper帮助文档学习2

neper每个模块下的例子命令

1Tessellation Module (-T)的例子

Below are some examples of use of neper -T.

1. Generate a Voronoi tessellation containing 100 cells.

$ neper -T -n 100

$ neper -V n100-id1.tess -datacellcol id -print img1

1.jpg

2. Generate a different Voronoi tessellation containing 100 cells (identifier = 2).

$ neper -T -n 100 -id 2

3. Use an elongated domain and generate a Voronoi tessellation containing 100 cells.

$ neper -T -n 100 -domain "cube(3,1,0.33)"

2.jpg

                 neper -T -n 100 -domain "cube(3,1,0.33)"

                 neper -V n100-id1.tess -datacellcol id -print img1

1.jpg

  

               neper -T -n 100 -domain "cylinder(2,4,500)"

               neper -V n100-id1.tess -showedge "cyl==0" -datacellcol id -print img1

1.jpg

            neper -T -n 1000 -domain "sphere(2,500)"

            neper -V n1000-id1.tess -showedge "polynb>1" -datacellcol id -print img1

6.jpg

               neper -T -n 100 -domain "cylinder(2,2,8)"

               neper -V n100-id1.tess -datacellcol id -print img1

1.jpg

               neper -T -n 100 -domain "sphere(2,40)"

               neper -V n100-id1.tess -datacellcol id -print img1

4. Generate a Voronoi tessellation containing 100 cells and apply regularization.

$ neper -T -n 100 -reg 1

3.jpg

5. Generate a 2D Voronoi tessellation containing 100 cells.

$ neper -T -n 100 -dim 2

4.jpg

4.jpg

                 neper -T -n 100 -dim 2 -domain "square(4,2)" -o rectangle1

                 neper -V rectangle1.tess -datacellcol id -print img1

5.jpg

                 neper -T -n 100 -dim 2 -domain "circle(3)" -o circ1

                 neper -V circ1.tess -datacellcol id -print img1

6. Generate a tessellation containing 100 cells with an x columnar axis.

$ neper -T -n 100 -morpho "columnar(x)"

1.jpg

7. Generate a tessellation containing 100 cells with a bamboo structure along x.

$ neper -T -n 100 -morpho "bamboo(x)"

1.jpg

8. Generate a tessellation containing 100 cells with experimental grain-growth morphological

properties.  gg代表 grain growth

$ neper -T -n 100 -morpho gg

1.jpg

9. Generate a tessellation containing 100 cells with experimental grain-growth morphological

properties and define groups by splitting cells based on their ids.

$ neper -T -n 100 -morpho gg -group "id<=50?1:2"

$ neper -V n100-id1.tess -datacellcol group -print img1

$ neper -V n100-id1.tess -datacellcol group -datacelltrs 0.5 -print img1

1.jpg

1.jpg10. Generate a tessellation containing 100 cells with experimental grain-growth morphological

properties and an aspect ratio of 2:1:0.5.

$ neper -T -n 100 -morpho "gg,aspratio(2,1,0.5)"

11. Generate a tessellation containing 100 cells with experimental grain-growth morphological

properties, and get the equivalent diameters and sphericities of the cells.

$ neper -T -n 100 -morpho gg -statcell diameq,sphericity

12. Generate a tessellation of specified absolute grain size distribution (the number of cells is

determined accordingly).

$ neper -T -n from_morpho -morpho

"diameq:lognormal(0.1,0.03),1-sphericity:lognormal(0.145,0.03)"

13. Generate a tessellation in a non-convex domain (by cutting the tessellation once generated).

$ neper -T -n 100 -morpho gg

-transform "cut(cylinder(1.2,0.5,0.5,0,1,0,0.4))"

14. Generate a 2-scale Voronoi tessellation containing 100 × 10 cells.

$ neper -T -n 100::10

15. Generate a 2-scale Voronoi tessellation containing 100×10 cells, with different tessellations

at scale 2 (identifier = 2) (identifier = 2).

$ neper -T -n 100::10 -id 1::2

16. Generate a 2-scale tessellation containing 10 primary cells with grain-growth morphological

properties, each one divided into lamellae of width 0.1.

$ neper -T -n 10::from_morpho -morpho "gg::lamellar(w=0.1)"

17. Generate a 2-scale Voronoi tessellation containing 10 primary cells with grain-growth mor-

phological properties, each one divided into lamellae of widths loaded from file lam_width

and plane normals loaded from file lam_normal.

$  neper -T -n 10::from_morpho -morpho "gg::lamellar(w=msfile(lam_

width),v=msfile(lam_normal))"

lam_width:

1 0.05

2 0.10

3 0.05

4 0.10

5 0.05

6 0.10

7 0.05

8 0.10

9 0.05

10 0.10

lam_normal:

1 1.000000 0.000000 0.000000

2 0.000000 1.000000 0.000000

3 1.000000 0.000000 0.000000

4 0.000000 1.000000 0.000000

5 1.000000 0.000000 0.000000

6 0.000000 1.000000 0.000000

7 1.000000 0.000000 0.000000

8 0.000000 1.000000 0.000000

9 1.000000 0.000000 0.000000

10 0.000000 1.000000 0.000000

18. Generate a 2-scale Voronoi tessellation containing 3 primary cells divided into 1, 10 and

100 secondary cells, respectively.

$ neper -T -n "3::msfile(myfile)" -id 1::1

myfile:

1 1

2 10

3 100

19. Generate a 2-scale Voronoi tessellation containing 2 × 3 cells with specific seed coordinates

at both scales (files coo1 and coo2).

$ neper -T -n 2::3 -id 1::1 \

-morphooptiini "coo:file(coo1),weight:0::coo:msfile(coo2),weight:0" \

-morpho voronoi

coo1:

0.25 0.50 0.50

0.75 0.50 0.50

coo2:

1 0.25 0.10 0.50

1 0.25 0.50 0.50

1 0.25 0.90 0.50

2 0.75 0.50 0.10

2 0.75 0.50 0.50

2 0.75 0.50 0.90

Note that coo1 is a simple position file (see Section B.4 [Position File], page 91) while coo2

is a multiscale cell file (see Section B.3 [Multiscale Cell File], page 90).

20. Generate a Voronoi tessellation containing 100 cells with uniformly distributed crystal ori-

entations and cubic crystal symmetry.

$ neper -T -n 100 -oricrysym cubic -ori uniform

21. Generate 100 uniformly distributed crystal orientations with cubic crystal symmetry (no

tessellation).

$ neper -T -n 100 -oricrysym cubic -ori uniform -for ori

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

 

 

2Meshing Module (-M)的例子

1. Mesh tessellation n100-id1.tess.

$ neper -M n100-id1.tess

2. Mesh 2D raster tessellation n100-id1.tesr.

$ neper -M n100-id1.tesr

3. Mesh tessellation n100-id1.tess with a mesh size of rcl = 0.5 and in 2nd-order elements.

$ neper -M n100-id1.tess -cl 0.5 -order 2

$ neper -V n100-id1.msh -dataelsetcol id -print msh1

1.jpg

$ neper -M n100-id1.tess -rcl 0.5 -order 2

2.jpg
3.jpg

4. Mesh tessellation n100-id1.tess with small elements for the interior cells and bigger ele-

ments for the boundary cells.

$ neper -M n100-id1.tess -rcl "body!=0?0.2:0.5"

4.jpg

5. Remesh mesh n150_def.msh (comprising poor-quality elements) into a clean, new mesh.

Transport the scalar data of file n150_def.data from the deformed mesh to the new mesh.

$ neper -M n150.tess,n150_def.msh -transport elt:real1:n150_def.data

-rcl 0.5 -o n150_new

6. Mesh tessellation n100-id1.tess and divide the mesh into 8 或 8*8 partitions (neper的编译需要用libscotch,否则不能使用-part,出现错误提示).

$ neper -M n100-id1.tess -rcl 0.4 -part 8

$ neper -M n100-id1.tess -part 8:8

7. Mesh tessellation n100-id1.tess into regular hexahedral elements (non-conformal mesh).

$ neper -M n100-id1.tess -rcl 0.5 -elttype hex

6.jpg

$ neper -M n100-id1.tess -rcl 0.2 -elttype hex

5.jpg

8. Mesh tessellation n100-id1.tess and get, for each element, its radius ratio and its volume.

$ neper -M n100-id1.tess -statelt rr,vol

9. Mesh tessellation n100-id1.tess and get the number of nodes and elements of the mesh.

$ neper -M n100-id1.tess -statmesh nodenb,eltnb 

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

 

 

3、Simulation Module (-S)的例子

Below are some examples of use of neper -S.

1. Transform an FEPX raw result directory into a simulation directory (all results).

$ neper -S fepx-simulation

2. Transform an FEPX raw result directory into a simulation directory of specified name (all

results).

$ neper -S fepx-simulation -o foo

3. Transform an FEPX raw result directory into a simulation directory of specified results:

the nodal ‘coo’ and the elemental ‘ori’.

$ neper -S fepx-simulation -noderes coo -eltres ori

4. Transform an FEPX raw result directory into a simulation directory; get all results and the

element volumes.

$ neper -S fepx-simulation -eltres inputres,vol

5. Add the nodal x and the elemental vol and stress33 results to a simulation directory.

$ neper -S simulation -noderes x -eltres vol,rr

6. Add the elemental energy result, defined as 0.1234*(crss-crss(step=0))^2, to a simu-

lation directory.

$ neper -S -eltres "energy:0.1234*(crss-crss(step=0))^2"

7. Override the elemental energy result, newly defined as 0.5678*(crss-crss(step=0))^2,

to a simulation directory.

$ neper -S -eltres ’!energy,energy:0.5678*(crss-crss(step=0))^2’

8. Add the elset stress result to a simulation directory (the stress result must exist for

elements).

$ neper -S simulation -eltres stress

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

登录后免费查看全文
立即登录
App下载
技术邻APP
工程师必备
  • 项目客服
  • 培训客服
  • 平台客服

TOP

9
1
29