Meshing Functions

ic_run_tetra tetin uncut_dom args

Runs tetra in batch mode, using the given tetin and uncut_domain files. The full path names must be given. One or more arguments may be given. These arguments are:

  • tradeofftype: the type is either space or time

  • loglogfile : the file to write stdout to

ic_write_fieldmesher_params_xml_file working_dir input_mesh output_mesh tetin_file meshing_controls global_maxsize global_minsize global_growthrate smoothing_level use_fluent hexacore inflation last_layer_aspect n_ortho_layers fix_first_layer enhance_norm_comp enhance_offset_comp gap_factor max_cap_skew max_cell_skew frozen_volumes debug interactive

Creates an XML file that defines the input parameters for the Python FieldMesher controller module. Returns the XML file name.

ic_run_fieldmesher inpfile outfile args

Runs the FieldMesher executable in batch mode, using the given arglist which is of the form [list options inputfile outputfile]. The full path names for inputfile and outputfile must be given.

ic_run_tri2tet inpfile outfile args

Runs tri2tet in batch mode, using the given arglist which is of the form [list optionsinputfileoutputfile]. The full path names for inputfile and outputfile must be given.

ic_run_afmesh inpfile outfile args

Runs the advancing front mesher in batch mode, using the given arglist which is of the form [list optionsinputfileoutputfile]. The full path names for inputfile and outputfile must be given.

ic_run_tgrid inpfile outfile args

Runs the Fluent Meshing mesher in batch mode, using the given arglist which is of the form [list optionsinputfileoutputfile]. The full path names for inputfile and outputfile must be given.

ic_run_cutter tetin uncut_dom cut_dom args

Runs the cutter, using an existing tetin file and uncut_domain produced by tetra. One or more arguments may be given. These arguments are:

  • saveallon : if on is 1 (the default) then all elements will be saved, otherwise selected families

  • savefamsf1f2 ... : the families to save if the saveall option is 0

  • whichtype : either volume (the default) or surface

  • fix_nonmanon : if on is 1 then fix non-manifold vertices, otherwise not

  • autovol0 | 1 : disables (or enables) automatic assignment of a material to unassigned tetrahedra. (D = 0)

  • loglogfile : the file to write stdout to


Note:  You cannot run cutter unless you load a tetin file first


ic_run_prism tetin cut_dom prism_dom args

Runs the prism mesher, using an existing tetin file and domain file cut_dom produced by cutter. A new domain file prism_dom will be created.

The parameter tetin is mandatory. If no geometry file should be used, the first argument has to be empty quotes:

  • ic_run_prism "" cut_domargs

One or more arguments may be given. Arguments, default values [...], and optional values /.../ are listed below:

  • layers [3]

  • height [0.2]

  • ratio [1.0] All families will be used for prism as a default. You can define list of families:

  • family {fam_name fam_name ...} Or you can specify the list with different height and/or ratio for selected families: In both cases parameters height and ratio will be used as defaults.

  • family {{fam_name height 0.35} {fam_name height 0.3 ratio 1.1} ...}

  • n_triangle_smoothing_steps [5]

  • n_tetra_smoothing_steps [10]

  • ortho_weight [0.5]

  • total_height []

  • max_aspect_ratio []

  • prism_height_limit []

  • triangle_quality [inscribed_ratio] /laplace height_over_base skewness min_angle max_angle inscribed_area/

  • max_prism_angle [180]

  • fillet [0.1]

  • law [exponential] /linear/wb-exponential

  • into_orphan 0

  • new_volume []

  • side_family []

  • top_family []

  • smoothing_steps [6]

  • min_prism_quality [0.01]

  • max_binary_tetin [0]

  • use_prism_v10 [0]

Example usage: ic_run_prism $tetin $domain $new_domain layers 5 height 0.33 family {TOP {WALLS height 0.44} BOTTOM}


Note:
  • Specifying “use_prism_v10 1” starts the prism 10.0 version instead of the current version.

  • The parameter tetin is mandatory. If no geometry file is used, the first argument has to be empty quotes.

    • ic_run_prism "" cut_domargs


