# Appendix

## Mesh Size Expressions

The table below contains all valid operators that can be used in mesh size expressions. The examples below show the usage of some of these operators for setting mesh sizes. Note that the function "if.." will evaluate all three expressions, so expressions like if ( x !=0.0,1/x, 0.0) may cause divide by zero error on some architectures. The following is a set of examples demonstrating the use of expressions.

## Example 1

Set the mesh size so that if x is greater than 0, the size should be 0.1, otherwise it should be 0.5.
value = if (x>0,
0.1,
0.5)

## Example 2

Mesh size depends on the x, y and z location and the size itself is an expression.
value = if( x > 3.0,
if( y < 10,
if( z > 2,
5 * exp( -z),
10 * exp( -z)
),
10 * tanh( y )),
20 * tanh( y ))

## Example 3

Set the mesh size for an external flow.

wPow = 0.4

gr = 0.4

sFar = 1.0

sNear = 0.1

nfRat = 1.5

rad = sqrt( xf^2 + xw^2 )

wake = abs( xw) / ((1+abs(xf)) ^wPow)

Supported Operators Function
! Logical Negation
- Negation
* Multiplication
/ Division
> Greater than
< Less than
>

-

Greater than equal to
<

-

Less than equal to
== Logical equal to
= Logical not equal to
abs(expression) Absolute value
cos(scalar expr) Cosine value
sin(scalar expr) Sine value
tan(scalar expr) Tangent value
acos(scalar expr) Cosine inverse value
asin(scalar expr) Sine inverse value
atan (scalar expr) Tangent inverse value
exp(scalar expr) Exponent
log(scalar expr) Logarithmic value
In(scalar expr) Natural log
sqrt(scalar expr) Square root value
cosh(scalar expr) Hyperbolic cosine value
sinh(scalar expr) Hyperbolic sine value
tanh(scalar expr) Hyperbolic tangent value
step(scalar expr) If expr < 0,0, else 1
stepT(expr1, expr2) If expr1 < expr 2, 0 else 1
min(expr1, expr2) Minimum of expr 1 and expr 2
max(expr1, expr2) Maximum of expr 1 and expr 2
if(cond, expl, exp2) If cond true, exp1 else exp2
sWake= sNear
sTrans= sNear + ( rad - 1 ) / (nfRat -1 ) * ( sFar - sNear )
sWTrans= sWake + ( wake -1 ) / ( nfRat -1 ) * ( sFar - sWake )
value = if( rad <= 1.0,
sNear,
if( xf < 0,
if( rad <= nfRat, sTrans, sFar ),
if( wake <= 1,
sWake,
if( wake <= nfRat, sWrans, sFar )
)
)
)

## AcuMeshSim Input File

The AcuMeshSim input file has an extension .ams. This file, along with the CAD data that is written into CAD.DIR, is created by AcuConsole. When AcuMeshSim is executed, the .ams file is read and processed. Like any other Acusim program, executing AcuMeshSim -h from the command line shows the usage and command line options. The .ams file is an .xml file with different elements corresponding to the main object, process, surfaces, volumes, zone meshes, and so on. The .ams file corresponding to the pipe example that is used in this documentation is listed below.

AcuConsole supports different CAD formats: Parasolid, ACIS and Pro/Engineer (Granite) part and assembly files. Besides the CAD formats, AcuConsole also has a discrete module that can be used to import Nastran and STL files.

## Introduction

AcuConsole requires the fluid volume to be modeled in the CAD package. For example, to model flow through a pipe, the fluid region represented by the volume within the inner diameter of the pipe (and bounded by the inlet and outlet) has to be modeled in the CAD software. In addition, depending on the CAD kernel (Parasolid, ACIS or Granite), requirements for a valid geometry for AcuConsole are slightly different.

## Parasolid

Both the binary and ASCII formats of Parasolid are supported in AcuConsole. Parasolid schema files are included in the AcuConsole distribution to support older versions of Parasolid.

## ACIS

AcuConsole supports both binary and ASCII formats of ACIS files. If the CAD model consists of surfaces and solids, the surfaces should be created as separate parts and assembled with the solid part(s). If both the solid and the surface are modeled in the same part, AcuConsole does not unionize the surface and solid properly.

## Granite

Pro/Engineer is a product from PTC and uses the Granite modeling kernel. AcuConsole uses the Granite API to access the parts and assemblies generated in Pro/Engineer or other packages using the Granite kernel. The Granite modeling kernel is not supported on Linux platorms. Currently, there are two additional limitations of the Granite kernel.
• Layers are not supported. If an assembly component is in a blanked layer it will still be modeled in AcuConsole.
• Quilts are not supported and are ignored.

## Pro/Engineer or Granite Part

To ensure that a valid AcuConsole model is created from a Pro/Engineer or Granite part, the following requirements are imposed:
• The part must have an absolute tolerance.
• Avoid self-intersecting surfaces. Use the surface analysis tool in Pro/Engineer.

## Pro/Engineer or Granite Assembly

To ensure that a valid AcuConsole model is created from a Pro/Engineer or Granite assembly, the following requirements are imposed:
• All components of the assembly must use the same absolute tolerance value
• Solid parts cannot overlap
• Avoid self-intersecting surfaces

