Você está na página 1de 40

ANSYS FENSAP-ICE Tools Reference

ANSYS, Inc. Release 18.0


Southpointe January 2017
2600 ANSYS Drive
Canonsburg, PA 15317 ANSYS, Inc. and
ansysinfo@ansys.com ANSYS Europe,
Ltd. are UL
http://www.ansys.com registered ISO
(T) 724-746-3304 9001: 2008
(F) 724-514-9494 companies.
Copyright and Trademark Information

2016 SAS IP, Inc. Unauthorized use, distribution or duplication is prohibited.

ANSYS FENSAP-ICE, ANSYS FENSAP-ICE-TURBO, ANSYS OPTIGRID 2016 ANSYS Inc. All rights reserved. Unauthorized
use, distribution or duplication is prohibited.

ANSYS, ANSYS Workbench, Ansoft, AUTODYN, EKM, Engineering Knowledge Manager, CFX, FLUENT, HFSS, AIM
and any and all ANSYS, Inc. brand, product, service and feature names, logos and slogans are registered trademarks
or trademarks of ANSYS, Inc. or its subsidiaries in the United States or other countries. ICEM CFD is a trademark
used by ANSYS, Inc. under license. CFX is a trademark of Sony Corporation in Japan. All other brand, product,
service and feature names or trademarks are the property of their respective owners.

Disclaimer Notice

THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION INCLUDE TRADE SECRETS AND ARE CONFID-
ENTIAL AND PROPRIETARY PRODUCTS OF ANSYS, INC., ITS SUBSIDIARIES, OR LICENSORS. The software products
and documentation are furnished by ANSYS, Inc., its subsidiaries, or affiliates under a software license agreement
that contains provisions concerning non-disclosure, copying, length and nature of use, compliance with exporting
laws, warranties, disclaimers, limitations of liability, and remedies, and other provisions. The software products
and documentation may be used, disclosed, transferred, or copied only in accordance with the terms and conditions
of that software license agreement.

ANSYS, Inc. and ANSYS Europe, Ltd. are UL registered ISO 9001: 2008 companies.

U.S. Government Rights

For U.S. Government users, except as specifically granted by the ANSYS, Inc. software license agreement, the use,
duplication, or disclosure by the United States Government is subject to restrictions stated in the ANSYS, Inc.
software license agreement and FAR 12.212 (for non-DOD licenses).

Third-Party Software

See the legal information in the product help files for the complete Legal Notice for ANSYS proprietary software
and third-party software. If you are unable to access the Legal Notice, Contact ANSYS, Inc.

Published in the U.S.A.


Table of Contents
1. Environment Setup ................................................................................................................................ 1
1.1. Command-Line Tools ........................................................................................................................ 1
2. Grid Operations ...................................................................................................................................... 3
2.1. Convertgrid ...................................................................................................................................... 3
2.1.1. Description .............................................................................................................................. 3
2.1.2. Command Line Reference ........................................................................................................ 4
2.1.3. Examples ................................................................................................................................. 7
2.2. fluent2fensap ................................................................................................................................... 8
2.2.1. Description .............................................................................................................................. 8
2.2.2. Command Line Reference ........................................................................................................ 9
2.2.3. Reference Values .................................................................................................................... 10
2.2.4. Examples ............................................................................................................................... 11
2.3. fensap2fluent ................................................................................................................................. 11
2.3.1. Description ............................................................................................................................ 12
2.3.2. Command Line Reference ...................................................................................................... 12
2.4. cfx2fensap ...................................................................................................................................... 12
2.4.1. Description ............................................................................................................................ 13
2.4.2. Command Line Reference ...................................................................................................... 13
2.4.3. Boundary and Reference Conditions ....................................................................................... 14
2.5. fensap2cfx ...................................................................................................................................... 14
2.6. cgns2fensap ................................................................................................................................... 14
2.6.1. Description ............................................................................................................................ 14
2.6.2. Command Line Reference ...................................................................................................... 15
2.7. fensap2cgns ................................................................................................................................... 16
2.7.1. Description ............................................................................................................................ 16
3. Solution File Operations ....................................................................................................................... 17
3.1. solnEdit .......................................................................................................................................... 17
3.1.1. Description ............................................................................................................................ 17
3.1.2. Command Line Reference ...................................................................................................... 17
3.1.3. Examples ............................................................................................................................... 18
3.2. soln2soln ........................................................................................................................................ 19
3.2.1. Description ............................................................................................................................ 19
3.2.2. Command Line Reference ...................................................................................................... 20
3.2.3. Examples ............................................................................................................................... 21
4. TimeBC Operations ............................................................................................................................... 23
4.1. TimeBC Files ................................................................................................................................... 23
4.2. interpTimeBC ................................................................................................................................. 23
4.2.1. Description ............................................................................................................................ 23
4.2.2. Command Line Reference ...................................................................................................... 24
4.2.3. Examples ............................................................................................................................... 24
4.3. genTimeBC ..................................................................................................................................... 25
4.3.1. Description ............................................................................................................................ 25
4.3.2. Command Line Reference ...................................................................................................... 25
4.4. interpTurboDropTimeBC (TURBO) ................................................................................................... 26
4.4.1. Description ............................................................................................................................ 26
4.4.2. Command Line Reference ...................................................................................................... 27
4.4.3. Examples ............................................................................................................................... 28
4.5. mergebcs ....................................................................................................................................... 29
4.6. generateRoughnessDat .................................................................................................................. 29
4.6.1. Description ............................................................................................................................ 29

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. iii
Tools Reference

4.6.2. Command Line Reference ...................................................................................................... 29


4.6.3. Examples ............................................................................................................................... 30
5. Expression Syntax ................................................................................................................................. 31
5.1. Operators ....................................................................................................................................... 31
5.2. Functions ....................................................................................................................................... 31
Index .......................................................................................................................................................... 35

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
iv of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 1: Environment Setup
Command-line tools are provided in the .../bin/ directory of the FENSAP-ICE installation directory,
whose complete paths are contained in the environment variable $NTI_PATH.

1.1. Command-Line Tools


Linux:

Add the $NTI_PATH to your shell environment $PATH variable, in your shell startup script.

export PATH = "$PATH":/path/to/nti/bin/

Windows:

