Figure 12: Simple slab generated with Mesher Unlike Tarantula, mesher is a very simple mesh generator for slab-like geometries de- fined on a structured grids. The main application for mesher is to provide simple meshes for quick tests of different features of the CARP simulator. mesher generates 2D and 3D meshes that consist of triangles or quadrilaterals in the 2D case, and hexahedra or tetrahedra in the 3D case. Implementations of additional element types which are supported by CARP like pyramids and prisms will follow. ::EXAMPLE A simple example is shown below. A slab geometry with a cylindrical region in the middle is generated. Fibers are assigned to the intial plane by defining a vector and the fibers rotate 15° per millimeter. Hexahedral elements are employed to discretize the domain. The mesh generator is invoked by ./mesher +F slab.par where slab.par is the following text file: # name mesh mesh = simple_slab # define slab geometry size[0] = 2.0 size[1] = 2.0 size[2] = 0.75 # define fiber rotation rotRate = 15.0 # rotation rate in degree per millimeter # define fiber vector in initial plane fibreDir0[0] = 0.5 fibreDir0[1] = -0.87 fibreDir0[2] = 0.0 # define one region if cylindrical shape numRegions = 1 regdef[0].type = 2 # cylinder regdef[0].rad = 0.5 # radius is 0.5 cm # define main axis of cylinder regdef[0].p0[0] = 0 regdef[0].p0[1] = 0 regdef[0].p0[2] = 0 regdef[0].p1[0] = 0 regdef[0].p1[1] = 0 regdef[0].p1[2] = 0.75 # add a bath along axis 0 (x-axis) bath[0] = -0.25 # resolution along different axis resolution[0] = 250 resolution[1] = 250 resolution[2] = 250 Elem3D = 1 # generate hexahedral elements
[MESHER] . previous page . next page .