## Pro/Engineer Modeling Guidelines

Most Granite parts and assemblies are created in Pro/Engineer. The following guidelines are recommended while creating parts or assemblies in Pro/Engineer for AcuConsole.

Make sure that you use absolute accuracy and set the same accuracy values in all the parts in case of an assembly. From the Pro/Engineer GUI:
• Click Tools > Options and set the enable absolute accuracy to yes.
• Click Edit > Select Setup. Click Accuracy and Absolute. Click Enter Value and enter the absolute accuracy value.
• Assemble with the default coordinate system.
• Use global interference check to make sure that there are no solid interferences and fix if there are interferences.
• Use surface analysis tools to check for self-intersecting surfaces.
• Check for short edges in the model. Even though a short edge definition depends on the relative dimensions of the model, in most cases, short edges less than 0.5mm should be avoided.

## Discrete

AcuConsole has a discrete module that is used to read STL and Nastran files and also to convert the CAD formats to ACUSIM discrete geometry files (.agm). Conversion of CAD to discrete functionality is extremely useful to generate meshes on operating systems that do not support the CAD packages used to generate the geometry files.

## CAD to Discrete Conversion Process

To create a discrete geometry (agm) from CAD file, say pipe .prt, use the following procedure in AcuConsole:
• Create a new database pipe .acs in AcuConsole.
• Import pipe .prt by selecting Import under the File menu and make sure to select water tight tessellations with higher resolution in the Import dialog. Water tight tessellations result in creating a surface mesh of the geometry before importing into AcuConsole. You could potentially use this surface mesh as the input for volume mesh generation.
• Convert CAD to discrete geometry by clicking Tools > CAD2Discrete. At this stage, AcuConsole de-associates itself from the CAD geometry.
• Create the appropriate Surface, inlet, outlet and wall, and Volume (air) groups.
• Click Tools > Generate Mesh to open the Mesh Generation dialog. Check export .ams file and uncheck launch AcuMeshSim to generate pipe.agm and pipe .ams files. Pipe.agm is the discrete geometry file that is used in conjunction with the pipe .ams file for mesh generation.
• Mesh generation can be done either on the same machine or a different machine using AcuMeshSim with the pipe .ams and pipe.agm files. There is an option to either modify the surface mesh or use the surface mesh as an input to volume mesh generation.

## Nastran

The discrete model creation process is the basis for Nastran file support. Surface meshes created in packages like ANSYS can be imported into AcuConsole as Nastran files. If the Nastran files have surface grouping information, it will be preserved in AcuConsole.

## STL

Both ASCII and binary STL file formats are supported in AcuConsole. AcuConsole assumes that the STL files do not have any slivers or gaps. AcuConsole does not have the functionality to clean up bad geometry at the current time. As such, healing gaps, and so on, has to be done in the software writing the STL. You provide a feature angle to generate/segment the faces from the STL data.

## SolidWorks Modeling Example 1: CAD Model for Simple Pipe Flow Simulation

The following example illustrates the CAD modeling process for creating a fluid volume for a simple pipe flow. A pipe of diameter 1mm and length 50 mm is created.

1. Launch SolidWorks and click File > New to create a new part. Select Part in the New SolidWorks Document dialog.
2. To create a pipe model, a sketch of the cross section of the pipe has to be created first. To sketch the circle, click the Sketch icon in the toolbar.
3. To draw a circle, select the Circle icon from the toolbar. You can modify the radius of the circle in the Properties block. For this example, set the radius value to 0.5mm to give a 1mm diameter pipe. The dimensions used in this session are mm.
4. Once the circular cross section has been sketched, it has to be extruded to create the pipe geometry. Select the icon for Extruded Boss under Features in the toolbar. Select the circle sketched in Step 3. Select Blind under Direction 1 block and provide the D1 value of 50mm.
5. Save the part as a Parasolid file, pipe.x t. The model can now be imported into AcuConsole. The model has three faces and one region. Each of these three faces can be used to create Surface groups, inlet, outlet and wall, in AcuConsole for setting boundary conditions. There will be one region that can be used to create a Volume group (air).

## SolidWorks Modeling Example 2 - CAD Model for Simulating Flow over a Cylinder

1. Create a new part in SolidWorks as in the first example.
2. In sketch mode, draw a square of 50mm x 50mm representing the flow cross-section.
3. Extrude the rectangle by 250mm to create a box. Typically, the flow domain downstream of the cylinder should be extending about 200 diameters from the cylinder.
4. To create the fluid volume, the cylinder region has to be cut out from the box created in Step 3. The Extruded Cut feature is used to create the cut. Create an extruded cut feature and sketch a circle of diameter 1mm, representing the cross-section of the cylinder on the side face of the box. For Direction 1, select Through All to cut through all faces in the extrusion direction.
5. Save the model as a Parasolid file and import it into AcuConsole. There are seven faces in the model, six for the box and one for the cylinder. These faces can be classified into inflow, outflow, wall and freestream Surface groups in AcuConsole for boundary conditions.