Launch a terminal from FENSAP-ICE (View Open Terminal) will initiate a DOS prompt with the envir-
onment PATH already set. All FENSAP-ICE command line tools will be available from there.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 1
Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
2 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 2: Grid Operations
The following sections of this chapter are:
2.1. Convertgrid
2.2. fluent2fensap
2.3. fensap2fluent
2.4. cfx2fensap
2.5. fensap2cfx
2.6. cgns2fensap
2.7. fensap2cgns

2.1. Convertgrid
convertgrid is a tool that enables many editing operations on a FENSAP format grid.

2.1.1. Description
Operations:

File format conversion (ASCII, binary, C3D solid)

General grid statistics

Grid order optimization

Scaling, rotation, translation

Node periodicity correction

Boundary condition operations: renumbering, detection of missing facets

Volume operations: splitting

Cell operations

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 3
Grid Operations

2.1.2. Command Line Reference

Note

convertgrid -h
For a complete and fully up-to-date command reference, use the built-in command line
help above.

Table 2.1: convertgrid Command Example

> convertgrid SOURCEGRID DESTINATIONGRID [OPTIONS]


Format of the convertgrid command.

Table 2.2: Options

-d
Diagnostic mode - Does not write output file but lists the solution content (reference values, solution
datafields, zones and boundary conditions).

Table 2.3: Output File Formats

-ascii
Writes text format grid (default=binary, for speed). File output format is binary, unless -ascii is specified.

-c3d
Writes a C3D format grid (solid domains).

-cart
Writes a grid in Cartesian coordinates.

-cyl
Writes a grid in cylindrical coordinates.

-solid
Writes a solid domain grid.

Table 2.4: Input File Format

-readc3d
Reads a C3D format grid.

-rotx
Specifies the X axis of rotation, if any. Required for some features.

-roty
Specifies the Y axis of rotation, if any. Required for some features.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
4 of ANSYS, Inc. and its subsidiaries and affiliates.
Convertgrid

-rotz
Specifies the Z axis of rotation, if any. Required for some features.

Table 2.5: Stats

-d
Printout grid stats and end (size, boundary conditions, cell types).

-dd
Outputs extra read info.

Table 2.6: Grid Scaling/Operations

-factor=VALUE
Scale the nodes coordinates by VALUE factor.

-factor=X,Y,Z
Scales the X,Y,Z coordinates by VALUE factor.

-translate=X,Y,Z
Scales the grid by the specified vector.

-translatePost
Translates after all other operations (on all materials).

-rotate[X,Y,Z]=angle
Rotates the grid along X,Y,Z axis, by the specified angle (degrees).

Table 2.7: Optimization

-optimize
Reorders the node numbering with the RCM algorithm.

-optimize2
Reorders the node numbering with the Octree algorithm.

Table 2.8: Boundary Condition Operations

-renameBC=OLD,NEW
Renumbers the specified boundary condition to NEW.

-renameBC=OLD,NEW,"EQUATION"
Same as -renameBC but only where EQUATION is true.

-detectBC=BC ???
Detects missing boundary facets on the grid and assigns them the identifier boundary condition.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 5
Grid Operations

-fixBC
Detects and remove duplicate facets.

-filterInternalBCs
Removes boundary condition surrounded by two volume elements, except actuator disks or heater
pads.

Table 2.9: Volume Operations

-splitVolumes
Writes OUTPUT.X grids, one for each volume.

-splitMaterials
As -splitVolumes, but using material IDs as volumes.

-splitSoln=FILENAME
In -splitVolumes mode, can split a solution file.

-splitHFlux=FILENAME
In -splitVolumes mode, can split a hflux.dat file.

-splitShear=FILENAME
In -splitVolumes mode, can split a surface.dat file.

-splitJoin=V1,V2
Volume 2 will be merged to Volume 1.

-splitSkip=V
Discards the volume V when working on multiple domains.

-mergeBC=BC1,BC2
Merges nodes of node-matching surfaces.

Table 2.10: Material Operations

-renameMat=OLD,NEW
Renumbers the specified material ID to NEW.

-renameMat=OLD,NEW,EQUATION
Same as -renameMat but where EQUATION is true.

Table 2.11: Periodicity Operations

-periodic[=tolerance]
Sets periodic flags on 4100, 4200, 4300s boundary condition, must be node-matching; also permits to
double-check the accuracy of a grid periodicity.

-notperiodic
Removes periodicity in the output grid.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
6 of ANSYS, Inc. and its subsidiaries and affiliates.
Convertgrid

-periodicZone=4***
For -periodic, specifies the symmetry boundary condition number that is periodic.

-periodicPlanes=tolerance
Optionally used with -periodic, to refine the tolerance of a point on a plane.

-periodicTranslation=X,Y,Z
Specifies the translation vector.

-periodicClipPlane=[X|Y|Z],low,hi
Clips the periodic nodes on the given planes. Used with -periodic.

-periodicRotational=X/Y/Z,ANGLE
Specifies the axis of rotation and angle in DEG.

-periodicFix
For already periodic grids, will increase the periodic plane accuracy (periodicTranslation/ Ro-
tational argument required).

-clearPeriod=BC,BC,...
Removes periodicity on specified boundary condition list.

-prBC=BC1,BC2
Used with -periodicRotational/Translation, specifies boundary condition pairs to match.
Boundary conditions are erased.

2.1.3. Examples
Table 2.12: Example Commands

convertgrid grid_bin grid_asc -ascii


Convert a grid to ASCII Format.

convertgrid grid_asc grid_opt -optimize2


Convert a grid to binary format, and reorder the node numbering for better performance.

Note

Nodal solutions, heat fluxes and so on are not useable with the reordered file as the node
and facet order of the output file is different.

convertgrid grid_in grid_m -factor=0.0254


Scale a grid from inches to meters.

convertgrid grid_in grid_out -renameBC=2002,2000 -renameBC=2003,2000


Renumber a boundary condition identifier. (All facets of boundary

condition 2002 and 2003 renamed to 2000).

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 7
Grid Operations

convertgrid grid_in grid_out -renameBC=2000,2001,"Y>0"


Renumber a boundary condition identifier from a geometrical condition. (All facets of boundary condition
2000 for which the centroid is over Y = 0 coordinate will be renumbered as 2001).