ic_run_hexa tetin blocking replay proj_dir [""] domains_dir [""] mesh_dir [""]

Runs the hexa mesher in batch mode, using the given tetin file and blocking, which may be "" to start with no blocking, and replay file which will be used as the standard input. The project directory should be given as proj_dir.

ic_run_frontal args

Runs frontal in batch mode, using the given tetin file. The full path name must be given. One or more arguments may be given. These arguments are:

  • dirxyz: the xyz argument is a list of 3 numbers that determines what direction we are looking

  • toltol: the tolerance to use

  • curvecurvefile : the curve file to write

ic_application_terminate

Kills the current running application.

ic_quad args

Free surface meshing by the extended splitting line algorithm. The arguments come in keyword value pairs. Possible options are:

  • namevalue: Name of the mapping

  • q1/2/3/4/5:

    • 1 = loop(s) from loop entities (default)

    • 11 = loop(s) from surface entities

    • 2 = loop from bar elements

    • 3 = loop from subset of bar elements

    • 4 = single loop from surface elements

    • 5 = single loop from surface elements, replace old elements if new elements have higher quality, work only on free surface nodes

    • -1 = loop(s) from loop entities, create bar elements only

  • h1/2/3/4: Ignore holes if 1, mesh only holes if 2, mesh hull of surface elements if 3, or mesh gaps of surface elements if 4. The default is 0.

  • element1/2/3/4/5: If set to 4, every loop must have an even number of nodes on the edges in order to form an all-quadrilateral QUAD_4 mesh. This constraint will be automatically satisfied by creating an even number of nodes on each curve, or it will be dropped if the creation of one (option 1) or several (option 2) TRI_3 transition triangles is accepted. The meshing scheme can also generate TRI_3 triangle surface meshes (option 3), TRI_3 STL-like facets (option 5), structured QUAD_4 grids (option 6), and TRI_3 split STL facets (option 7). The default is 4.

  • innervalue: Preferred interior element size if > 0. Take from surface parameters if -1. The default is 0.

  • offsetn: Create n layers of offset elements. The default is 0. Argument "curve_family" can be used to limit offsetting to this family. A negative value will be only applied to curves with a given height parameter.

  • offset_hvalue: Relative value for the offset height. The default is 1. Use -1 to apply the curve parameters.

  • devvalue: Refine mesh up to three times to reduce surface deviation. Value defines the maximum surface deviation if not 0. The default is 0.

  • proj0/1: Project the new nodes onto the CAD surfaces if 1, or onto an isoparametric quadratic interpolation surface if 2. The default is 0.

  • itersmaximum: The mesh quality can be improved if additional smoothing steps are performed. With this option set, a pure Laplacian smoothing is used in which each interior node is moved to the centroid of its neighbors. In typical cases smoothing will converge after about six steps. The default maximum number of steps is 20. No complaints about inaccuracy if negative.

  • convervalue: The smoothing accuracy defines a convergence value which is related to the element sizes. The default value is 0.025. Uses an activity control for better performance if negative.

  • b_smooth0/1 : Smooth boundaries if 1. The default is 0.

  • improvement0/1/2/3 : Allow advanced improvement operations (node and element elimination, diagonal swapping, element merging and splitting, etc.) if set. The default is 0.

  • violatevalue : Allow a node to move off the surface by this value. The default is 0.

  • merge_tolvalue: Merge tolerance related to element size. The default is 0.1.

  • ele_tolvalue : The default element tolerance is 0. Set this violate geometry value to remove tiny elements, holes and loops. Given bunching will be protected if < 0.

  • boundary_tolvalue: The default boundary tolerance is -1. The mesher then applies above ele_tol on the boundary. Set this value in case you want to have an independent violate geometry tolerance for the boundary elements.

  • geo_tolvalue: The default looping tolerance is 0, which means that curves are only connected via identical endpoints. Set this value to enable free surface meshing to calculate the loop topology of inexact curves.

  • bunch0/1: Use node bunching from BAR_2 elements on curves if 1. The default is 0.

  • curve_familyname: Use curves from this family to define a virtual loop.

  • curve_family_2name: Use also curves from this family to define a virtual loop but never associate BAR_2 elements to these curves.

  • error_familyname : Move failed loops to this family.

  • offset_element_familyname: Move offset elements to this family.

  • materialname: Label new elements with this family name.

  • time_maxlimit: Stop the mesher if time limit has been exceeded. Default is infinite seconds.

  • ele_maxlimit: Stop the mesher if the element limit has been exceeded. Default is infinite number of elements.

  • try_twice0/1/-n: Try simple triangulation if 1 and meshing fails. First try simple triangulation and then retry without holes if 2. The default is 1. A negative value n limits simple triangulation to loops with number of nodes <= n. (for element type 2 and 3 only)

  • loopsnames: List of selected loops. The default is to mesh all loops.

  • blockvalue: Create a structured mesh instead of an unstructured up to this block quality if value > 0. The default value is 0. A suitable choice for hybrid meshes would be 0.2.

  • adjust_nodesvalue: Recompute number of nodes on edges such that all structured loops can be map meshed if set. Smooth nodes if > 1. The default value is 0.

  • adjust_nodes_maxvalue: Relative limit for node adjustment. The default value is 0.5 so that only those edges are adjusted where a maximum of 50% of the nodes need to be removed.

  • ignore_tp0/1: Ignore location of topological curve end points if set. The default value is 0.

  • board0/1 : Run improved meshing scheme for boards with many holes if set. The default value is 0.

  • complete_edges0/1/2: Complete missing edges in boundary loop if 1. 2 allows more than one loop from bar elements (q = 2 or 3). Broken loops are ignored. The default value is 0.

  • geo_id0/1: Create elements with family name of nearest surface if set. The default value is 0.

  • enn0/1: Estimated number of nodes if set. The default value is 0.

  • dormant0/1: Merge loops at dormant curves if set. The default value is 0.

  • patternvalue: Improve element pattern up to this angle if > 0. The default value is 150 degree.

  • simple_offset0/1: Do simple normal offsetting if set. The default value is 0.

  • four0/1: Force four-quad patterns at prescribed points if set. The default value is 0.

  • max_areavalue: Maximum element area if set. The default is 0.

  • max_lengthvalue : Maximum edge length if set. The default is 0.

  • min_anglevalue: Minimum angle if set. The default is 0.

  • max_nodesvalue: Maximum number of nodes if set. The default is 0.

  • max_elementsvalue: Maximum number of elements if set. The default is 0.

  • n_threadsvalue: Number of threads. The default is 0.

  • freeb0/1: Allow free bunching for patch independent surfaces if set. The default is 0.

  • snorm0/1: Orient elements to surface normals if set. The default is 0.

  • shape0/1: Element shape function, 0 is linear and 1 is quadratic. The default is 0.

ic_quad_from_geometry what entities element [4] proj [0] iters [20] conver [0.025] tol [0.1] ele_tol [0] dev [0] improvement [0] block [0] bunch [1] violate [0] debug [0] adjust_nodes [0] adjust_nodes_max [0.5] max_point_dist [10] try_harder [0] even_if_dormant [1] offset [-1] error_subset [Failed_surfaces] pattern [150] big [1] board [0] remove_old [-1] inner [0] simple_offset [0] split_tri [0]

Free surface meshing from geometry. This option creates and deletes its own loops used in the Quad mesher. Provided for backward compatibility. Use ic_quad2 instead.

  • what: Can be "surfaces" (creates a loop per surface), "native_surfaces (directly meshes each surface), "connected_surfaces" (creates a loop per connected surfaces), "surface_group" (list of surfaces, where the list of surfaces becomes one loop), "curves" (list of curves becomes a loop), or "curves_only" (list of curves to be meshed with bar elements).

  • entities: List as described in "what".

  • element: See ic_quad description for element.

  • proj : See ic_quad description for proj.

  • iters: See ic_quad description for iters.

  • conver: See ic_quad description for conver.

  • b_smooth: See ic_quad description for b_smooth.

  • tol: See ic_quad description for geo_tol.

  • ele_tol: See ic_quad description for ele_tol.

  • dev: See ic_quad description for dev.

  • improvement: See ic_quad description for improvement.

  • block: See ic_quad description for block.

  • bunch: See ic_quad description for bunch.

  • violate: See ic_quad description for violate.

  • adjust_nodes: See ic_quad description for adjust_nodes.

  • adjust_nodes_max: See ic_quad description for adjust_nodes_max.

  • max_point_dist: For backward compatibility.

  • try_harder0/3: Try harder if > 0 and meshing fails (0 = just run the Quad mesher, 1 = try simple triangulation (for element type 2 and 3 only), 2 = try 1 and retry without merging at dormant curves, 3 = try 1 and/or Tetra mesher, and then retry 2). The default is 0.

  • even_if_dormant0/1: Use curves even if they are dormant. The default is 1.

  • offsetn: Create offset elements on curves with a given height parameter if -1. This is the default.

  • patternvalue: Improve element pattern up to this angle if > 0. The default value is 150 degree.

  • big0/1: Undo/redo will be available for each meshing step if 0. Just one undo/redo is stored for 1. The default value is 1.

  • board0/1 : Run improved meshing scheme for boards with many holes if set. The default value is 0.

  • remove_old-1/0/1: Remove old elements if 1, do not remove any elements if 0, use an automatic approach if -1. The default value is -1.

  • inner: See ic_quad description for inner.

  • simple_offset: See ic_quad description for simple_offset.

