AcuSurf

Extract external surfaces of a mesh, for imposing boundary conditions.

Syntax

acuSurf [options]

Type

AcuSolve Preparatory Program

Description

AcuSurf is a simple utility program that extracts and organizes all external surfaces of a mesh. The generated surface files may be used in the input file for element boundary conditions, surface output, and so on.

The surfaces are collected based on their parent connectivity file, surface shape, and neighboring angles. The collections are written in files problem.srfindex; where index is an index starting from 1 to the number of surface sets. Note that disconnected surfaces are stored in different files.

The algorithm used by AcuSurf is as follows. It first traverses through all element surfaces and collects only those surfaces with elements on one side. These surfaces are the external or boundary surfaces. All surfaces that have elements on both sides are internal surfaces, and hence are not considered.

The algorithm then traverses through the surfaces given in surface_file_list files. Each boundary surface found in these files is tagged as it is read.

It then traverses through the "partial" surfaces given in partial_surface_file_list files. These files must contain surfaces without the parent element numbers. Similar to the surface_file_list case, the boundary surfaces found in these files are tagged as they are read. In addition, the surfaces including the parent element numbers are written in the surface files file.index where file is the original file name; and index is the index of the parent connectivity file starting from 1 in the order specified in connectivity_file_list.

It then traverses through the surface node sets given in surface_node_file_list files. These files must contain the list of nodes on the boundary. For each file, the nodes of each boundary surface are checked against the node list. If all surface nodes are present, the surface is tagged as it is read and is written into the file file.index_shape, where file is the node set file name, index is the index of the parent connectivity file starting from 1 in the order specified in connectivity_file_list, and shape is either tri3, quad4, or tri6.

Finally, if auto_generate_surfaces flag is set, it randomly selects one surface from the non-tagged boundary surface, which starts a new surface set. It then recursively traverses through the neighbors of the selected surfaces. If a neighbor has the same surface shape, that is, 3-node triangle, 4-node quadrilateral, or 6-node triangle, comes from the same connectivity file, and its outward normal direction has an angle less than or equal to max_angle, the neighbor is added to the surface set. If no other surface qualifies to be added to the surface set, then a new non-tagged surface is chosen and the process is repeated.

Choice of the max_angle can significantly affect the collection process. A max_angle of 0 only admits elements that fall exactly on a plane, whereas a max_angle of 180 gives one surface set for each connected set of surfaces with the same shape and parent connectivity file.

This utility also determines whether or not the mesh is constructed by a two dimensional mesh extracted into a third dimension. If so, it determines the axis of extrusion. Any external surface that is perpendicular to this axis is ignored, unless -no_c2d is set, in which case no external surface is ignored. For convenience, AcuSurf also determines the extruded node pairs, which are output in the file problem.pbc. This file is suitable for the nodes parameter of the PERIODIC_BOUNDARY_CONDITION command.

In the following, the full name of each option is followed by its abbreviated name and its type. For a general description of option specifications, see Command Line Options and Configuration Files. See below for more individual option details:

help or h (boolean)
If set, the program prints a usage message and exits. The usage message includes all available options, their current values, and the place where each option is set.
problem or pb (string)
The name of the problem is specified via this option. This name is used to generate input file names and extracted surface file names.
coordinates_file or crd (string)
Nodal coordinates file name. The file must contain four columns: node number and x, y, z coordinates. If coordinates_file is set to _auto, problem.crd and problem.crd.B are assumed.
connectivity_file_list or cnn (string)
Comma-separated list of connectivity files. The shape of the elements is extracted from the number of columns in each file. The elements are assumed to be 4-node tetrahedra if the file has 5 columns; 5-node pyramids if 6 columns; 6-node wedges if 7 columns; 8-node bricks if 9 columns; and 10-node tetrahedra if 11 columns. If connectivity_file_list is set to _auto, all problem*.cnn and problem*.cnn.B files are used.
surface_file_list or srf (string)
Comma-separated list of surface files. The shape of the surfaces is extracted from the number of columns in each file. The surfaces are assumed to be 3-node triangles if the file has 5 columns; 4-node quads if 6 columns; and 6-node triangles if 8 columns. The surfaces in these files are removed from the generated surface files. If surface_file_list is set to _none, no surface file is read. If surface_file_list is set to _auto, then problem*.srf, problem*.srf.B, problem*.ebc, and problem*.ebc.B are used.
partial_surface_file_list or psrf (string)
Comma-separated list of surface files, without the parent element numbers. The shape of the surfaces is extracted from the number of columns in each file. The surfaces are assumed to be 3-node triangles if the file has 4 columns; 4-node quads if 5 columns; and 6-node triangles if 7 columns. The boundary surfaces of each file are written in files file.index, where file is the original file name; and index is the index of the parent connectivity file starting from 1 in the order specified in connectivity_file_list. The generated files contain the parent element numbers, which are needed by all ACUSIM programs. All surfaces in these files are removed from the generated surface files. If partial_surface_file_list is set to _none, no surface file is read.
surface_node_file_list or node (string)
Comma-separated list of surface node files. The boundary surfaces of each connectivity file are searched for the nodes in each of these files. If any boundary surface is found, a surface file is created with the name file.index_shape, where file is the node file name; index is the index of the parent connectivity file starting from 1 in the order specified in connectivity_file_list; and shape is either tri3, quad4, or tri6. All extracted surfaces are removed from the generated surface files. If surface_node_file_list is set to _none, no node file is read. If surface_node_file_list is set to _auto, then problem*.nbc and problem*.nbc.B are used.
auto_generate_surfaces or asrf (boolean)
Output boundary surfaces that are not processed due to parameters surface_file_list, partial_surface_file_list, and surface_node_file_list.
max_angle or angle (real)
This option specifies the maximum angle allowed between two adjacent surfaces in order to be considered as part of the same surface set. max_angle must be between 0 and 180 degrees. If max_angle is set to 0, surfaces that fall on a flat plane, and have the same shape and parent connectivity file are collected together. If max_angle is set to 180, all connected surfaces of the same shape and parent connectivity are collected together.
output_surface_nodes or onod (boolean)
Generate a nodal list for every surface file. The nodes of the surfaces are written in surface_file.nod; where surface_file is the name of the surface file.
check_2d_mesh or c2d (boolean)
Do not generate surfaces for the 2D planes of a 2D mesh.
verbose or v (integer)
Set the verbose level for printing information to the screen. Each higher verbose level prints more information. If verbose is set to 0, or less, only warning and error messages are printed. If verbose is set to 1, basic processing information is printed in addition to warning and error messages. This level is recommended. verbose levels greater than 1 provide information useful only for debugging.

Examples

Consider the mesh of the channel problem. AcuSurf may be executed as:
acuSurf -pb channel -angle 10
or alternatively the options may be put into the configuration file Acusim.cnf as follows:
problem = channel
max_angle = 10
and AcuSurf invoked as
acuSurf
The above example produces four surface sets, stored in files channel.srf1 through channel.srf4, and four node sets, stored in files channel.srf1.nod through channel.srf4.nod. Whereas,
acuSurf -pb channel -angle 91

produces a single surface file channel.srf1 containing all the surfaces, plus its nodes in the -channel.srf1.nod file.

In another example, assume you have the inflow surface file channel.inflow.srf, then:
acuSurf -pb channel -srf channel.inflow.srf

produces the files channel.srf1 through channel.srf3 (plus their nodal files). These files do not contain any of the surfaces in channel.inflow.srf. The file channel.inflow.srf.nod is also generated.

In another example, assume you have the inflow surfaces without the parent element number in the partial file channel.inflow.psrf, then
acuSurf -pb channel -psrf channel.inflow.psrf

produces the files channel.srf1 through channel.srf3, the file channel.inflow.psrf.1, which is the inflow surface file channel.inflow.psrf including the parent element number for the first connectivity file, plus the nodal files channel.srf1.nod through channel.inflow.psrf.1.nod.

In another example, assume you have a list of inflow nodes in the file channel.inflow.nodes, then
acuSurf -pb channel -node channel.inflow.nodes

produces the files channel.srf through channel.srf3, channel.inflow.nodes.1_quad4 containing the inflow surfaces for the first connectivity file, plus the nodal files.

To prevent the nodal files to be generated, issue the command with -no_onod option, or place
output_surface_nodes= FALSE
in the Acusim.cnf configuration file.