convertgrid grid_multi grid_part -splitVolumes


Split a multi-volume grid into separate grids, grid_part.1 and grid_part.2 would be written.

convertgrid grid_multi grid_part -splitVolumes -splitSoln=grid_multi.soln -splitHFlux=grid_multi.hflux


-splitShear=grid_multi.surface
Split a multi-volume grid and solution files into separate grid/solution files. (In addition to grid_part.X,
grid_part.X.soln/hflux/surface will be written).

To add rotational periodicity onto a grid lacking periodicity information:

Grid provided with a single BC=4000 for both rotational periodic sides, the boundary condition is first
split in two boundary conditions, the renamed boundary condition is based on the rotational coordinate
THETA (grid is specified as rotating along the X axis, with the -rotx argument).

convertgrid grid_orig grid_bcsplit -renameBC=4000,4001,"THETA>0" -rotx


The two boundary conditions are now useable for periodicity node detection, which is a known 45
degrees rotation along the X axis.

convertgrid grid_bcsplit grid_periodic -periodicRotational=X,45 -prBC=4000,4001


FENSAP requires a rotational periodic grid (or non-axis-aligned translational periodic grid) to have
periodic nodes, but no boundary condition facets (or a boundary condition 5000).

convertgrid grid_orig grid_bcsplit -renameBC=4000,5000 -renameBC=4001,5001


Renames the two temporary symmetry plane boundary conditions 4000 and 4001 to their final identifier
5000 and 5001 (periodic boundary conditions).

2.2. fluent2fensap
The ANSYS Fluent case and solution file (.CAS and .DAT) can easily be converted to a FENSAP grid and
airflow solution format.

2.2.1. Description
This operation is usually done within FENSAP-ICE by selecting a .CAS file as the grid input file. The import
panels will provide the means to fine-tune the boundary conditions, reference conditions and solution
field association.

The fluent2fensap process is fully automated and normally does not require adjustments.

Reference values are extracted from the Fluent configuration and written in the solution file header.
The values in the solution file header are required only for:

Viewmerical Postprocessing:

The calculation of the pressure coefficient requires PINF, TINF, VELINF. The calculation of the airflow
Mach number requires RGAS, GAMMA. The calculation of the relative velocity components require
RPMX, RPMY, RPMZ.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
8 of ANSYS, Inc. and its subsidiaries and affiliates.
fluent2fensap

CHT3D Anti-Icing:

Requires RGAS, GAMMA, VELINF.

Note

If the reference velocity value selected by fluent2fensap is not correct, it must


be reset with the proper value, otherwise CHT3D will not be able to compute the
correct surface temperature and heat fluxes.

2.2.2. Command Line Reference


fluent2fensap INPUT.cas OUTPUT [parameters]
Reads from the Fluent case file INPUT.cas (and optionally INPUT.dat, if in the same location), and
write to the OUPUT prefix (OUTPUT.grid, OUTPUT.soln, etc.).

Table 2.13: Options

-d
Diagnostic mode. Does not write the output file but list its content (reference values, solution datafields,
zones and boundary conditions).

Table 2.14: Icing Options

-roughness=FILE
If Fluent was configured with a roughness profile, typically obtained from ICE3D beading model in a
previous FENSAP-ICE computation, it is required to apply the same roughness value in the airflow
solution file converted from Fluent format. This argument permits to specify a roughness.dat file, with
the roughness distribution. The roughness values will be inserted in the output airflow solution file
written by fluent2fensap. The roughness information will be used by ICE3D, if the beading model
is enabled.

Note

A roughness.dat file related to the node number and ordering in the grid. If the Fluent
grid has been remeshed, or reordered, the roughness.dat of the previous shot cannot
be used as-is, and will need to be reinterpolated on the new grid: Use then the
rough2rough tool.

Table 2.15: Output Files

-nosoln
Will not read a .DAT file nor write a soln file.

-ascii
Output FENSAP grid written in ASCII (default is binary).

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 9
Grid Operations

-solid
Write a solid grid (for use with C3D).

-imat
Write a multi-material grid (for use with FENSAP/DROP and multiple domains). This is automatic if the
Fluent grids have more than one cell section.

Table 2.16: Multi-Zone Options

-materials=ZONE,ZONE,ZONE
Optional. Provide a specific order for the material IDs.

Table 2.17: Solution Options

-rotVX=RPM
Convert a relative-frame solution to absolute.

-rotVY=RPM
Convert a relative-frame solution to absolute.

-rotVZ=RPM
Convert a relative-frame solution to absolute.

-rotabs
Indicate the solution is absolute frame. Use rotVX/-rotVY/-rotVZ to specify the rotation speed which
will be stored in the solution header (used for post-processing).

Table 2.18: Boundary Conditions

wall-6:2001 wall-7:2002 "inlet with spaces":1001 non-useful-internal-wall:0


Fluent boundary conditions are matched to suitable FENSAP boundary condition types and identifiers.
The automatic behavior can be overloaded by using the ZoneName:BC syntax. Use quotes for zone
names with multiple words separated by spaces. If the boundary condition identifier 0 is chosen, the
facet zone will not be written. Refer to the FENSAP-ICE user manual for detail on boundary condition
identifiers.

2.2.3. Reference Values


The reference values automatically detected from Fluent configurations can be replaced on the command
line by using the VAR=VALUE syntax.

Table 2.19: The Following Values are Important

VELINF
Reference velocity (m/s)

TINF
Reference static temperature (K)

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
10 of ANSYS, Inc. and its subsidiaries and affiliates.
fensap2fluent

PINF
Reference static pressure (Pa)

Table 2.20: The Following Values are Optional

LENINF
Reference length (m)

VELX, VELY, VELZ


Components of the reference velocity (m/s)

RPMX, RPMY, RPMZ


Rotation speed (rpm)

Table 2.21: Variables with a Default Value

RGAS 287.05 GAMMA 1.4


(kJ/kg K, gas constant for air)

Table 2.22: Variables Continued

MACHINF, HINF, XKEINF, RHOINF, P0INF, ZMUINF, REINF, PRINFND, ENTRINF


Variables computed automatically from the other variables above.

2.2.4. Examples
Table 2.23: fluent2fensap Commands

fluent2fensap cht_ext.cas cht_ext


Writes chg_ext.grid (and cht_ext.soln, cht_ext.hflux, cht_ext.surface, if there is a
check_ext.dat in the same directory).

fluent2fensap cht_ext.cas cht_ext TINF=265.3


Same as above, however the reference temperature read from the file is adjusted to 265.3 K.

fluent2fensap cht_solid.cas cht_solid wall-6:6100 -solid


Writes the output file in a format compatible with C3D. The wall-6 surface is converted to a heater
boundary condition (range 6000-6999).

2.3. fensap2fluent
This tool permits to convert a FENSAP grid into the Fluent grid format. The file will contain only the
grid and boundary condition types, no solver settings are written.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 11
Grid Operations

2.3.1. Description

Important

Some grids with periodicity will be converted to a Fluent file with invalid shadow zone sur-
faces, and Fluent might fail to read them. In such a case, the suggested approach is:

Convert the grid using the noperiod option or prepare an input grid with convertgrid INPUT
OUTPUT -notperiodic.

In Fluent, detect anew the periodicity using the TUI command lines.

2.3.2. Command Line Reference


Table 2.24: General Commands

fensap2fluent grid soln -out=OUT [options]


Read the FENSAP format grid and airflow solution soln, and write to OUT.cas and OUT.dat.

fensap2fluent grid -nosoln -out=OUT [options]


Grid-only conversion. Reads the file grid, and write to OUT.cas.

Table 2.25: Input File Options

-solid
Reads a C3D solid grid file format.

-read=FILE.cas
Reads a reference case file, some options (solver settings, zone numberings) will be copied in the new
output .CAS file. This might result in an incomplete Fluent configuration.

-modifyNodes=FILE.cas
Reads a reference case file and writes it as output, with the only modification being the XYZ coordinates
of the nodes, read from the input FENSAP grid. This is used to displace the nodes after ICE3D ALE grid
displacement.

Table 2.26: Output File Options

-ascii
Fluent file will be written in ASCII.

-noperiod
Disable periodicity writing.

2.4. cfx2fensap
cfx2fensap is a tool introduced in FENSAP-ICE 2015R1.0 to enable automatic conversion from CFX
.RES format to FENSAP grid and airflow solution formats. General usage is similar to fluent2fensap.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
12 of ANSYS, Inc. and its subsidiaries and affiliates.
cfx2fensap

2.4.1. Description
This operation is usually done within FENSAP-ICE, by selecting the .RES file as the grid input file for a
run. The import panels will allow fine-tuning of the boundary conditions, reference conditions and
solution field associations. In FENSAP-TURBO simulations, multi-row grids can be separated and auto-
matically configured in FENSAP-ICE.

Note

CFX must be installed on the machine where cfx2fensap is launched, and the cfx5cmds
tool is accessible, either via a global execution path, or the command line below.

-cfxPath=/path/
Used to indicate the path of the bin/ subdirectory of the current installation of CFX.

Alternatively, if a CCL appears alongside the input .RES file, CFX is not required to reside on the exe-
cution machine. (FILE.ccl alongside FILE.res) The CCL can be generated in the following way.

From CFX-Pre:

File Export CCL select all objects.

cfx5cmds - read -definition INPUT.res -text INPUT.ccl


Generates a CCL from a command line.

Prior to FENSAP-ICE 2015R1.0, CFX import was done via CGNS file format (See cgns2fensap (p. 14)).

2.4.2. Command Line Reference


cfx2fensap INPUT.res OUTPUT [options]
Reads from the CFX solution file INPUT.res, and writes to the OUTPUT prefix (OUTPUT.grid, OUT-
PUT.soln, etc.).

Table 2.27: Output Options

-zone=N
Extract a subzone of the grid (1-N), only, for example, a turbofan stage, or a single material.

-split
Write all subzones of the grid to different OUTPUT.ZONENAME files. Used for turbo-fan grid, separated
in multiple rows.

-hflux -shear
Write hflux and shear stress facet-based files.

-solid
Write a solid grid (for use with C3D).

-notperiodic
Disable periodicity detection/writing.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 13
Grid Operations

2.4.3. Boundary and Reference Conditions


Boundary Conditions:

CFX boundary conditions are matched to suitable FENSAP boundary condition type and identifiers.
The automatic behavior can be overloaded by using the ZoneName:BC syntax. Use quotes for zone
names with multiple words separated by spaces.

If the boundary condition identifier 0 is chosen, the facet zone will not be written. Refer to fluent2fensap
for details on FENSAP boundary condition identifiers.

Table 2.28: Boundary Condition Identifier

Wall1:2001 Wall2:2002 "inlet with spaces":1001 non-useful-internal-wall:0


Boundary Condition Identifier at 0.

Reference Conditions:

The detection is done automatically from the CFX settings, but should be reviewed in the output log.
For correct functioning, CHT-CFX requires that the proper reference conditions values be set in the
FENSAP solution file.

Refer to Reference Values (p. 10).

2.5. fensap2cfx
To convert from FENSAP file format to CFX format, the options are:

fensap2cgns: Convert to CGNS and read CGNS from CFX-Pre

fensap2fluent: Convert to Fluent case and read from CFX-Pre

An existing CFX-Pre configuration can be updated from a new, compatible, mesh if the original mesh
is overwritten and the File Reload Mesh Files option is chosen.

2.6. cgns2fensap
The following sections of this chapter are:
2.6.1. Description
2.6.2. Command Line Reference

2.6.1. Description
CGNS is a general file format for CFD (CGNS) and the file format is supported by most solvers. However
it is a very general file format and only a subset of the features is supported.

Single-block unstructured grid

Single Nodal solution

The converted grid can be used with FENSAP-ICE; the converted solution (if solution data is included)
might not be suitable for DROP3D. Particular attention to the solution units and availability of all the
required data fields is needed.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
14 of ANSYS, Inc. and its subsidiaries and affiliates.
cgns2fensap

2.6.2. Command Line Reference


cgns2fensap INPUT.cgns OUTPUT [parameters]
Write the OUTPUT.grid and OUTPUT.soln files in FENSAP file format.

Table 2.29: General Settings

-solid
Write a solid grid (for use with C3D).

-noSoln
Write only a grid without a solution file.

-cfx
CGNS file coming from a solver in which the heat flux values must be reversed.

or

-fluent
CGNS file coming from a solver in which the heat flux values must be reversed.

-fieldlist
Printout available fields.

-field=CGNS,FENSAP
Choose conversion from CGNS ID to FENSAP 4-letter ID.

-periodic
Automatic periodicity detection. For symmetry in x/y/z only.

-periodicTol=VALUE
(For auto detection) specify tolerance for node equality.

-periodicPlanes=VALUE
(For auto detection) specify planar tolerance.

-periodic=lo,hi
Periodicity detection between two named boundary conditions.

-periodicVector=X,Y,Z
Specify the vector of translation.

-periodicRotational=X/Y/Z, ANGLE
Specify the axis of rotation and angle in DEG.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 15
Grid Operations

-rotVX=RPM/-rotVY/-rotVZ
Convert a solution in relative frame to absolute frame.

Table 2.30: Boundary Conditions

CGNS boundary conditions are matched to suitable FENSAP boundary condition type and identifiers.
The automatic behavior can be overloaded by using the ZoneName:BC syntax. Use quotes for zone
names with multiple words separated by spaces.

Wall1:2001 Wall2:2002 "inlet with spaces":1001 non-useful-internal-wall:0


If boundary condition identifier 0 is chosen, the facet zone will not be written. Refer to Boundary
Conditionsl for detail on FENSAP boundary condition identifiers.

The CGNS format does not include reference conditions, but the values can be specified on the command
line with the VAR=VALUE syntax.

Refer to fensap2fluent

2.7. fensap2cgns
This tool can be used to convert a FENSAP grid (and optionally, solution) to CGNS format. It can then
be loaded in CFD-Post and postprocessing tools that support this file format.

2.7.1. Description
Table 2.31: Command Line Reference

fensap2cgns grid soln -out=OUT [options]


This command reads the FENSAP grid and airflow solution soln, and writes them to OUT.cgns which
contains both grid and solution.

fensap2cgns grid -nosoln -out=OUT [options]


This is a grid-only conversion command. The grid file is read and written to OUT.cgns.

Table 2.32: Input File Options

-solid
Reads a C3D solid grid file format.

Table 2.33: Output File Options

-type=cfx
Will write CGNS file compatible with CFX and CFD-Post.

-2d
Special handling of map.grid/ice.grid. Use in combination with -type=cfx.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
16 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 3: Solution File Operations
The following sections of this chapter are:
3.1. solnEdit
3.2. soln2soln

3.1. solnEdit
solnEdit is a tool that enables operations on a solution file.

3.1.1. Description
Operations range from:

Imposition of a constant value on a datafield, or a part of a datafield.

Imposition of an analytic value on a datafield.

Modification of solution header information.

Conversion of solution files from non-SI unit systems.

Combination of datafields for postprocessing operations.

Note

Advanced edition of an INPUT solution file is not a supported feature of FENSAP-ICE. A


modified solution file might affect the solver convergence and the physical accuracy of your
computations. This command should be used only for postprocessing or data analysis pur-
poses.

3.1.2. Command Line Reference

Note

solnEdit -h
For a complete, and fully up-to-date command reference description, use the built-in
command line help with the above script.

Table 3.1: solnEdit

solnEdit GRID INPUT OUTPUT [options]


The solution file INPUT and its related grid are read, and the file OUTPUT is written.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 17
Solution File Operations

-l
Printout the content of the solution file, the OUTPUT argument can be omitted.

-c3d
Input grid is a C3D solid grid.

Table 3.2: Options

FIELDNAME=EXPRESSION
The content of the named field will be replaced by the expression value. Expressions are Maple-like.
See the FENSAP-ICE user manual for a reference. Use enclosing quotes around EXPRESSION if spaces
are used in the expression.

For example "XVEL=Z^2"

Available variables are: the 4-letter solution field names, X, Y, Z, NN (node ID), MAT (material ID).

FIELDNAME:#=EXPRESSION
For unsteady fields, # permits to select the time level to change.

"PRES:2=sqrt(X*X+Y*Y)*1000 + 101325" FIELDNAME@BC=EXPRESSION


Specify a boundary condition where the values are applied. When no boundary condition is specified,
the value is applied to the whole datafield, internally too. Multiple boundary conditions and a
no-boundary condition expression can be specified simultaneously.

FIELDNAME=@FILENAME@FIELD
The entire content of FIELDNAME will be replaced by the content from the source solution file. The
source solution must be from a grid with the same number of nodes, however the file format and
available fields may differ.

-convertToMetricFrom=[ft/s,in/s,mph,m] [,[psi,psf,Pa,kPa,lbm/ins2], [R,F,C,K], [kg/m3,lb/in3,lb/ft3]]


This converts the solution for velocity, pressure, temperature, density using the specified units.

3.1.3. Examples
Example 3.1: Print the Content of a Solution File

solnEdit grid soln -l


Prints the content of a solution file. The output record below shows the list of available fields, as
4-letter groups.

...reading grid

...done

Grid BCs : 1000 2000 3400 4100

== File information:

nodes: 4854 fields: 6 lvltime: 1

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
18 of ANSYS, Inc. and its subsidiaries and affiliates.
soln2soln

Available fields : DENS ( Density (kg/m^3) )

Available fields : PRES ( Pressure (N/m^2) )

Available fields : XVEL ( V1-velocity (m/s); Velocity )

Available fields : YVEL ( V2-velocity (m/s) )

Available fields : ZVEL ( V3-velocity (m/s) )

Available fields : TEMP ( Static temperature (K) )

Header variable #1 : 287.054

Header variable #2 : 1.4

Header variable #3 : 288

...

Example 3.2: Modify the Content of a Datafield

solnEdit grid soln soln_out TEMP=288


Assigns a constant value.

Example 3.3: Modify the Content of a Datafield on a Specific Boundary Condition

solnEdit grid soln soln_out TEMP@2000=288


Assigns a constant value on wall 2000.

Example 3.4: Set up Material-Specific Values (Two Possible Syntaxes)

solnEdit grid soln soln_out "TEMP=ifValue(MAT==1,288,270)"


Syntax 1

solnEdit grid soln soln_out "TEMP=(MAT==1)*288+(MAT==0)*270"


Syntax 2

See Expression Syntax (p. 31) for more details regarding the available expression operators.

