Info : Meshing surface 151 (Plane, Frontal-Delaunay) Info : Meshing surface 150 (Surface, Frontal-Delaunay) Info : Meshing surface 146 (Surface, Frontal-Delaunay) Info : Meshing surface 142 (Surface, Frontal-Delaunay) Info : Meshing surface 138 (Surface, Frontal-Delaunay) Info : Meshing surface 127 (Plane, Frontal-Delaunay) Info : Meshing surface 125 (Plane, Frontal-Delaunay) Info : Meshing surface 123 (Plane, Frontal-Delaunay) Info : Meshing surface 121 (Plane, Frontal-Delaunay) Info : Meshing surface 119 (Plane, Frontal-Delaunay) Info : Meshing surface 17 (Plane, Frontal-Delaunay) Info : Meshing surface 12 (Plane, Frontal-Delaunay) Info : Meshing surface 11 (Plane, Frontal-Delaunay) Info : Meshing surface 1 (Plane, Frontal-Delaunay) We group volumes 129 and 130 in a single physical group with tag 1 and name "The volume": (3,, 1) We finish by synchronizing the data from the built-in CAD kernel with the Gmsh model: () Mesh sizes associated to geometrical points can be set by passing a vector of (dim, tag) pairs for the corresponding points: .setSize([(0,103), (0,105), (0,109), (0,102), (0,28), As expected, the function takes a vector of (dim, tag) pairs as input as well as the translation vector, and returns a vector of (dim, tag) pairs as output: ov2 = (], 0, 0, 0.12) 6-element Array: For example, the following command extrudes the surface 11 along the z axis and automatically creates a new volume (as well as all the needed points, curves and surfaces). When a volume can be extruded from a surface, it is usually easier to use the extrude() function directly instead of creating all the points, curves and surfaces by hand. We would like to retrieve the coordinates of point 5 to create point 103, so we synchronize the model, and use getValue() () The following volume does not have holes and thus consists of a single surface loop: (0., 0.3, 0.12, lc, 100) In the same way one defines curve loops to build surfaces, one has to define surface loops (i.e. Volumes are the fourth type of elementary entities in Gmsh. (ov, 0.12, 0, 0) println("New surfaces ", ov, " and ", ov) New surfaces 12 and 17 In the same way, we can translate copies of the two surfaces 1 and 11 to the right with the following command: ov = () The new point tag is available in ov, and can be used to create new lines: (3, ov, 7) Point 3 can be duplicated and translated by 0.05 along the y axis by using the copy() function, which takes a vector of (dim, tag) pairs as input, and returns another vector of (dim, tag) pairs: ov = () Note that there are no units in Gmsh: coordinates are just numbers - it's up to the user to associate a meaning to them. For example, the point 5 (dimension=0, tag=5) can be moved by 0.02 to the left (dx=-0.02, dy=0, dz=0) with (, -0.02, 0, 0)Īnd it can be further rotated by -Pi/4 around (0, 0.3, 0) (with the rotation along the z axis) with: (, 0,0.3,0, 0,0,1, -pi/4) Geometrical transformations take a vector of pairs of integers as first argument, which contains the list of entities, represented by (dimension, tag) pairs. 4, 0, lc, 5)īut Gmsh also provides tools to transform (translate, rotate, etc.) elementary entities or copies of elementary entities. We can then add new points and curves in the same way as we did in t1.jl: (0. If ARGS is passed to gmsh.initialize(), Gmsh will parse the command line in the same way as the standalone Gmsh app: gmsh.initialize(append!(, ARGS)) ("t2") Edit on GitHub Tutorial 2 Transformations, extruded geometries, volumes import gmsh
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |