This is a refinement study application for ICEM CFD. It creates meshes from a starting geometry with successively smaller mesh sizes.

Tetra octree is used to generate the tetrahedral mesh. Prism may optionally be extruded into the tetra mesh.

Initial Geometry and Mesh

It is intended that any preparation such as geometry repairs and mesh sizes for the initial coarse mesh be first set using the full ICEM CFD interface. This includes setting prism parameters.

The .prism_params file needed for the refinement application is written to the working directory at the time of computing the prism mesh with the full ICEM CFD application interface. Or one can be composed in a text file if the keywords are known. Here is an example of a .prism_params file:

surface_file PrismDuct.tin

input_file temp_prism0.uns

output_file prism.uns

law exponential

layers 4

height 0

ratio 1.5

total_height 0

n_processors 5

first_layer_smoothing_steps 1

fillet 0.10

max_prism_angle 180

min_prism_quality 0.01

family FLUID

family BASE

family INCLINE

The surface_file, input_file, output_file, and n_processors are unnecessary since these will be written by the refinement application.

Defaults for the other parameters are set for the refinement application in the refinement/init.tcl file.

The FAMILY lines list the parts that are tagged for prism, and may also appear in this format for prism settings on individual parts:

family INCLINE height 1.0 ratio 1.2 n_layers 4

Any individual part settings will override the global settings.

If a .prism_params file is not selected, but prism is check on, then it will look to the individual part settings saved to the geometry file, and it will use the global prism setting defaults in the refinement/init.tcl file.

Quality and errors as well as possible problems should be checked first in the full interface to ensure there are no serious problems in the initial coarse mesh from the starting geometry.

The mesh sizes are saved to the geometry when setting up the initial coarse mesh.

File locations

All files, except the solver input files will be written to the working directory. This is either the directory that the application was launched in, or it is changed using "File->Set working directory."

There is a folder icon in the application to set the directory for the solver files, or it is set with the data(solvedir) variable in refinement/init.tcl or with the solvedir variable in the text file written when using "File->save application parameters" in preparation for a batch run.

Refinement Factor

This is a divider of mesh sizes for each successive mesh. It is an exponential stepping by default but can be set to linear with the data(refinelaw) variable in the refinement/init.tcl file or with the refinelaw variable in the text file written when using "File->save application parameters" in preparation for a batch run.

The following are examples of the scaling factor multiplied by mesh sizes for each successive mesh for a refinement factor of 2:

exponential:

1/2, 1/4, 1/8, 1/16... (multiply refinement factor by denominator)

linear:

1/2, 1/4, 1/6, 1/8... (add refinement factor to denominator)

Number of refinements

This is the total number of refined meshes to make, each successively smaller in mesh size. It does not include the initial coarse mesh if this is chosen to be remeshed. A number of 2 will produce 3 meshes if the "Compute initial coarse mesh" is checked on.

Smoothing

The "min quality" number specified in the refinement application uses the "Quality" criterion as seen in the full ICEM CFD interface.

Allow node merging

This option is done during smoothing and is also seen in the full ICEM CFD interface. It allows merging of nodes for the smallest edge of tetra and tri elements that have a high aspect ratio.

Quality Checking

By default, 2 quality checks are done every time the quality is checked. These are the "Quality" and "Aspect ratio" and can be changed or added to as a list in the data(qualitymetrics) variable in refinement/init.tcl or the qualitymetrics variable in the text file written when using "File->save application parameters" in preparation for a batch run.

Error and Possible Problem Checking

Whereever possible, automatic fixes have been utilized.

Uncovered faces will result in triangles being created in the part UNCOVERED_FACES.

Missing internal faces will result in triangles being created in the part MISSING_INTERNAL_FACES.

Any possible problems which are not a fatal error will be put into a subset, and the mesh will be saved for viewing in the full ICEM CFD interface.

A blue message will be printed when this happens giving the mesh file name. Load the mesh and view mesh subsets and the 2 above mentioned parts for problems.

Adjust prism heights with refinement factor

Checking this option will mulitply prism heights for each successive mesh by the same scale factor computed from the Refinement Factor.

Adjust number of layers for total thickness less than 0.25 max tet size

If this option is checked, it will find the largest tetra volume element, and compute the edge length of that element assuming it is equilateral on it sides and all angles are 60 degrees. If the total thickness of the prism layers on any part is more than 25% of this, then the prism parameters on that part will be changed so as to remove only as many layers as neccessary to be smaller than the 25% distance. Height and ratio must be nonzero.

Running in Batch

To run in batch from a parameter file, insert -batch before -app when launching and append the file

name after "refinement" (at the end).

The format will take one of these forms depending on how it was installed (see README.txt).

icemcfd -batch -app full-path-to-refinement-folder params_file

icemcfd -batch -app refinement params_file

The parameter file can be written out from the GUI (File->Save application parameters), or can be made up of

any of the variables in the ::Refinement namespace at the beginning of refinement/init.tcl

The -batch argument is only needed on Windows if you want to see messages printed.

It will probably be necessary to rename paths for file locations or use relative paths by removing all directory names and leaving only the file names in the text file written with "File->Save application parameters." (variables: dir, geomfile, prismparamsfile, solvedir)