3.2. soln2soln
The soln2soln command interpolates a solution file from one grid to another. The grids can be node-
matching or non-node-matching.

3.2.1. Description
If the grids are exactly node-matching, no interpolation will be required, the solution will simply be
copied from one grid to the other. This is useful if a solution must be copied onto a grid that has been
reordered. Use the -nodes option for this specific mode.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 19
Solution File Operations

If the grids are not node-matching, each target node will be interpolated in 3D in the source grid cells.
If the node lies outside of the original grid volume, the value at the closest surface projection is used.
This feature must be used with caution.

Note

Wall nodes have a special treatment. For some datafields (temperature, pressure, velocity,
heat flux, forces, beta), their value will be projected to the closest wall of the target grid. Use
the -raw option to disable this behavior.

If the source grid is curvilinear two-dimensional (such as ICE3D output grid files), it is suggested to use
the -flat option.

3.2.2. Command Line Reference


soln2soln GRID1 SOLN1 GRID2 SOLN_OUT [options]
This command interpolates solution1 values from grid1 to grid 2 and writes SOLN_OUT.soln.

Note

For FENSAP/DROP3D solution files, it interpolates wall-based hflux/shear/beta on surfaces


only.

Table 3.3: Options

-raw
Disable any automatic behavior (wall only, slip/noslip).

-flat
Use with map.grid/ice.grid source (GRID1) files.

-nodes
Use with reordered grids or grids same nodes coordinates, no interpolation is done, interpolation is a
closest-node search.

-walls
Interpolate all points from the nearest WALL boundary condition of the input grid.

-perbc
Values are computed on boundaries only and closest-surface/point search is done on the matching
boundary condition in the other grid. The two grids must share same boundary condition identifiers.

Table 3.4: Optimizations

-outbc
Values computed on the target boundaries only (internal nodes = 0).

-threads=N
Execute the interpolation using multiple CPU cores.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
20 of ANSYS, Inc. and its subsidiaries and affiliates.
soln2soln

3.2.3. Examples
Table 3.5: Interpolating Solutions

soln2soln grid_orig soln grid_reordered soln_ordered -nodes


Interpolate solution of a reordered grid (different node ordering).

soln2soln grid1 soln grid2 soln.2 -threads=4


Interpolate solution between two different grids of same general geometry (Interpolation using
multi-cores is much faster).

Table 3.6: Interpolating swimsol Files and 3D Airflow Wall Values

soln2soln map.grid swimsol grid_3d swimsol.3d -flat


Interpolate a swimsol file onto the 3D airflow grid.

soln2soln grid_3d soln map.grid soln.map -walls


Interpolate 3D airflow wall values onto a 2D flat grid.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 21
Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
22 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 4: TimeBC Operations
The following sections of this chapter are:
4.1.TimeBC Files
4.2. interpTimeBC
4.3. genTimeBC
4.4. interpTurboDropTimeBC (TURBO)
4.5. mergebcs
4.6. generateRoughnessDat

4.1. TimeBC Files


TimeBC files (timebc.dat and roughness.dat) are used to specify nodal boundary condition values
to FENSAP and DROP3D.

The timebc file is used for inlet, wall and/or exit boundary conditions, and is created by fensapiceGUI
from the values input in the boundary conditions panel. A custom file can be created using these
command line tools.

FENSAP:

Custom timebc files can be set, overriding some settings of the boundary conditions panel, this feature
is for expert users and can be enabled by enabling the advanced options in FENSAP-ICE (Settings
Preferences Show advanced / beta solver options (available at next restart)). The Initial conditions
panel will then be accessible in the Conditions panel of FENSAP.

DROP3D:

Custom timebc file can be set in the Droplet initial solution panel, by choosing Input Profile
TimeBC file.

The TimeBC files can be viewed with the Viewmerical post-processor by using either the TimeBC file
input solution type, in the data-loader panel, or by launching it from the command line with the
viewmerical TIMEBC grid timebc.dat command.

4.2. interpTimeBC
interpTimeBC interpolates the nodal values of a grid/solution onto the nodes of a grid, writing these
values to a timebc file.

4.2.1. Description
A typical case for this command is when running a simulation using a solution from a different flow
solver (Fluent, CFX and so on) in which the inlet velocity is not uniform. The source and destination
grids are then the same and the boundary condition inlet values are extracted to a TimeBC file.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 23
TimeBC Operations

4.2.2. Command Line Reference


Table 4.1: interpTimeBC Command

interpTimeBC GRID1 SOLN1 GRID2 BCLIST FIELD [FIELD FIELD...] [options]


Will interpolate, in grid1+solution1 values for each node of the specified boundary conditions in grid
2. FIELD is the 4-letter field name of FENSAP/DROP. Such as DENS or DRUU, BCLIST can be a single
boundary condition, or a comma-separated list of boundary conditions (BC,BC,BC). If BCLIST is -1, all
the INLET+WALL+OUTLET will be interpolated.

The input and output grids can be the same, will be faster and interpolation-free.

Table 4.2: Options for DROP (Droplets)

-drop3d
Converts XVEL,YVEL,ZVEL fields (if specified) to a DROP3D input timebc.dat.

-lwc=VALUE
Adds a LWC (liquid water content) entry to the timebc, with the specified value.

Table 4.3: Options for DROP3D (Crystals) (TURBO Specific)

-icc=VALUE
Adds a ICC (ice crystal content) entry to the timebc file, with the specified VALUE.

-dtemp=VALUE
Adds a constant droplet temperature.

-ctemp=VALUE
Adds a constant crystal temperature.

-crystals
Converts XVEL,YVEL,ZVEL fields (if specified) to a DROP3D CRYSTAL input timebc.dat file.

-out=FILENAME
Specifies the output filename (default is timebc.dat).

Note

-drop3d and -crystals can be combined, leading to a droplet+crystal timebc.dat


file.

4.2.3. Examples
Example 4.1: Extraction of Droplet Inlet Conditions from an Air Solution File

interpTimeBC grid.row01 soln.row01 grid.row01 1001 XVEL YVEL ZVEL -drop3d -lwc=0.001
The example above is:

reading the airflow input solution from the source grid.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
24 of ANSYS, Inc. and its subsidiaries and affiliates.
genTimeBC

writing a drop3d timebc file, for the same grid.