ic_quad2 args

Free surface meshing from geometry.

ic_quad_debug db [0]

Set Quad debug level.

ic_quad_from_elements name element [4] proj [0] remesh [0] iters [20] conver [0.025] tol [0.1] ele_tol [0] dev [0] db [0] make_consistent [0] offset [0] offset_h [1] keep_fixed_nodes [0] inner [0] material [""] geo_id [0] simple_offset [0]

Free surface meshing from elements.

  • name: Name of the mapping.

  • element: If set to 4, every loop must have an even number of nodes on the edges in order to form an all-quadrilateral QUAD_4 mesh. This constraint can be dropped if the creation of one (option 1) or several (option 2) TRI_3 transition triangles is accepted. The meshing scheme can also generate TRI_3 triangle surface meshes (option 3) and TRI_3 STL-like facets (option 5). The default is 4.

  • proj: Project the new nodes onto the CAD surfaces if 1. The default is 0.

  • remesh: Ignore holes if 1, mesh only holes if 2, mesh hull of surface elements if 3, or mesh gaps of surface elements if 4. The default is 0.

  • iters: The mesh quality can be improved if additional smoothing steps are performed. With this option set, a pure Laplacian smoothing is used in which each interior node is moved to the centroid of its neighbors. In typical cases smoothing will converge after about six steps. The default maximum number of steps is 20.

  • conver: The smoothing accuracy defines a convergence value which is related to the element sizes. The default value is 0.025.

  • tol: Merge tolerance related to element size. The default is 0.1.

  • ele_tol: The default element tolerance is 0. Set this violate geometry value to remove tiny elements or holes.

  • dev: Refine mesh up to three times to reduce surface deviation. Value defines the maximum surface deviation if not 0. The default is 0.

  • db: Do some checking and printing if > 0, print less messages if < 0. Default is 0.

  • make_consistent : Make volume mesh consistent if set. The default value is 0.

  • offset: Create n layers of offset elements. The default is 0.

  • offset_h: Relative value for the offset height. The default is 1.

  • keep_fixed_nodes: Keep fixed nodes if set. The default is 0.

  • inner: Preferred interior element size if > 0. The default is 0.

  • materialname: Label new elements with this family name.

  • geo_id0/1: Create elements with family name of nearest surface if set. The default value is 0.

  • simple_offset0/1: Do simple normal offsetting if set. The default value is 0.

ic_quad_from_bars name element [4] proj [0] iters [20] conver [0.025] improvement [0] surf [0] complete [0] ele_tol [0] dev [0] db [0] make_consistent [0]

Quad from bars.

ic_quad_mesh_surface_from_edge_mesh sname

Given a surface name sname create a quad mesh from the existing edge mesh on its boundary. Example usage: ic_uns_quad_mesh_surface_from_edge_mesh E43457

ic_quad_from_loops name element proj iters conver improvement bunch loopnames tol etol fam dev db violate [0] offset [0] offset_h [1] offset_element_family [""] block [0] inner [0] boundary_tol [-1] adjust_nodes [0] board [0] ignore_tp [0] adjust_nodes_max [1] enn [0] dormant [0] pattern [0] b_smooth [0]

Quad from loops.

ic_smooth_quad name proj [0] iters [20] conver [0.025] improvement [0] type [4] w [0] b_smooth [0] debug [0] n_threads [0] unique [0] diagnostic [""] max_aspect_ratio [-1] w_transition [0] w_first [0] h_first [0] untangle [1]

Smooth surface elements. By default, any free surface node is moved to the centroid of its neighbors (Laplacian method).

ic_smooth_hexa name proj [0] iters [20] conver [0.025] w [0] debug [0] n_threads [0] unique [0] diagnostic [""]

Smooth volume elements. By default, any free surface node is moved to the centroid of its neighbors (Laplacian method).

ic_remesh_edges name tol merge_ends mtol [0] db [0]

Remesh edges.

ic_remesh_bad_elements name element [3] proj [0] db [0] all_dim [0] max_steps [-1] quality [1] angle [0] ele_tol [0] inner [0] diagnostic [Custom quality] material [""] aggressive [0]

Remesh bad elements.

ic_quad_remesh_bad_elements_by_quality fams types metric quality_limit [0.6] eltype [2] ignore_dim [0]

Remesh regions of a surface mesh by a diagnostic. It will return 1 if it performed remeshing, 0 if it was already okay.

ic_quad_remesh_by_diagnostic diagnostic fams types nlayers eltype [2] ignore_dim [0] custom_metric_weights [""]

Remesh regions of a surface mesh by a diagnostic. It will return 1 if it performed remeshing, 0 if it was already okay.

ic_enforce_vertex name element [3] proj [0] db [0] all_dim [0] vertex [-1] make_consistent [0]

Enforce vertex in surface mesh. The map should include just one node element to provide the vertex to be enforced, or the vertex number must be >= 0.

ic_change_tri_quad_2 name proj [0] db [0] all_dim [0] max_steps [-1] skew [160] warp [20] quadrization [0] diagnostic [Angle error]

Change tri to quad elements (new scheme).

ic_quad_offset_curve_layers how which n_layers [""]

Offset quad layers on the loaded surface mesh. how can be one of { curve_family, curve, map } while which would be a curve_family, curve_names (list), or map_name respectively. If n_layers is not specified, it will try getting the value from the tetin parameters.

ic_mesh_hexcart args

Cartesian hexa mesher.

ic_hexcart_shrinkwrap tetin_file minsize proj_fact [0.3] nsmooth [5] fam [inherited] force_load [0] mtype [0] batch [1]

Run Cartesian shrinkwrap.

ic_hexcart_body_fitted tetin_file minsize parts args

Create body-fitted Cartesian mesh. If there are more than one part then run part by part.

ic_hexcart_bfcart_inflation

Run BFCart based post inflation for all hex mesh.

ic_mesh_hexdom family remesh [0]

Run Hex-Dominant mesher.

ic_run_mapped_based_mesher type [Quad Dominant] surfs [""] min_edge [0] mode [""] no_merge [1] version [100]

Runs mapped based mesher type is type of mesh desired options are "All Quad", "Quad w/one Tri", "Quad Dominant", "All Tri", "Tri (STL like)" Default is "Quad Dominant" surfs is surfaces to mesh, default is all surfaces min_edge is minimum edge length allowed in mesh; default is 0.