extracting the X/Y/Z velocity components from the airflow for the droplet solution.

setting a constant value of 0.001 for the droplet LWC.

Example 4.2: Droplet & Crystal Timebc Input File (TURBO Only)

interpTimeBC grid.row01 soln.row01 grid.row01 1001 XVEL YVEL ZVEL -drop3d -lwc=0.001 -crystals -
icc=0.009 -dtemp=270 -ctemp=270
Sets up a droplet and crystal timebc input file.

4.3. genTimeBC
genTimeBC generates a timeBC or a sandgrain roughness file from scratch.

4.3.1. Description

Note

This feature is for advanced users.

4.3.2. Command Line Reference


Change GRIDFILE text to: genTimeBC GRIDFILE "BC,Variable,Expression" [...] [-
c3d -fensap -drop3d -rough -ale]

genTimeBC is a tool enabling to create a timebc (boundary profile) input file. On a specified GRIDFILE
it can define boundary conditions for one or multiple boundary conditions. The value of each boundary
condition to write in the file, is defined by a tuple BC,Variable,Expression. The command line
can state multiple tuples. By default, the type of the boundary profile is -fensap, the tool can be
switched to alternate modes using the other options.

Table 4.4: genTimeBC Command

genTimeBC GRIDFILE "BC,Variable,Expression" [...] [-c3d -fensap -drop3d -rough -ale]

GRIDFILE = Grid for which the timebc.dat is generated

Tuple = BC,Variable,Expression

BC = BC to define

Variable = Target variable to define on the boundary condition

Depends on the solver mode:

fensap = P,U,V,W,T,TURB1,TURB2

drop3d = LWC,U,V,W,DIAM,CRYST_LWC,CRYST_U/V/W

c3d = TEMP,HEAT

ale = DISPX,DISPY,DISPZ

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 25
TimeBC Operations

other = VAR_# the specified number will be used on the timebc entries

C3D only = For facet-based boundary profile, prefix a F to the tuple : "F**,***,***"

Expression = An algebric expression computing the value of the BC at each nodal location of the
boundary condition (See Expression Syntax (p. 31)). The expression can use X,Y,Z as input variable.

Table 4.5: The Expression Can Make Use of the Following Variables

XYZ
Coordinate of the evaluated node.

XMIN XMAX YMIN YMAX ZMIN ZMAX


Minimum/maximum boundaries of the set of nodes belonging to the boundary condition.

T
For time based equations (use -timeStart/Step/End also).

Time-based file (default is time = 0, no time step)

-timeStart=VALUE
Time value used for the first step.

-timeStep=VALUE
Time step used (require -timeEnd).

-timeEnd=VALUE
Final Time.

Table 4.6: For Roughness, the Variable Parameter Is Ignored

-drop3dConfig=file.par
Reads the DROP3D configuration and write a suitable timebc.dat file.

-bcExtra=BC,Variable,Extra
For advanced format timebc, last line value specification.

-out=timebc.dat
Sets the custom output file name.

4.4. interpTurboDropTimeBC (TURBO)


interpTurboDropTimeBC
Performs manual row-by-row pitch-averaging interpolation for sequential DROP3D runs.

4.4.1. Description
This is a TURBO feature only.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
26 of ANSYS, Inc. and its subsidiaries and affiliates.
interpTurboDropTimeBC (TURBO)

This tool permits to do row-per-row pitch averaging of solution data, to create a timebc.dat file to
use in the next row. The tool will extract conditions from droplet or crystal solutions.

In addition to the pitch-averaged value, the tool permits value injection by modifying the value with
an expression. Expressions can read a datafile to construct a 1D inlet-profile dataset.

4.4.2. Command Line Reference


Table 4.7: Reading a DROPLET Solution

interpTurboDropTimeBC GRID1 SOLN1 bcGRID1 GRID2 bcGRID2 [-nmix NMIX] [-LWCref VALUE]
[-mflux] [-out FILE] [-varChange=FIELD,EXPR]
This tool will read a DROPLET solution for GRID1 and will interpolate onto GRID2 a timebc.dat file,
for use as input to DROP. Values are interpolated from BC1 of grid1 to BC2 of grid2.

Table 4.8: Mandatory Parameters

-nmix
Number of sample points to use for the integration (suggested value: 50).

Table 4.9: Optional Parameters

-rot X
DEPRECATED, If the GRID1 solution is in a rotating frame of reference and the GRID2 computation is
not, specify the rotation in RPM. (from 2012 onwards, all solutions are in absolute frame of reference).

-rotout X
Specify the GRID2 rotation speed. The timebc.dat written will be added that rotation speed.

-rotx/-roty/-rotz
Specify the rotation axis (default Z).

-mflux
Integrate the velocity by poderating using the mass-flux info.

-autoLWC
if -LWCref is not needed, this mode will: compute the mean LWC from the input outlet, and write it
to the fensap.par of the current dir; read the LWC from the input solution's directory fensap.par,
and use it for the clipping.

-LWCref / -ICCref
The reference LWC value default is 0.001 gm/m^3. Values below LWCREF*1.25e-6 will be clipped to
zero.

-crystal
Writes a crystal timebc file instead. LWC options will apply to ICC for a hybrid droplet+crystal timebc
file, use mergebcs tool.

-out FILENAME
Specify an output file (default is timebc.dat).

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 27
TimeBC Operations

-varChange=FIELD,EXPR
Permits to modify the interpolated datafield, either by fully replacing the value, or mixing it with other
values in the equation. EXPR is an algebraic equation which can be constructed with the X,Y,Z,R,THETA
variables and the current variable name. For Linux O/S: put the full -varChange in single quotes to
ensure proper shell parsing. Variables are: LWC,U,V,W[,TEMP,DIAM]. The TEMP and DIAM fields are
accessible only if the input solution has them.

Table 4.10: Examples

-varChange=LWC,0.333
Forces the LWC to a constant value.

'-varChange=LWC,"(R>0.5)*LWC+(R<=0.5)*0.001'
Forces the LWC to 0.001 if the R coordinate is less than 0.5.

'-varChange=TEMP,fileData1D(R,"rTempProfile.txt")'
Loads the text file rTempProfile.txt as a 1D linear lookup table. It will change the value of the
variable TEMP, for which a new value will be computed as a function of R.

4.4.3. Examples
Table 4.11: Interpolation of Droplet Values with Temperature Modification

interpTurboDropTimeBC grid.row01 droplet.row01 0 grid.row02 0 -nmix 50 -LWCref 0.001 -mflux


-out timebc.dat.droplet -rotx -varChange=TEMP, fileData1D(R,"rTempProfile.txt")'
The rTempProfile.txt file here used will be interpolated as a function of R. The general format of
such a file is:

number_of_points

r valuer value

...

If the value of R falls between two entries, a linear interpolation is computed. See Expression Syn-
tax (p. 31) for reference on the possible input syntaxes for the varChange second argument.

Table 4.12: Interpolation of Both Drop and Crystals

interpTurboDropTimeBC grid.row01 droplet.row01 0 grid.row02 0 -nmix 50 -LWCref 0.001 -mflux


-out timebc.dat.droplet -rotx
Interpolate droplets and store in the output file timebc.dat.droplet.

interpTurboDropTimeBC grid.row01 crystal.row01 0 grid.row02 0 -nmix 50 -ICCref 0.009 -mflux -out


timebc.dat.crystal -rotx
Interpolate crystals and store in the output file timebc.dat.crystal.

mergebcs timebc.dat.droplet timebc.dat.crystal timebc.dat.merged


Combine the two timebc files in a single timebc.dat.merged.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
28 of ANSYS, Inc. and its subsidiaries and affiliates.
generateRoughnessDat

4.5. mergebcs
mergebcs merges two timebc files defined on the same grid. The two files must not have any conflicts
(different BC-Variable-Node entries). Typically mergebcs is used to combine separate droplet and
crystal timebc files into a single one.

It can also be used to merge the output of a TimeBC interpolation (interpTimeBC and a field-specific
evaluation with equations or 1D profiles generated using genTimeBC).

Table 4.13: Usage

mergebcs TIMEBC_FILE_1 TIMEBC_FILE_2 TIMEBC_OUT


Merges the output of a TimeBC interpolation (interpTimeBC and field-specific evaluation with
equations or 1D profiles generated using genTimeBC).

4.6. generateRoughnessDat
generateRoughnessDat creates a surface sandgrain roughness input file with values computed
from a specified solution file.

4.6.1. Description
The sandgrain roughness file is defined with reference to the airflow (3D) grid, but if quantities from
an ICE3D (surface) solution are to be used, the solution must be transmogrified onto the 3D grid. Use
soln2soln in -flat mode to do this (See Examples (p. 30)).

4.6.2. Command Line Reference


Table 4.14: Creating a roughness.dat File

generateRoughnessDat GRID [options]


Creates a roughness.dat file using the specified options. Each successive option may overwrite
node values of the previous options.

Table 4.15: Options

-bc:ID=VALUE
Applies a value to all boundaries with ID=VALUE.

-range:XMIN,YMIN,ZMIN,XMAX,YMAX,ZMAX=VALUE
Range will apply to any wall.

-solnVar:SOLNFILE:FIELD:>FIELDVALUE:ROUGHVALUE
From the soln file solution file, read the datafield FIELD. For each node for which the value is greater
than FIELDVALUE, the roughness.dat file will contain the value ROUGHVALUE. The < operator is
also available.

-node:ID=VALUE
Assign the specified VALUE to the node number ID.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 29
TimeBC Operations

-out:FILENAME
Specify an optional different output filename.

4.6.3. Examples
Table 4.16: Set up Roughness Values from Ice Thickness in Solution

soln2soln map.grid swimsol grid swimsol_3d -flat , generateRoughnessDat grid -solnVar:swim-


sol_3d:WWIT:>0.0001:0.003
For each node where the ice thickness is greater than 0.0001, a roughness of 0.003 (m) is set in the
output file.

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
30 of ANSYS, Inc. and its subsidiaries and affiliates.
Chapter 5: Expression Syntax
The following sections of this chapter are:
5.1. Operators
5.2. Functions

FENSAP-ICE, solnEdit, convertgrid and other ANSYS tools share the same syntax for expression
evaluation.

An expression is a string defining an algebraic equation to compute a value. Typically, this equation is
evaluated at a node or for a specific {X,Y,Z} coordinate.

Example 5.1: Basic Examples

"123" or "100+23" corresponds to the constant value 123.

"X>100" corresponds to 1 if X is greater than 100.

5.1. Operators
Arithmetic:

is the modulo operator (division remainder). is

is for exponent. is

Logical:

is "and", is "or".

The result of an operation is either 0 or 1.

! is used to reverse a logical value (any nonzero value will be permuted to 0, 0 permuted to 1).

5.2. Functions
Table 5.1: Functions

sqrt(), cos(), sin(), tan(), acos(), asin(), atan(), atan2(,), exp()


Mathematical Functions

min(val1,val2), max(val1,val2)
Value Operations - Returns the minimum/maximum of two values

round(), floor(), ceil()


Rounding Functions

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 31
Expression Syntax

fabs()
Absolute Value

Table 5.2: Range Operations

inRange(value,min,max)
Returns 1 if the value within [min,max].

inRangeExcl(value,min,max)
Returns 1 if the value outside [min,max].

valueRange(val,min,max,valIN,valOUT)
Returns valIN if the value is within [min,max], returns valOUT otherwise.

valueRangeExcl(val,min,max,valIN,valOUT)
Same as valueRange, but when the value is outside [min,max].

ifValue(condition,valueTrue,valueFalse)
Returns valueTrue if the condition is true (nonzero), otherwise returns valueFalse.

File Data:

fileData1D(value,"filename")
Reads the filename from the current directory (must be a 1D dataset of N points). The data will be
interpolated linearly. Values out of range are clamped to the minimum/maximum data point.

fileData1D File Format:

npoints

variable value

variable value

variable value

variable value

...

Example 5.2: Linearly Interpolated Data

0.5 291.75

0.6 293.4

0.73 295.9935

0.88 299.616

1.2 309.6

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
32 of ANSYS, Inc. and its subsidiaries and affiliates.
Functions

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 33
Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
34 of ANSYS, Inc. and its subsidiaries and affiliates.
Index

Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates. 35
Release 18.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
36 of ANSYS, Inc. and its subsidiaries and affiliates.

Você também pode gostar