0% found this document useful (0 votes)
472 views265 pages

Numeca Cfview Manual

Uploaded by

Weiqi Shen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
472 views265 pages

Numeca Cfview Manual

Uploaded by

Weiqi Shen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 265

User Manual

CFView™ v8.7
Flow Visualization and Post-Processing

- May 2010 -

NUMERICAL MECHANICS APPLICATIONS


User Manual
CFView™ v8.7
Documentation v8.7c

NUMECA International
5, Avenue Franklin Roosevelt
1050 Brussels
Belgium

Tel: +32 2 647.83.11


Fax: +32 2 647.93.98
Web: http://www.numeca.com

NUMERICAL MECHANICS APPLICATIONS


Contents

CHAPTER 1: Getting Started 1-1


1-1 Overview 1-1
1-2 Introduction 1-1
Features 1-1
Approach & Acknowledgments 1-2
1-3 Conventions Used in this Manual 1-3
1-4 Outline 1-3
1-5 Running CFView™ 1-3
Basic Installation 1-3
Starting CFView™ 1-4
1-6 Advanced Options 1-4
Command Line Arguments 1-4
Customizing Graphics Options 1-6
Double Buffering 1-6
Reverse Video 1-6
Update Abort 1-6
Graphics Drivers 1-6
1-7 Troubleshooting 1-7

CHAPTER 2: Graphical User Interface, Projects & Views 2-1


2-1 Overview 2-1
2-2 Graphical User Interface (GUI) 2-2
Menu Bar 2-3
Pull-down Menu 2-3
Menu General Organization 2-3
Keyboard Shortcuts 2-5
ToolBar 2-5
Open & Close Project Buttons 2-5
View Handling Buttons 2-5
Coordinate Axis Buttons 2-6
Quantity Range Control Buttons 2-6
Unsteady Animation Buttons 2-6
Quick Access Pad (QAP) 2-6
Graphics Area 2-7
Message Area 2-7
Keyboard & Viewing Control Area 2-8
Keyboard Input Area 2-8
Quantity Range Monitor 2-8
Information Output Area 2-8
2-3 Project Management 2-9
File Chooser 2-9
Supported File Formats 2-10
Open CFView™ Native File Format (.cfv) 2-10
Open FINE™/Turbo File Format (.run & .cgns) 2-10
Open Autogrid5 CGNS (.cgns) 2-10
Open CGNS Formatted File (.cgns) 2-10
Open Plot3D Formatted Files 2-11

CFView™ iii
Contents

Open Multiple Projects 2-12


Partial Loading 2-12
Close Project 2-15
2-4 Import Validation Data 2-15
2-5 Views Manipulation 2-16
Active View 2-16
View Concepts 2-16
Projection Mode 2-17
Change Representation Scale 2-18
Viewing Buttons 2-18
X, Y & Z Projection Buttons 2-18
Translate Button 2-18
Dynamic Viewing Button 2-18
X, Y & Z Rotation Buttons 2-19
Roll Button 2-19
Zoom In/Out Button 2-19
Zoom Area Button 2-20
Fit Button 2-20
Original Button 2-20
View & Window Menus 2-20
View/Projection 2-20
Original 2-20
X Constant, Y Constant, Z Constant 2-21
View/Parameters 2-21
Normal 2-21
Up Vector 2-21
Full Render 2-21
Display Shadow 2-22
Fast Preview 2-22
Transparent 2-22
Border 2-22
Stretched, Orthographic, Perspective 2-22
Multiple Views 2-23
Open Additional Views 2-23
Refresh Graphical Area Display 2-23
Reset View Content & Viewing Parameters 2-23
Close Active View 2-23
Change View Size/Position 2-23
Maximize 2-23
Preferred Size 2-24
Minimize 2-24
Push Back 2-24
Move/Resize 2-24
Interactive Move/Resize Mode. 2-24
Tiling Views 2-24
Arrange Iconized Views 2-25
Swap Views 2-25
Align Views 2-25
Superpose Views 2-25

iv CFView™
Contents

Add Coordinate Axes 2-25


Insert Orientation Axes 2-25
Insert Graduated Axes 2-26
Graduated Axis Representation Control 2-27
2-6 Templates & Macro Scripts 2-28
Apply Templates 2-29
Use Macro Scripts 2-29
Play Active Macro 2-29
Record User Actions 2-29
Clear Active Macro 2-29
Load Macro 2-29
Save Active Macro 2-30
Execute Macro Script Data File 2-30
Save All Macro Recording Since Session Start 2-30
Load Macro Module 2-30
Viewer/Debugger 2-30

CHAPTER 3: Creating & Handling Surfaces 3-1


3-1 Overview 3-1
3-2 What are Surfaces in CFView™? 3-1
Surfaces Types 3-2
Activation/Selection of Surfaces 3-2
Project Surfaces List 3-2
Surfaces Groups 3-2
3-3 Select Surfaces 3-3
From Quick Access Pad 3-3
Surfaces List 3-3
Set Surfaces Activation State 3-4
Visualize for Quick Identification 3-5
Reverse Surface(s) Normal 3-5
Visualize Surface(s) Normal 3-5
Check Number Of Points 3-5
Create/Delete Group 3-6
Rename Surface/Group 3-6
Delete Surfaces from Project 3-6
Surface Creation Shortcut Buttons 3-6
Surface Selection by Filter Frame 3-6
From Geometry Menu 3-7
Surface Selection 3-8
Visualization of Group Composition 3-8
Visualization for Quick Identification 3-8
Remove all Surface Representations in the Active View 3-8
Delete Surfaces from Project 3-8
Rename Surface or Group 3-9
Interactive Surface Selection 3-9
Surface Selection using Macro 3-10
3-4 Create Surfaces 3-11
Create Mesh Surface 3-11

CFView™ v
Contents

Create Cutting Plane 3-13


Create Cutting Surfaces defined from IGG™ curve 3-15
Split Surfaces 3-16
Create Iso-surfaces 3-17
Compute Iso-surface 3-17
Save Iso-surface 3-18
3-5 View Surfaces 3-18
View Surfaces Boundaries 3-19
View Solid Boundaries 3-19
Update Surfaces Boundaries Representation 3-19
View Grid Wireframe 3-19
Update Grid Wireframe Representation 3-20
Hidden Lines Rendering 3-20
Uniform Coloring 3-20
Flat Shading 3-21
Gouraud Shading 3-21
Remove Rendering Effects 3-21
Modify Rendering Color 3-21
Diffuse 3-23
Specular Highlight 3-23
Opacity 3-24
Reflection 3-24
Set Visibility, Light & Shadow Attributes 3-25
Toggle Light Contour 3-26
Toggle Light Grid 3-26
Toggle Light Face 3-26
Display Shadow 3-27
Light Editor 3-27
Graphics Repetition 3-28
Surfaces Representation Selectability 3-29
3-6 View Elements (Unstructured Meshes Only) 3-29

CHAPTER 4: Flow Quantities Visualization 4-1


4-1 Overview 4-1
4-2 Select & Create Flow Quantities 4-1
Quantity Types 4-1
Select Field Quantity 4-3
Select Mechanical data 4-3
Select Solid Quantity 4-7
Select Computed Thermodynamic Quantity 4-7
Definition of Computed Thermodynamical Quantities 4-7
Perfect Gas 4-8
Incompressible Fluid 4-8
Real Gas 4-9
Select Vector Component 4-9
Apply Differential Operators: Gradient, Divergence or Curl. 4-10
Create Derived Quantity 4-11
Field Quantities & Computer Memory Management 4-12

vi CFView™
Contents

Quantities Load on Demand 4-12


Unload Quantities 4-12
Field Quantities Status Dialog Box 4-13
RAM Management and Unsteady Post-processing 4-14
4-3 Visualize Scalar Data 4-15
Local Values 4-15
Display Local Values 4-15
Update Local Values 4-15
Delete Local Values 4-16
Isolines 4-16
Draw Local Isoline 4-16
Drawing Multiple Isolines 4-17
Update Isolines 4-18
Delete Isolines 4-18
Color Contours 4-18
Flat 4-18
Smooth 4-19
Strip 4-19
Thresholding (Flat, Smooth and Strip) 4-19
Color Contour Transparency 4-20
Update Color Contour 4-21
Delete Color Contours 4-22
Streamlines 4-22
Local Streamline 4-23
Streamline from Section 4-23
Streamline from Grid Line 4-24
Streamlines Parameters 4-25
Update Streamline 4-26
Delete Color Streamlines 4-26
Iso-Surfaces 4-27
Cartesian Plots 4-28
Cartesian Plot along Surface Boundaries 4-28
Cartesian Plot along Solid Surface Boundaries 4-28
Cartesian Plot along Section 4-28
Cartesian Plot along a Grid Line 4-29
Update Cartesian Plot 4-30
Change Axis Variable & Range 4-30
Update Curve Type 4-31
Copy/Paste/Merge Curves 4-32
Delete Plot Curves 4-32
Change Axis Ticks & Labels 4-33
Ticks & Numbers 4-33
Axis Label 4-33
Add Grid Lines in Cartesian Plot 4-34
Resize Cartesian Plot 4-35
Cartesian Plot Axis Editor Dialog Box 4-35
Update/Plot Menu 4-36
Export Plot Curve(s) in File 4-36
4-4 Represent Validation Data 4-37

CFView™ vii
Contents

4-5 Represent Plot Data 4-38


4-6 Visualize Vector Data 4-38
Arrow Representation 4-39
Local Vector 4-39
Vector on Grid Nodes 4-39
Thresholded Vector on Grid Nodes 4-40
Vectors along Section 4-40
Vectors along Grid Line 4-40
Update Vector Representation 4-41
Change Representation Scale 4-41
Change Color & Line Type 4-41
Vector Type Dialog Box 4-42
Delete Vector Representations 4-42
Vector Lines 4-43
Local Vector Line 4-43
Vector Lines from Section 4-43
Vector Lines from Grid Line 4-44
Vector Lines Parameters 4-44
Stream ribbons and stream tubes 4-46
Update Vector Line Representation 4-49
Update Color 4-49
Update Curve Type 4-49
Delete Vector Lines 4-49
4-7 Colormap & Representations Range 4-50
Insert Colormap 4-50
Control Representations Range 4-50
Range Set 4-50
Range Default 4-51
Range Active Surfaces 4-51
Update Colormap Representation 4-51
Smooth & Strip Maps 4-51
Change Colormap Position & Size 4-51
Update Axis Graduations & Label 4-52
Ticks & Numbers 4-52
Colormap Label 4-53
Select Colored, Greyscale or Black & White Mapping 4-53
4-8 Represent Particle Traces Data 4-54
Update Particle Traces Representations 4-54
Delete Particle Traces 4-55
4-9 Decoration Texts 4-55
Insert Text 4-55
Update Texts 4-55
Delete Texts 4-56
4-10 Update Representations 4-56
Undo 4-56
Delete 4-56
Representation Type Editors 4-57
Text Type Editor 4-57
Color Controller 4-58

viii CFView™
Contents

Font Type Controller 4-59


Curve, Line & Marker Type Editors 4-59
Line Type Editor 4-59
Marker Type Editor 4-60
Numbers Format Editor 4-61
4-11 Edit, Save & Restore Defaults 4-61
What Are Defaults ? 4-61
Load Defaults from File 4-62
Save Defaults to a File 4-62
Other User Preferences 4-62
Reverse Video 4-62
AutoGrid 4-62
Face Displacement 4-62
4-12 Surface Integrals 4-63
Surface Integrals of Scalar Quantities 4-63
Surface Integrals of Vector Quantities 4-64
4-13 Curve Integrals 4-65
4-14 Export Quantities Distribution 4-65
4-15 Output Generation 4-66
Output Format Description 4-67
PNG 4-67
PostScript 4-67
Other Formats 4-68
PostScript Page Layout Editor 4-68

CHAPTER 5: Turbomachinery Specific Features 5-1


5-1 Overview 5-1
5-2 Visualization in Blade to Blade Coordinates 5-1
Hub & Shroud Surfaces Definition 5-1
Open Blade to Blade View 5-3
Visualization of Blade to Blade Surfaces 5-3
5-3 Compute Meridional View by Azimuthal Averaging 5-5
Meridional Patches Definition 5-5
Compute & Open Meridional View 5-7
5-4 TurboMachinery Mode 5-8
Start TurboMachinery Mode 5-8
TurboMachinery Mode Description 5-8
Quit TurboMachinery Mode 5-10

CHAPTER 6: Animations & Unsteady Data Analysis 6-1


6-1 Overview 6-1
6-2 Animations in Steady State Data Sets 6-1
Animation of Vector Lines 6-2
Markers 6-2
Arrows 6-3
Animation by Mesh Surfaces Scrolling 6-6
Animation by Cutting Planes Scrolling 6-7

CFView™ ix
Contents

Recording a steady animation 6-8


6-3 Animation of Unsteady Data Sets 6-9
Recording an unsteady animation 6-10

CHAPTER 7: Macro Language 7-1


7-1 Overview 7-1
7-2 Python Language 7-1
7-3 Python Language Overview 7-2
Adding Commented Lines 7-2
Support for Mathematical Operations 7-2
String Handling 7-3
Lists Handling 7-3
Program Flow Control : Conditional & Loop Statements 7-4
Function Definition 7-4
File Handling 7-5
Execute Python Script from another Python Script 7-6
Create & Use Modules (Library of Functions) 7-6
7-4 Macro Script Examples 7-6
Compute Surface Integrals 7-6
Export Field Values to a File 7-8
7-5 CFView™ Command Description 7-9
Commands Related to Defaults Settings 7-9
Picture Output Generation 7-11
Commands Related to Project Handling 7-12
Commands Related to Additional Views Creation 7-14
Commands Related to Animation Control 7-14
Commands Related to Multiple Views Handling 7-16
Commands Related to Turbomachinery Mode 7-17
Commands Related to Meridional View Creation 7-17
Commands Related to Active View Only 7-18
Commands Related to Viewing Geometry of Active View 7-19
Commands Related to Mesh Representation 7-21
Commands to Obtain Informations on Data Set 7-23
Commands Related to Surface Creation 7-24
Commands Related to Surface or Group Surface Selection 7-26
Commands Related to Blade to Blade Definition 7-29
Commands Related to Surface Rendering 7-29
Commands Related to Quantity Selection 7-30
Commands Related to Quantity Probing 7-32
Commands Related to Scalar Quantity Representations 7-34
Local Values 7-35
Color Contours 7-35
Isolines 7-36
Iso-Surfaces 7-36
Plot Generation 7-37
Stream Lines 7-38
Commands Related to Vector Quantity Representations 7-41
Local Vector 7-41

x CFView™
Contents

Vectors Representations 7-41


Vector Lines 7-43
Commands Related to Time Label 7-44
Commands for Computing Integrals on Surfaces 7-44
Commands for Computing Mechanics 7-47
Commands for Computing Integrals Along Curves 7-47
Commands Related to Plot Manipulation 7-48
Commands Related to Colormap & Range Selection 7-51
Commands Related to Text Manipulation 7-52
Commands Related to Axes Systems Representations 7-54
Orientation Axes 7-54
Graduated Axes 7-54
Description of Argument List for Some Standard Features 7-55
7-6 Utilities for Handling Curves 7-56
Point Class 7-56
Curve Class 7-57

APPENDIX A:List of Shortcut Keys A-1

APPENDIX B:Input File Format B-1


B-1 Overview B-1
B-2 Native File Format B-2
General Concepts B-2
Create Identification File B-3
Project Identification B-3
Mesh Identification B-4
General Specifications B-4
Field Data Specification B-5
Surface Data Specification B-5
Domain(s) Identification B-5
Validation Data Identification B-7
Plot Data Identification B-7
Geometry Support for Blade to Blade Views B-8
Example of Complete Identification File B-9
Create Boundary Condition Files B-11
Unstructured Cell Connectivity File B-16
Create Topology File in ASCII Format B-17
Create Geometry & Quantity Files B-19
ASCII Geometry Files B-20
Field Data & Surface Data Geometry File B-20
Validation Data Geometry File B-20
Plot Data Geometry File B-20
ASCII Quantity Files B-20
CFView™ Tools for Native File Format B-20
B-3 FINE™/Turbo File Format B-26
B-4 CGNS File Format Support B-26

CFView™ xi
Contents

xii CFView™
CHAPTER 1: Getting Started

1-1 Overview
Welcome to the CFView™ User Manual, an illustrated presentation of the CFView™ capabilities.
This chapter presents the basic concepts of CFView™ and shows how to get started with the pro-
gram. Specifically, this chapter describes:
• what CFView™ does and how it operates,
• how to use this guide,
• how to run CFView™.

1-2 Introduction
CFView™ is the flow visualisation tool of the FINE™ integrated environment. It is designed for
the visualization of structured and unstructured meshes in multi-domain (multi-block) configura-
tions and provides a user friendly graphical interface (GUI) integrating two dimensional and three
dimensional plotting capabilities in a multi-window environment.

1-2.1 Features
CFView™ provides a set of powerful exploration tools for the interactive qualitative and quantita-
tive analysis of the field. This analysis can be performed on any surface and consists of representa-
tions such as local values, isolines, Cartesian plots, streamlines, contour shading and thresholding.
In addition, CFView™ provides a set of numerical probes for a quantitative investigation of the
flow properties anywhere in the computational domain.
The most important tools comprise the local value extraction, the quantity distribution along curves
(arbitrary section or mesh lines or streamlines) for detailed analysis of specific regions such as
boundary layers.

CFView™ 1-1
Getting Started Introduction

CFView™ provides the ability to display in Cartesian and cylindrical coordinates as well as in tur-
bomachinery blade to blade views. Scalar and vector quantities can be displayed and new quantities
can be computed by providing their mathematical formula. Pitchwise averaging can be performed
and comparison with experimental data or with other numerical data is easily obtained.
Another interesting feature of the system is the ability of scanning instantaneously the computa-
tional volume by scrolling through constant I, J, K mesh surfaces or by moving arbitrary cutting
planes. This feature gives the possibility to localize rapidly regions of interest in the field.
CFView™ is capable to visualize surfaces in hidden lines or shaded models with userdefined light
sources assigned to the views. When saving pictures several formats are available. The creation of
animations from unsteady data sets is extremely easy and the animations can be recorded as ani-
mated GIF files.
All these features are integrated in a highly interactive multiwindow environment which allows
loading different data sets for comparison during the same CFView™ run.
This version of CFView™ contains macro capabilities. A macro is a powerful tool that allows
recording a sequence of operations that can be played back later. It is also possible to create librar-
ies of custom macros to perform repetitive operations quickly.

1-2.2 Approach & Acknowledgments


The CFView™ system is designed using an object-oriented programming approach (OOP) and is
implemented in C++. In order to ensure maximal portability the software development platform
consists of the HOOPS graphics library and the Tcl/Tk toolkit (a package for the implementation of
GUI running on top of X Windows and Windows-NT).
A HOOP is a 3D graphics standard, developed by TechSoft. It is a versatile and efficient tool to cre-
ate, display and modify device independent graphics. The C++ binding and the graphical class
library were created for HOOPS in order to ensure an object-oriented code development and an
integration of 3D graphics.
CFView™ is also embedding the Python language interpreter (v 2.5.2 on windows and v2.5 on
linux) for the macro and template features.
The creation of PNG formatted pictures and animated GIF makes use of libraries included in library
magick v6.4.3
The creation of JPEG formatted pictures makes use of the sixth public release of the Independent
JPEG Group's free JPEG software.
The creation of TIFF formatted pictures makes use of the TIFF software distribution 3.8.
All the third party software components are copyrighted of their respective owners.

1-2 CFView™
Conventions Used in this Manual Getting Started

1-3 Conventions Used in this Manual


Some conventions are used to ease information access throughout this guide.
• Commands that should be typed in are in italics.
• Keys that should be pressed are in italics and surrounded by <> (e.g.: press <Enter>).
• Names of menu or submenu items are in bold.
• Names of buttons that appear in dialog boxes are in italics.
• Numbered sentences are steps that should be followed to complete a task. Sentences that follow
a step and are preceded with a dot (•) are substeps; they describe in detail how to accomplish the
step.

 The hand indicates an important note.

 The scissors indicate a keyboard shortcut.

A light bulb in the margin indicates a section with more detailed information on a
specific subject for advanced use of CFView™.

1-4 Outline
The first five chapters of this manual contain all information necessary for a beginning user to work
with CFView™. The advanced user may however also consult these first chapters when requiring
more detail about a specific task.
This first chapter tells how to start the application. Chapter 2 introduces the basics: the graphical
user interface and project management. To learn how to use and how to perform a specific task, turn
to Chapter 3 to Chapter 5. All the functionalities of the system software are gathered in a
step-by-step learning method.
For the more advanced user Chapter 6 and Chapter 7 and Appendix B provide more detailed infor-
mation. Chapter 6 describes the analysis of time dependent data sets. In Chapter 7 the macro system
of CFView™ is described with the available commands in Python language. The macro system is a
powerful feature that allows automating CFView™. To learn how to generate input files in the
CFView™ native file format, turn to Appendix B. It contains the description of the CFView™ input
data file system.

1-5 Running CFView™


1-5.1 Basic Installation
When using CFView™ for the first time verify that it is installed according to the installation note.
This installation note is provided with the software and should be read carefully. The following
points are specifically important:

CFView™ 1-3
Getting Started Advanced Options

• Hardware and operating system requirements should be verified to see whether the chosen
machine is supported.
• Installation of CFView™ according to the described procedure in a directory chosen by the user
and referenced in the installation note as ‘NUMECA_INSTALLATION_DIRECTORY’.
Depending on the provided installation package CFView™ is installed alone or in combination
with other NUMECA software.
• A license should be requested which allows for the use of CFView™. This license should be
installed according to the described procedure.
• Each user willing to use CFView™ or any other NUMECA software must perform once a user
configuration as described.

When these points are checked the software can be started as described in section 1-5.2.

1-5.2 Starting CFView™


1. CFView™ may be started from the FINE™ interface by pressing the CFView™ button ( ) or
by selecting the CFView item from the Modules menu.
2. CFView™ can also be started as a standalone application, outside of the FINE™ environment.
The starting procedure for the UNIX and LINUX based platforms is different from the one on
the Windows based platforms:
on UNIX and LINUX Platforms
Start CFView™ by typing: cfview <Enter> in a command shell.
The command may be followed by one or several command line arguments that are
described in section 1-6.1.
on Windows Platforms
Two different ways may be used to start CFView™ as a stand alone application.
• During the installation, an icon identifying CFView™ is created and inserted in the Start/
Programs/Fine# menu. Select the icon identifying CFView™ to start it as a standalone
application.
• It is also possible to start CFView™ from a command prompt window or by defining a
desktop shortcut. The full path name of the CFView™ executable must be typed. Typi-
cally, this will be C:\numeca_software\fine#\bin\cfview.exe <Enter>.
In a command prompt shell or in the string defining the command corresponding to a
desktop shortcut, one or several command line arguments may be added after the
CFView™ executable file name. These arguments are described in section 1-6.1.

1-6 Advanced Options


1-6.1 Command Line Arguments
CFView™ may be started with one or several command line arguments. The set of valid command
line arguments is described here. Unless specified differently, the command line arguments may be
used on UNIX, LINUX and Windows platforms.

1-4 CFView™
Advanced Options Getting Started

The command line arguments allow to override some system defaults (used graphics acceleration
driver, display device name, doublebuffering and updateabort options) or to specify files to be
loaded immediately (project, macro, defaults settings, macro module).
The supported command line arguments are:
• -help: prints a summary of the command line arguments.
• -version: prints the CFView™ version number.
• -backward <version number>: necessary when executing a macro file created with an earlier
version than CFView™ v8.
• -date: prints the CFView™ version date.
• -defaults <defaults file name>: starts CFView™ with the default settings from the specified file
(see section 4-11 for a complete description of defaults settings).
• -project <project file name>: starts CFView™ and opens immediately the specified project.
• -nob2b on: starts CFView™ and allows to avoid the hub and shroud projections process when
loading a turbomachinery solution file.
• -macro <macro script file name>: starts CFView™ and executes the specified macro script.
• -macromodule <macro module file name>: starts CFView™ and loads a specified macro mod-
ule (see section 2-6.2.8 for a description of the macro module feature).
• -display <display name>: starts CFView™ on the specified display device, overwriting the DIS-
PLAY environment variable (this feature is available only on UNIX and LINUX platforms).
• -doublebuffering (or -doublebuffering on): activates double buffering, overwriting the
NI_DOUBLEBUFFERING environment variable if existing (see section 1-6.2 "Customizing
the Graphics Option"). The argument -doublebuffering off disables the double buffering feature,
overwriting the environment variable.
• -updateabort (or -updateabort on): activates update aborting, overwriting the UPDATEABORT
environment variable if existing (see section 1-6.2 "Customizing the Graphics Option"). The
argument -updateabort off disables the update abort feature, overwriting the environment varia-
ble.
• -driver <driver name>: starts CFView™ with the specified graphics accelerator (see for infor-
mation on graphics accelerators section 1-6.2.4).
• -reversevideo (or -reversevideo on) starts CFView™ with black background color, overwriting
the REVERSEVIDEO environment variable if existing (See section 4-11.4.1). The argument
-reversevideo off starts CFView™ with a white background color (the default).
• -facedisplacement <n>: starts CFView™ with the specified face displacement (See
section 4-11.4.3).
• -loaddata all (-loaddata none, -loaddata ask). With the -loaddata all option (the default), when
opening a project the quantities fields are loaded in the computed memory. With the -loaddata
none, no quantity are loaded. And with the -loaddata ask argument, a specific dialog box is
raised where the user choose the field variables to be loaded. See section 4-2.2.1 for a descrip-
tion of the data management facility and of the associated dialog box
• -batch (or -batch on): starts CFView™ without graphical user interface. This mode can be used
in combination with the -macro command line option in order to perform the execution of a
macro script without user interaction.
• -turbomode (or -turbomode on): starts CFView™ with the turbomachinery analysis mode ena-
bled (see section 5-4), overwriting the TURBOMODE environment variable if existing. The
argument "-turbomode off" starts CFView™ in the standard mode, overwriting the environment
variable.
• -hoops_relinquish_memory off: this option disables the garbage collection feature in the
HOOPS graphics library that is activated when CFView™ is idle during a long period of time.

CFView™ 1-5
Getting Started Advanced Options

1-6.2 Customizing Graphics Options


1-6.2.1 Double Buffering
Double buffering is a graphics technology that allows smooth graphics refreshing. Without it,
graphics refreshing may cause flickering or flashing, depending on the graphics accelerator drivers.
By default, the double buffering is enabled for all the graphics accelerator drivers. In very rare
occasion, it has been observed that the doublebuffering is slowing down heavily the rendering
speed. In this case, double buffering may be disabled in the following way:
• on UNIX and LINUX platforms add a line in the shell configuration file (.cshrc or equivalent):
to set the environment variable NI_DOUBLEBUFFERING to off
• on Windows platforms the DOUBLEBUFFERING variable must be defined and its value set to
off in the Environment Variable dialog box, accessible from the Windows Control Panel (Start
/ Settings / Control Panel) by invoking the System icon.

1-6.2.2 Reverse Video


By default CFView™ is started with a white background. It is possible to have a black background
in three ways:
• through the interface selecting the toggle menu item Preferences/Reverse Video before loading
the solution file,
• using the command line argument -reversevideo when starting CFView™,
• setting the environment variable REVERSEVIDEO to ON (on all platforms).

1-6.2.3 Update Abort


When enabled, this feature allows to continue to access to the menu bar and dialog boxes during the
graphics updates. If the content of the graphics window changes during a refresh due to the contin-
uing user interaction, the graphics update is aborted and restarted with the new content.
When disabled, the user interaction is disabled during graphics update.
The default is to enable update abort. If, for some reason, this feature should be turned off, it can be
done in the same way as for double buffering (see above), except that the environment variable is
UPDATEABORT for all platforms.

1-6.2.4 Graphics Drivers


The graphics area of CFView™ interface uses by default an OPENGL driver that takes advantage
of the available graphics card. When the activation of OPENGL is causing problems, CFView™
uses an X11 driver (on UNIX) or MSW driver (for Windows) instead.
It is possible to explicitly change the driver used by CFView™ in the following ways:
on UNIX:
in csh or tcsh shell:
setenv NI_DRIVER X11
in bash or korn shell:
NI_DRIVER=X11
export NI_DRIVER
The selection will take effect at the next session.

1-6 CFView™
Troubleshooting Getting Started

on Windows:
• Log in as Administrator.
• Launch regedit from the Start/Run menu.
• Go to the HKEY_LOCAL_MACHINE/SOFTWARE/NUMECA International/Fine# register.
• Modify the DRIVER entry to either OPENGL or MSW.
The selection will take effect at the next session.

1-7 Troubleshooting
Unexpected termination of CFView™ may occur due to memory resources, network or graphics
server problems or other problems. In case of unexpected termination CFView™ tries to save a
script that allows, once CFView™ is restarted, to retrieve the visualization session at the point it
was interrupted.
On Windows platforms, the script is saved in the user home directory under the name
cfview_recover.py. On Windows the home directory is defined by the environment variable HOME.
If this variable is not defined the home directory is set to the concatenation of HOMEDRIVE and
HOMEPATH environment variables.
On UNIX and LINUX platforms, the script is saved in the .numeca subdirectory under the user
home directory and with the name .Cfview.recover.
To restart the session, CFView™ has to be restarted and the script has to be executed by selecting
File/Macro/Execute... This opens a file chooser dialog box, in which the recovery file has to be
selected.

CFView™ 1-7
Getting Started Troubleshooting

1-8 CFView™
Overview Graphical User Interface, Projects & Views

CHAPTER 2: Graphical User


Interface, Projects
& Views

2-1 Overview
This chapter presents the basic concepts used in CFView™. It is divided in 6 sections:
• user interface description,
• opening project,
• manipulating active view,
• manipulating graphics area (multi view operations),
• adding coordinate axis in a view,
• templates and macros.
The first section describes the basic concepts of the interface. The remaining sections provide
step-by-step instructions for loading and working with a project.

CFView™ 2-1
Graphical User Interface, Projects & Views Graphical User Interface (GUI)

2-2 Graphical User Interface (GUI)


When starting CFView™, the graphical user interface appears on the screen. The interface allows
to navigate through the system by interacting with all of its parts. It is subdivided into areas:

FIGURE 2.2.0-1 The graphical user interface

Creating flow field pictures with print quality is made very easy with CFView™ and usually con-
sists of the following steps:
1. The fluid flow simulation project is opened and a sketch of its geometry is drawn automatically
in the graphics area. When used in the FINE™ GUI environment, CFView™ is opening auto-
matically the current computational project. More than one project can be opened simultane-
ously (see section 2-3.3 for multiple project handling and section 2-3.2 for a detailed description
of the supported file formats).
2. One or several surfaces on which a flow quantity is to be represented are selected or created.
CFView™ allows selecting any of the boundary surfaces on which boundary conditions have
been defined, but also allows creating cuts at arbitrary locations as well as iso-surfaces. Please
refer to Chapter 3 for a detailed description of surface selection and creation.
3. The flow quantity and the type of representation are selected. Isolines, color contours, stream-
lines, iso-surfaces, solid rendering, Cartesian plots are among the most frequently used repre-
sentations available. The graphics area is updated automatically. Refer to Chapter 4 for a
detailed description of quantity selection and creation and also for a detailed description of the
various types of representations.
4. If necessary, the viewing point can be modified (see section 2-5) and the representation parame-
ters can be modified through dialog boxes (see section 4-10).
5. The final picture is printed in one of the available graphic formats (PNG, JPEG, PostScript...).

2-2 CFView™
Graphical User Interface (GUI) Graphical User Interface, Projects & Views

The user interface is organized in various parts: the menu bar, the toolbar, the Quick Access Pad, the
graphics area, the message area, the information area and the viewing buttons, as can be seen in Fig-
ure 2.2.0-1. Each part plays a specific role, as explained in the following sections.

2-2.1 Menu Bar

The menu bar is situated at the top of the layout. It consists of ten pull down menus: File, Edit, Geom-
etry, Render, Quantity, Representation, Update, View, Window, Preferences and Macros. They
contain all the commands needed to control CFView™.
The pull down menus are dynamic. Their content depends on the active project type (2D or 3D, struc-
tured or unstructured) and on the quantity selected. For example:
• In 2D, the Render pull down menu and a part of the Geometry pull down menu as well as other
items are not available.
• When selecting a scalar quantity, the content of the Representation pull down menu is different
from the menu available for a vector quantity.
• The content of the Quantity pull down menu is based on the quantities given in the project file.
For example, if there is no validation data loaded, this item will not be available.
When a command is not available, it appears in light grey and it is not possible to select it.

2-2.1.1 Pull-down Menu


There are five types of menu items:
• items with immediate response in the active view,
• items requiring mouse interactions in the graphics area,
• items requiring string input. They are followed by a left and right parenthesis: ().
• items opening a pull right menu, which may in turn contain all types of items. Such items are fol-
lowed by an arrow.
• items opening a dialog box or a chooser used for the selection of items in a list. These items are fol-
lowed by three dots (...).

2-2.1.2 Menu General Organization


The available functionalities are grouped into menus:
• The File menu contains the functionality related to
— data access: project, AutoGrid5™ CGNS, validation data, default parameters loading,...
— handling of templates and macros,
— activation of the turbomachinery analysis mode,
— printing (save images),
— leaving CFView™.
• The Edit menu offers the possibility to undo or redo one or several consecutive actions.

CFView™ 2-3
Graphical User Interface, Projects & Views Graphical User Interface (GUI)

• The Geometry menu contains


— the surfaces creation and selection functionality: mesh surfaces, cutting planes, blade to
blade surfaces, mesh surface for pitchwise averaging,
— the geometry representations functionality: surface, grid, wireframe and boundaries, repeti-
tions,
— the animation of representations: cutting plane and mesh surfaces sweeping, stream lines
animations,
— orientation axis and graduated coordinate system.
• The Render menu contains all the functionalities related to surface rendering.
• The Quantity menu allows selecting the quantity used for flow field representation. There are
five types of data:
— The field data: these are quantities which are given for the complete computational domain,
such as the pressure, the mach number or the temperature. There are two main kinds of field
data:
— the basic field quantities that are loaded from the project or are in the computer memory,
— the computed thermodynamics and vector components that are computed on the fly if
selected.
— The solid data: these are quantities which are existing only on surfaces such as skin friction,
heat transfer coefficient or the normal component of the velocity.
— The validation data: this data is coming from experiments or other computations used for
comparison with computed ones (required to be loaded through the menu File/Load Valida-
tion Data...).
— The plot data: they are related to arbitrary X-Y plots, such as convergence history or quanti-
ties selected in FINE™/Turbo on the Outputs/Surface Averaged Variables page.
— The particle traces data: they are externally computed traces attached to an inlet boundary
such as those computed by the Lagrangian Module under the page Optional Models/
Fluid-Particle Interaction within FINE™/Turbo.
— The Time Label: it allows to display the time for an unsteady computation
CFView™ has no limits on the number of input data points or quantities. The only limit is the
hardware memory storage.
• The Representation menu allows to invoke representation insertions. This menu is accessible
only when a quantity is selected and its content depends on the quantity type.
• The Update menu contains the functionalities that allow to modify the flow field representa-
tions after their insertion.
• The View menu contains the functionalities related to the handling of the active view:
— active view resizing and positioning,
— camera handling (see section 2-5 for a complete description).
• The Window menu contains the functionalities related to the creation and handling of views:
— additional view creation,
— views tiling.
• The Preferences menu contains the functionalities related to the defaults settings:
— default line and marker types for various kind of curves, default text font size and type,
— graphics parameters such as background color, face displacement, use of an underlying grid
for view position, graphics accelerator.

2-4 CFView™
Graphical User Interface (GUI) Graphical User Interface, Projects & Views

2-2.1.3 Keyboard Shortcuts


For more efficient use most of the menu items have a key binding, which can be activated when the
cursor lies in the graphics area. If a menu item has a key binding, it is written as an extension to the
menu item name. For example, under the File menu, the Open Project... command is followed by "P".
This indicates a shortcut. Hold down the <Shift> key and type <p> to invoke the Open Project... com-
mand. Note that the use of capitals is important in the shortcuts of CFView™. When the shortcut is
indicated by a capital this means that the character should be combined with the <Shift> key.

 Throughout this manual, a pair of scissors indicates keyboard shortcuts.

2-2.2 ToolBar
The toolbar is located right under the menu bar and allows performing common tasks. This bar is com-
posed of 14 buttons that allow performing different tasks.

In the case of unsteady data sets, the toolbar is extended by a set of specific buttons:

2-2.2.1 Open & Close Project Buttons


This button is a shortcut for opening a project by selecting a project file. See section 2-3.2, for a more
detailed description of project opening and of the supported file formats.
This button is a shortcut for partially opening a project by selecting required geometry and quantities
of a project file or for opening an unsteady project. See section 2-3.4 for a more detailed description of
steady state and unsteady project opening.
This button is a shortcut for closing the current project. See section 2-3.5, for a more detailed descrip-
tion of that function.

2-2.2.2 View Handling Buttons


This button is a shortcut for opening an additional view in Cartesian coordinates. See section 2-5.5.1,
for a more detailed description of that function.
This button is a shortcut for opening an additional view in cylindrical coordinates. See section 2-5.5.1,
for a more detailed description of that function.
This button is a shortcut for minimizing the active view. See section 2-5.5.5, for a more detailed
description of that function.
This button is a shortcut for maximizing the size of the active view. See section 2-5.5.5, for a more
detailed description of that function.
This button is a shortcut for deleting the active view. See section 2-5.5.4 for a more detailed descrip-
tion.
This button is a shortcut for inserting a decoration text. See section 4-9 for a more detailed description.

CFView™ 2-5
Graphical User Interface, Projects & Views Graphical User Interface (GUI)

2-2.2.3 Coordinate Axis Buttons


This button allows to display or removing the orientation axis, acting as a toggle. It performs
exactly the same task as the menu item Geometry/Coordinate System/Axis. See section 2-5.6.1
for a more detailed description of that function.
This button allows to display or remove the graduated coordinate axis, acting as a toggle. It per-
forms exactly the same task as the menu item Geometry/Coordinate System/Graduated Axis.
See section 2-5.6.2 for a more detailed description of that function.

2-2.2.4 Quantity Range Control Buttons


This button allows to start a modification of the active quantity range. It performs exactly the same
task as the menu item Representation/Range/Range Set. See section 4-7.2 for a more detailed
description.
This button allows to do a fitting back to the default quantity range. It performs exactly the same
task the menu item Representation/Range/Range Default. See section 4-7.2 for a more detailed
description of that function.
This button allows to do a fitting to the quantity range on the active surfaces. It performs exactly the
same task as the menu item Representation/Range/Range Active Surfaces. See section 4-7.2, for
a more detailed description of that function.

2-2.2.5 Unsteady Animation Buttons


The detailed description of unsteady data sets handling is provided in section 6-3.
This button allows to come back to the first time step.
This button allows to go to the next time step. The same representations are drawn in the views, but
with the data from the next time step.
This button allows to start an animation of the current representation. The same representations are
drawn in the views, for each time step successively.
This button allows to stop a running animation.
This button allows to enable or disable the automatic restart at the first time step, when the anima-
tion has reached the last time step. If the feature is turned on, the first time step is considered as the
one following the last time step. If the feature is turned off, the animation stops when it reaches the
last time step.
This button allows to free the RAM usage at each time step when post-processing unsteady data
sets. By default it is activated. See section 4-2.2.4 for a more detailed description.
This buttons allows to enable or disable the animation recording in an animated GIF format. It acts
as a toggle: when the recording is turned off, the button background is grey (this is the default) and
when the recording is turned on, the button background is yellow.

2-2.3 Quick Access Pad (QAP)


The Quick Access Pad is located on the left side of the user interface and contains icons and lists
providing direct access to commonly used functions in CFView™. It is divided in three main parts:
• The Surfaces subpanel provides easy ways to select and to create surfaces (see section 3-3.1).
• The Quantities subpanel displays the list of available quantities. It allows to select and to create
quantities (see section 4-2).

2-6 CFView™
Graphical User Interface (GUI) Graphical User Interface, Projects & Views

• The Representations subpanel provides icons for creating representations and for the computation
of surface integrals (see Chapter 4).
Each subpanel may be closed and reopened by clicking on its header.
The width of the Quick Access Pad may be augmented or narrowed by clicking and dragging the
square button situated on the right side of the Surfaces subpanel header.
The height of the Surfaces and Quantities subpanels may be increased or decreased by clicking and
dragging the square buttons situated at the bottom right of the subpanels.

2-2.4 Graphics Area


The graphics area is the part of the layout where all graphics objects appear. The graphics objects may
be distributed in different windows called views in the CFView™ terminology. These views can be
positioned arbitrarily in the graphics area and can also be moved, resized and iconized (see
section 2-5.5).
The selection as well as the drag and drop operations are directly connected to the mouse buttons and
are explained below. As detailed in section 2-5.1, only one view at a time can be modified. The active
view is highlighted by a red border. When the interactive mode is active, a describing message is
present at the bottom of the graphics area.
The mouse buttons have the following function when the cursor is located inside the graphics area:
• The left button (<1>) is used to select a point interactively.
— If the interactive mode is not active, the functionality associated with the picking selects the
object situated at the mouse location (see section 4-10).
— If the interactive mode is active, it depends on the mode that is currently active in that view (for
example: if the local value insertion is active, a click with the left mouse button will interpolate
the local quantity value on the active surface intersected by the line passing through that point).
• Middle button (<2>)
Used for dragging decoration text in view. It is also used for translation in the free rotation mode.
On two mouse buttons computers, this is also accessible through the left button with the <Ctrl>
key pressed.
• Right button (<3>)
— When one or several graphics objects are selected, pressing the right mouse button raises a con-
textual pop up menu providing access to the updating functionalities.
— When the interactive mode is active, it allows to quit the interactive mode.

2-2.5 Message Area


The message area is located immediately below the graphics area. Three types of text messages are
displayed on this line. Message types are easily identified by the background colour:
• Light yellow background: information messages.
• Black background: request messages. These messages are reminding the valid user interactions in
the graphics area or in the keyboard input area (see section 2-2.6).
• Red background: warning messages. These are non fatal errors. However, the result of the
requested operation may be altered.

CFView™ 2-7
Graphical User Interface, Projects & Views Graphical User Interface (GUI)

2-2.6 Keyboard & Viewing Control Area


This area contains a set of information on the current state of CFView™.

keyboard input area viewing buttons

quantity range monitor information output area

FIGURE 2.2.6-1 Keyboard & Viewing Area

The viewing buttons are described in section 2-5.3 and the three other regions are outlined below.

2-2.6.1 Keyboard Input Area


The multipurpose keyboard input area is present in the layout of CFView™ to allow input from the
keyboard. A prompt indicating the type of input is displayed on the left side of the string input win-
dow, e.g. ’enter isosurface value’. To perform a string input operation, move the cursor in the limits
of this area, click the left mouse button, enter the value(s) separated by a blank and press <Enter> to
execute the action.
The mouse buttons have the following function in this area:
• left button (<1>):
Click and release to select an insertion point in the string editor.
Click and hold to initiate a rate scrolling of text within the horizontal box, then move the cursor
to the left or to the right for scrolling. When the desired position is reached, release the button.
• right button (<3>):
After left-click on the graphics area, the right-click enables the user to leave the menu.

2-2.6.2 Quantity Range Monitor


The quantity range monitor displays the current range of the active quantity in the active view. By
default, this is the full range of the quantity determined from the input data. This range can be
smaller or larger than the full range (see section 4-7.2 for the quantity range control).

2-2.6.3 Information Output Area


In this area, the quantitative information are displayed. Three kind of values are displayed:
• The results are obtained from surface or curve integrals (see section 4-12 and section 4-13).
• When pressing the left mouse button in the graphics area while no graphics object is selected
and when no interactive mode is active, the cursor position is displayed.
• This area also displays a progress bar during some computationally intensive operations.

2-8 CFView™
Project Management Graphical User Interface, Projects & Views

2-3 Project Management


In this section it is described how to open and close a project and which type of data sets are supported
by CFView™.
The data related to the current computation is loaded automatically when CFView™ is opened
through the FINE™ GUI environment. Furthermore (additional) projects may be opened by selecting
in CFView™ File/Open Project... and selecting a data file in the file chooser. The available file types
depend on the selected type of output for the computation. In section 2-3.2, the file formats that can be
opened by CFView™ are listed.
When starting CFView™ with a command line in a shell the -project command line argument may be
used to load a specific data file (see section 1-6.1). If the command line argument -loaddata is used,
the project loading may be restricted to the geometry only or to the geometry with a user defined sub-
set of flow fields (see section 1-6.1, for further details).
A project can also be opened through File/Open Project Selection... It allows the user to partially load
the geometries and quantities of the project, or to open unsteady projects. See section 2-3.4.
The data loading process is completed when the messages "Reading..." have disappeared. When the
reading operation is completed, CFView™ opens a new view and automatically displays the bounda-
ries of the solid surface(s) of the geometry. This view becomes active and all following actions are
related to this view. From that moment the system is ready for the visualization session and the control
of the system is accomplished through the use of the menu items, the Quick Access Pad or through the
graphics area itself. The name of the project is indicated on the upper part of the CFView™ session.

 To open a project, the user must have the read permission on the file and the execute per-
mission on the whole directory path where the project related files are located.

2-3.1 File Chooser


The layout of the File Chooser depends on the used operating system but a typical layout is shown
below. Select the path of the directory containing the file using the list of directories or to add the path
directly in the string editor. To filter the available files in the selected directory choose a file type in the
list of file types (for more detail on the available file types see section 2-3.2). In the list of files, auto-
matically the files corresponding to the chosen file type are displayed for the selected directory. Select
the file and press OK (Open) to open the file.

FIGURE 2.3.1-1 Typical layout of a File Chooser

CFView™ 2-9
Graphical User Interface, Projects & Views Project Management

2-3.2 Supported File Formats


CFView™ supports several file formats and each file format is identified by the extension of the
file name. The following sections describe how to open files that are in the CFView™ native, in the
FINE™/Turbo, in the CGNS or in the PLOT3D file format.

2-3.2.1 Open CFView™ Native File Format (.cfv)


All the information concerning the project is included in the identification file. This file has the
’.cfv’ extension. FINE™/Turbo is creating such files when doing unsteady computations or select-
ing meridional averaged variables. Refer to section B-2, to have a complete description of this for-
mat.

2-3.2.2 Open FINE™/Turbo File Format (.run & .cgns)


The FINE™/Turbo formatted files have the ’.run’ extension. This is a file format specific to the
FINE™ GUI environment. When running a computation with FINE™/Turbo, all files related to the
computation and its solution are stored in one directory. When opening a ’.run’ file in CFView™ it
is necessary to have the corresponding ’.cgns’ file in the same directory with the same name (this
last file is automatically saved by FINE™/Turbo).

2-3.2.3 Open Autogrid5 CGNS (.cgns)


This menu allows to visualize the mesh file from AutoGrid5, without performing a computation.

2-3.2.4 Open CGNS Formatted File (.cgns)


CFView™ is able to open CGNS formatted files that are containing exactly one base (Refer to the
CGNS documentation for details on this file format). The loading of CGNS file containing more
than one base is possible only through the OpenCGNSProject macro command (see section 7-5.3).
The following types of projects are supported:
• multi-zone structured data sets with both topological and geometrical dimensions equal to 2,
• multi-zone structured data sets with both topological and geometrical dimensions equal to 3,
• single zone unstructured data sets with both topological and geometrical dimension equal to 2,
• single zone unstructured data sets with both topological and geometrical dimension equal to 3,
• multi-zone data sets mixing structured and unstructured and with topological dimension equal
to 2 and geometrical dimension equal to 3.

2-10 CFView™
Project Management Graphical User Interface, Projects & Views

2-3.2.5 Open Plot3D Formatted Files


Plot3D formatted files can be loaded in CFView™ using File/Open Plot3D Project... . As the data in
this format may be provided in one or several files, a specific file chooser dialog box will appear as
shown below.

FIGURE 2.3.2-1 Plot3D File Chooser

The first entry should contain the name of the geometry file, the second one should contain the name
of the solution file and the last two entries should contain the name of the function file and the associ-
ated name file. A Plot3D project must always contain a geometry file. A project can also be composed
of a geometry and a solution file. The last kind of project contains the four file types.
As various kind of file formats are allowed in the Plot3D format, the user should provide information
on the file format by clicking on the File Format... button in the Plot3D file chooser box or by select-
ing the Plot3D file type... item in the Preferences menu. The dialog box as shown below will appear.

FIGURE 2.3.2-2 Plot3D File Type Editor

The dialog box contains, on the left side, the parameters related to the grid type:
• multiblock: must be selected if the grid contains more than one block;
• blanking: must be selected if blanking information is included in the files. It should be emphasized
that this parameter relates to the presence of the blanking information in the file. It may happen
that such information is included even if no grid point is blanked.
On the right side, the parameters related to the file formatting are as follows:
• file type: may be ASCII, binary single precision, binary double precision, unformatted single preci-
sion or unformatted double precision;
• binary big endian/binary low endian: this information relates to the byte ordering on the machine
on which the files were created. This does not apply to ASCII formatted files.

CFView™ 2-11
Graphical User Interface, Projects & Views Project Management

The file format is stored as a part of the user defaults. If the file format default options are changed
during a CFView™ session, CFView™ prompts the user that the defaults have changed and pro-
poses to save them. Saving of the defaults is done automatically at the moment CFView™ is quit. If
the user saves the new defaults, the Plot3D file format may be restored in the next sessions. Default
restoring may be automatic or manual (see section 4-11 for further information on loading
defaults).
Plot3D files created by FINE™/Turbo can be binary low endian (little endian) single precision
unformatted or ASCII (imposed in the Outputs/Computed Variables page within FINE™/Turbo),
whatever the platform was used to run the computation. This is also the CFView™ default. Note
that Intel processor and Compaq alpha processor based platforms are natively low endian (little
endian), while the RISC processors (used in SGI, HP, IBM and SUN UNIX workstations) are
natively big endian.

 With binary or unformatted file, a wrong binary ordering specification (e.g.: big
endian instead of low (little) endian) may lead to unpredictable behaviour, including
application crash.

2-3.3 Open Multiple Projects


The multiview environment of CFView™ allows to simultaneously load different projects during
the same run and to manipulate them in a similar way. This feature is particularly useful when com-
parative analysis is made between computations based on similar geometry.

If CFView™ is already open, click Open ( ) on the toolbar or choose Open Project... in the File
menu to open a new project. The number of files that can be opened at the same time is limited by
the memory of the system.

 The keyboard shortcut for File/Open Project... is: <Shift-p>

2-3.4 Partial Loading


The partial loading is a useful tool to load part of the geometry and quantities instead of the com-
plete project. This functionality reduces the CPU time and memory usage and is especially interest-
ing for post-processing large projects. However, it also allows to open unsteady projects and select
the time steps to load.
The tool is compatible with steady, harmonic and unsteady data sets. If the project is harmonic or
unsteady, CFView™ searches for available time step files in the project directory and provides
additional controls in order to allow the user to choose the first and the last time step as well as the
interval between two consecutive time steps.
Access this feature by selecting Open Project Selection… from the File menu or from the Open
Project Selection ( ) button in the CFView™ toolbar

 The keyboard shortcut for Open Project Selection… is <p>.

2-12 CFView™
Project Management Graphical User Interface, Projects & Views

The data file can be selected from the pop-up file chooser window. Selection of the data file leads to
the Partial Loader dialog box. Depending on the selection of a steady, harmonic or unsteady project,
the dialog box is different.
• When a steady project is selected, the Partial Loader dialog box appears as shown in Fig-
ure 2.3.4-1.
— The left frame in the dialog box allows loading part of the geometry by selecting their corre-
sponding check box among the existing geometries available in the data file.
— The right frame in the dialog box allows loading part of the available quantities by selecting
their corresponding check box among the existing quantities available in the data file.
— Filter string input area allows to select or deselect the geometries by their name, if the Select or
Unselect button is selected respectively. Type full or fractions of the name of the geometries
need to be filtered and click the Select or Unselect button as defined by the requirement and
press <Enter>.

FIGURE 2.3.4-1 Partial Loader dialog box for a steady project

• When an unsteady project is selected, the Partial Loader dialog box appears as shown in Fig-
ure 2.3.4-2. Two extra radio buttons are available for time step selection:
— All Time Steps: load all the time steps available in the directory of the unsteady data file.

CFView™ 2-13
Graphical User Interface, Projects & Views Project Management

— The second radio button applies for selecting Initial and Final time steps along with an
Interval between two consecutive time steps.

FIGURE 2.3.4-2 Partial Loader dialog box for an unsteady project

• When an harmonic project is selected, the Partial Loader dialog box appears as shown in Fig-
ure 2.3.4-3. New buttons are available:
— Reconstruct unsteady project: ability to reconstruct solutions in time from harmonic
results.
— The radio button applies for selecting the Number of time steps.
— The second input is the Number of repeated blade channels in each row.

FIGURE 2.3.4-3 Partial Loader dialog box for an harmonic project

2-14 CFView™
Import Validation Data Graphical User Interface, Projects & Views

2-3.5 Close Project

To remove a given project from CFView™, click Close ( ) on the toolbar or choose File/Close
Project... from the menu. The active view and all the views related to that project are closed. Remem-
ber that each view has always one project associated with it.
To quit CFView™, select File /Quit CFView.

 The keyboard shortcut for File/Quit CFView... is: <Ctrl-q>

2-4 Import Validation Data


To load validation data, select File/Load Validation Data.... A file chooser appears and, by default,
filters the files with a ’.dat’ extension. To select a file with a different extension select All Files in the
List Files of Type section of the file chooser (see section 2-3.1 for more information on the file
chooser). Select the file containing the validation data. Once imported successfully, the validation data
are available through the Quantity/Validation Data menu. (see section 4-4 for detailed information
on validation data representation).
The validation data must be provided in ASCII file format describing the data set along one curve in
the Cartesian coordinates space. The file has the following format:
• a header line which contains:
— the number of geometrical coordinates. It is usually 3, but it may be 2 or 1. If this number is 2,
the Z coordinate is assumed to be null. If this number is 1, both Z and Y coordinates are
assumed to be null.
— followed by the number of quantities and the number of curve points,
— followed by the names of the quantities surrounded by ’|’ characters.
• the content lines where each line contains:
— the X, Y and Z coordinates of one point,
— followed by the quantity values.
This format is compatible with the curve plot export facility (see section 4-3.8).
Example:
3 1 65 |magnitude V|
1.200000e-001 6.007622e-002 0.000000e+000 9.515225e-002
1.180000e-001 6.007622e-002 0.000000e+000 8.875245e-002
...
6.499933e-002 6.007622e-002 0.000000e+000 2.244284e-005
6.499832e-002 6.007622e-002 0.000000e+000 0.000000e+000

CFView™ 2-15
Graphical User Interface, Projects & Views Views Manipulation

2-5 Views Manipulation


CFView™ operates as a multi-window system in which 2D and 3D graphics objects can be simulta-
neously and independently displayed and manipulated. A window is called a view in CFView™ ter-
minology. The number of windows and tasks assigned to them is unlimited (except by system
resources). Any representation of the field may be applied and combined inside one or more views.
CFView™ recognizes three types of views:
• 2D views which are primarily related to 2D data,
• 3D views which are related to 3D data,
• Cartesian plot views which are used to display data in a Cartesian plot form.
When starting CFView™ only one view is created that occupies the entire graphics area. It is possi-
ble to create additional views by opening a new project or by explicitly requesting a new view for
the same data set. In addition CFView™ creates Cartesian plot views whenever a scalar quantity
distribution (Representation/Cartesian Plot) is requested. The newly created view becomes the
active view. All subsequent actions, by using the menus or viewing buttons, are related to it.
To manage the set of views, use special menu items dedicated to view manipulations such as resiz-
ing, moving, iconizing or deleting a view. It is also possible to tile all non iconized views to the
graphics area. This gives a flexible way to customize the screen layout dedicated to graphics and to
produce plots for scientific publications and technical reports.

2-5.1 Active View


Although CFView™ allows any number of views to appear on the screen, only one view may be
active at a given time. The active view is the view to which all viewing operations and data manip-
ulations are applied by using the viewing buttons and menus.
The active view always appears on top of all the other views (view stack) and is recognized by its
red border, while the other views appear with a black border.
It is possible to activate any other view for interactive work. To do so, use the left mouse button:
click inside the view, to pop-up the desired view of the stack on top of the others.

2-5.2 View Concepts


The way the user looks at a certain scene is defined by 4 parameters controlling a virtual camera.
• The view point represents the position of the camera.
• The target point represents the point where the camera is pointing to.
• The view up direction controls the direction the top of the camera should face.
• The width and height control the span around the target to be visible.
In addition we can define:
• The view normal direction going from camera target to camera position.
• The target plane which is the plane passing through the target and normal to the views normal
direction.

2-16 CFView™
Views Manipulation Graphical User Interface, Projects & Views

target plane
width

v
u

target point
n view point

u: view right vector


height v: view up vector
n: view normal vector

FIGURE 2.5.2-1 View Definition

Each viewing operation affects one, some or all the parameters of this camera. The parameters affected
by each operation are specified at the end of each description.
Whenever a view is opened or a new surface is added to the active view, CFView™ automatically
computes the box such that all the graphics objects fit inside.

2-5.2.1 Projection Mode


CFView™ provides three types of projection modes to display three-dimensional objects (View/
Parameters):
• Orthographic: they are typically used to represent the metric properties of an object and to show
the exact shape of a side parallel to the plane of the screen.
• Stretched : this mode is similar to orthographic, except that when the view is resized the
observed object is scaled in the same way
• Perspective : they give a more realistic representation of an object as seen from an observer at
a specific position. This position, called the reference point, can be used to
change the appearance of the graphics objects on the screen. The closer the point
is, the more distorted the objects will appear. On the other hand, if the reference
point is far from the objects, the projection will look like an orthogonal projec-
tion (Orthographic). CFView™ provides a convenient way to modify the posi-
tion of this reference point by controlling its distance from the objects using the
Continuous zooming ( ) viewing button. Refer to "The Viewing Buttons"
section 2-5.3 here below.
The default projection mode is orthogonal (Orthographic).

 The interactive picking cannot be done in perspective views. Hidden line may not work
properly in perspective views, when the projection point is too close to the object.

CFView™ 2-17
Graphical User Interface, Projects & Views Views Manipulation

2-5.2.2 Change Representation Scale


To change the scaling factors for the 3D or 2D scenes, select Scale from the Geometry menu. Then
enter the 3 or 2 scaling factors for each of the directions. Press <Enter> in the keyboard input area
in order to validate the entry. The scale factors are applied to the active view. A value lower or
larger than 1 is respectively stretching in or out the geometrical representation for the related direc-
tion. Finally a value of 1 is leaving the geometry unaffected.

2-5.3 Viewing Buttons

There are 13 buttons allowing to perform various operations on the active view: viewing operations
affect the way the user looks at the project.
Most viewing operations are interactive:
• Press on the left (<1>) or middle (<2>) mouse button to initiate the operation.
• Drag the mouse. Depending on the operation, the position of the mouse will affect some param-
eters of the camera.
• Release the mouse button when finished.
If the option View/Parameters/Full Render is disabled then the scene in the active view is reduced
(hidden surface removal is deactivated, markers are removed, text is removed, colormaps are
removed, etc....) during interactive operation in order to maximize the response of the graphic sys-
tem.

2-5.3.1 X, Y & Z Projection Buttons


These buttons allow to set the camera position in order to bring the view normal parallel to X, Y or
Z coordinate directions. This option is also accessible through the menu View/Projection/.

2-5.3.2 Translate Button


This button allow to scroll (translate) the camera in a given direction, the direction the camera is
being pointing is remaining unchanged.
• Press on the left mouse button to initiate the operation.
• Then drag the mouse in the direction of interest.
• Release when finished.
This button allows also to perform a continuous scrolling of the camera:
• Press on the middle mouse button to initiate the operation.
• Then drag the mouse in the direction of interest. The continuous scrolling speed and direction
are proportional to the dragging amplitude and direction.
• Release when finished.
These operations affect the camera position and target.

2-5.3.3 Dynamic Viewing Button


This button allows to rotate and translate the camera position around the target as well as to zoom
and to fix the rotation center and to zoom in/out.
• Click with the left mouse button to start the operation mode.

2-18 CFView™
Views Manipulation Graphical User Interface, Projects & Views

• Press, drag and release the left button in the graphics area to rotate the camera. Move the mouse
left-right for a rotation around the vertical axis or forward-backward for a rotation around a hori-
zontal axis.
• Press and release the left mouse button with the <Shift> key pressed to select a new rotation center.
The rotation center is chosen in two steps: first if at least one active surface is under the mouse
pointer, the point which is the closest to the observer is chosen. If no such points exists,
non-selected surfaces are considered and if no point is found, the selection is aborted.
• Press, drag and release with the middle mouse button to translate the camera. This is also available
with the left mouse button with the <Ctrl> key pressed.
• Press, drag and release the middle button with the <Shift> key pressed for zooming in or out. This
is also available through the left mouse button with the <Ctrl> and <Shift> keys pressed simultane-
ously.
• Roll the middle-mouse button to perform a zoom where the mouse is pointing.
• Press and release the right button to quit to operation mode.

 The shortcut key for dynamic viewing is <F1>.

2-5.3.4 X, Y & Z Rotation Buttons


These buttons allow to rotate the camera about the principal coordinate directions (X, Y or Z for views
in Cartesian coordinates; R, θ or Z for cylindrical coordinates,...).
1. Press on the left mouse button to initiate a rotation operation.
2. Then drag the mouse to the left or to the right to rotate clockwise or counterclockwise.
3. Release when finished.
These buttons allow also a continuous rotation:
1. Press on the middle mouse button to initiate a rotation operation.
2. Then drag the mouse to the left or to the right to start a continuous clockwise or counterclockwise
rotation. The rotation speed is proportional to the dragging amplitude.
3. Release when finished.
Rotation affects only the camera position.

2-5.3.5 Roll Button


This button allow to roll the camera around the view normal and affects the view up direction:
1. Press on the left mouse button to initiate a rolling operation.
2. Then drag the mouse to the left or to the right to roll clockwise or counterclockwise.
3. Release when finished.
This button allows also a continuous rotation:
1. Press on the middle mouse button to initiate a rotation operation.
2. Then drag the mouse to the left or to the right to start a continuous clockwise or counterclockwise
rotation. The rotation speed is proportional to the dragging amplitude.
3. Release when finished.

2-5.3.6 Zoom In/Out Button


This button allows to interactively zoom in and out and thus affects the camera width and height:
1. Press on the left mouse button to initiate a zooming operation.

CFView™ 2-19
Graphical User Interface, Projects & Views Views Manipulation

2. Then drag the mouse to the left or to the right to zoom in or out.
3. Release when finished.
This button allows also a continuous zoom in or zoom out operation:
1. Press on the middle mouse button to initiate the zoom operation.
2. Then drag the mouse to the left or to the right to start a continuous zoom. The zooming speed is
proportional to the dragging amplitude.
3. Release when finished.

2-5.3.7 Zoom Area Button


This button allows to specify a rectangular area of the active view to fit to the whole view. This
affects the camera position, target, width and height:
1. Press and release the button to initiate an area zoom operation.
2. Move the mouse to the active view and press the left mouse button on the first corner of the rec-
tangular area.
3. Drag the mouse to the second corner and release the left mouse button.
The operation may be repeated several times. Press the right mouse button to quit the interactive
mode

 The shortcut for defining the zoom area is <F2>.

2-5.3.8 Fit Button


This button allows to fit the scene to the view and affects camera position, target, width and height:

 The shortcut to fit the scene to the view is <F3>.

2-5.3.9 Original Button


This button allows to bring the active view in a default viewing state and affects all the parameters
of the camera. This default viewing state is referred to as the “original” view and is also accessible
through View/Projection/Original.

 The shortcut to return to the default viewing state is <F4>.

2-5.4 View & Window Menus


The functionalities related to the view handling are grouped in the View and Windows menu. The
View menu contains the functionalities that affect the active view directly, while the Window menu
contains the items for the creation of new views and for the tiling of the views in the graphics area.
The Projection and Parameters submenu are described first. In section 2-5.4.1 multiple view han-
dling and the other items from these menus are described.

2-5.4.1 View/Projection
The Projection submenu in the View menu contains the following commands:

a) Original

To reset the view in its default orientation select this item. The associated viewing button is ( ).

2-20 CFView™
Views Manipulation Graphical User Interface, Projects & Views

 The keyboard shortcut to reset the view in its default orientation select <o>

b) X Constant, Y Constant, Z Constant


To update the view parameters to obtain X, Y or Z constant projection of the objects, choose one of
these three commands from the View/Projection menu. The associated view buttons are , , or

 The keyboard shortcuts for X constant, Y constant or Z constant are respectively <x>,
<y> or <z>.
To go back to the original view use View/Projection/Original or use the short cut: <o>.

2-5.4.2 View/Parameters
This menu allows to exactly setup the view by giving an orientation to the view coordinate system.
This is done through two variables, the Normal vector and the Up Vector. The Normal vector is a
vector perpendicular to the screen and pointing outside it. The Up Vector is a vertical vector in the
plane of the screen. Giving the coordinates of this vector rotates the coordinate axes around the normal
vector. These two vectors are always perpendicular. If the perpendicularity is not respected when
entering the coordinates of the Up Vector, the system will automatically replace it with its projection
in a plane perpendicular to the Normal vector.
This submenu allows also to set some of the viewing parameters and to choose the projection mode
(see section 2-5.2.1): Orthographic, Stretched or Perspective.

a) Normal
This command allows to enter the coordinates of the Normal vector. To do so:
1. Choose Normal from the Parameters pull right menu.
2. Move the mouse to the keyboard input area and enter the coordinates of the Normal vector or
press, drag and release with the left mouse button in the active view to indicate the desired normal
direction.

b) Up Vector
This command allows to enter the coordinates of the Up Vector. To do so:
1. Choose Up Vector from the Parameters pull right menu.
2. Move the mouse to the keyboard input area and enter the coordinates of the Up Vector or press,
drag and release with the left mouse button in the active view to indicate the desired up direction.

c) Full Render
When not being in Full Render mode CFView™ automatically degenerates all shaded representa-
tions, such as solid model and color contour during rotation and translation in order to improve the
operation speed. This is the default mode. To disable or enable this feature, select this item. It acts as a
toggle.

 The keyboard shortcut for Full Render is: <Shift-v>

CFView™ 2-21
Graphical User Interface, Projects & Views Views Manipulation

d) Display Shadow

When activating the Display Shadow feature in this menu or the button in the QAP, a shadow
is drawn under the scene. Its position and the light direction change according to the view. The
shadow is always drawn on an horizontal plane, located at the bottom of a bounding box, enclosing
the scene. The direction of the light source generating the shadow is always vertical.

e) Fast Preview
When the user has semi-transparent surfaces in its view, the time needed to generate an image in a
big scene can acheive a couple of seconds. Because of this lack of interactivity, changing the cam-
era position is really difficult. To solve this problem, the Fast Preview mode can be activated. In
this mode, all the costly rendering options are disabled (transparency, environment map).
This mode will give different opportunity to help the user in large scenes:
— Set the materials in normal mode, switch temporary to the Fast Preview mode to set the
camera, and switch back to normal mode to see the final result.
— Switch to Fast Preview mode, edit a set of material properties, and switch back to normal
mode to see all the modification at once.

 The message "Fast preview mode" is displayed when the mode is active in the menu

f) Transparent
This command allows to make a view transparent. To do so:
1. Activate the view to make transparent.
2. Choose Transparent from the Parameters pull right menu. The view becomes transparent.
This command acts as a toggle: a second selection disables the transparency.

 The keyboard shortcut for Transparent is: < - >

g) Border
This command allows to hide the border of the view. To do so:
1. Activate the view to edit.
2. Choose Border from the Parameters pull right menu. The border of the view disappears.
This command acts as a toggle: a second selection makes the border visible again.

 The keyboard shortcut for Border is: <Shift-b>

h) Stretched, Orthographic, Perspective


These three menu items allow to control the projection mode of the active view (see
section 2-5.2.1).

2-22 CFView™
Views Manipulation Graphical User Interface, Projects & Views

2-5.5 Multiple Views


2-5.5.1 Open Additional Views
To open a new Cartesian view, choose Open Cartesian from the Window pull down menu. To do so
specify a rectangular area to indicate the location of the new view:
1. Move the mouse to the active view and press the left mouse button on the first corner of the rectan-
gular area.
2. Drag the mouse to the second corner and release the button.
Open Cylindrical opens a view in the (r, θ, z) coordinate space.
Open Blade to Blade in the (s, θ, m) coordinate space. For a description of the (s, θ, m) coordinate
space refer to section B-2.2.6.
Compute & Open Pitch Average starts the computation of a pitch average project and opens a merid-
ional (2D) view. Refer to section 5-3.2 for a detailed description of this feature.

 The keyboard shortcut for Open Cartesian is: <Shift-n> and the toolbar buttons associ-

ated to the opening of respectively Cartesian and cylindrical views are and .

2-5.5.2 Refresh Graphical Area Display


To refresh the content of the graphics area, select Refresh from the Window menu. CFView™ is
refreshing automatically the graphics area content and this command does not need to be used under
normal conditions.

2-5.5.3 Reset View Content & Viewing Parameters


To reset the view content as it was just after opening it, choose Reset View from the Window menu.

2-5.5.4 Close Active View


To close the active view and delete all the representations, choose the Close item from the Window
menu. After deletion it is not possible to retrieve the content. In this way memory space can be made
available again.
When all the views associated with a project are deleted, the project is at the same time deleted from
the system.

 The keyboard shortcut <Ctrl-n> and the toolbar button permit to close the view.

2-5.5.5 Change View Size/Position


The view size and position can be changed by selecting the appropriate feature from the View pull
down menu. The view border can also be selected with the left mouse button in order to activate the
view move or resize interactive mode. This section describes first the functionalities from the View
menu and then provides a description of the interactive move or resize mode.

a) Maximize
To expand the active view over the entire Graphics area, choose Maximize from the View pull down
menu.

 The keyboard shortcut is: <f> and the toolbar button associated is .

CFView™ 2-23
Graphical User Interface, Projects & Views Views Manipulation

b) Preferred Size
To return to the size of the active view before the last full screen or icon operation select Preferred
Size from the View pull down menu.

 The keyboard shortcut is: <7>

c) Minimize
To iconize the active view select Minimize from the View pull down menu.

 The keyboard shortcut is: < . > and the toolbar button associated is .

d) Push Back
To push back a view, select the Push Back item. The active view is redrawn behind any overlap-
ping view.

e) Move/Resize
To move or resize the active view in the graphics area, choose Move or Resize from the View
menu. Both are starting the interactive move or resize mode described in section 2-5.5.6.

 For compatibility with previous versions, two shortcuts are recognized: <m> and
<r>.

f) Interactive Move/Resize Mode.


When move or resize are selected from the View menu, or when the view border is selected with the
left mouse button, the interactive Move or Resize mode is activated. The cursor appearance is
changed.
In this mode, the mouse binding are as follows:
• When the mouse pointer is positioned near a view corner or at mid distance along one of the
view side, the cursor is changed into a symbol (i.e. ) indicating which type of resizing opera-
tion can be performed. At this moment, if the left mouse button is pressed, a resizing operation
is started. By dragging, without releasing, the mouse pointer into a new location the view is
resized accordingly. The resizing operation is validated by releasing the left mouse button.
• When the mouse pointer ( ) is positioned inside of the view. Pressing, dragging and then
releasing with the left mouse button is moving the view accordingly.
•When the right mouse button is pressed a pop up menu is raised that provides
access to the commonly used features. These features are enabling to change the
view size, to send it to back or to bring it to the front and to close the view.
•The interactive mode is quit by a simple left-click inside the view.

2-5.5.6 Tiling Views


To tile the non iconized views to the entire graphics area select Tile Views from the Windows
menu.

2-24 CFView™
Views Manipulation Graphical User Interface, Projects & Views

2-5.5.7 Arrange Iconized Views


To arrange the current iconized views in the graphics area select Arrange Icons from the Windows
menu.

2-5.5.8 Swap Views


It is possible to swap a view with another view, i.e. exchanging their position and size. To do so:
1. Select the first view with the mouse.
2. Choose Swap Views from the View pull down menu.
3. Select the second view with the mouse. The two views are swapped.

 The keyboard shortcut for Swap Views is: < / >

2-5.5.9 Align Views


This command allows to align the camera position and orientation of a view with another. To align a
view:
1. Select the model view for alignment.
2. Choose Align Views from the View pull down menu.
3. Click with the left mouse button into the reference view on which to align the active view. The
camera position and orientation parameters will be automatically set to those of the reference view.

 The keyboard shortcut for Align Views is: < = >

2-5.5.10 Superpose Views


This command allows to superpose two views in order to compare their contents. The active view is
placed on top of another one and the active view is set transparent. To superpose a view:
1. Activate the view to superpose.
2. Choose Superpose Views from the View pull down menu.
3. Click with the left mouse button into the target view on which to put the active view. The active
view is superposed and becomes transparent.

 The keyboard shortcut for Superpose Views is: <+>

2-5.6 Add Coordinate Axes


CFView™ provides two types of coordinate systems, both right handed: the orientation axis and the
graduated axis. Both types of coordinate systems are explained in this section.

2-5.6.1 Insert Orientation Axes


The orientation axes make a small local coordinate system displayed without graduations. By default,
it is displayed in the lower right corner of the view. And it defines the principal directions as a help for
the viewing operations.

The orientation axis is inserted in the active view by selecting the toolbar button or by selecting
Axis in the Geometry/Coordinate system submenu. The button and the menu item are acting as tog-
gles: a second selection removes the axis representation.
The orientation axis origin may be changed easily:

CFView™ 2-25
Graphical User Interface, Projects & Views Views Manipulation

1. Select the axis representation in the view by clicking on it. A set of highlighting markers are
appearing.
2. Place the mouse cursor on the axis, then press, drag and release with the left mouse button to
place it at the desired location.
The size of the orientation axis may be increased or decreased in the following way:
1. Select the axis representation in the view by clicking on it. The highlighting markers are shown.
2. Press the right mouse button, a pop up menu appears.
3. Select Set Larger or Set Smaller to increase or decrease the representation size.
The pop up menu offers also the possibility to discard the axis representation from the view. To do
so, select the Hide item in the pop up menu.

2-5.6.2 Insert Graduated Axes

The graduated axes are inserted in the active view by clicking on the toolbar button or by
selecting Graduated Axis in the Geometry/Coordinate System submenu. The axis origin and
range is set automatically to values appropriate in order to fit with the represented geometry.
When the viewing direction is parallel to one of the main coordinates axis, the axis close to that
direction is not drawn (since its representation would be degenerated to a point).
Several options are available to customize the graduated axis representation. These are accessible in
the graduated axis editor dialog box (see section 2-5.6.3). To open this dialog box, there are two
possible ways:
• select the Axis Editor... in the Geometry/Coordinate System submenu,
• select the graduated axis in the active view, highlighting markers are drawn. Then, press the
right mouse button, a pop up menu is appearing. In the pop up menu, select Edit axis.... Note
that the pop-up menu contains a series of items that are shortcuts for common update options.

2-26 CFView™
Views Manipulation Graphical User Interface, Projects & Views

2-5.6.3 Graduated Axis Representation Control


There are several parameters that can be modified in order to tune the graduated axis representation.
All of them are accessible from the Graduated Axis Editor dialog box (see figures below).

FIGURE 2.5.6-1 : Ticks & Line Type and the Numbers Type pages from the Graduated Axis
Editor

In the page entitled Ticks & Line Type, the following parameters are controlled:
• the origin and extend in each direction. The coordinate system origin is situated at the point which
coordinates are below the From label and the axis extends to the values given below the To label.
The ticks spacing and their associated labels are given below the Spacing label. In order to change
those values, type the new values and press the Apply button.
• The size of the ticks (with respect to the axis size) is displayed at the centre. In order to change it,
type the new value in the entry and press the Apply button.
• In the lower part of the page, the line type used for drawing the axis and the ticks is displayed. The
parameters controlling the line type are detailed in section 4-10.4.
The second page Numbers Type of the Graduated Axis Editor provides control of the type of text
used for the numbers labels displayed along the axis.
• The numbers orientation can be set to Horizontal (the numbers text appear horizontal whatever the
axis orientation) or to Perpendicular to the axis (the numbers text are always orthogonal to the axis
direction). This can be controlled individually for each axis. This control is also accessible directly
from the graduated axis popup menu.
• The font type, size and color can be changed in the Text Type frame. Further details on these
parameters are provided in section 4-10.3.1.

CFView™ 2-27
Graphical User Interface, Projects & Views Templates & Macro Scripts

FIGURE 2.5.6-2 Labels page from the Graduated Axis Editor

The third page Labels of the Graduated Axis Editor provides control over the positioning and text
type of the axis labels:
• The axis labels can be set at the end of the axis or at the centre (at mid range). Select Top or
Center in the Position frame in order to change this setting.
• The font type, size and color can be changed in the Text Type frame (see section 4-10.3.1 for fur-
ther details on these parameters).
The pop-up menu also offers shortcuts to enlarge or shrink all the text sizes in the represented grad-
uated axis. To do so, select Larger Texts or Smaller Texts. The pop-up menu provides also an item
to discard (Hide axis) the representation from the active view.

2-6 Templates & Macro Scripts


The templates and macro scripts are special types of files that are containing commands to be exe-
cuted by CFView™. Templates and macro scripts are designed with very different objectives:
• A template file contains commands that are defining the content of the views, without reference
to a specific data set. It contains information on how to construct the content of each view along
with instructions needed to set up an entire drawing. The creation of a template file is done by
CFView™ in a single operation (a file chooser is raised in order to select the directory and tem-
plate file name). A template recorded on a data set is designed to be applicable on similar data
sets.
• A macro script is a general purpose set of commands. It may contain reference to actual data
sets. Macro scripts are written in the Python language, extended by the CFView™ specific com-
mands. CFView™ provides a way to record a sequence of user commands as they are per-
formed interactively. And, it is also possible to create macro scripts from scratch, using the
CFView™ commands and all the features of the Python language (loops, tests, subroutines, file
input/output,...).

2-28 CFView™
Templates & Macro Scripts Graphical User Interface, Projects & Views

2-6.1 Apply Templates


In order to apply an existing template on another data set, proceed as follows:
1. Load the project in CFView™ or select a view that is relative to the desired project.
2. Select Apply Template... from the File menu. A file chooser appears.
3. Select the template file (’.ty’). The template is automatically applied to the current project: all the
views related to the project are closed and replaced by those defined in the template file.

 There are some limitations to the applicability of templates. If the project from which the
template was created is too different from the target project, the template may not work
properly, leading to error messages and/or incomplete building of the representation layout.
The templates are working with difference in number of points in the mesh and with small
modifications in the geometry. However, differences in topology (different boundary condi-
tion patches type or names, differences in number or in name of blocks) and differences in
coordinate scales (e.g. difference in units) would most probably lead to inapplicable tem-
plates.

 The ability to save templates has been replaced by saving macros, see section 2-6.2 for
more details on how to use macros in CFView™.

2-6.2 Use Macro Scripts


As explained in the introduction, the macro scripts are Python scripts that are executed by CFView™.
In order to facilitate the creation of scripts, CFView™ allows the user to record sequences of actions.
CFView™ works with an active macro: this is a script stored internally and initially empty. All macro
manipulations operate on the active macro. These operations are grouped in the Macro pull right
menu of the File menu.
CFView™ supports also macro modules: a macro module is a set of macro functions defined in a file.
When a macro module is loaded, each function can be invoked individually from the Macros menu.
For additional information and the description of the supported commands, please refer to Chapter 7.
This chapter provides also a short description of the Python language.

2-6.2.1 Play Active Macro


To play the active macro, choose Play from File/Macro. The macro execution starts in the active
view.

2-6.2.2 Record User Actions


To record subsequent actions on the active macro, choose the Record toggle from the File/Macro
menu. When starting a recording of a new macro ‘from scratch’ do not forget to Clear the active
macro first.

2-6.2.3 Clear Active Macro


To clear (remove all operations in) the active macro, choose Clear from the File/Macro menu.

2-6.2.4 Load Macro


To load a macro from file, choose Load... from the File/Macro menu. A file chooser appears. The file
extension for a macro script file is ’.py’. The new macro replaces the previous active macro.

CFView™ 2-29
Graphical User Interface, Projects & Views Templates & Macro Scripts

2-6.2.5 Save Active Macro


To save the active macro content in a file, choose Save... from the File/Macro menu. A file chooser
appears. The file extension for the macro script files is ’.py’. This extension is automatically added
if necessary.
The active macro is saved on file and remains in the system for further operation.

2-6.2.6 Execute Macro Script Data File


To execute a macro script stored in a file, choose Execute... from the File/Macro menu. A file
chooser appears. Select the macro script file ’.py’. The macro execution is started automatically.

 The execution of the macro is also recorded if the Record button is turned on. It is dif-
ferent from loading and then playing a macro only from the point of view of the macro
recorder. If a macro is loaded, the recorder is reset. If a macro is executed, the new script
is appended to the active macro.

 The keyboard shortcut for Execute... is: <6>

2-6.2.7 Save All Macro Recording Since Session Start


To save the script recording all the operations made since the session start, choose Save All... from
the File/Macro menu. A file chooser appears. The script is saved in the selected file.

2-6.2.8 Load Macro Module


To load a macro module, choose Load Module... from the File/Macro menu. A file chooser
appears. The file extension for the macro module files is ’.py’. The selected file is loaded and the
functions defined in the module are inserted in the Macros pull-down menu. (see section 7-3.9, for
a further description of macro modules).

 Two macro modules having the same file name should not be loaded in the same
CFViewTM session.

2-6.2.9 Viewer/Debugger
The viewer/Debugger module allows to control macro execution and editing at runtime. It contains
the following functionalities:
• load a macro file and view the contents of the macro file,
• edit any particular macro,
• set breakpoint at any particular macro,
• delete breakpoint from any macro for which a breakpoint has already been set,
• step through the macros n at a time, n being controlled by the user,
• delete any particular macro,
• print a variable that has been assigned any value during macro execution,
• notify the user of failure if execution fails at any particular macro,
• auto cleaning of macros depending on various clauses,
• at any time user can either highlight all the macros for which breakpoints have been set or the
macro that will be executed next.

2-30 CFView™
Templates & Macro Scripts Graphical User Interface, Projects & Views

Implementation of automatic cleaning is dependent on following clauses:


• Following macros are cleaned if the value is not assigned to any variable:
— Macros for quantity probing (see section 7-5.18).
— Macros for integral computation (see section 7-5.22, section 7-5.23,and section 7-5.24).
— Other macros just returning values (NumberOfTimeSteps, ViewName, GetMeshRepetition-
Type, , StructuredDomainSize, ProjectFile, SurfaceExist,...).
• Unsteady Macros are removed (NextTimeStep, SetActiveTimeStep,...).
• Viewing Macros are removed in case any of the macros occur consecutively: the preceding
instances are removed (see section 7-5.10 for the description).
• If multiple instances of ViewTile (section 7-5.6)exist in macro list, the unnecessary instances are
cleaned: e.g. if there are no view opening / file opening / view closing / file closing macros
between two instances of ViewTile, the second instance is removed.
• If a quantity is created and removed without being used anywhere, corresponding instances of Qnt-
FieldDerived and QntFieldRemove are cleaned (section 7-5.17). Only those instances are consid-
ered that occur without any call to ViewActivate in between. This is done to make sure that
QntFieldDerived and QntFieldRemove are for the same project.
• If there are occurrences of contour creation commands (section 7-5.19.2) without any print com-
mands in between, the preceding instances are removed. Besides, all of the contour commands are
removed if the contour is deleted without being printed. Only those instances are considered that
occur without any call to ViewActivate in between.
• All consecutive instances of Toggle commands are removed.
• If there are consecutive occurences of following Set commands with the same name, first instance
is removed.

 Limitation: loops only a linear sequence of instructions works (only one line). For exam-

CFView™ 2-31
Graphical User Interface, Projects & Views Templates & Macro Scripts

ple the following macro is recommended:


CFViewBackward(84)
for i in [0,1]: print i

2-32 CFView™
Overview Creating & Handling Surfaces

CHAPTER 3: Creating &


Handling Surfaces

3-1 Overview
This chapter provides a detailed description of the Blade to Blade surface handling features in
CFView™. Surfaces are playing a fundamental role in CFView™ as nearly all the representations
of the flow quantities are made on surfaces. This chapter is divided in 6 sections:
• surface types and attributes description,
• handling the list of selected surfaces,
• creating new surfaces,
• visualizing the surfaces mesh,
• surfaces rendering and shadow,
• mesh cell visualization.
The commands related to surface handling, creation and representation are available mainly from
the Geometry and the Render menus.

3-2 What are Surfaces in CFView™?


This section describes the various types of surfaces and the concept of active and inactive surfaces.
The surface concept of CFView™ is of great importance. CFView™ allows to visualize 3D data
sets by the definition of surfaces on which the data can be analysed. This means that most of the
representations used to analyse scalar or vector fields are applied to surfaces.

CFView™ 3-1
Creating & Handling Surfaces What are Surfaces in CFView™?

3-2.1 Surfaces Types


CFView™ makes a distinction between:
• Structured surfaces that are related to structured meshes. In 3D structured meshes, they corre-
spond to constant I, J, K mesh surfaces or to boundary patches. In the case of 2D structured data
sets, the computational domain is made of one or several structured surfaces.
• Unstructured surfaces that result from computations inside the computational domains, such as
iso-surfaces, arbitrary cutting planes, and that are defined by their nodes and cells. They corre-
spond to boundary patches in 3D unstructured grids.
When the user opens a project file, some surfaces are automatically represented in CFView™.
These surfaces are:
• for 2D projects : all the (2D) domains.
• for 3D projects : only the solid boundaries patches, if existing; otherwise all the boundary
patches defined in the data set.

3-2.2 Activation/Selection of Surfaces


CFView™ defines an activation state for each surface. Surfaces have two possible states:
• Active : when requested, surface representations, rendering or flow quantities repre-
sentations are applied to the surface. Surface integrals are computed on the set
of active surfaces.
• Inactive : they may be present on the screen but are not affected by the users requests.
The surfaces status is displayed in the Surfaces subpanel in the Quick Access Pad. After the crea-
tion of new surfaces, they automatically become active. The active-inactive status of the surfaces
can be modified at any time in different ways:
• with the Surfaces subpanel from the Quick Access Pad (see section 3-3.1),
• with the Geometry/Select Surfaces... menu (refer to section 3-3.2),
• interactively with the mouse (see section 3-3.3).
The set of the active surfaces is also called the surface selection.

3-2.3 Project Surfaces List


Each project has a list of surfaces. They are available in all the views related to the project. Each
surface has a unique name.
If a project is visualized in more than one view, all the surfaces of that project can be accessed and
manipulated in all of them. Consequently, all surfaces existing inside a view are accessible from all
the other views. However, the surface manipulations are independent in each view. An operation
performed on a surface in a given view does not affect this surface in the other views. The surface
state may be different for every view.
As an example, if a cutting surface is defined in a cylindrical coordinates view, the same cut may be
viewed in a Cartesian coordinates view, where it will be a cylinder or a cone.

3-2.4 Surfaces Groups


The surfaces may be grouped. Groups may have various origins:

3-2 CFView™
Select Surfaces Creating & Handling Surfaces

• groups defined in the FINE™ GUI (version 5 or higher).


• groups formed at project opening by CFView™. This automatic grouping is performed in
projects that are not created by FINE™/Turbo or that are not in a format supporting the group
description. These groups are made of surfaces having an identical boundary condition type and
which are "in continuity" with each other.
• when cutting planes are crossing several domains, a group is created automatically and the cre-
ated surfaces are placed inside.
A group of surfaces is handled in the same way as a surface: all operations performed on a group
are performed on all of its members.

3-3 Select Surfaces


3-3.1 From Quick Access Pad

Group symbol

The surfaces list

Selection status indicator

The surface creation


shortcut buttons

The filter frame

FIGURE 3.3.1-1 Surfaces Subpanel in Quick Access Pad

The Surfaces subpanel is made of three parts: the surfaces list, the surfaces creation shortcut but-
tons and the filter frame.

3-3.1.1 Surfaces List


The Surfaces list contains a hierarchical list of all the project surfaces. Each surface is listed by its
name. On the left side of the name, symbols indicating the status and the type (using a color code)
are shown. The active surfaces are indicated by a in the colored symbol. Groups are also indi-
cated by a specific symbol (see Figure 3.3.1-1).

CFView™ 3-3
Creating & Handling Surfaces Select Surfaces

The following color convention is used:


•inlets: green,
•outlets: orange,
•solid walls: blue,
•external: red,
•mirror and singular: brown,
•connections: cyan,
•periodic connections: magenta,
•rotor stator connections: grey,
•mesh surfaces, cutting planes and iso-surfaces: black.
This convention is the same as in IGG™ patch viewer, except for the inlets for which a green color
is used instead of yellow for a better readability.
Several operations can be performed directly in the list:
• double click on a surface to toggle its activation state.
• display of group composition can be added or remove by clicking on the group symbol .
• left mouse button is used to build a browsing selection, the surfaces in the browsing selection
are highlighted in blue.
— To select or deselect one surface, click with the left mouse button on the surface name. Only
this item is highlighted.
Or, to select several surfaces:
— click on a first item,
— press the <Ctrl> key while clicking to add or remove surfaces from the
current browsing selection.
— or press the <Shift> key while clicking on a second item: all the surfaces
between the two selected items are added to the current browsing selec-
tion.
When a selection is made (highlighted in blue), a popup menu can be raised by
pressing the right mouse button. It provides a set of operations:
— Setting the surface activation state (Select - Make Active/Inactive),
— Visualization of a surface for quick identification (Show Wireframe),
— Reversing the normal orientation of the selected surface(s) (Reverse Normal)
— Visualization of the normal of the selected surface(s) (Show/Remove Normal),
— Plotting the number of points of the selected surface(s) in the message area (Number Of
Points)
— Creating or deleting groups (Make Group - Ungroup),
— Renaming of surfaces or groups (Rename),
— Deletion of surfaces (Delete),
These functions are explained in the following sections.

a) Set Surfaces Activation State


To toggle the activation state of a single surface or group, double click on its name.

3-4 CFView™
Select Surfaces Creating & Handling Surfaces

To set the current selection to the surfaces highlighted in blue, choose the Select item. All the sur-
faces highlighted in blue become active, while the others are removed from the active surfaces list.
In order to add (or remove) the surfaces highlighted in blue to (or from) the current set of active sur-
faces, choose Make Active (or Make Inactive).

b) Visualize for Quick Identification


In order to locate easily a surface in the geometry, select the Show Wireframe item. The surface is
represented as a wireframe colored in blue. The representation is automatically removed when
another interaction takes place.
This item is present in the pop-up menu only if the browsing selection is made of one surface or one
group.

c) Reverse Surface(s) Normal


To reverse the normals on the surfaces highlighted in blue choose Reverse Normal. When comput-
ing the massflow on selected surfaces, the normals should be oriented in the same direction. Cur-
rently, when selecting a set of surfaces defined by a cutting plane or the bounding patches of the
blocks, the normals will be oriented in the same direction (i.e. for boundary patch, the normal points
towards inside the block to which it belongs.) but this not true for internal IJK surfaces for which
the tool Reverse Normal should be used.

Use Reverse Normal

Bounding Surfaces Cutting Plane IJK Surfaces

d) Visualize Surface(s) Normal


To plot (or remove) the normals on the surfaces highlighted in blue choose Show Normal (or
Remove Normal).

e) Check Number Of Points


To plot the number of points in the message area of the surfaces highlighted in blue choose
Number Of Points.

CFView™ 3-5
Creating & Handling Surfaces Select Surfaces

f) Create/Delete Group
To create a group from the current browsing selection, select the Make Group item. A group is
formed. The name of the group can be changed by selecting the Rename item described here
below.
To delete a group, select the Ungroup item. This is only removing the group from the surfaces list,
all the member surfaces are left unchanged.
These items are included only when relevant: the Make Group item is present if the browsing
selection is made of several surfaces and the Ungroup item is present only if the browsing selection
contains exactly one group.

g) Rename Surface/Group
To change the name of a surface or a group, select the Rename item. The name in the list becomes
an editable string. Once the new name is typed, press <Enter> to validate the entry. The renaming
mode is left if the <Esc> key is pressed or if a click with the left mouse button is performed outside
of the editable string area.
An internal check against duplicated names is performed before the new name becomes effective. If
the name is already associated to another surface or group, an error box is raised and the renaming
is not performed.

h) Delete Surfaces from Project


To delete a surface from a project, choose Delete. All the representations associated with the sur-
face are removed from the active view. Furthermore, if the surface was created during the project
session (e.g. the surface is a cutting plane), the surface disappears also from the list and all its repre-
sentations in all the views are deleted.

3-3.1.2 Surface Creation Shortcut Buttons

These buttons are offering shortcuts to open the surface creation dialog boxes:
• select Cut in order to open the cutting plane creation dialog box (see section 3-4.1).
• Select IJK Surf in order to open the mesh surfaces creation dialog box (see section 3-4.2).
• Select Blade to blade in order to open the blade to blade surfaces creation dialog box (see
section 5-2.3).

3-3.1.3 Surface Selection by Filter Frame

The surface selection can also be made by entering a string in the Filter frame. Several possibilities
are available:
• In order to select all the surfaces whose names are matching an expression, press the Name
check button, enter the expression in the area next to the Select label and press <Enter>.

3-6 CFView™
Select Surfaces Creating & Handling Surfaces

• In order to remove from the selection all the surfaces whose name are matching an expression,
press the Name check button, enter the expression in the string area next to the Unselect label
and press <Enter>.
• In order to select all the boundary patches of a given type, select the Type check button, enter the
type string and press <Enter>. Only the first 3 letters are used: e.g. inl, out, sol, mir, ext, con,
per, rot or sin.
• In order to remove from the selection all surfaces of a given type, select the Type check button,
enter the type string and press <Enter>. As for the selection, only the first 3 letters are used: e.g.
inl, out, sol, mir, ext, con, per, rot or sin.
As an example, in order to select all the surfaces that contain the word "rotor" in their name, select
the Name button, enter the "rotor" string next to the Select label and press <Enter>.

3-3.2 From Geometry Menu


The Select Surfaces dialog box is provided for backward compatibility: its use is not advised any-
more and the Surfaces subpanel in the Quick Access Pad should be preferred. To open the dialog
box, choose Select Surfaces... from the Geometry menu.

FIGURE 3.3.2-1 Select surfaces dialog box

It contains a hierarchical list of all the surfaces and a filter box. Several operations can be per-
formed from this dialog box. These are:
• Setting the surface selection for flow field representation,
• Visualization of group composition (Show...),
• Visualization of a surface for quick identification (Show...),
• Removing of all representations of a surface in the active view (Remove...from view),
• Deletion of surfaces from the project (Delete...),
• Renaming of surfaces or groups (Rename...).
All these functions are accessible through a popup menu which is raised by pressing on the right
mouse button (see Figure 3.3.2-1). The popup menu entries are mentioning the targeted surface
name for an easier control. These functions are detailed in the following sections.

CFView™ 3-7
Creating & Handling Surfaces Select Surfaces

3-3.2.1 Surface Selection


To select or unselect surfaces:
1. Select one surface. Click the left mouse button on the surface name. Only this item remains
highlighted.
2. Or, select several surfaces.
•click on a first item,
•press the <Ctrl> key while clicking to add or remove surfaces from the current selection.
•or press the <Shift> key while clicking on a second item: all the surfaces between the two
selected items are added to the current selection.
3. Click the Apply button to validate the surface selection and the Close button to close the
chooser.
The selected surfaces are now active and all the representations can be applied to these surfaces.
The selection can also be made by entering a regular expression in the Select or the Unselect filter
entry. Pressing <Enter> adds or suppresses to the selection the surfaces whose name matches the
filter expression (entering a blank or null expression, i.e. pressing <Enter> without entering any
expression, selects or unselects all surfaces).

 After the selection process, the inactive surfaces still remain on the screen but are not
affected by the users requests.

 The keyboard shortcut for opening the Select Surfaces dialog box is: <Ctrl-s>.

3-3.2.2 Visualization of Group Composition


An item in the list that is a group is marked by a symbol . The group composition can be seen or
hidden by clicking on the symbol at the left side of the item name. Clicking on the group name
acts also as a toggle, but modifies at the same time the selection.

3-3.2.3 Visualization for Quick Identification


The surfaces and groups can be easily identified in the graphical window by using the Show... item
in the popup menu. The grid of the surface or of the group is represented in the active view. If
another surface or group is selected for quick identification, any previous quick representation is
removed.
The quick representations can be removed at any moment by pressing the <Esc> key. If the dialog
box is closed or if the active view is changed, the quick representations are removed from the view.

3-3.2.4 Remove all Surface Representations in the Active View


To selectively remove all representations of a surface from the active view, choose Remove...from
view. All the representations associated with the surfaces selected for removal are deleted. This can
be applied to an individual surface or to a group.

3-3.2.5 Delete Surfaces from Project


To delete a surface from a project, choose Delete.... All the representations associated with the sur-
face are removed in all the views.
If the surface was created during the project session (e.g. the surface is a cutting plane), the surface
disappears also from the list.

3-8 CFView™
Select Surfaces Creating & Handling Surfaces

This can be applied to an individual surface or to the group.

3-3.2.6 Rename Surface or Group


To change the name of a surface or of a group, select Rename.... The name in the list becomes an
editable string. Once the new name is typed, press <Enter> to validate the entry. The renaming
mode is left if the <Esc> key is pressed or if a click with the left mouse button is performed outside
of the editable string area.
Before the new name becomes effective, an internal check to avoid duplicated names is performed.
If the name is already associated to another surface or group, an error box is raised and the renam-
ing is not performed.

3-3.3 Interactive Surface Selection


This functionality allows to interactively select or unselect visible surfaces in the active view. A
surface is visible when one of the following representations is displayed for that surface:
• boundaries,
• mesh wireframe,
• hidden line rendering,
• solid or flat shading,
• color contour (flat or striped),
• vector representation.
To interactively select surfaces in the active view:
1. Start the interactive selection mode by selecting Activate Surface() from the Geometry menu.
2. Move the mouse to the desired surface.
3. Click the left mouse button. The surface activation status is toggled. Its name and selection sta-
tus are displayed in the message area, at the bottom of the graphical area.
4. Repeat these actions several times to activate other surfaces.

 The keyboard shortcut for Activate is: <Ctrl-a>.

CFView™ 3-9
Creating & Handling Surfaces Select Surfaces

3-3.4 Surface Selection using Macro


When the surface generated is composed of non connected areas, a macro can be used to select one
of the non connected areas that are by default saved in the list of surfaces under one unique surface.
For example, if a cutting plane is used to create a new surface in a O-topology, two non connected
areas are created and saved under a unique surface in the list (Figure 3.3.4-1).

FIGURE 3.3.4-1 Cutting plane in a O-topology leads to two non-connected areas

In order to select only one area of the surface, the following command can be used within a macro:
LimitedCutPlaneSave(x,y,z,nx,ny,nz)
where x, y, z are the coordinates of a point belonging to the requested area of the cutting plane and
nx, ny, nz are the plane normal.

3-10 CFView™
Create Surfaces Creating & Handling Surfaces

For example, if the area of the top of the blade is required, a macro file containing the command
"LimitedCutPlaneSave(0.25,0.01,0.004,0,0,1)" will select the area of a cutting plane normal to the z
axis and that is containing the point (0.25,0.01,0.004) as illustrated on Figure 3.3.4-2.

LimitedCutPlaneSave(0.25,0.01,0.004,0,0,1)

Z cst
(0.25,0.01,0.004)

FIGURE 3.3.4-2 Macro to select area of a cutting plane

3-4 Create Surfaces


Different types of surfaces can be created: mesh surfaces, cutting planes and iso-surfaces. All the
newly created surfaces are added to the project surfaces list and to the current activated surfaces
list.

3-4.1 Create Mesh Surface


This command allows to scan the computational domains instantaneously by scrolling through con-
stant I, J, or K surfaces and save the most interesting surfaces for further analysis. In a multi-
domain configuration it is possible to select the domain to be scanned through the chooser display-
ing the list of all the domains. This scanning consists of displaying the surfaces of constant I, J or K
family one after the other, continuously or step-by-step. The scrolling is available in two represen-
tation modes:
• Geometry mode: it allows the user to visualize the surface grids of the active block. It can be
used to analyse the mesh geometry surface by surface.
• Quantity mode: it allows to analyse the same surfaces with a shaded contour of the active quan-
tity if it is a scalar or with a vector arrow representation if it is a vector quantity. This option is
only available when a quantity has been selected first and can be used to quickly localize inter-
esting regions of the 3D computational volume.

To create surfaces:

CFView™ 3-11
Creating & Handling Surfaces Create Surfaces

1. Choose Create IJK Surface... from the Geometry pull down menu. A dialog box appears.

FIGURE 3.4.1-1 Create Structured Surface

It contains:
• if a multi-block project is active a Domains (block) chooser appears for selection of one,
more or all existing domains.
• three radio buttons for the surface family selection (I, J or K). The family defines the
constant index of the scrolled surfaces. The family I, for example, contains surfaces
which have I constant;
• one string editor per family to input the constant index value of the scrolling operation;
• two scroll buttons per family to move up and down the constant index;
• two string editors per family to input the lower and upper limits of the non constant
indexes for the scrolling operation;
• if a quantity is selected, a mode selector (Geometry or Quantity);
• Apply, Save, Reset and Close push buttons;
2. Choose a representation mode. Click the left mouse button on Geometry or Quantity.
3. Choose a surface family. Click the left mouse button on the desired J, K Index button or I.
4. Choose the upper and lower limits for the non constant indexes.
5. Start step by step scrolling. Dependent on the used button, a different action is performed:
• click the left mouse on the up arrow button to increase the value of the constant index
value.
• click the left mouse on the down arrow button to decrease the value of the constant index
value.
6. The selected surface can be visualized and saved by respectively clicking on the Apply and Save
buttons.
7. Close the dialog box by clicking on the Close button.
The previous actions can be repeated with constant I, J or K surfaces any number of times. After
any saving operation, the boundaries of the newly created surfaces are displayed and indicate that
they have been properly created. The figure below illustrates the definition of a structured surface
and its simultaneous representation in the active view.

3-12 CFView™
Create Surfaces Creating & Handling Surfaces

FIGURE 3.4.1-2 Mesh surface definition dialog box with geometry representation

 This command is related to structured meshes. The creation of surfaces for unstruc-
tured meshes is done through arbitrary cutting planes

 The keyboard shortcut for Create IJK Surface... is: <Ctrl-z> and the item is accessi-
ble in the Quick Access Pad: .

3-4.2 Create Cutting Plane


This option is used to scan the computational field by an interactive movement. A plane, on which
the active quantity distribution is interpolated, is displayed in smooth color contour.
The plane is defined by two vectors:
• The plane point is any point belonging to the plane.
• The plane normal is any vector normal to the plane.
Additionally a rotation axis direction is introduced. This direction is used for rotation operations.
To draw a cutting plane:

CFView™ 3-13
Creating & Handling Surfaces Create Surfaces

1. Choose Create Cutting Plane... from the Geometry menu. A dialog box appears.

Plane normal control Axis direction control

Plane point control

Mode control

Plane translation
button
Plane rotation
button
Axis direction
button Step by step
scrolling
dialog box buttons X, Y, Z plane buttons control

FIGURE 3.4.2-1 Create Cutting Plane dialog box

2. Define a plane (if the user does not define a plane, a default cutting plane defined by the current
view camera target and camera normal is activated):
• Use the Plane Point control to input the plane point.
• Use the Plane Normal control to input the plane normal.
• Press on the Apply button to see the defined plane.
3. Select the appearance of the cutting plane using the mode control.
• select Quantity to visualize a color contour on the cutting plane (available if a quantity
is selected).
• select Geometry to visualize only the mesh off the cutting plane.
• select Polygon to see a semi-transparent blue cutting plane. The contour of the plane is
drawn in red. A cross has been added to better show the 3D aspect of the plane.
4. Translate the plane along the normal direction.
• Press on the left mouse button to initiate a translation.
• Then drag the mouse to the left or to the right to translate forward or backward.
• Release when finished.
5. Rotate the plane around the axis.
• Press on the left mouse button to initiate a rotation operation.
• Then drag the mouse to the left or to the right to rotate clockwise or counterclockwise.
• Release when finished.

 The direction used for the rotation is actually the normal projection on the plane of the
rotation axis as specified in the axis direction control (Normal).

3-14 CFView™
Create Surfaces Creating & Handling Surfaces

6. Rotate the axis direction in the plane.


• Press on the left mouse button to initiate a rotation operation.
• Then drag the mouse to the left or to the right to rotate the axis direction in the plane
clockwise or anti clockwise. The axis direction is identified by a black line in the control
polygon.
• Release when finished.
7. Use step by step scrolling.
• Input the scrolling increment in the Step scrolling control.
• Use the right and left arrow buttons to translate forward and backward in the normal
direction. The magnitude of the translation is the scrolling increment.
8. To save the selected cutting plane, click on the Save button. This operation introduces the cut-
ting plane into the project surfaces list. If the cut is crossing several domains, a group is formed
that contains the cuts from each domain.
9. Close the dialog box by clicking on the Close button.

 The keyboard shortcut for Create Cutting Plane... is: <Shift-l>and the item is acces-
sible in the Quick Access Pad: .

FIGURE 3.4.2-2 Cutting plane definition dialog box with active quantity color contour
representation

3-4.3 Create Cutting Surfaces defined from IGG™ curve


In order to enable more flexibility in cutting planes, the user may generate a new kind of cutting
surface by defining it from an IGG™ curve.
The objective is to generate a surface by rotating an IGG™ user-defined curve around a rotation
line whose axis vector is 0 0 1 and axis origin is 0 0 0. Afterwards, CFView™ is saving in the sur-

CFView™ 3-15
Creating & Handling Surfaces Create Surfaces

face list the intersection between this last surface of revolution and the computational domain as
presented in the Figure 3.4.3-1.

FIGURE 3.4.3-1 Intersection surface (grid on right side) between the computational domain
(left side) and the revolution surface ( )

The user-defined curve used to generate the surface of revolution must respect the format presented
below:
Example:
IGG first line comment
XYZ space coordinates (i.e. XYZ, YXZ, ZR or RZ)
3 number of points to define curve
0.0 0.0 0.0
0.05 0.05 0.05 space coordinates of each point
0.09 0.09 0.09

 When the curve is defined in XYZ coordinates, CFView™ will first project it on a ZR
plane (Theta=0) before generating the surface of revolution.
Afterwards to define the surface of revolution and its intersection with the computational domain,
the user-defined curve data has to be selected through the menu Geometry/Create Cutting Sur-
face Along Igg Curve....

3-4.4 Split Surfaces


This option allows to extract a portion of active surfaces delimited by two planes. A new dialog box
is available from the menu Geometry/Split Surface...
The dialog box is similar to the one for the cutting plane (section 3-4.2) but in this case, the plane
settings are duplicated in order to control both planes at the same time.

3-16 CFView™
Create Surfaces Creating & Handling Surfaces

When the Save button is pressed, a new surface is created that is the portion of all active surfaces
included between the two planes.
Geometry

Polygon

The green lines show the surface normals pointing to the direction excluding the surface portions in
order to avoid the two normals overlay and provide therefore more visibility. This is available in
Cartesian coordinates as well as in cylindrical or STM coordinates that allows for example to
extract surfaces included between two span values.

3-4.5 Create Iso-surfaces


An iso-surface is a 3D surface where a scalar flow quantity is constant. CFView™ is able to display
such surfaces (see section 4-3.5), but it is also possible to save the surface and introduce it in the
project surfaces list as an unstructured surface. In order to do so, a two step process must be fol-
lowed:

3-4.5.1 Compute Iso-surface


1. Select a scalar quantity in the Quantities subpanel or in the Quantity menu.

2. Choose Iso-Surface from the Representation pull down menu or press the button in the
Representations / Contours & Iso Values subpanel.
3. Choose the iso-surface value by using one of the following possibilities:
• move the mouse to the keyboard input area, enter a single value (included between the
maximum and the minimum of the quantity) and press <Enter>.
• with the mouse in the colormap: move the mouse to the colormap (by default on the right
side of the graphics area) and click at a level which represents the value.
• with the mouse on an active surface: move the mouse over an active surface, click at the
location where the iso-surface is going to intersect the surface. An iso-surface with the
active quantity value at that location is displayed.
Each new input for the iso-surface value removes the previous iso-surface and displays the new
one.

CFView™ 3-17
Creating & Handling Surfaces View Surfaces

 Iso-surface generation involves scanning the complete computational volume and is


computationally intensive on large meshes.

FIGURE 3.4.5-1 Iso surface of constant mass fraction around a boat

3-4.5.2 Save Iso-surface


Once an iso-surface has been created, it can be saved for further manipulations. To save an iso-sur-
face, choose Iso-Surface Save from the Representation menu or click a second time on the
button.
The surface name appears in the Surfaces subpanel and in the Select Surfaces dialog box, so that it
can be activated and any flow field representations can be added on it.

3-5 View Surfaces


When a project is opened, or when surfaces are created, the surface boundaries, the surface mesh
wireframe may be represented. The surfaces may also be rendered as solid surfaces. The repetition
transformation (such as a translation, a rotation or a mirror) defined in the identification file can
also be applied to the graphical representations inside the active view.
The commands to create such representations are contained mainly in the Geometry and Render
menus. Also the Representations/Grid, Opacity, Lighting & shadows and Material subpanels
contain a set of shortcuts buttons for the commonly used functions.

3-18 CFView™
View Surfaces Creating & Handling Surfaces

3-5.1 View Surfaces Boundaries


To turn on the display of the mesh boundaries in the active surfaces, choose Boundary from the
Geometry menu or click on the button in the Representations/Grid subpanel. This item acts
as a toggle.
The default line pattern, color and width may be modified using the Default Boundary Curve Type
Editor (Preferences/Boundary curve type...). See section 4-10.4, for further informations. In
order to change the representation line type, see section 3-5.3.

 If the boundary representation is present on some active surfaces, but not on all of
them, choosing this item a first time removes all the representations. Select it a second
time in order to turn on the boundary display on all active surfaces.

 The keyboard shortcut for Boundary representation is: <b>.

3-5.2 View Solid Boundaries


To turn on the display of the boundaries in the active surfaces that have a solid boundary condition
type, choose Solid boundary from the Geometry menu. This item acts as a toggle.
The default line style is the same as for other boundaries (see section 3-5.1 and section 3-5.3).

3-5.3 Update Surfaces Boundaries Representation


The line type of the surfaces boundaries representations can be modified as follows:
• Check that the surfaces representations can be selected interactively. The Render/Selectable
checkbutton, also displayed as the button in the Representations/Grid subpanel must be
enabled.
• Select the boundaries to be modified: click with the left mouse button on a surface boundary,
highlighting markers are inserted and the name of the surface is indicated in the message area.
• If several boundary representations are to be updated at the same time, select the other boundary
representations by click with the left mouse button with the <Ctrl> key pressed.
• Press the right mouse button, a popup menu appears.

• Select the Curve Type... item, a Line Type Editor dialog box is raised (see section 4-10.4 for a
description of the parameters appearing in this dialog box).
• Modify the parameters in the dialog box and press Apply to validate the new parameters.
The Line Type Editor dialog box may be also opened by selecting the Line Type Editor... item in
the Update menu.

3-5.4 View Grid Wireframe


To turn on the display of the wireframe geometry of the active surfaces, choose Grid from the
Geometry menu or click on the button in the Representations/Grid subpanel. This item acts
as a toggle.

CFView™ 3-19
Creating & Handling Surfaces View Surfaces

The default grid line pattern, color and width may be modified using the Default Grid Line Type
Editor (Preferences/Grid line type...). See section 4-10.4, for further informations.
To change the grid line type in the graphical area, see section 3-5.5.

 If the grid representation is present on some active surfaces, but not on all of them,
choosing this item a first time removes all the grid representations. Select it a second
time in order to turn on the grid wireframe display on all active surfaces.

 The keyboard shortcut for Grid representation is: <g>.

3-5.5 Update Grid Wireframe Representation


The line type of the grid wireframe representations can be modified as follows:
• Check that the surfaces representations can be selected interactively. The Render/Selectable
checkbutton, also displayed as the button in the Representations/Grid subpanel must be
enabled.
• Select the grid wireframe to be modified: click with the left mouse button on a wireframe, high-
lighting markers are inserted and the name of the surface is indicated in the message area.
• If several representations are to be updated at the same time, select the other boundary represen-
tations by click with the left mouse button with the <Ctrl> key pressed.
• Press the right mouse button, a pop up menu appears.

• Select the Grid Line Type... item, a Line Type Editor dialog box is raised (see section 4-10.4 for
a description of the parameters appearing in this dialog box).
• Modify the parameters in the dialog box and press Apply to validate the new parameters.
The Line Type Editor may also be opened by selecting the Line Type Editor... item in the Update
menu.

3-5.6 Hidden Lines Rendering


To show the active surfaces with hidden lines removed, choose Hidden line from the Render or
select the button from the Representations/Grid subpanel. This item acts as a toggle: select it
a second time or select Render/Render Off to turn off hidden lines rendering.

 When Hidden line rendering is activated, flat and smooth shading are not available
(see section 3-5.8).

 The keyboard short cut for Hidden line representation is: <h>.

3-5.7 Uniform Coloring


To show the active surfaces in uniform color (with nor shading nor lighting) choose Uniform from
the Render pull down menu. This item acts as a toggle: select it a second time or select Render/
Render Off to turn off the uniform representation.

3-20 CFView™
View Surfaces Creating & Handling Surfaces

3-5.8 Flat Shading


To show the active surfaces in a solid model with one color assigned to each cell according to light
position and cell surface normal, choose Flat from the Render/Shading menu. This item acts as a
toggle: select it a second time or select Render/Render Off to turn off flat shading.

 The keyboard shortcut for Render/Shading/Flat is: <Shift-f>.

3-5.9 Gouraud Shading


To show the active surfaces in Gouraud style shading (smooth shading) choose Gouraud from the
Render/Shading menu or select the button from the Representations/Grid subpanel. This
item acts as a toggle: select it a second time or select Render/Render Off to turn off Gouraud
shading.

 When combined with transparent surfaces, this representation is computationally


intensive and may affect the interactive graphics performances.

 The keyboard shortcut for Render/Shading/Gouraud is: <Shift-s>.

3-5.10 Remove Rendering Effects


To remove hidden lines, flat and shading visualisations on the active surfaces, choose Render Off
from the Render pull down menu.

 The keyboard shortcut for Render Off is: <Shift-h>.

3-5.11 Modify Rendering Color


To modify the rendering attributes:
• Check that the surfaces representations can be selected interactively. The Render/Selectable
checkbutton, also displayed as the button in the Representations/Grid subpanel must be
enabled.
• Select the surface representation to be modified: click with the left mouse button on a repre-
sented surface, highlighting markers are inserted and the name of the surface is indicated in the
message area.
• If several representations are to be updated at the same time, select the other surfaces by click-
ing with the left mouse button with the <Ctrl> key pressed.
• Press the right mouse button, a popup menu appears.

CFView™ 3-21
Creating & Handling Surfaces View Surfaces

• Select the Material Type... item. The Surface Material Editor... is opened. This dialog box
allows to modify the material light reflection properties of the active representations.

The dialog box may be also opened by selecting the Surface Material... item in the Update menu
or click on the button in the Representations/Material subpanel.
The surface material properties are defined by 4 parameters:
• Diffuse: is the base color of the surface.
• Specular: affects the light reflections on the surface.
• Opacity: controls the transmission of light through the surface. An opacity of 1.0 means a com-
pletely opaque surface. An opacity of 0 means a completely transparent surface.
• Reflection: is the property of a surface to reflect the surrounding environment.

 The keyboard shortcut to open the dialog box is: <Shift-t>.

 Transparency availability depends only on the driver/machine/graphic card combina-


tion. If not available the value is discarded. Regarding transparency and diffuse color,
some graphics hardware only take the intensity of the color into account.

3-22 CFView™
View Surfaces Creating & Handling Surfaces

3-5.11.1 Diffuse
The diffuse color is the fundamental color of the surface. It is chosen using the color picker Diffuse/
Color.

3-5.11.2 Specular Highlight


The specular highlight affects the light reflections on the surface. The shape, the strength and the
color of the highlight depends of the material. For instance, a material like cotton tissue will not
have any specular highlight, in comparison to a reflective surface like a mirror that will have a very
bright specular highlight.
• Color: is the color of the specular highlight. It is chosen using the color picker Specular/Color.

• Amount: is the strength of the highlight. It is a value ranging from 0 to 1. A value of 0 means
that the surface has no specular highlight; a value of 1 means that the surface presents a strong
specular highlight.

Amount set to 0 Amount set to 1

CFView™ 3-23
Creating & Handling Surfaces View Surfaces

• Gloss: defines the extent of the highlight. It is a value ranging from 1 to 30. A value of 1 means
that the specular highlight is widespread. It will be the case for rough material. A value of 30
means that the highlight is very narrow. It will be the case for very smooth surfaces, like glass.

Rough Surface (Gloss = 0) Smooth Surface (Gloss = 20)

3-5.11.3 Opacity
Set the opacity of the surface, ranging from 0 to 1. An opacity of 1.0 means a completely opaque
surface. An opacity of 0 means a completely transparent surface.

Opacity set to 1

Opacity set to 0.3

3-5.11.4 Reflection

Reflection is the property of a surface to reflect the surrounding environment. A “spherical environ-
ment mapping” technique is applied on the selected surface(s) when the option use reflection map-
ping is set active:
• An image, also called “map”, is provided for each surface. This map represents a given material.

3-24 CFView™
View Surfaces Creating & Handling Surfaces

• The color of each surface point is found by using the local normal at the surface point to address
the map.

reflection map on missile map

Amount: changes the reflectivity property of the surface.


• A reflectivity amount of 0 means that the surface has no reflectivity: the final color is the diffuse
color of the surface.
• A reflectivity amount of 1 means that the surface is purely reflective: the final color is equal to
the reflection color.
• All value in-between result in a mix of reflectivity and surface color.

3-5.12 Set Visibility, Light & Shadow Attributes


To turn on or off the visibility of the faces, edges or markers on surfaces, grid wireframes and on
shaded surfaces, select Render/ Visibility On/Off /Faces, Edges or Markers. These allow to con-
trol directly the visibility of the rendering, of the grid wireframe and of the markers represented at
the grid points locations. The faces visibility is turned on for surface rendering. The edges visibility
is equivalent to the grid wireframe visibility and, by default, the markers visibility is not turned on
by surface representations.
Furthermore, to turn on or off the lighting attribute of the faces, edges or markers, select Render/
Light On/Off /Faces, Edges or Markers. By default, only the lighting is turned on only for faces
with a shaded representation (Flat or Gouraud).
Finally, to control the lightning attribute on grid wireframe, rendering or color contour on selected
surface(s), select Representations/Lighting & shadows subpanel in the Quick Access Pad. It
allows to set the light parameters and to add a shadow.
These features apply only to surfaces immediately after the grid or the colour contour or the surface
rendering has been activated. They should not be used most of the time, they are only useful in
some very specific cases.

CFView™ 3-25
Creating & Handling Surfaces View Surfaces

3-5.12.1 Toggle Light Contour

Select the icon to toggle the lighting on/off for all the active color contours.

3-5.12.2 Toggle Light Grid

Select the icon to toggle the lighting on/off for all the active grids.

3-5.12.3 Toggle Light Face

Select the icon to toggle the lighting on/off for all the active surface rendering.

3-26 CFView™
View Surfaces Creating & Handling Surfaces

3-5.12.4 Display Shadow


Select the icon to toggle a shadow under the scene. The shadow is view dependent: its position and
the light direction change with the view. The shadow is always drawn on an horizontal plane
located at the bottom of a bounding box enclosing the scene. The direction of the light source gen-
erating the shadow is always the vertical direction.

3-5.12.5 Light Editor

The light editor ( ) allows to change the settings of the light of the active view. The type, posi-
tion and direction of the light can be controlled.

It is possible to choose between two different kind of lights: directional or omni.


• Directional: the light is coming from an infinitely far away light source, like the sun. All the
light rays are parallel.

CFView™ 3-27
Creating & Handling Surfaces View Surfaces

• Omni: the light is coming from a punctual point, like a candle. The lights illuminates in all
directions in a uniform way.

In the Position & orientation section, the light direction can be controlled by dragging the spot on
the surface of the sphere.
The Back light option imposes a light coming from the other side of the hemisphere (i.e light comes
from the back of the objects in the direction of the viewer).
When an omni light is selected, a Distance slider allows to set the distance of the light to the center
of rotation of the view.
In the Light Intensity section, a slider enables to change the power of the light.
In the Refresh Options section, instantaneous update of the lightning and visualization of the light
can be controlled by respectively the Instant Refresh and the Display in View options.
The Default button reset the active light to its default value.

3-5.13 Graphics Repetition


The repetition of the graphical representations may consist of a translation in a given direction, a
rotation around an arbitrary axis or a mirror operation. This feature allows to represent a complete
geometry while, due to symmetry properties of the computational domain, only a part of it has been
simulated. The number and type of repetitions are defined in the mesh. To visualize a certain
number of repetitions use Geometry/Repetition on/off after entering a number of repetitions.
Figure 3.5.13-1 shows an example of geometry before and after mirror repetition. To activate the
graphics repetition:
1. Choose Repetition Number from the Geometry menu.
2. Input the desired number of repetitions in the keyboard input area to set the number of repeti-
tions - <Enter>.
3. Choose Repetition on/off from the Geometry menu to activate the repetition.
This item acts as a toggle: click a second time on the menu item to cancel the action.
For example, this option is used for turbomachinery applications where blade to blade geometry
can be duplicated for better visual understanding of the periodical behaviour of the flow properties.

FIGURE 3.5.13-1 Geometry representation before (left) and after (right) repetition (mirror)

 This item is not available if no repetition (translation, mirror or rotation) is specified in


the input data file.

3-28 CFView™
View Elements (Unstructured Meshes Only) Creating & Handling Surfaces

 The repetition option creates only an image of the graphical objects. No interactive
operation, such as interactive picking, can be performed on the duplicated surfaces.

 The keyboard shortcut for Repetition on/off is: <Shift-r>.

3-5.14 Surfaces Representation Selectability


In some circumstances, the interactive selection of surfaces representations may not be desired. As
an example, when surface representations are superposed to flow quantities representations, it may
be difficult to select the flow field representation.
In order to disable the interactive selection of surfaces representations, choose the Selectable item
in the Render menu or click on the button. When the button is raised and grey colored, the
selectability is disabled.
This feature behaves as a toggle: selecting a second time enables the selectability again.

3-6 View Elements (Unstructured Meshes Only)


This feature allows to insert the representation of mesh elements in the graphical area. It is
restricted to 3D unstructured meshes. When choosing the Cells... item in the Geometry menu, a
dialog box is raised.

FIGURE 3.6.0-1 Cell Chooser

The list of cells is specified as a comma separated list. Each item is a single number or a set of two
numbers separated by a ’-’ symbol. ’-’ separated pairs of numbers are used to specify a range of ele-
ment numbers.
The size factor can be specified in the Size Factor entry or adjusted using the increase/decrease
arrows. A value of 1.0 indicates that the element is represented with its geometric size. A factor
smaller than one indicates that the element is shrunk and a value larger than one is used to enlarge
the element.
By default, the cell edges are represented and the cell faces are rendered with a flat shading. Modi-
fying these attributes can be made by first selecting the "domain" item in the surface list chooser
(section 3-3). The edge representation can be toggled by the Geometry/Grid menu item. The ren-
dering can be modified in the same way as for surfaces (section 3-5.11).

CFView™ 3-29
Creating & Handling Surfaces View Elements (Unstructured Meshes Only)

3-30 CFView™
Overview Flow Quantities Visualization

CHAPTER 4: Flow Quantities


Visualization

4-1 Overview
This chapter provides a detailed description of how to represent the flow quantities. It is divided in
5 sections:
• Select and create flow quantities,
• Visualize scalar data,
• Work with Cartesian Plots,
• Visualize vector data,
• Update the data representation.
The first section describes the basic concepts needed before going further into details. The remain-
ing sections provide step-by-step instructions to create and modify a project.

4-2 Select & Create Flow Quantities


The multiview environment of CFView™ allows to simultaneously load different projects in the
same session and to manipulate them in a similar way.
It is also possible to analyze simultaneously more than one quantity of the same project in the same
view (for example, Mach number isolines and local values of static pressure plotted on the same
surface...). Nevertheless, in order to avoid clutter in a view, it is recommended to create additional
views for the same project to visualize several quantities.

4-2.1 Quantity Types


CFView™ allows to visualize different types of quantities in the computational domain:

CFView™ 4-1
Flow Quantities Visualization Select & Create Flow Quantities

• The field quantities: they are defined for the complete domain. For example, the pressure or the
velocity field around a body is calculated through all the computational volume, from the inlet
to the outlet. Two kinds of data are supported:
— scalar data such as pressure, Mach number or velocity magnitude,
— vector data such as the velocity field.
• The solid quantities: they are defined on the solid surfaces only. For example, the skin friction
on the solid surfaces of a body. These data are defined only on a defined set of surfaces. There-
fore, they are separated from the field data.
Like for the field data, there can be scalar or vector quantities.
• The computed thermodynamical quantities: these are the quantities that can be computed from
the field quantities by standard formulas and that have not been computed by the flow solver
EURANUS. They are computed in CFView™ upon request.
• The components of vector quantities: these are directly extracted from a vector field quantity.
• The quantities defined as the gradient, divergence or curl of an existing quantity.
• The derived quantities: these are quantities respecting a user defined definition. CFView™ sup-
ports field derived quantities (defined in the whole computational domain) as well as surface
derived quantities (defined only on surfaces).

Besides these data types, CFView™ also supports data for specific purposes:
• The validation data: these are comparison data defined along curves. For example, they allow to
make comparisons between experimental and computed data or between different numerical
data sets.
• The plot data: this is a generic container for any type of data defined along a curve. They can be
convergence curve, surface averaged data from FINE™ GUI (Surface Averaged Variables
page).
• The particle traces data: these are related to externally computed trajectories of particles, such as
those generated by the Lagrangian module of FINE™ GUI (Fluid Particle Interaction page).

All these quantities are not available in all file formats. As an example, computed thermodynamics
and particle traces data are available only in the FINE™ GUI environment.
The quantities are selected by using the Quantity menu or the Quantities subpanel in the Quick
Access Pad. The Quantity menu contains a complete set of submenus allowing to select any of the
quantities, while the Quantities subpanel provides a convenient shortcut to select the most com-
monly used ones.

4-2 CFView™
Select & Create Flow Quantities Flow Quantities Visualization

4-2.1.1 Select Field Quantity


• To select a quantity in the Quantities subpanel, double click on the quantity name. A marker
is inserted on the left of the selected quantity name.

• To select a quantity from the Quantity menu, choose Quantity/Field Data/Basic Quantities.
This menu contains a list of all scalar and vector fields that are present in the project. Then,
select one of them.

FIGURE 4.2.1-1 Quantity Selection Menu

After the selection, CFView™ displays the active quantity name in the lower left corner, with the
minimum and maximum values and, if available, its units label.
The active quantity can always be replaced by another for further analysis. All the graphical objects
related to the previous quantity representation remain in the view.

4-2.1.2 Select Mechanical data


A new dialog box is available from the menu: Geometry->Set Torque Axis

CFView™ 4-3
Flow Quantities Visualization Select & Create Flow Quantities

By default, the torque will be computed with respect to the axis defined by the two points Origin
and Direction. In this case the resulting torque will be a scalar field equal to the component along
the axis. The user can also compute the torque with respect to a point by activating the check button
“With respect to point”. In this case, the resulting torque is a vector field.

In the quantities frame, a new menu Mechanics has been added that enables the calculation of
mechanics quantities on Solid surfaces. When double clicking on Mechanics->Force, the Force is
computed on all solid surfaces and the quantity Force is added below the Solid Data menu. The
force is given by P.1n + S where P is the pressure, 1n is the normalized normal and S is the Viscous
Stress Vector (τ ij .1n ) and has been computed by the solver (what has been computed by the solver,
the viscous stress vector' This is not clear). S will be omitted if the solver has not saved it. This is
actually the Force By Surface Unit (not clear to me, should this be Force per Surface Unit') and
example is provided in the next picture.

4-4 CFView™
Select & Create Flow Quantities Flow Quantities Visualization

If the check button “With respect to point” is not activate, when double clicking on
Mechanics->Torque, the field Scalar Torque is added under the Solid Data menu and can be
visualized as any scalar field as shown in the picture below.

If the check button “With respect to point” is activate, when double clicking on
Mechanics->Torque, the field Vector Torque is added under the Solid Data menu and can be
visualized as any vector field as shown in the picture bellow.

CFView™ 4-5
Flow Quantities Visualization Select & Create Flow Quantities

The total Scalar Torque can be compute by clicking on the scalar Integral button that integrates the
Scalar Field on all active surfaces.

The total Force and Vector Torque norms can be compute by clicking on the Flux button that
integrates the Vector Field on all active surfaces and compute the norm of the resulting vector.

4-6 CFView™
Select & Create Flow Quantities Flow Quantities Visualization

A new button Vector Integral that integrates the active vector field on all active surfaces and prints
the tree components of the resulting vector.

4-2.1.3 Select Solid Quantity


To select a quantity existing only on surfaces (a solid quantity or a surface derived quantity), select
the corresponding item in the Quantity/Solid Data menu, or open the Solid Data group in the
Quantities subpanel and double click on the quantity name.

4-2.1.4 Select Computed Thermodynamic Quantity


When used with a FINE™ GUI project, CFView™ checks automatically if the fluid computation
was made with a perfect gas, a real gas or an incompressible fluid. In such a case, a list of standard
thermodynamical quantities which are not already available is proposed:
• in the menu Quantity/Field Data/Computed Thermodynamics and
• in the Thermodynamics group of the Quantities list subpanel.
To select one of these quantities, choose the corresponding item in the Quantity/Field Data/Com-
puted Thermodynamics menu or open Thermodynamics group by clicking on the group symbol
and double click on the desired quantity name.

 For FINE™/Turbo computations made with condensable gas, the Computed Ther-
modynamics menu is not available, since the computation of these quantities relies on
the thermodynamic tables which are not available in CFView™.

 Thermodynamic quantities are not available in macros.

4-2.1.5 Definition of Computed Thermodynamical Quantities


The computation of these derived quantities is based on a set of conventional names for the basic
thermodynamical fields:
• Static Pressure,
• Static Temperature,
• Density (for incompressible fluids, this quantity does not need to be present),
• Vxyz for the absolute velocity vector field,
• Wxyz for the relative velocity vector field.

CFView™ 4-7
Flow Quantities Visualization Select & Create Flow Quantities

If it is not present, the absolute velocity is automatically deduced from the relative velocity (or the
relative velocity from the absolute velocity) when the quantity is required.

a) Perfect Gas
For perfect gas, the following quantities are defined:
2
Vxyz
Absolute Total Temperature = Static Temperature + ------------------
2Cp
2
Wxyz
Relative Total Temperature = Static Temperature + -------------------
2Cp

Absolute Total Temperature γ ⁄ ( γ – 1 )


Absolute Total Pressure = Static Pressure ⎛ --------------------------------------------------------------------⎞
⎝ Static Temperature ⎠

Relative Total Temperature γ ⁄ ( γ – 1 )


Relative Total Pressure = Static Pressure ⎛ ------------------------------------------------------------------⎞
⎝ Static Temperature ⎠

Speed of sound = γ ⋅ Static Pressure ⁄ Density

2
Vxyz
Absolute Mach Number = -----------------------------------------2-
Speed of sound

2
Wxyz
Relative Mach Number = -----------------------------------------2-
Speed of sound

Static Pressure
Internal Energy = -----------------------------------
( γ – 1 )Density

Cp Static Pressure ( 1 – γ ) ⎛ Static Temparture ⎞ γ⎞


Entropy = ------- log ⎛ ⎛ ----------------------------------------------⎞ --------------------------------------------------------
γ ⎝ ⎝ Reference Pressure⎠ ⎝ Reference Temperature⎠ ⎠

where Reference Pressure and Reference Temperature are asked for in a specific dialog box if the
entropy item is selected. Note that log refers to Neperian (or natural) logarithm. Note also that no
Reference Pressure and Temperature are required to visualize the entropy if the quantity is already
provided by the flow solver.
2
Absolute Total Enthalpy = Cp Static Temperature + 0.5 Vxyz
2
Relative Total Enthalpy = Cp Static Temperature + 0.5 Wxyz

b) Incompressible Fluid
For incompressible fluids, the following standard thermodynamical quantities are supported:
2
Vxyz
Absolute Total Temperature = Static Temperature + ------------------
2Cp
2
Wxyz
Relative Total Temperature = Static Temperature + -------------------
2Cp
2
Absolute Total Pressure = Static Pressure + Density ⋅ Vxyz ⁄ 2

4-8 CFView™
Select & Create Flow Quantities Flow Quantities Visualization

2
Relative Total Pressure = Static Pressure + Density ⋅ Wxyz ⁄ 2

Internal Energy = Cp Static Temperature

· Static Temparture
Entropy = Cp log ⎛ --------------------------------------------------------⎞
⎝ Reference Temperature⎠

where the Reference Temperature is asked for in a specific dialog box if the entropy item is
selected. Note that log refers to Neperian (or natural) logarithm. Note also that no Reference Tem-
perature is required to visualize the entropy if the quantity is already provided by the flow solver.

2 Static Pressure
Absolute Total Enthalpy = Cp Static Temperature + 0.5 Vxyz + -----------------------------------
Density

2 Static Pressure
Relative Total Enthalpy = Cp Static Temperature + 0.5 Wxyz + -----------------------------------
Density
where Density is a constant value retrieved from the FINE™ project file.

c) Real Gas
For real gas, the thermodynamical quantities are computed by interpolation in tabulated piecewise-
polynomial functions.

In project files created by FINE™/Turbo version 5 or higher, these quantities are associated to the
unit system selected in the FINE™ interface. As a consequence, unit conversion is performed and a
unit label is automatically attached to the quantity.

4-2.1.6 Select Vector Component


For each of the vector fields, each submenu of Quantity/Field Data/Vector Components contains
a set of vector components that can be obtained from the vector. Based on the vector field name, a
naming convention is applied automatically.
For a vector name having a name suffix "xyz", the "xyz" suffix is suppressed before the component
name is formed. Then a suffix letter is added or the quantity name is used to compose the compo-
nent name.
e.g.: if Vxyz is present, the proposed vector components are
• Cartesian components: Vx, Vy, Vz,

• magnitude V = Vx2 + Vy2 + Vz 2 ,

• radial, tangential and axial amplitudes with respect to the z axis: Vr = xVx + yVy
------------------------- ,
2 2
x +y
xVy – yVx 2 2
Vt = ------------------------- and Vm = Vr + Vz where x and y are the local geometrical coordinates,
2 2
x +y
• flow angle: atan ( Vt ⁄ Vm ) in 3D and atan ( Vy ⁄ Vx ) in 2D.

CFView™ 4-9
Flow Quantities Visualization Select & Create Flow Quantities

4-2.1.7 Apply Differential Operators: Gradient, Divergence or Curl.


To calculate the gradient, divergence or curl of a field quantity, select Quantity/Field Data/Gradi-
ent, Divergence or Curl.

FIGURE 4.2.1-2 Differential Operators

A menu containing a list of respectively scalar and vector operable fields appears.
To launch the operator, left-click in the menu on the field on which the differential operator has to
be applied.
The computation of the gradient, divergence and curl may also be selected from the Quantities
subpanel:
• Click on the quantity for which the computation should be made, it is highlighted in blue.
• Press the right mouse button, a popup menu appears.
Scalar
Vector Quantity
Quantity Vector
Scalar Quantity
Quantity

• Select the Gradient, Divergence or Curl item.


Once the computation is done, the divergence, gradient, or curl field will be added to the field quan-
tities list, respectively as: Div, Grad, or Curl followed by the name of the operand field in paren-
theses.
The computation method is based on the Gauss formulas: average values for Gradient, Divergence
and Curl are computed in each cell of the mesh. Then, values at the vertices are obtained as
weighted means of the neighbouring average cell values. Note that this method is less accurate
along the boundaries than inside the grid.

4-10 CFView™
Select & Create Flow Quantities Flow Quantities Visualization

4-2.1.8 Create Derived Quantity


New quantities are created by using the Define New Quantity dialog box. This dialog box is opened
by selecting Quantities/Field Data/Define New Quantity... or by clicking on the New button in
the Quantities subpanel.

FIGURE 4.2.1-3 Derived quantity definition dialog box

To create a derived quantity:


1. select the new quantity type. For Scalar and Vector by components, the available scalar quan-
tities and the mathematical operators are listed in the upper right frames. If Vector is selected,
the available vector quantities are listed in the Quantities frame. When defining a Vector by
components, the Definition entry is replaced by a set of 2 or 3 entries, one for each component
of the new vector quantity.
2. Select Field or Surface:
— A Field quantity is defined in the complete computation domain. The available quantities
for its definition are all the field quantities (if Scalar or Vector by components is selected,
the components of the field vector quantities are also available).
— A Surface quantity is defined only on surfaces. The available quantities for its definition are
all the field and solid quantities as well as the normal and tangent component of the vector
quantities.
3. Enter the name of the new quantity in the Name entry and its mathematical definition in the
Definition entry. The following operators and functions are available:
— +, -, * and / operators (if Vector type, * and ^ are respectively the scalar and vectorial prod-
uct),
— log, log10, exp, sqrt, sin, cos, tan, cotan, sinh, cosh, tanh, asin, acos and atan functions,
— The geometrical coordinates as x, y and z,
— The constants ’e’ and ’pi’ are also predefined.
— The a to the power b is obtained by using the log and exp functions ( ab = exp ( b ⋅ log a ) ).

CFView™ 4-11
Flow Quantities Visualization Select & Create Flow Quantities

By double clicking with the mouse left button on any of the items listed in the Quantities,
Geometry, Op. or Constants frames, its name is automatically inserted in the Definition. For
example, enter the string "normalized pressure" in the Name entry, the string "Static Pressure /
101325" in the Definition entry to create a normalized pressure quantity.
4. Press the Apply button to create the new quantity and to insert it into the project. The new quan-
tity can be selected for visualization in the same way as the project field quantities.

 To delete or unload a derived quantity, use the unload option or the Quantities Status
dialog box as described in section 4-2.2.2 or section 4-2.2.3 respectively.

4-2.2 Field Quantities & Computer Memory Management


4-2.2.1 Quantities Load on Demand
By default, when a project file is opened, CFView™ is loading all the quantities in memory. Com-
pared to a situation where the data would be left on disk, this accelerates considerably the access to
the data for the creation of representations.
However, when the data sets are very large, this may require a computer memory larger than avail-
able. For this reason, CFView™ provides the capability to postpone the data loading until requested
by the graphical representation. A selection of the quantities to be loaded can be done by using the
Partial Loader, see section 2-3.4.
Releasing some computer memory by removing some of the quantities from the computer memory
is also possible from the Quantities Status dialog box (see section 4-2.2.2). When a quantity has
been removed from the memory, it will be automatically reloaded if required.

4-2.2.2 Unload Quantities


The unload quantities option in the multi-view environment of CFView™ reduces the CPU time
and memory requirement for post-processing large projects. This unloading functionality works for
both steady and unsteady cases. The unload option is available from the pop-up menu that appears
on pressing the right mouse button on any field or solid data quantity in the Quantities subpanel.
Unloading of any field quantity can be done in the following way:
1. Press the right mouse button on any of the scalar or vector field quantity available in the Quan-
tities sub-panel.
2. A popup menu is displayed where the last item in the popup menu is Unload.
3. If Unload is selected the storage space allocated to the corresponding quantity is freed.

Scalar Quantity Vector Quantity Solid Quantity

In the unloading process of any solid data quantity from Solid Data list in the Quantities sub-panel
shows a different menu list when right mouse button is pressed. However the functionality of the
Unload option is the same as for the field quantities.

4-12 CFView™
Select & Create Flow Quantities Flow Quantities Visualization

Once the quantity is unloaded, a small bitmap file (unload icon) is placed at the left of the unloaded
quantity as observed in the right hand side image of Figure 4.2.2-3.

FIGURE 4.2.2-1 Unloading of a field quantity

 By default the thermodynamic quantities from the Thermodynamics list in the


Quantities subpanel, are not loaded into the memory. After selecting such a quantity, it
becomes available in the field quantities list. Once loaded, it can be unloaded in the same
way as described above.
If Unload is selected on a user-defined quantity in the field quantities list, it permanently removes
that user-defined from the field quantities list
The memory usage status can be confirmed from Quantities Status dialog box. To open the Quanti-
ties Status dialog box select the Quantities Status... option in the main menu Quantity/Field Data
or click on the Status button in the Quantities subpanel (see section 4-2.2.3 for more details).

4-2.2.3 Field Quantities Status Dialog Box


To open the Quantities Status dialog box, select Quantities Status... in the Quantity/Field Data
menu or click on the Status button in the Quantities subpanel.

FIGURE 4.2.2-2 Access to Quantities Status

CFView™ 4-13
Flow Quantities Visualization Select & Create Flow Quantities

FIGURE 4.2.2-3 Quantity Status Dialog Box

The dialog box is listing the scalar fields on the left and the vector fields on the right. The button on
the left of each quantity name is an on/off button indicating if the quantity is loaded in the computer
memory (the button is on if the quantity is present).
By toggling the buttons and then clicking on Apply, the computer memory storage is modified
according to the user’s specification.
For a derived quantity, this removes the field as well as its definition. The name used for the derived
quantity is available again for another derived quantity definition.
For a quantity defined in the project itself, this removes only the data storage. If the quantity is
needed later, it is reloaded automatically.
Below the list of quantities, a first line indicates the type of the quantity at the cursor position. This
may be "Quantity from file" or "Derived quantity". The second line is present only when a derived
quantity is under the cursor and it presents the quantity definition.
On the right, the memory used for the storage of the complete field data is mentioned.

4-2.2.4 RAM Management and Unsteady Post-processing


This functionality allows to free RAM usage at each time step when post-processing unsteady data
sets. It is very useful for large projects.

You can access this feature through the button Free Memory On/Off available in the anima-
tion toolbar when an unsteady project is loaded. By default, this button is active and highlighted in
yellow. The Free Memory On/Off button is not highlighted anymore when inactive.

4-14 CFView™
Visualize Scalar Data Flow Quantities Visualization

Press the left mouse button on Free Memory On/Off button, to toggle this functionality on or off.
When the Free Memory On/Off button is active, and the Next Time Step button ( ) is pressed,
the memory allocated to all field and solid data quantities at the current time step is freed, before
moving to the next time step. If the Free Memory On/Off button is inactive, all the field and solid
quantities are kept in the memory for every time step.

4-3 Visualize Scalar Data


When a scalar quantity is selected, CFView™ allows to visualize it in different ways:
• local values,
• isolines,
• color contours,
• iso-surfaces,
• Cartesian plots.
The Representation menu and the Representations subpanel are allowing to create such represen-
tations. These are dynamic containers: it means that the contents of this menu and of this subpanel
depend on the type of the active quantity (scalar or vector) and on the view type (2D or 3D). This
section describes only the items dealing with scalar quantities. The items concerning vector quanti-
ties are outlined in section 4-6.

4-3.1 Local Values


4-3.1.1 Display Local Values
The local value tool is a numerical probe that allows to print directly the data value of the active
quantity at selected points on the active surfaces. To create local values:

1. Choose Representation/Local Value or click on the button in the Representations/Plots


& Values subpanel.
2. Select a point in the graphical area by clicking with the left mouse button. CFView™ interpo-
lates the active quantity value at the point that is located at the intersection of the active surface
and the line that is perpendicular to the screen and which passes through the selected point.
This item remains active until another quantity representation requiring interactive input is selected.
The default style for number formats may be modified by using the Default Local Value Type Editor
(Preferences/Local value type...). section 4-11 for further information.

 The keyboard shortcut for Local Value is: <v>.

4-3.1.2 Update Local Values


To modify one or several local values represented on the screen,
1. Click on the first local value to modify, then pressing the <Ctrl> key, click on the other local
values to modify.

CFView™ 4-15
Flow Quantities Visualization Visualize Scalar Data

2. Press the right mouse button, a pop up menu appears.

It contains 4 items:
— select Marker Type... in order to modify the type of marker. A marker editor is opened (see
section 4-10.4 for a detailed description of marker parameters).
— Select Number Format... in order to modify the way the figures are formatted. A number
format editor is opened (see section 4-10.5 for a detailed description of number formats).
— Select Text Type... in order to modify the font type and size. A Text Type editor is opened
(see section 4-10.3.1 for a description of text font parameters).
— Select Delete to suppress the local values from the screen.

4-3.1.3 Delete Local Values


CFView™ provides different methods to erase local values:
• By interactive selection: as explained in section 4-3.1.2, when a set of local values is selected,
the associated popup menu contains a Delete item. By selecting this item, the currently selected
local values are suppressed from the screen.
• By selecting Update/Delete/Local Value: all the local values associated to the active quantity
and attached to one of the active surfaces are erased.
• By selecting Update/Delete/All, all the representations (not only the local values) on all sur-
faces are deleted.

4-3.2 Isolines
Single or multiple isolines are available. It is also possible to select uniformly colored isolines or
isolines colored according to the value.

4-3.2.1 Draw Local Isoline


To display a local isoline of the active quantity:

1. Choose Representation/Isolines/Local Isoline in the menu bar or click on the button in


the Representations/Contours & Iso Values subpanel.
2. Choosing an iso-value can be done in three different ways:
• move the mouse in the string input window, enter a single value (included between the
maximum and the minimum of the quantity) and press <Enter>.
• click with the left mouse button on the active surface. After each clicking operation,
CFView™ interpolates the value of the quantity at the selected point and generates the
isoline corresponding to that value.
• click with the left mouse button on the colormap of the active view to indicate the
desired value.
This option remains active as long as no other scalar representation is activated.

4-16 CFView™
Visualize Scalar Data Flow Quantities Visualization

 Isoline drawing is restricted to the current range. See section 4-7.2 for more details on
the quantity range.

 The keyboard shortcut for Local Isoline insertion is: <j>.

4-3.2.2 Drawing Multiple Isolines


To generate multiple isolines, choose Isolines... from the Representation/Isolines menu or click on

the button in the Representations/Contours & Iso Values subpanel. A dialog box is opened:
• the isolines may be specified by the number of isolines to draw or by their relative increment.
— To modify the increment between two isolines:
• click the increment option and
• click in the Value box and enter the new value.
— To modify the number of isolines:
• click the number option and
• click in the Value box and enter the new value.

FIGURE 4.3.2-1 Create Multiple Isolines

• To modify the range inside which the isolines are computed:


• click in the from entry, enter the minimum value and press <Enter>.
• do the same operation in the to entry for the maximum value.
If an input value exceeds the quantity limits, it is automatically reset to the limit value.
• Select whether the isolines should be uniformly colored (Uniform) or colored according to the
value (Contour).
• Click the Apply button to start the isoline computation with the new parameters.
• Click the Close button to close the dialog box.

 Isolines drawing is restricted to the current range. See section 4-7.2 for more details
on the quantity range.

 The keyboard shortcut for Isolines is: <i>.

CFView™ 4-17
Flow Quantities Visualization Visualize Scalar Data

4-3.2.3 Update Isolines


To modify one or several isolines represented on the screen,
1. Click on the first local isoline or multiple isolines group which is to be modified. And while
pressing the <Ctrl> key, click on the other isolines which are to be modified.
2. Press the right mouse button, a pop up menu appears.

It contains 4 items:
— Select Line Type... in order to edit the type of line used for the representation. Note that the
line color parameter is effective only if the isolines are set in the color lock mode (see
section 4-10.4 for an explanation of the line type parameters).
— Select Color Lock in order to draw the isolines in a fixed color.
— Select Color by Value to draw each isoline in a color according to the isoline value.
— Select Delete to suppress the selected isolines from the screen.

4-3.2.4 Delete Isolines


CFView™ provides different methods to erase isolines:
• By interactive selection: as explained in section 4-3.2.3, when isolines are selected, the associ-
ated pop up menu contains a delete item. By selecting this item, the currently selected isolines
are suppressed from the screen.
• By selecting Update/Delete/Isoline: all the isolines associated to the active quantity and that
are drawn on one of the active surfaces are erased.
• By selecting Update/Delete/All: all the representations (not only the isolines) on all surfaces
are deleted.

4-3.3 Color Contours


With color contours, the active surfaces are painted with a gradation of colors according to the
selected data values. CFView™ provides six coloring options: flat, smooth, strip and these 3
options with or without thresholding. Thresholding allows to restrict the coloring of the quantity on
the active surface to a restricted range of the quantity values.

 All colorings are restricted to the current range. See section 4-7.2 for more details on
the quantity range.

4-3.3.1 Flat

Choose Flat from the Representation/Color Contour menu or click on the button in the
Representations/Contours & Iso Values subpanel. In this mode, each cell is assigned to a unique
color that corresponds to the average value of the quantity in that cell.

 The keyboard shortcut for Flat color contour is: <Shift-q>.

4-18 CFView™
Visualize Scalar Data Flow Quantities Visualization

4-3.3.2 Smooth

Choose Smooth from the Representation/Color Contour menu or click on the button in the
Representations/Contours & Iso Values subpanel. In this mode, the color is interpolated inside
each cell from the values of the quantity at the cell vertices.

 The keyboard shortcut for Smooth color contour is: <c>.

4-3.3.3 Strip

Choose Strip from the Representation/Color Contour menu or click on the button in the
Representations/Contours & Iso Values subpanel. In this mode, the color interpolated on each
cell contour from the values of the quantity at the surface vertices is kept constant over small sub-
ranges.

4-3.3.4 Thresholding (Flat, Smooth and Strip)


This option provides a convenient way to discard uninteresting parts of the color contours (previous
command) by allowing the introduction of minimum and maximum threshold values. All the sur-
face regions in which the quantity value does not fit into the threshold values are discarded. To
achieve this:
1. Choose any thresholded coloring from the Representation/Color Contour/...Threshold menu
or click on one of the buttons in the Representations/Contours & Iso Values sub-
panel. The message “min, max (min, max)” appears in the keyboard input area.
2. Providing the threshold range can be done in different ways:
• with the mouse: move the mouse into the colormap and click at a level which represents
the first limit. Drag the mouse along the colormap up to a suitable value (a line appears
between the selected point and the cursor). Release the mouse button to fix this second
limit.
• with keyboard input: click in the string input box and enter either 2 or 4 values separated
by a blank:
— if two values are provided, they are forming a single range. The first value must be
smaller than the second one.
— If four values are provided, the first pair is forming a first range and the last pair is
forming a second one. Within each pair, the first value must be smaller than the sec-
ond one.
By default, the regions with values outside the specified ranges are set to transparent. The colors, to
be used outside of the treshold range, can be specified in the Range Colors Type Editor. This edi-
tor can be accessed through the Preferences/Range colors type… menu. As can be seen in Fig-
ure 4.3.3-1, the editor contains 4 options:
• Visible:When activated, the colors specified in the editor will be used, if not they will be set to
transparent.
• Below Range: The specified color will be used for all regions in which the quantity value is
lower than the specified minimum treshold value.
• Between Ranges: If four values are provided for the treshold range, the specified color will be
used for all regions in which the quantity value lies between the specified
maximum and minimum treshold values of the first and second range respec-
tively.

CFView™ 4-19
Flow Quantities Visualization Visualize Scalar Data

• Above Range: The specified color will be used for all regions in which the quantity value is
higher than the specified maximum treshold value.

FIGURE 4.3.3-1 Range Colors Type Editor

 The settings in the Range Colors Type Editor are only taken into account when a
project is opened in CFView™.
The region of the surface in which the quantity lies between the limits is represented. This com-
mand remains active until another quantity representation requiring interactive input is selected. An
example of a tresholded smooth colour contour is given in Figure 4.3.3-2.

FIGURE 4.3.3-2 Thresholded color contour of the static pressure

4-3.3.5 Color Contour Transparency


An opacity slider has been added to the quick panel. When the user change this slider, the opacity
value is given to:
• all the active surfaces
• all the active color contours.

4-20 CFView™
Visualize Scalar Data Flow Quantities Visualization

FIGURE 4.3.3-1 Opacity slider

FIGURE 4.3.3-2 semi-transparent color contour on a cutting plane

4-3.3.6 Update Color Contour


To modify one or several colored contours represented on the screen,
1. Click on the first color contour to modify, then pressing the <Ctrl> key, click on the other color
contour representations to modify.
2. Press the right mouse button, a pop up menu appears.

CFView™ 4-21
Flow Quantities Visualization Visualize Scalar Data

It contains 6 items for smooth and strip contour (for flat contours, only the Delete item is available):
— Select Filled to let the color contour fill the surfaces completely.
— Select Wireframe to get colored surface wireframes.
— Select Markers Only to get only the markers colored.
— Select Line Type... to edit the type of line used for the wireframe representation. Note that
the line color parameter does not have any effect in this context (see section 4-10.4 for an
explanation of the other parameters).
— Select Marker Type... to edit the type of markers used for the "markers only" representa-
tions. Note that the color parameter does not have any effect in this context (see section 4-
10.4.2 for an explanation of the marker parameters)
— Select Delete to suppress the contour representations from the screen.

FIGURE 4.3.3-3 Color contour shown as markers only, mesh wireframe and filled.

4-3.3.7 Delete Color Contours


CFView™ provides different methods to erase color contour representations:
• By interactive selection: as explained in section 4-3.3.6, when color contour representations are
selected, the associated popup menu contains a Delete item. By selecting this item, the currently
selected contours are suppressed from the screen.
• By selecting Update/Delete/Color Contour: all the color contour associated to the active quan-
tity and that are drawn on one of the active surfaces are erased.
• By selecting Update/Delete/All, all the representations (not only the color contours) on all sur-
faces are deleted.

4-3.4 Streamlines
The Streamlines module allows the user to color the streamlines based on any scalar field quantity
available in the field quantities list in the Quantities subpanel. By default the streamlines are com-
puted by using the relative velocity vector field. To color the streamlines by integration of the active
scalar quantity, select Streamline from the Representation menu. A submenu appears, containing
three options to plot streamlines: Local, Section and From Grid Line…. The default computation
and representation parameters can be changed by using the Streamlines Parameters dialog box
available from Parameters… menu.

4-22 CFView™
Visualize Scalar Data Flow Quantities Visualization

FIGURE 4.3.4-1 Access to Streamlines Module

4-3.4.1 Local Streamline


1. Select Local from Representation/Streamline menu.
2. Select the starting point. This can be done in two ways,
• With the mouse: select a point with the left mouse button on an active surface (selected
in the Surfaces subpanel).
• With the keyboard: A request message "Input or select vector line starting point" appears
in the message area of CFViewTM.

In the string input area, type the desired x y z coordinates of the starting point on the active surface,
then press <Enter> in the keyboard input area in order to validate the entry.
The streamline starts from this point and extends to the first non-connected boundary (i.e. full-non-
matching boundaries, rotor-stator interfaces…) encountered or until the maximum number of points
per streamline is exceeded (more details can be found in section 4-3.4.4).

4-3.4.2 Streamline from Section


1. Choose Section from Representation/Streamline menu.
2. Select a section defined by two points: A request message "Input number of vector lines and
press-drag to define section" appears in the message area of CFViewTM.
3. In the keyboard input area, type the desired "Number of Points:" (the default value is 5), then
press <Enter> in the keyboard input area in order to validate the entry (e.g. 25). The entered
number should be larger than 2. It defines the number of starting points on the originating sec-
tion.

CFView™ 4-23
Flow Quantities Visualization Visualize Scalar Data

4. To create the originating section of streamlines through the active surface (selected in the Sur-
faces subpanel), move the mouse in the graphical area and click the left mouse button to select
the first point of the section line. Hold the mouse button and drag it, a red line is attached to the
cursor. Move the cursor in the desired direction and release the left mouse button to define the
second point of the line.

FIGURE 4.3.4-2 Section creation on an active surface for streamline plot

4-3.4.3 Streamline from Grid Line


1. Choose from Grid Line... from the Representation/Streamline menu. A dialog box appears:

FIGURE 4.3.4-3 Grid line definition dialog box for streamline plot

2. In the Index area, click the desired radio button. The i and j radio buttons do not necessarily cor-
respond to the IGG™ indices:
• If the surface is constant in I, the first index corresponds to J and the second to K.
• If the surface is constant in J, the first index corresponds to K and the second to I.
• If the surface is constant in K, the first index corresponds to I and the second to J.
3. Set a value of the constant index in the Value box between 1 and the maximum value indicated.
4. Select the nodes from which the streamlines need to be generated in Node Range area. To do
this, enter a node range:
• Enter a number in the First box included between 1 and the maximum of the unselected
index.

4-24 CFView™
Visualize Scalar Data Flow Quantities Visualization

• Enter a number in the Last box included between the number given in First box and the
maximum of the unselected index. This number has to be different from the first node
number. Initially the Last box indicates the maximum node number available.
5. Click the Apply button to start the streamline computation and display.
6. Click the Close button to close the dialog box.

4-3.4.4 Streamlines Parameters


The parameters of the streamlines like the maximum number of points per line or cell, the cell aver-
age, the color, the direction, the curve type can be changed in the following way.
1. Choose Parameters... from the Representation/Streamline menu. A dialog box appears, as
shown in Figure 5.
2. To modify the maximum number of points per streamline: click on the Max points per line box
and enter the desired number of points or use the increment-decrement buttons
3. To modify the maximum number of points calculated inside each cell (this number allows to
avoid continuous calculations when the streamline goes in a spiral inside a cell): click on the
Max points per cell box and enter the desired number of points or use the increment-decrement
buttons. This parameter is used only for surface streamlines on mesh surfaces.
4. To modify the average number of points inside each cell (this average defines the number of
points calculated inside a cell): click on the Average points per cell box and enter the desired
point average or use the increment-decrement buttons. This parameter is used only for surface
streamlines on mesh surfaces.

5. Parameters definition dialog box for streamline plot


6. To modify the integration direction: click on the pull down menu and choose among three
options:
• Forward, to set up a downstream integration,
• Backward, to set up an upstream integration or

CFView™ 4-25
Flow Quantities Visualization Visualize Scalar Data

• Both, to set up full stream integration.


7. To modify the computation mode: click on the pull down menu and choose among two options:
• Volume, to define streamline(s) in the 3D space or
• Surface, to constrain the streamline on the surface from which it is started
8. Click the Apply button to apply the modifications.
9. Click the Reset button to discard the modifications and go back to the initial parameters.
10. Click the Close button to close the dialog box.
To modify the default line or the marker type click on the corresponding Line Type or Marker
Type page respectively (See section 4-10.4 for a detailed description of these parameters).

 The parameters settings are applicable for the next streamline(s) to be created.

4-3.4.5 Update Streamline


To modify one or several streamlines represented on the screen,
1. Click on the first streamline to modify, then pressing the <Ctrl> key, click on the other stream-
lines to modify.
2. Press the right mouse button, a pop up menu appears.

It contains 4 items:
— Select Uniform Color to color the streamline with pre-defined uniform color.
— Select Quantity Color to color the streamline based on the scalar quantity which was
selected when creating the streamline.
— Select Curve Type... to edit the type of curve used for the streamline representation. Note
that the line color parameter only has an effect if Uniform Color was selected before (see
section 4-10.4 for an explanation of the other parameters).
— Select Delete to suppress the contour representations from the screen.

4-3.4.6 Delete Color Streamlines


CFView™ provides different methods to erase color streamline representations:
• By interactive selection: as explained in section 4-3.4.5, when color streamline representations
are selected, the associated popup menu contains a Delete item. By selecting this item, the cur-
rently selected streamlines are suppressed from the screen.
• By selecting Update/Delete/Streamline: all the color streamline associated to the active quan-
tity and that are created from one of the active surfaces are erased.
• By selecting Update/Delete/All, all the representations (not only the color streamlines) on all
surfaces are deleted.

4-26 CFView™
Visualize Scalar Data Flow Quantities Visualization

4-3.5 Iso-Surfaces
This option allows to visualize in 3D the surfaces where the active quantity remains constant. To do
so:

1. Choose Iso-Surface from the Representation menu or click on the button in the Repre-
sentations/Contours & Iso Values subpanel.
2. Choose the iso-surface value:
• click in the string input box, enter a single value (included between the maximum and
the minimum of the quantity) and press <Enter>.
• With the mouse: move the mouse to the colormap and click at a level which represents
the value.
Each new input for the iso-surface value removes the previous iso-surface and displays the new
one.

 Iso-surface generation involves the scanning of the complete computational volume


and is computationally intensive on large meshes.
Iso-surfaces may be saved in order to create other representations on them. To save an iso-surface,
choose Representation/Iso-Surface Save or click a second time on the button. The surface
name is inserted in the project surface list for further manipulations (see section 3-4.5).

In previous versions of CFView, the rendering of iso-surface presents lighting artefacts, because the
normals of the surface are not computed correctly by HOOPS. These artefacts are white and black
areas on the iso-surface, or a faceted look of the surface.
The following solution has been implemented: the normals are computed analytically, as the local
gradient of the scalar field, after the iso-surface has been computed.
The gradient is only computed locally, on the proximity of the iso-surface.

FIGURE 4.3.5-1 Without and with analytic normal computation

One can see the faceted aspect of the iso-surfaces on the left and the smoother look of the iso-

CFView™ 4-27
Flow Quantities Visualization Visualize Scalar Data

surface on the right.

4-3.6 Cartesian Plots


CFView™ allows to easily create plots of the quantity distribution along arbitrary sections and grid
lines.
When one of the plot commands is activated, CFView™ automatically opens a new view, that will
contain the Cartesian plot. Furthermore, the range of the plot axis is set to the limits reached by the
quantities. CFView™ defines and handles automatically one Cartesian plot view per quantity.
When the first curve of a quantity is drawn, a Cartesian plot view is opened. And the next curves
are automatically inserted in this Cartesian plot view.
The layout of existing Cartesian plots can be modified interactively by selecting parts, by using the
Update/Plot menu or by the viewing buttons.
The different commands to create Cartesian plots are contained in the Representation/Cartesian
Plot menu and in the Representations/Plot & Values subpanel. These are outlined below.

4-3.6.1 Cartesian Plot along Surface Boundaries


Choose Along Boundary from the Representation/Cartesian Plot menu or click on the Boundary
button in the Representations/Plot & Values subpanel. A curve is drawn for each boundary of the
active surfaces.
In the currently active 3 or 2 dimensional view, the boundaries of the active surfaces are colored in
the same color as in the Cartesian plot.

 The default style for the line and markers may be modified by using the Default Node
Line Curve Type Editor (Preferences/Node line curve type...), see section 4-11 for fur-
ther information. If the default color is different from black or white, the color is changed
from curve to curve in order to facilitate curves identification. Similarly, the marker type
and the line style are changed from curve to curve.

4-3.6.2 Cartesian Plot along Solid Surface Boundaries


Choose Along Solid Boundary from the Representation/Cartesian Plot menu or click on the
Boundary Solids button in the Representations/Plot & Values subpanel. A curve is drawn for each
boundary of the active surfaces which is a solid boundary. Also, the boundaries of the solid surfaces
are colored in the same color as in the Cartesian plot.
As for the plot along surface boundaries feature, the default line and marker styles can be changed
by using the Default Node Line Curve Type Editor (Preferences/Node line curve type...).

 If no solid surface is selected at the time the Cartesian Plot/Along Solid Boundary is
requested, an empty Cartesian plot view will appear on the screen.

4-3.6.3 Cartesian Plot along Section


This option provides a convenient way of visualizing quantity distributions along arbitrary sections
of the active surfaces. To create a plot along a section:
1. Select the surfaces on which the section has to be represented.
2. Choose Along Section from the Representation/Cartesian Plot menu or click on the Section
button in the Representations/Plot & Values subpanel.
3. Select a section line defined by two points:

4-28 CFView™
Visualize Scalar Data Flow Quantities Visualization

• move the mouse to the graphical area and click the left mouse button to select the first
point of the section line. A red line is attached to the cursor. Drag the cursor in the
desired direction and release the left mouse button to define the second point of the line.
• or, move the mouse to the string input area and successively enter the coordinates of the
two points defining the section. Press <Enter> to apply.
The section line actually defines a cutting plane perpendicular to the plane of the screen. This plane
crosses the active surfaces and generates sections. The quantity values on these sections are imme-
diately mapped in the Cartesian plot view, while the traces of the sections appear on the active sur-
faces.

FIGURE 4.3.6-1 Pressure profile on a radial compressor blade.

The section in Figure 4.3.6-1 is obtained from a cylindrical coordinates view (constant radius). The
viewing direction is along theta and the section line is a horizontal line which intersects the blade
pressure and suction sides.
The default style for line and markers may be modified by using the Default Section Curve Type
Editor (Preferences/Section curve type...). section 4-11 for further information. If the default Sec-
tion Curve Type is different from black or white, the curve color is changed from curve to curve, as
well as the line and marker styles.
This option remains active until another scalar representation which requires interactive picking is
activated.

 The arc lengths are independent for each curve extracted from the active surfaces.

 The keyboard shortcut for Along Section is: <d>.

4-3.6.4 Cartesian Plot along a Grid Line


To create a plot along a grid line:
1. Select the desired surfaces.
2. Select Along Grid Line... from the Representation/Cartesian Plot menu or click on the Grid
Line button in the Representations/Plot & Values subpanel. It opens a dialog box. Click on one
of the I or J constant Index button to activate the desired surface family. The “I” and “J” appella-
tion do not necessarily correspond to the IGG™ index:
• if the surface is constant in I, the first index corresponds to J and the second to K.
• if the surface is constant in J, the first index corresponds to K and the second to I.
• if the surface is constant in K, the first index corresponds to I and the second to J.

CFView™ 4-29
Flow Quantities Visualization Visualize Scalar Data

3. Click on the Value string input and enter a number included in the limits.
4. Click on the First and Last string inputs and enter the number of the first and last grid node to
consider in the plot curve.
5. Click the Apply button to perform the action. The result is immediately mapped in the Cartesian
plot view, while the trace of the section appears on the active surfaces.
6. Click the Close button to close the dialog box.

FIGURE 4.3.6-2 Grid line definition dialog box for vector line plot

The default style for the line and markers may be modified by using the Node Line Curve Type Edi-
tor (Preferences/Node line curve type...). section 4-11 for further information. If the default color
is different from black or white, the curve color is changed from curve to curve as well as the line
and marker styles.

 This option is only available for structured meshes.

4-3.7 Update Cartesian Plot


A Cartesian plot view is made of several parts that can be selected and updated separately. The
curves, the axis and the axis labels are the elements that may be selected. The various ways to
update these elements are described in the following sections.

4-3.7.1 Change Axis Variable & Range


Each axis of the Cartesian plot is attached to a variable. The available variables are:
• the quantity values,
• the arc length or its normalized value along the curve,
• the x, y or z coordinates,
• the radius or the azimuthal angle (with respect to the z axis) and
• the span or stream position for turbomachinery analysis (see section 5-2).
In order to modify the variable related to an axis or to modify the range minimum or maximum
value, click with the left mouse button on the axis, red markers are appearing. Then, press the right
mouse button, a pop up menu is raised.

4-30 CFView™
Visualize Scalar Data Flow Quantities Visualization

1. In the sub menu Function of, select the desired item to change the variable which is attached to
the axis.
2. Select Fit Range in order to set the minimum and maximum range values to those of the repre-
sented curves. Note that if no element is selected in the Cartesian plot view, the popup menu
raised by pressing the right mouse button, contains the item Fit Range that performs the same
operation on both the ordinate and the abscissa axes.
3. Select Set Range... to enter a new range. There are two possible ways of doing this:
— enter the minimum and the maximum value in the string entry below the graphical area or
— press on the axis desired minimum value, drag and release on the axis desired maximum
value to provide the minimum and maximum values. During the interactive operation a red
bar appears along the axis.
4. Select Set Logarithmic in order to display the data in logarithmic scale. When an axis is
already in logarithmic scale, select the Set Linear item to come back to a linear display.
5. Select Set Reverse in order to display the data in decreasing values. When an axis is reversed,
select Unset Reverse to come back to the normal display.
The viewing buttons are also providing shortcuts for some of the frequently used operations (see
also section 2-5.3 for a detailed explanation of their use):

These buttons are selecting the quantity for the abscissa axis

This buttons allows to translate the curve representations.

This button allows to zoom in or out in both the abscissa and


ordinate ranges.

This button allows to zoom on a rectangular region.

This button performs a range fitting in both directions.

This button performs a range fitting and a small zoom out, in


both directions.

The axes ranges are always updated automatically to reflect the range modifications.

4-3.7.2 Update Curve Type


To modify the line and marker style of the curves:
1. Select the first curve to be modified, then pressing the <Ctrl> key, select the other curves. The
curves may be selected in the Cartesian plot view or in the 2 or 3 dimensional view in which
they are represented.

CFView™ 4-31
Flow Quantities Visualization Visualize Scalar Data

2. Press the right mouse button, a popup menu appears.

3. Select the Curve Type... item: a Curve Type Editor dialog box is raised.
4. Modify the line and marker attributes (see section 4-10.4 for a detailed explanation of the
parameters for line and markers)
5. Press the Apply button in the dialog box.
Note that the selected curves set can still be modified after the dialog box is opened. The line and
markers style is applied to the curves that are selected at the moment the Apply button is pressed.
The Set Thicker/Set Thinner items allow to increase or reduce the thickness of the line.
The Limited Section item allows to restrict the plot between the two selected points instead of, by
default, a complete line on whole domain passing through the two selected points.

FIGURE 4.3.7-1 Illustration of "Limited Section" Curve Type

4-3.7.3 Copy/Paste/Merge Curves


The Copy/Paste items allow to perform comparisons between computed results by selecting Copy
in a first Cartesian plot and then Paste in a second Cartesian plot.
When plotting a curve on multiple successive surfaces, the resulting plot will contain several curves
(one per surface), while the user is frequently interested into viewing these curves as a single one.
The Merge item appearing when multiple curves are selected in the Cartesian plot allows to merge
all the selected curves in an automatic way.

4-3.7.4 Delete Plot Curves


When plot curves are selected (see section 4-3.7.2 for a description of how to select curves), select
the Delete item in the associated popup menu. The selected plot curves are deleted.

4-32 CFView™
Visualize Scalar Data Flow Quantities Visualization

Note that when plot curves are deleted in a Cartesian plot, the representations of the curve in the
original 2D/3D view is also deleted. But, when a plot curve is deleted in a 2D/3D view, it is not
removed from the Cartesian plot view.

4-3.7.5 Change Axis Ticks & Labels

a) Ticks & Numbers


A specific dialog box allows to update the ticks and the numbers style. In order to open this dialog
box, select the axis, then, in the popup menu which is raised by pressing the right mouse button,
select the item Ticks & Numbers...
.

Numbers Numbers
orientation text type

Numbers
Graduations distance

FIGURE 4.3.7-2 Axis ticks and labels definition dialog box

The dialog box contains several parts:


• The numbers orientation buttons: these allow to choose the text orientation between horizontal,
vertical or at 45 degrees.
• The numbers text type part allows to choose the font name, size and color for the axis numbers.
• The Ticks entry allows to choose the number of graduations displayed on the axis. Note that
CFView™ is rounding automatically the graduations interval in order to display values with as
few significant numbers as possible.
• The Numbers distance entry allows to enlarge or shrink the spacing between the axis and the
graduation numbers.

b) Axis Label
In order to modify the axis label, it should be selected by clicking on it with the left mouse button.
Red markers are displayed around it to indicate the selected element.
When the axis label is selected, a popup menu is raised by pressing the right mouse button.

This menu contains 4 elements:

CFView™ 4-33
Flow Quantities Visualization Visualize Scalar Data

• Select Larger Font Size or Smaller Font Size to enlarge or shrink the label text.
• Select Edit Text... in order to edit interactively the text. During its edition, the text is displayed
horizontally for a better readability. The following functions are available during the edition:
— The text is inserted at the cursor position. Initially, this cursor is positioned on the first char-
acter.
— The left and right arrow key to move the insertion cursor.
— The <Backspace> key suppresses the character on the left side of the insertion cursor.
• Select Font & Position... in order to open a dialog box in which the label font and position can
be modified.

FIGURE 4.3.7-3 Axis Label Editor

— The Font Type frame allows to choose the font type, size and color (see section 4-10.3.1 for
further details on text fonts).
— The Position frame allows to choose the position (either at the axis origin, at mid-range or an
the axis end) as well as the distance between the numbers and the label text.

4-3.7.6 Add Grid Lines in Cartesian Plot


If no element is selected in the Cartesian plot view, the popup menu raised by pressing the right
mouse button contains the items Show H Grid Lines and Show V Grid Lines. When selected, grid
lines are represented at each major axis graduation.

When graduation lines are represented, these items are replaced by Hide H Grid Lines or Hide V
Grid Lines which are used to remove the grid lines from the Cartesian plot. Furthermore, the
popup menu contains the items H Grid Lines Type... or V Grid Lines Type.... By selecting one of
these items, a Grid Lines Type dialog box is opened in which the grid line type, color and thickness
may be modified (see section 4-10.4.1 for a detailed description of the dialog box and of the line
type parameters).

4-34 CFView™
Visualize Scalar Data Flow Quantities Visualization

4-3.7.7 Resize Cartesian Plot


If no element is selected in the Cartesian plot view, the popup menu raised by pressing the right
mouse button contains the item Resize Curve Area. When this item is selected, a red rectangle is
drawn with markers in the corners and in the middle of the sides and a specific message is displayed
in the message bar.
To resize the curve area:
• Move the cursor on the marker to move. When close to the marker, the cursor is changed to the
resizing cursor symbol.
• Press, drag and release with the left mouse button to resize the curve area.
To move the curve area, without modifying its size:
• Move the cursor inside the curve area. The cursor is changed to the move cursor symbol.
• Press, drag and release with the left mouse button to move the curve area.
When the curve area is moved or resized, the axes are automatically redrawn on its sides.
To leave the resizing mode, click with the left mouse button or press the right mouse button.

4-3.7.8 Cartesian Plot Axis Editor Dialog Box


The Plot Axis Editor dialog box is opened by selecting the item Axis Editor... in the Update/Plot
menu. This 5 pages dialog box, see Figure 4.3.7-4, provides a centralized access to all the parame-
ters that can be modified in the Cartesian plot axis:

FIGURE 4.3.7-4 Plot Axis Editor

• the first page (Scale) provides access to the axis quantity and range selection.
• the second page (Axis Labels) provides access to the axis labels text and text type.
• the third and fourth pages (Major Units - Minor Units) provides access to the grid line types.
• the fifth page (Ticks Labels) provides access to the graduation numbers text type.

CFView™ 4-35
Flow Quantities Visualization Visualize Scalar Data

4-3.7.9 Update/Plot Menu


The Update/Plot menu contains some frequently used items for Cartesian plots. These are the fol-
lowing:
• To fit all the curves in the plot choose Original.
• To display quantity distributions in function of the X direction, choose Function of X.
• To display quantity distributions in function of the Y direction, choose Function of Y.
• To display quantity distributions in function of the Z direction, choose Function of Z.
• To display quantity distributions in function of the Arc length direction, choose Arc length.
• To display quantity distributions in function of the normalized arc length, choose Normalized
arc length.
• To suppress the last curve inserted in the Cartesian plot, select Curve Undo

4-3.8 Export Plot Curve(s) in File


CFView™ allows to export all the curves from a Cartesian plot or selected curves.
To save all the curves data in an ascii file, select Curve Output... from the Update/Plot menu. To
save only selected curves, first select them interactively (use <Ctrl> + left mouse button to select
multiple curves), then press the right mouse button and select Export to File in the popup menu.
A file chooser is opened to specify the file directory and name. The data are saved as an ASCII file
which contains one section per curve. A section in the file has the following format
• a header line which contains:
— the number of geometrical coordinates: 3,
— followed by the number of quantities: 1,
— followed the number of curve points,
— followed by the names of the quantities surrounded by ’|’ characters,
• the content lines where each line contains
— the X, Y and Z coordinates of one point (or Z and R coordinates and a "0" in case the Carte-
sian plot has been created from the meridional averaged view)
— followed by the quantity values.
Example:
3 1 85 |Vx|
6.344958e-002 5.638292e-002 0.000000e+000 0.000000e+000
6.345011e-002 5.638186e-002 0.000000e+000 -7.162985e-006
...

 In addition of the default file containing the quantity function of X, Y and Z, a new
file will be automatically generated containing the ordinate function of the abscissa used
in Cartesian plot ("usernameOrdinateFctOfAbscissa.dat")

 A file containing a single section in this format can be directly loaded as a validation
data (see section 2-4 and section 4-4). Note that files that are containing several curves
must be split before being loaded as validation data.

4-36 CFView™
Represent Validation Data Flow Quantities Visualization

4-4 Represent Validation Data


The validation data functionality allows to make a plot of a validation data set and to compare it to
the computational data. Refer to section 2-4 for further details on how to import validation data. To
represent validation data in a Cartesian plot:
1. Load validation data from the File/Load Validation Data... menu.

 The format of the validation data file is presented in section 2-4.

2. Choose Validation Data from the Quantity menu. A submenu appears:

It contains all the validation curves loaded in the project.


3. Select a validation curve: another submenu appears. It contains one or more quantity names: the
names of the quantities existing on the selected curve. Choose one of them.
4. If the selected quantity also exists as a field quantity (i.e. is listed in the Quantity/Field Data/
Basic Quantities menu), a confirm dialog box is popped up with a question "Comparison?".
Click the Yes button to load the respective computation data from the field quantity list to be
compared with the validation data. The No button is used to load the experimental data only.

Automatically, a new view is opened that contains the plot or, if the plot view is existing, the curve
is added to the plot view related to that quantity. The line and markers default style for the valida-
tion data curve may be modified by using the Default Validation Data Curve Type Editor (Prefer-
ences/Validation curve type...).
The line and markers default styles for the interpolated data curve may be modified using the
Default Comparison Curve Type Editor (Preferences/Comparison curve type...). See section 4-11
for further information.

CFView™ 4-37
Flow Quantities Visualization Represent Plot Data

4-5 Represent Plot Data


This functionality allows to make a Cartesian plot with plot data coming as part of a project data
set, such as those created when surface average data outputs are selected in the FINE™ GUI (Sur-
face Averaged Variables page). To do so:
1. Choose Plot Data from the Quantity pull down menu. A submenu appears: it contains all the
plot data present in the project.

2. Select a plot data curve with the mouse. Another submenu appears. It contains one or more
quantities defined for the selected plot data curve. Choose one of them to end the selection pro-
cedure. Automatically, a new view is opened that contains the plot.
The line and markers default style may be modified by using the Default Plot Data Curve Type Edi-
tor (Preferences/Plot data curve type...). section 4-11 for further information.

FIGURE 4.5.0-1 Example of plot data from a NACA airfoil computation.

The plot data on the right side of Figure 4.5.0-1, is the convergence curve of the computed drag. On
the left side, a color contour of the vertical velocity shows the velocity distribution.

4-6 Visualize Vector Data


The Representations subpanel and Representation menu are dynamic. The items which appear,
after the selection of a scalar quantity are described in section 4-3. If a vector quantity is selected,
different items appear. They are used to display vectors at given positions on the active surfaces and
to compute particle traces starting at given positions.

4-38 CFView™
Visualize Vector Data Flow Quantities Visualization

4-6.1 Arrow Representation


4-6.1.1 Local Vector
To obtain just one vector drawn locally on an active surface, choose Local Vector from the Repre-
sentation menu or select the button in the Representations/Vectors subpanel. The selection
of the point where to compute and draw the local vector is either done by typing the point coordi-
nates into the string input box or, interactively by selecting it by clicking with the left mouse button
on the active surface in the graphical area.

 The keyboard shortcut for Local Vector is: <v>.

4-6.1.2 Vector on Grid Nodes


This command allows to represent the active vector quantity as an arrow at a given mesh nodes of
the active surfaces. These nodes are specified by a start index, an end index and a step for the two
surface indexing directions. Setting both, the I and the J step to 1 will plot a vector at every vertex
between the start and the end indices. To do so:

1. Choose Vector on Grid Nodes... from the Representation menu or select the button in
the Representations/Vectors subpanel. A dialog box appears.

The “I” and “J” appellation do not necessarily correspond to the IGG™ index:
• if the surface is constant in I, the first index corresponds to J and the second to K.
• if the surface is constant in J, the first index corresponds to K and the second to I.
• if the surface is constant in K, the first index corresponds to I and the second to J.
2. Click on the I - Min box and enter the I value or use the small up and down arrow buttons to set
the starting node. Do the same for I - Max which is the I value of the ending node. If necessary,
change the default I - Step number.
3. Set the J value of the starting node in the J - Min box. Do the same for J - Max which is the J
value of the ending node. If necessary, change the default J - Step number.
4. Click the Apply button to represent the vector field.
5. Click the Close button to discard the dialog box.

 The keyboard shortcut for Vector on Grid Nodes is: <c>.

CFView™ 4-39
Flow Quantities Visualization Visualize Vector Data

4-6.1.3 Thresholded Vector on Grid Nodes


This functionality allows to discard parts of the vector field, which present no interest, by allowing
the introduction of a minimum and maximum threshold value for the vector magnitude. All the sur-
face regions in which the vector magnitude is outside the given limits are discarded.
To add a thresholded vector representation,

• select the Thresholded item in the Representation menu or click on the button in the
Representations/Vectors subpanel.
• Provide the threshold range in one of the following ways:
— with the mouse: move the mouse into the colormap and click at a level which represents the
first limit. Drag the mouse along the colormap up to a suitable value (a line appears between
the selected point and the cursor). Release the mouse button to fix this second limit.
— with keyboard input: click in the string input box and enter 2 values separated by a blank.
They are forming a single range, the first one must be smaller than the second one.
The vector arrows having an amplitude lying between the limits are represented at the active sur-
faces vertices.

 The keyboard shortcut for Thresholded vector arrows is: <t>.

4-6.1.4 Vectors along Section


To obtain the vector field quantity representation along an arbitrary section on the active surfaces,
choose Section from the Representation menu or click on the button in the Representations/
Vectors subpanel.
The selection of the line section is done interactively by pressing, dragging and releasing the left
mouse button. The section line is actually defining a plane perpendicular to the screen. The section
along which the vectors are represented is the intersection of that plane with all the active surfaces.

 The keyboard shortcut for vectors along a Section is: <d>.

4-6.1.5 Vectors along Grid Line


This command allows to display the vector arrows along constant index surface lines. To do so:

FIGURE 4.6.1-1 Vectors along Grid Lines

4-40 CFView™
Visualize Vector Data Flow Quantities Visualization

6. Choose Along Grid Line... from the Representation menu or click on the button in the
Representations/Vectors subpanel. The above dialog box appears.
The “I” and “J” appellation do not necessarily correspond to the IGG™ index:
• if the surface is constant in I, the first index corresponds to J and the second to K.
• if the surface is constant in J, the first index corresponds to K and the second to I.
• if the surface is constant in K, the first index corresponds to I and the second to J.
7. Select the constant index: click on the desired Index button and set its value in the Value entry.
8. In the Node Range frame, set the value of the first and last node to consider along the line.
9. Click the Apply button to see the vectors along the grid line.
10. Click the Close button to discard the dialog box.

 This command is related to structured meshes only.

4-6.2 Update Vector Representation


4-6.2.1 Change Representation Scale
By default, CFView™ computes a scaling factor for the representation of vectors based on the aver-
age vector field amplitude. To change that factor:

• click on the button to enlarge the vectors or on the button to scale down the vector

representations in the subpanel Representations/Vectors or


• use the Vector Type Editor dialog box through the Representation/Vector Type... menu as
described in section 4-6.2.3.

4-6.2.2 Change Color & Line Type


The vector arrow representation can be colored according to the vector amplitude or drawn in a
fixed color. The default coloring mode can be modified in the Vector Type Editor dialog box.
The coloring mode of the represented vectors as well as the line type used for the arrows may be
modified in the following way:
• Select the first vector or vector group to be modified by clicking on it with the left mouse but-
ton. Select the other vector or vector groups by pressing the <Ctrl> key and clicking on them.
Highlighting markers are drawn on all the selected vectors.
• Press the right mouse button, a popup menu appears.

• Select Line Type... to open a Line Type Editor allowing to modify the line type used for the vec-
tor arrows (see section 4-10.4.1 for a detailed explanation of the line type parameters).
• Select Color Lock to change the coloring mode into single color.
• Select Color by Amplitude to color the vectors according to their amplitude.

CFView™ 4-41
Flow Quantities Visualization Visualize Vector Data

4-6.2.3 Vector Type Dialog Box


The representation type of the vector field as well as the representation scale and the shape of the
vector arrow head can be modified in the Vector Type Editor dialog box. To do so:
1. Choose Representation/Vector Type.... The dialog box appears.
2. Select the representation type:
— Full Vector for standard representation of vectors,
— Normal Component to represent the projection of the vectors on the surfaces local normals,
— Tangent Component to represent the projection of the vectors on the surfaces local tangent
planes,
— Normal Difference for a representation of the locally normal component of the difference
between the mean vector and the local vector. The mean vector is computed as the average
vector on the surface, averaging being weighted by the area of the cells that are containing
the vertices,
— Tangent Difference for a representation of the locally tangent component of the difference
between the mean and the local vector. The mean vector is computed as the surface average
vector, in the same way as for the Normal Difference.
3. Select the arrow shape:
— select the Length of the arrow head relatively to the vector length,
— select the Width of the arrow head relatively to the vector length,
— select whether the arrow head should be filled or not.
4. Select the scaling factor. The Scaling factor is defined as a ratio between 2 numbers.
— double or half the numerator or the denominator by pressing on the up and down arrow but-
tons.
— set the factor to a value of 1 by pressing on 1/1 button.
5. Select Color Uniform to have vectors drawn in a single color or Color Contour to have vec-
tors colored according to their amplitude.
6. Click the Apply button to redraw the vectors with the selected parameters without closing the
dialog box.
7. Click the Reset button to reset the changes and go back to the original values.
8. Click on Close to discard the dialog box.

 The representation type and color mode parameters are applicable for the next vectors
to be created, while the scale and arrow shape are applied to all represented vectors.

 The keyboard shortcut for Vector Type is: <s>.

4-6.2.4 Delete Vector Representations


CFView™ provides different methods to erase represented vectors:
• By interactive selection:
— select a first set of vectors by clicking on any of the vectors.
— Select others vectors to be deleted by pressing the <Ctrl> key while clicking on them.
— Press the right mouse button to raise a popup menu.
— Select the Delete item in the popup menu.

4-42 CFView™
Visualize Vector Data Flow Quantities Visualization

• By selecting Update/Delete/Vectors: all vector representations of the active quantity on active


surfaces are deleted.
• By selecting Update/Delete/All: all representations (not only the vectors) on all surfaces are
deleted.

4-6.3 Vector Lines


To generate vector lines by integration of the active vector quantity field, choose Vector line from
the Representation menu. A submenu appears which contains different commands. The Represen-
tations/Vector Lines subpanel contains also shortcut buttons for these functionalities.
Vector lines may be obtained from a specified point, from a section or along a grid line. The default
computation and representation parameters can be changed by using the Vector Lines Parameters
dialog box.

4-6.3.1 Local Vector Line


To generate local vector lines:

1. Choose Local from the Representation/Vector line menu or click on the button in the
Representations/Vector Lines subpanel.
2. Select the starting point. This can be done in different ways:
• with the mouse: select with the left mouse button a point on an active surface.
• with the keyboard: the message “Vector line starting point:” appears in the string input
area. Click on the string input box and enter the coordinates (the coordinates must be
separated with a blank) of the starting point. The actual start point is the projection of the
provided point on the closest active surface.
The vector line starts from this point and extends to the first non-connecting boundary encountered
or until the maximum number of points per vector line is exceeded (see section 4-6.4).

 The keyboard shortcut for Local vector line is: <j>.

4-6.3.2 Vector Lines from Section


To generate a set of vector lines from a section:

1. Choose Section from the Representation/Vector line menu or click on the button in the
Representations/Vector Lines subpanel.
2. Select a section defined by two points: move the mouse in the graphical area and click the left
mouse button to select the first point of the section line. A red line is attached to the cursor.
Move the cursor in the desired direction and click the left mouse button to define the second
point of the line.
The two points are actually defining a plane perpendicular to the screen. The section along
which the vector lines starting points are set is the intersection of that plane with the active sur-
faces. The starting points are equally distributed between the two points.
A default number of 5 vector lines are generated from this section and extend to the first boundary
encountered.

 When choosing Section, a message “Number of Points:” appears on the left of the
string input area. To modify the default number of starting point in the section, click on
the string input box and enter a number larger than 2.

CFView™ 4-43
Flow Quantities Visualization Visualize Vector Data

 The keyboard shortcut for vector lines from Section is: <Shift-j>.

4-6.3.3 Vector Lines from Grid Line


To generate vector lines from the points contained in a grid line:

1. Choose From Grid Line... from the Representation/Vector line menu or click on the but-
ton in the Representations/Vector Lines subpanel. A dialog box appears as shown in Fig-
ure 4.6.3-1.

FIGURE 4.6.3-1 Vector Lines along Grid Line

The “I” and “J” appellation do not necessarily correspond to the IGG™ index:
• if the surface is constant in I, the first index corresponds to J and the second to K.
• if the surface is constant in J, the first index corresponds to K and the second to I.
• if the surface is constant in K, the first index corresponds to I and the second to J.
2. Select the constant index. Click on the desired Index button.
3. Set the value of this constant index in the Value box.
4. Select the nodes from which the lines are generated. To do this, enter a node range:
• Enter in the First box a number included between 1 and the maximum of the unselected
index.
• Enter in the Last box a number included between 1 and the maximum of the unselected
index. This number shall be different from the First Node number.
5. Click the Apply button to start the vector line computation and display.
6. Click the Close button to close the dialog box.

 The keyboard shortcut for vector lines From Grid Line is: <Ctrl-j>.

4-6.4 Vector Lines Parameters


The parameters of the vector lines like the color, the direction, the curve type, the number of points
or the cell average can be changed in the following way.

1. Choose Parameters... from the Representation/Vector line menu or click on the button
in the Representations/Vector Lines subpanel. A dialog box appears, as shown in Figure 4.6.4-
1.

4-44 CFView™
Visualize Vector Data Flow Quantities Visualization

2. To modify the integration direction: click on the pull down menu and choose between three
options:
• forward, to set up a downstream integration,
• backward, to set up an upstream integration or
• both, to set up a fullstream integration.
3. To modify the computation mode: click on the pull menu and choose between two options:
• volume, to define vector line(s) in the 3D space or
• surface, to constrain the vector line on the surface from which it is started

FIGURE 4.6.4-1 Vector Lines Parameters

4. To modify the maximum number of points per vector line: click on the Max points per line box
and enter the desired number of points or use the increment-decrement buttons (little up-down
arrows).
5. To modify the maximum number of points calculated inside each cell (this number allows to
avoid continuous calculations when the vector line goes in a spiral inside a cell): click on the
Max points per cell box and enter the desired number of points or use the increment-decrement
buttons (little up-down arrows). This parameter is used only for surface streamlines on mesh
surfaces.

CFView™ 4-45
Flow Quantities Visualization Visualize Vector Data

6. To modify the average number of points inside each cell (this average defines the number of
points calculated inside a cell): click on the Average points per cell box and enter the desired
point average or use the increment-decrement buttons (little up-down arrows). This parameter is
used only for surface streamlines on mesh surfaces.
7. Click the Apply button to apply the modifications.
8. Click the Reset button to discard the modifications and go back to the initial parameters.
9. Click the Close button to close the dialog box.
To modify the Line Type or the Marker Type click on the corresponding thumbnail which allows to
modify the default line and marker types (section 4-10.4 for a detailed description of these parame-
ters).

 The selected parameters are applicable for the next vector line(s) to be created.

 The keyboard shortcut for vector line Parameters is: <q>.

4-6.5 Stream ribbons and stream tubes

FIGURE 4.6.5-1 Stream tube, line and ribbon

4-46 CFView™
Visualize Vector Data Flow Quantities Visualization

FIGURE 4.6.5-2 Ribbon and Tube type type

The two buttons "Variable" allow you to choose if you want the ribbon and the tube have their size
and twist varying along the stream line.
When "Variable size" is selected, the size of the ribbon/tube is proportional to the divergence of
the flow.
When "Variable twist" is selected, the twist of the ribbon/tube is proportional to the vorticity of the
flow.
The "ro" parameter is the size of the ribbon/tube at the beginning of the stream line.
The "r0" number is not an physical size, but it’s relative to the geometry extent of the project.
The computation of the twist and of the size is based on the interpolation of the curl and of the
divergence of the velocity field. These quantities are computed automatically the first time they are
needed and stored for later use, when they are not present in the project.
The two "Scale" parameters are two scaling factors that can be used to show the change of size and/
or twist in a better way. In that case, the ribbon size and twist are not related anymore to a physical
quantity. These scale parameters can be useful for illustrational purposes, to emphasize the flow
divergence and rotational properties.
The "Tube vertices" parameter is only used for tube generation: it defines the number of vertices of
the polygonal cross section of the tube.

CFView™ 4-47
Flow Quantities Visualization Visualize Vector Data

Initial direction: The normal at each point of the curve is computed automatically. However, the
choice of the first normal direction is left to the user, and has to be set by the "Initial direction"
parameter. All the directions are allowed, and you do not have to chose explicitly one of the coordi-
nate axis, but for the user's facility 3 shortcut buttons "X", "Y" and "Z" allow to align the normal
with one of the axis coordinate.

 It is better to use the same initial direction for all the ribbons of a given picture.

Advanced parameters:
• Coincident point removal
The algorithms used to generate ribbons and tube geometry fail when the stream line curve has
coincident points. The coincident point removal options allow to remove all the points that are too
close to each other: all the points that are closer than the "Min. Distance" parameter are collapsed.
When the creation of a ribbon or tube fails, the problem can often be solved by the coincident point
removal algorithm, and increasing the "Min. Distance" parameter.

 Even if it is not its primary goal, the coincident point removal can be used to reduce
the number of points of a stream line, in order to reduce the ribbon geometric complex-
ity.
• Laplacian filter
The "laplacian filter" algorithm allows to smooth the stream lines and the stream tubes. The filter is
a sliding window average filter. The "Pass count" parameters represents the number of time the fil-
ter is applied. The "Kernel size" is the size of the filter's kernel (i.e. the number of points that are
taken into account in the average computation)

 When filtering is on, these quantities are filtered: the position of the curve points, the
normals of the curve, the size and the twist angle.
Twist subdivision:
In case of high vorticity flow, the quality of the ribbons can be low when the ribbon's geometric
density is not sufficient in comparison with the twist of the ribbon. The "Twist subdivision" algo-
rithm allows to refine locally the stream ribbon geometry. The general principle is to add new
points to the curve, until two successive normals never present a relative angle greater than the
"Minimum angle" parameter threshold. New points are added to the curve when the angle between
two successive point is too high.
The "Max. point" parameter is the maximum number of points that will be inserted every time a
refinement is necessary.
Limitations:
a) Generation failure
The streams ribbon/tubes generation algorithm will fail when :
the initial stream curve contains coincident points
the local normal at the point P(i) of the curve is parallel to the local segment P(i-1)- P(i)
In these cases, a stream line will be used instead of a stream ribbon/tube.
Solution: In most of the case, the coincident point removal procedure solves these issues.

4-48 CFView™
Visualize Vector Data Flow Quantities Visualization

When the procedure fails, these errors are detected while computing the normals, with the corre-
sponding warning messages "warning: Curve contains coincident points. Can not compute nor-
mals" and "warning: normal and previous_segment are coincident. Can not compute normals". If
they are detected during the ribbon/tube generation itself, the message will be "Ribbon stream gen-
eration error: ribbon not created because of stream line data degeneracies"
b ) twist angle refinement
If the local twist angle is higher than "Min angle" parameter, the algorithm will add new points to
the stream ribbon/tube. However, if the number of points to add is higher "Max Points" parameter,
only this maximum number of points will be added, with the message: "Ribbon stream generation
warning: twist is too high...try reducing the twist scaling factor"
c) local computation of divergence and of curl
As explained before, the vorticity and the cross divergence computation are based on the interpola-
tion of the divergence and of the curl of the velocity field. These quantities must be computed and
stored for all the domains, even if they are only used locally by the stream line. An amelioration
could be to compute the divergence and the curl quantities only at the curve points where they are
required

4-6.6 Update Vector Line Representation


4-6.6.1 Update Color
The vector lines may be drawn in a single color or colored according to the local amplitude of the
vector. To modify the coloring mode:
• Select the group of vector lines by clicking on any of its vector lines. Multiple selection may be
obtained by pressing the <Ctrl> key while clicking on another group of vector lines. The
selected vector lines are highlighted by markers.
• Press the right mouse button to raise a popup menu.

In this menu
— select Uniform color to have vector lines represented in a single color or
— select Velocity color to have vector lines colored according to the local amplitude.

4-6.6.2 Update Curve Type


In the popup menu associated to a vector line selection (see section 4-6.6.1), select the Curve
Type... item to open a Curve Type Editor dialog box. This dialog box allows to modify the line and
marker parameters as described in section 4-10.4. Note that the color attribute is not used when the
vector lines are colored according to the local vector amplitude (Velocity color).

4-6.6.3 Delete Vector Lines


CFView™ provides different methods to erase represented vectors:
• By interactive selection: when a set of vector lines are selected (see above), the associated
popup menu contains the Delete item. Select it to delete the selected vector lines.

CFView™ 4-49
Flow Quantities Visualization Colormap & Representations Range

• By selecting Update/Delete/Vector Lines: all vector lines representation of the active quantity
that were started from one of the active surfaces are deleted.
• By selecting Update/Delete/All: all representations (not only the vector lines) on all surfaces
are deleted.

4-7 Colormap & Representations Range


4-7.1 Insert Colormap
The colormap is a color scale of the active quantity (for vector quantities, the magnitude of the
quantity is displayed). It is posted automatically when a colored representation (isolines, color con-
tours, vectors) is added. If posted, the colormap is also updated to the new quantity when the active
quantity is changed.
Choose Colormap from the Representation menu to display it in the current view. This command
acts as a toggle, select it again to remove the map from the current view.

 The keyboard shortcut for Colormap is: <Ctrl-r>.

4-7.2 Control Representations Range


This functionality allows the user to control the represented range of the active quantity. This means
that all colored representations of the quantity will be affected by a range selection. The regions of
the color contours with values falling outside the selected range will not be represented. The iso-
lines and vector having values falling outside the selected range will not be visible.

 The quantity range is a global setting. It affects all the views related to the project that
is edited.

4-7.2.1 Range Set


To change the limits of the colormap range, choose Representation/Scalar Range/Range Set or
Representation/Vector Range/Range Set or select the shortcut button in the toolbar. This
option is also available when the colormap is selected (the colormap is selected by clicking on it
with the left mouse button), in the popup menu raised by pressing the right mouse button, select the
Set Range item.

Then insert the new limits in one of the following ways:

4-50 CFView™
Colormap & Representations Range Flow Quantities Visualization

• Move the mouse to the string input area and enter the range of the colormap. The two limits
must be separated by a blank.
• Move the mouse on the colormap and click at a level which represents the first limit. Drag the
mouse in the colormap to a suitable value and release to fix the second limit.
A zoom to the selected range is performed.

4-7.2.2 Range Default


To set the range of the color ramp to its default value, choose Representation/Scalar Range/
Range Default or Representation/Vector Range/Range Default, or press the shortcut button

on the toolbar.

4-7.2.3 Range Active Surfaces


To set the range of the colormap to the quantity range on the active surfaces, choose Representa-
tion/Scalar Range/Range Active Surfaces or Representation/Vector Range/Range Active Sur-
faces or press the shortcut button on the toolbar.

4-7.3 Update Colormap Representation


4-7.3.1 Smooth & Strip Maps
By default, the colormap is represented with a strip and a smooth map. The colormap can also be
represented with only a smooth or a strip map.
To change the represented mapping, select the colormap by clicking on it with the left mouse but-
ton, highlighting markers are displayed.

In the above popup menu raised by pressing the right mouse button:
• Select Smooth Only to have only a smooth colormap represented.
• Select Strip Only to have only a strip colormap represented.
• Select Smooth and Strip to have both smooth and strip map represented.
Depending on the current representation, two of these three items are present.

4-7.3.2 Change Colormap Position & Size


By default, the colormap is represented at the extreme right of the view. CFView™ provides two
different ways of changing the location of the colormap.
To perform a location change:
• Select the colormap by clicking on it with the left mouse button, highlighting markers are
appearing.

CFView™ 4-51
Flow Quantities Visualization Colormap & Representations Range

• In the above popup menu raised by pressing the right mouse button:
— select the item Place at Left in order to place the colormap at the extreme left of the view.
The axis and colormap label are then placed on the right side of the colormap.
— select the item Move or Resize to start an interactive move or resize operation:
To resize the colormap:
• move the cursor on one of the corner markers, the cursor is changed into a resizing
symbol.
• press, drag and release the marker to the desired position.
To move the colormap:
• move the cursor inside the colormap, the cursor is changed into a moving symbol.
• press, drag and release the move the colormap to the desired position.
To leave the move or resize mode:
• click with the left or the right mouse button or press the <Esc> key.

4-7.3.3 Update Axis Graduations & Label

a) Ticks & Numbers


A specific dialog box allows to update the ticks and the numbers style. In order to open this dialog
box, select the colormap, then, in the popup menu which is raised by pressing the right mouse but-
ton, select the item Ticks & Numbers....

Numbers Numbers
orientation text type

Numbers
Graduations distance

FIGURE 4.7.3-1 Axis ticks and labels definition dialog box

The dialog box contains several parts:


• The numbers orientation buttons: these allow to choose the text orientation between horizontal,
vertical or at 45 degrees.
• The numbers text type part allows to choose the font name, size and color for the axis numbers.
• The Ticks entry allows to choose the number of graduations displayed on the axis. Note that
CFView™ is rounding automatically the graduations interval in order to display values with as
few significant numbers as possible. As an example, in order to decrease the number of gradua-
tions, it may be necessary to decrease that number by several units: starting from a default value
of 10 ticks, if the value is set to 9, no change will occur. If the value is set to 5, the number of
ticks will be decreased in such a way that only one graduation over two is kept.

4-52 CFView™
Colormap & Representations Range Flow Quantities Visualization

• The Numbers distance entry allows to enlarge or shrink the spacing between the axis and the
graduation numbers.

b) Colormap Label
In order to modify the axis label, it should be selected by clicking on it with the left mouse button.
Red markers are displayed around it to indicate the selected element.
When selected, an insertion cursor is activated and the colormap label text may be modified in the
following way:
• The text is inserted at the cursor position. Initially, this cursor is positioned on the first character.
• The left and right arrow key to move the insertion cursor.
• The <Backspace> key suppresses the character on the left side of the insertion cursor.
When the axis label is selected, a popup menu is raised by pressing the right mouse button. This
menu contains the following elements:
• Select Larger font or Smaller font to enlarge or shrink the label text.
• Select Text Type... in order to open a Text Type Editor dialog box in which the label font can be
modified (see section 4-10.3.1 for a detailed description of the text type attributes).

4-7.3.4 Select Colored, Greyscale or Black & White Mapping


The coloring of the representations may be done using a colored mapping (from blue to red), a
greyscale mapping (from black to white) or a black and white mapping (cycling several times from
black to white). By default, the colored mapping is used.
• To select a greyscale mapping, select Update/Colormap/Reset Greyscale.
• To select a black and white mapping, select Update/Colormap/Reset B&W.
• To restore a standard color mapping, select Update/Colormap/Reset Color.
The color mapping is shared among all the representation of a quantity in all the views. When
changing the color mapping, the colormap and all the colored representations are modified accord-
ingly.
• Nine colormaps have been added. The name of the new colormaps are “jet”, “cool”, ”hot”,
“summer”, “winter”, “spring”, “bone”, “copper”, “pink”. The colors are inspired from Matlab
(cf. Figure 4.7.1). To access, select Update/Colormap/Matlab style...

CFView™ 4-53
Flow Quantities Visualization Represent Particle Traces Data

FIGURE 4.7.3-1 Colormaps avalaible

4-8 Represent Particle Traces Data


This functionality allows to represent particle traces data computed by the Lagrangian module of
FINE™ / Turbo. These particle traces are always related to INLET boundaries. To represent parti-
cle traces:
• Activate the INLET surfaces from which the particle traces were started. The Quantity/Particle
Traces menu is enabled only if particle traces are attached to one of the active surfaces.
• Select All Traces in the Quantity/Particle Traces menu to add the representations of all the
particle traces data related to the currently selected INLET boundaries.
• Select Traces... in the Quantity/Particle Traces menu to open a grid nodes chooser dialog box
which allows to restrict the representation to a given range of nodes.

4-8.1 Update Particle Traces Representations


To update the type of line used to represent the particle traces, select them with the left mouse but-
ton. The particle traces attached to a same inlet surface are forming a group that is selected when
any of its particle traces is selected.

4-54 CFView™
Decoration Texts Flow Quantities Visualization

Press the right mouse button, a popup menu appears. Select the Curve Type... item to open a Curve
Type Editor dialog box (see section 4-10.4 for a detailed description of this dialog box).

4-8.2 Delete Particle Traces


The popup menu associated to a particle traces group contains a Delete item. Select this item to
remove the representation of the particle traces group.

4-9 Decoration Texts


4-9.1 Insert Text
Texts may be added in the active view in the following way:

1. Choose Update/Insert Text menu or click on the button in the main tool bar.
2. Click in the active view at the position where the text should appear.
3. Input the text. Multiple text lines can be inserted by pressing the <Enter> key.

The default text font type, size and color may be changed using the Default Decoration Text Type
Editor, invoked from Preferences/Decoration Text type... (section 4-11, for further information on
default settings and section 4-10.3.1 for a detailed description of the text type attributes).

 The keyboard shortcut for Update/Insert Text is: <Ctrl-t>.

4-9.2 Update Texts


The text can be edited using the mouse:
• Use the left button to select text for editing. The selected text appears with a box shaped frame.
• Use the left or the middle mouse button to drag the selected text in the view. Press to initiate
action and move the mouse to drag the text. Release to freeze the position of the text.
• Press the right button to raise a popup menu.

The pop up menu contains the following items:


— Select Larger font or Smaller font to increase or decrease the text size.
— Select Show frame or Hide frame to add or remove an opaque rectangular frame around the
text. The frame size is automatically set in order to fit the text extent.
— Select Text Type... to open the Text Type Editor dialog box. See section 4-10 for more
details about how to use the various text controllers.

CFView™ 4-55
Flow Quantities Visualization Update Representations

4-9.3 Delete Texts


CFView™ provides two methods to delete texts:
• with the mouse: select the text to be deleted with the left mouse button, a frame and highlighting
markers appear. Press the right mouse button to raise a popup menu and select the Delete item.
• from the Update/Delete sub menu:
— choose Text All to remove all the text from the active view.
— choose Text Last to remove the last inserted text in the active view.

4-10 Update Representations


The data representations can be updated by selecting them individually or by groups as described in
section 4-9.2. Indeed, when representations are selected, a popup menu containing the updating
functionalities is accessible by pressing the right mouse button.
CFView™ provides also, in the Update menu, a set of items which allow to modify the last created
representation without selecting it.
For example, the line width of isolines can be modified immediately after their insertion using the
Line Type Editor started from the Update menu. However, if another representation is made, a
Gouraud shading for example, the isolines may not be modified without being interactively
selected.
The update commands are outlined below.

4-10.1 Undo
For some of the representations type, several representations can be inserted on the same surface.
This is the case for local values, isolines, vectors, vector lines and plot curves. For these representa-
tion types, choose Undo from the Update menu to remove the last inserted representation. Each
time this command is invoked, the latest representation from the group is deleted. This command
can be repeated until no object is left for that representation type.

 The keyboard shortcut for Update/Undo is: <u>.

4-10.2 Delete
It is possible to delete all or a specific representation type in the active view. To do so:
1. Choose Delete from the Update menu. A submenu appears.
2. Select a delete operation:
• choose All to remove at once all the data representations from all the active and inactive
surfaces in the active view.
• choose Text All to remove all the text from the active view.
• choose Text Last to remove the last inserted text in the active view.
• choose one of the other items to remove the associated data representations type from the
active surface(s) in the active view.

4-56 CFView™
Update Representations Flow Quantities Visualization

 Representations cannot be removed from the active surface(s), with the Update/
Delete menu, if the corresponding quantity is not selected.

4-10.3 Representation Type Editors


Most of the modifications of representations attributes are done through dialog boxes. All the dia-
log boxes in CFView™ use the same terminology and have a coherent behaviour and aspect.
All the dialog boxes are made up of small controllers that allow to perform editing. Some of these
controllers, such as the one allowing to select a color, are included in several dialog boxes.
All dialog boxes have also a consistent button naming policy:
• Apply performs the editing.
• Reset discards the changes brought to the editing parameters and restores back the values they
had at the moment the dialog box was opened.
• Close discards the dialog box.

4-10.3.1 Text Type Editor


For editing a decoration text, axis numbers and axis label, text type editors are used.

Font Type and Size Color


Controller Controller

Alignment Anchor Point


Controller Controller

Spacing Controller

Anchor alignment
dialog box buttons Controller

FIGURE 4.10.3-1 Text type definition dialog box

These are a combination of the following controllers:


• A font controller allowing to change the font type and size.
• A color controller allowing to change the color of the text.
• A line spacing controller allowing to change the spacing between the lines.
• An alignment controller allowing to change the alignment of the text.

CFView™ 4-57
Flow Quantities Visualization Update Representations

• An anchor alignment controller allowing to change the position of the text relatively to its
anchor point.
• An anchor point controller allowing to change the text anchor position.

Several dialog boxes are made out of the same controls, the most common controllers are described
in the rest of this section. More specific controllers are described later in the text.

4-10.3.2 Color Controller


Predefined
colors
color editor
button Current color

The color controller allows to change various colors in the system. To change the color either select
one of the 18 predefined ones or invoke a standard color editor by clicking on the color editor but-
ton (Ed.).

Unix Standard Color Editor.

Red, Green, Blue


Controllers Current color

Windows Standard Color Editor.

Predefined
colors

Current color

The color editor allows to select a color by specifying its definition in the RGB color model. The
RGB color model is a hardware oriented color model: Red, Green and Blue are the 3 additive com-
ponents used in a color monitor to define a color).

4-58 CFView™
Update Representations Flow Quantities Visualization

On Unix platforms, use the RGB sliders or the entry fields to modify the color in RGB color model
space. On Windows platforms, select a color in the predefined area or in the colormap or specify its
RGB or its HSV values (Hue, Saturation, Value color model). Once a satisfying color is obtained,
click on OK to set the color in the controller and to close the dialog box. Click Cancel to quit the
dialog box without validating the choice.

4-10.3.3 Font Type Controller


The font controller allows to change font type and size.

The font type can be selected by clicking on the button on the right side of the entry showing the
currently selected font (arial in the above example) and its size by specifying an integer value.
Starting from version 3.8-22 of CFView™, two TrueType™ fonts have been introduced: Arial™
and Times™ (both are trademarks of Agfa Monotype Ltd). These fonts are based on the TrueType
technology and are rendered exactly in the same way on the screen and in bitmapped pictures (PNG,
JPEG, TIFF, PPM, PBM, PGM, NTSC). The Arial™ font is selected as the system default font.

4-10.4 Curve, Line & Marker Type Editors


The Curve Type Editor dialog box is composed of a Line Type Editor and a Marker Type Editor.
The same layout and the same parameters are used throughout CFView™ to update the representa-
tion parameters for the line and the markers. As an example, the line type editor is also inserted as a
frame in the Plot Axis Editor to edit the axis line type.

4-10.4.1 Line Type Editor

FIGURE 4.10.4-1 Line Type Editor

CFView™ 4-59
Flow Quantities Visualization Update Representations

The Line Type Editor allows to modify the parameters that are controlling the appearance of lines in
the graphical area. In Figure 4.10.4-1, it is represented as the first page of the Curve Type Editor.
The following parameters are controlling the line appearance:
• the line Pattern (solid, dashed, dotted, etc...)
• the line End cap.
Butt
Square
Round

• the line Join.


Mitre

Bevel

Round

• the visibility (Visible).


• the color.
• the Thickness (1 is standard, 2 is twice as big as 1, etc...).

4-10.4.2 Marker Type Editor


The Marker Type Editor allows to modify the parameters that are controlling the appearance of
markers in the graphical area. In the following figure, it is represented as the second page of the
Curve Type Editor

FIGURE 4.10.4-2 Marker Type Editor

The following parameters are controlling the markers appearance:


• the marker Symbol (Box, Circle, etc...),
• whether the marker shape should be Filled or not,
• whether the marker shape should be Lighted or not,
• the visibility (Visible),
• the color of the marker,
• the Size of the marker.

4-60 CFView™
Edit, Save & Restore Defaults Flow Quantities Visualization

4-10.5 Numbers Format Editor


This controller allows to change marker appearance. The following parameters can be modified:
• whether the number should be displayed in scientific format (mantissa "e" exponent) always,
never, or whether the system should switch to this format automatically.
• whether or not the sign (+/-) should be displayed in front of the number.

• the precision: it can be increased, or decreased. The sample displayed next to the Precision
label shows on an example the current number formatting. To increase or decrease the number
of significant figures, click on the little up or down buttons on the right side.

4-11 Edit, Save & Restore Defaults


4-11.1 What Are Defaults ?
Defaults are a convenient way of predefining attributes in the system according to the users prefer-
ences. In the current release of CFView™, 11 default attributes can be set:
• The default text attributes, see section 4-9.1.
• The default grid line attributes, see section 3-5.4.
• The default surface boundaries line attributes, see section 3-5.1.
• The default section curve attributes, see section 4-3.6.3.
• The default node line attributes, see section 4-3.6.4.
• The default plot data curve attributes, see section 4-5.
• The default validation curve type attributes, see section 4-4.
• The default comparison curve type attributes, see section 4-4.
• The default local value attributes, see section 4-3.1.
• The default Plot3D file type, see section 2-3.2.5.
• The default range colors type, see section 4-3.3.4
All the attributes are editable through the dialog boxes which are opened by selecting the corre-
sponding item in the Preferences menu.

CFView™ 4-61
Flow Quantities Visualization Edit, Save & Restore Defaults

4-11.2 Load Defaults from File


The defaults can be loaded from a file. To do so, choose Preferences/Load Defaults.... A file
chooser appears in which the defaults file should be selected.

 At start-up the system tries to load the personal defaults file. This file should be
located in the subdirectory .numeca of the users home directory and should be named
.cfview.def (see section 1-7 for the location of the home directory).

4-11.3 Save Defaults to a File


The current defaults can be saved to a file. To do so, choose Preferences/Save Defaults.... A file
chooser appears, it prompts for the name to give to the file. Valid CFView™ defaults file have the
extension ’.def

 At the end of the CFView™ session, the system checks if changes were brought to the
defaults configuration. If changes occurred, the system will ask whether these changes
should be saved or not.

4-11.4 Other User Preferences


A couple of preference parameters are not saved in the default files. These are detailed in the fol-
lowing sections.

4-11.4.1 Reverse Video


To swap the display background from white to black, choose Reverse Video from the Preferences
pull down menu. This acts as a toggle: selecting a second time restores the initial background color.
This parameter can be set by the command line argument -reversevideo or by the REVERSEVI-
DEO environment variable (see section 1-6.1 for a description of command line argument and envi-
ronment variable).

 The keyboard shortcut for Reverse Video is: <w>.

4-11.4.2 AutoGrid
The AutoGrid item from the Preferences menu enables or disables an invisible grid on which the
views corners are attracted when performing a move or a resize operation. It is turned on by default.

4-11.4.3 Face Displacement


The Face Displacement() item from the Preferences menu allows to modify the default value of
the face displacement parameter. Valid range is 0 - 1. This parameter is used for improved rendering
of the color contour (or shading) simultaneously with grid or iso-surfaces lines. The graphic display
of the faces is moved slightly backwards to allow a proper rendering of the lines.
The default value is 0.1. But this value can be set by the command line argument -facedisplacement
or by the FACEDISPLACEMENT environment variable (see section 1-6.1 for a description of
command line argument and environment variable).

4-62 CFView™
Surface Integrals Flow Quantities Visualization

4-12 Surface Integrals


CFView™ provides various types of integrals which can be computed over the active surfaces. The
available types of integrals depend on the quantity type.

4-12.1 Surface Integrals of Scalar Quantities


The surface integral functionality is contained in the Representation/Surface Integral menu and
in the Representations/Integrals subpanel. The following integrals are available:

• Surface Area ∫ dS : select this item in the Representation/Surface Integral menu to compute
S
the sum of the areas of all the active surfaces.

• Scalar Integral ∫ ( q ⋅ dS ) : select this item in the Representation/Surface Integral menu


S

or click on the button in the Representations/Integrals subpanel to compute this integral


on all the active surfaces.
⎛ ⎞ ⎛ ⎞
• Scalar Average ⎜

∫ ( q ⋅ dS )⎟⎠ ⁄ ⎜⎝ ∫ dS ⎟⎠ : select this item in the Representation/Surface Inte-
S S

gral menu or click on the button in the Representations/Integrals subpanel to compute


the Scalar Integral divided by the Surface Area.

• Vector Integral ∫ ( q ⋅ dS ) : select this item in the Representation/Surface Integral menu or


S

click on the button in the Representations/Integrals subpanel to compute this integral on


all the active surfaces. The direction and sense of the integrated vector are given by the positive
normal to the surface element, and its module is equal to the local value of the scalar active
quantity. As an example, this integral can be used to compute the force exerted on a solid object
by the pressure on its surface.
⎛ ⎞
∫ ∫
• Vector Average ( q ⋅ dS ) ⁄ ⎜ dS ⎟ : select this item in the Representation/Surface Integral
⎝ ⎠
S S

menu or click on the button in the Representations/Integrals subpanel to compute the


Vector Integral divided by the Surface Area
⎛ ⎞ ⎛ ⎞
• Weighted Integral ⎜

∫ q ⋅ w • dS⎟⎠ ⁄ ⎜⎝ ∫ w • dS⎟⎠ : select the button in the Representations/
S S

Integrals subpanel to compute this integral. The weighting factor w can be selected in the pop
down entry below the integral buttons. By default, the available weighting factors are Den-
sity*Vxyz, Density*Wxyz, Vxyz, Wxyz and 1. However, any valid vector equation can be entered
as weighting factor.
The integration result is written in the string output area, on the lower right of the graphical area.

CFView™ 4-63
Flow Quantities Visualization Surface Integrals

4-12.2 Surface Integrals of Vector Quantities


The surface integral functionality is contained in the Representation/Surface Integral menu and
in the Representations/Integrals subpanel. The following integrals are available:

• Surface Area ∫ dS : select this item in the Representation/Surface Integral menu to compute
S
the sum of the areas of all the active surfaces.

• Flux ∫ v • dS : select this item in the Representation/Surface Integral menu or click on the
S

button in the Representations/Integrals subpanel to compute the flux of the vector quan-
tity through the active surfaces.


• Weighted Flux ( w ⋅ v • dS ) : select this item in the Representation/Surface Integral menu to
S
compute a flux integral weighted by a scalar field. The weighting scalar (w) is selected by click-
ing on a scalar field name in the Weighted Flux sub-menu.
The integral is performed on the active surfaces.

 When computing flux on multiple IJK surfaces, the sign of the flux is depending of the
local surface orientation.

K -d irectio n

F lu x T o ta l = F lu x - F lu x

FIGURE 4.12.2-1 Flux through K cst surfaces where combined flux sign has to be corrected.


• Massflow ( ρ ⋅ v • dS ) : activate a surface from the Surfaces subpanel in the Quick Access Pad
S

and then click the button in the Integrals page of Representation subpanel to compute
the massflow through the active surface. The integration result is displayed in the string output
area.

4-64 CFView™
Curve Integrals Flow Quantities Visualization

4-13 Curve Integrals


To perform an integral along a curve, select Representation/Curve Integral. The integration is
done in the following way:
• The request message "Input equation or press and drag to select section" appears in the message
area and the name of the active quantity appears in the string input area.
• The integration may be of any valid mathematical expression (section 4-2.1.8 for the details on
supported equations). By default, CFView™ is proposing to integrate the active quantity. This
expression can be replaced in the string entry. If the expression is changed, it is validated by
pressing the <Enter> key. If the expression is a scalar one, a standard scalar integration along a
line is performed. If it is vectorial, the amplitude of the component normal the integration line is
integrated.
• If the default expression is used, press with the left mouse button on the start point, then drag
and release on the end point.
• If the expression is validated by pressing <Enter>, then CFView™ proposes to press and drag to
draw the section or to enter the position of its start and end points.
• The curve integral is computed along the intersection between the plane defined by the start
point, the end point and the viewing direction (the plane that contains the start and end points
and that is parallel to the viewing direction) and the active surfaces.
• The actual start and end points for the integration are the intersection between the active surface
and the ray passing at the user specified point and parallel to the viewing direction. If there is no
intersection, the integral is computed from / to the boundary intersection.
• The integration result is written in the string input area.
The integral is performed on the active surfaces from the start point to the end point. As sketched in
Figure 4.13.0-1, the integration is not made on the parts of the section that fall before the start point
or after the end point. If both points are on the surface (sketched on the left), the integral is limited
between A and B. If A falls outside of the active surface (sketched at the centre), the integral is per-
formed between the boundary intersection and B. And if both A and B fall outside of the surface
(sketched on the right), the integral is computed over the whole section.
A
A A
A

B B
B
B
FIGURE 4.13.0-1 Illustration of integration from A to B.

4-14 Export Quantities Distribution


To export the value of the active quantity on the active surfaces, select Export Active Surfaces...
from the Geometry menu. A file chooser is opened to select the file in which the data is written.
The created file has the following format:

CFView™ 4-65
Flow Quantities Visualization Output Generation

• For each surface,


— the first line contains the name of the surface
— the second line contains 3 numbers: the number of geometrical coordinates (3), the number
of exported quantities (1) and the number of grid points
— the following lines contain the geometrical coordinates of a point followed by the value of
the active quantity on this grid point
— if several surfaces are exported in a same file, they are separated by 2 empty lines.

Example:
Block_1.Kmin Mirror
3 1 9425 |Vxyz_X| |Vxyz_Y| |Vxyz_Z|
6.500100e-002 6.000000e-002 0.000000e+000 -1.457787e-006 -5.816685e-006 0.000000e+000
...
1.200000e-001 6.000000e-002 0.000000e+000 7.074288e-002 -3.901238e-002 0.000000e+000

Block_2.Kmin Mirror
3 1 4225 |Vxyz_X| |Vxyz_Y| |Vxyz_Z|
1.200000e-001 0.000000e+000 0.000000e+000 1.168020e-001 7.446105e-004 0.000000e+000
...
2.900000e-001 1.200000e-001 0.000000e+000 1.159577e-001 9.697273e-004 0.000000e+000

4-15 Output Generation


To generate output from CFView™, select Print ... from the File menu. The following dialog box
then appears.
On the left side, a frame allows to select the output file format (see file format description in
section 4-15.1). On the right side, the user can choose between a print of the Active View or of all
views present in the graphical area (Graphics Window).
If a title is to be inserted on the top of the picture, the Banner button must be selected and the title
should be typed in the string entry. The date may also be inserted in the banner by selecting the
Date in Banner option

4-66 CFView™
Output Generation Flow Quantities Visualization

FIGURE 4.15.0-1 Hardcopy Output Set-Up

The Options frame allows to select various options which depend on the selected file format. The
options are described in section 4-15.1.

4-15.1 Output Format Description


By default, two output formats are proposed:

a) PNG
PNG is a compressed bitmapped colored format that is recommended in most cases. This format
reduces greatly the created picture file size without any degradation and it is supported by nearly all
the word processors and image handling tools.
In the Options frame, the size of the picture may be specified in percent of the screen display (by
selecting the scaling option) or by setting directly the number of pixels in width and height (option
size).
The first way of specifying the size is more intuitive. The default size is 100%, meaning that the
created picture is of the same size as the screen display.
Please note that the text rendering may suffer some degradation if arbitrary size values are used.
Recommended values are multiple of 100%, in such a way that the text size in pixels remains an
integer.

b) PostScript
PostScript is a page description format used for hard copy prints. Both vectorised and pixelised (bit-
mapped) options are supported. This format is widely accepted by printer devices.
The PostScript format may be useful if the created picture is sent directly to a PostScript printer.
However, it should be noted that if a picture contains color, the size of the created picture may be
very large. It is recommended to use bitmapped PostScript (by selecting the Bitmapped option in
the Options frame) as soon as coloring is included in the picture.

CFView™ 4-67
Flow Quantities Visualization Output Generation

Furthermore, in the Options frame, the resolution is specified in dots per inch (dpi). The size and
positioning of the created picture is controlled by a specific dialog box, the Page Layout Editor,
which is opened by pressing the Page Layout button (see section 4-15.2)

c) Other Formats
If the button Others... is selected, a more extensive list of file formats is proposed. These formats
should be used only when format compatibility problems are encountered. The proposed formats
are:
• EPS is the encapsulated PostScript format. It is similar to PostScript except that it is independ-
ent of any page size definition.
• PBM is a black and white bitmap format (all non white pixels become black).
• PGM is a greyscale (256 levels of grey) bitmap format.
• PPM is a color (16 million colors) bitmap format.
• TIFF is the standard TIFF RGB full color format (16 million colors)
• JPEG is a compressed colored format.

For the 5 last formats, the size may be specified in the same way as for the PNG file format (see
section 4-15.1)

4-15.2 PostScript Page Layout Editor


To control the page layout of the PostScript output, choose the Page Layout button in the Option
frame, a dialog box appears:
— Use the Paper Size controller to set the page size used for the output.
— Use the orientation controller to select Portrait or Landscape orientation.
— Use the reduction factor control to select the reduction factor to apply to the picture. The
reduction factors are defined as the ratio between the graphical displays on the screen and on
the paper sheet. The button Max. Size computes automatically reduction factors for a maxi-
mum size.
If the page layout is not customized before a PostScript output, a default set of parameters is used:
A4 page size, orientation best fitting the picture aspect ratio and reduction factors equals to their
maximum value).

FIGURE 4.15.2-1 Page Layout Editor

4-68 CFView™
Overview Turbomachinery Specific Features

CHAPTER 5: Turbomachinery
Specific Features

5-1 Overview
This chapter provides a detailed description of the functionalities specific to turbomachinery appli-
cations. It is divided in 3 sections:
• visualization in blade to blade coordinates,
• computing a meridional view by azimuthal averaging,
• the turbomachinery mode.

5-2 Visualization in Blade to Blade Coordinates


The blade to blade functionality described here allows to visualize a computation solution in the
blade to blade coordinates system as well as to define usual constant span and constant stream posi-
tion cuts. It is covering a wide range of project types (not limited to AutoGrid™ topologies) such as
multi-stage turbomachinery simulations. This functionality relies on the declaration of the hub and
shroud surface names and allows to create cutting planes at constant span or stream position in any
view.

5-2.1 Hub & Shroud Surfaces Definition


In order to enable the computation of span and stream positions, the hub and shroud surfaces must
be known by CFView™.
Starting from v8.4 of AutoGrid™, the hub and shroud curves are saved in the CGNS file created
byt AutoGrid™ and starting from v8.6, they are also copied in the CGNS file of Euranus. Hence, to
get the hub and shroud surfaces, CFView™ will first read in the CGNS file of the solver, then in the
CGNS file of AutoGrid™.

CFView™ 5-1
Turbomachinery Specific Features Visualization in Blade to Blade Coordinates

In case these two steps are not successful, it is strongly advised to open and save the mesh file in a
recent version of AutoGrid™. Otherwise, CFView™ will use the old approach described below.
This approach is not adivsed since the computation of span and stream positions can be very long.

 In case you want to compute the span and stream positions for only one row, please
use the Partial Loader (see section 2-3.4).
CFView™ detects the hub and shroud surfaces by the naming convention used in AutoGrid™. Hub
surfaces are containing the word "hub", while shroud surfaces are containing the word "shroud".
These are the surfaces selected by default (except that the surfaces related to a blade gap are
excluded).
If necessary, the surface sets defining the hub and the shroud may be modified. This is done in the
Define Hub And Shroud dialog box. Selecting Geometry/Set Hub and Shroud... opens this dialog
box, presented in Figure 5.2.1-1.

FIGURE 5.2.1-1 Define Hub and Shroud

On the left side, the list of solid surfaces is displayed. The surfaces must be “moved” to the hub and
shroud lists using the arrow buttons, in the following way:
• Select one or several surfaces or groups in the Surfaces list (the list on the left side).

 Selected surfaces (highlighted in blue) can be visualized in the graphics area by mouse
right-click.
• Press the upper button displaying a right pointing arrow.
• The selected surfaces are removed from the Surfaces list and added to the Hub Surfaces list.
A surface can be removed from the hub list by selecting it and pressing on the left pointing arrow
button. Similarly, the buttons situated next to the Shroud Surfaces frame can be used to set up the
shroud surfaces list.

 It is strongly recommended to carefully check the validity of the choice of hub and
shroud surfaces before starting to create blade to blade representations. Attention should
be paid on the fact that the RZ-plane projections of hub or shroud surfaces have to coa-

5-2 CFView™
Visualization in Blade to Blade Coordinates Turbomachinery Specific Features

lesce in a uniform curve. The zoom functionality should allow to verify if the apparently
coalescent set of hub or shroud RZ-plane projection curves is not consisting in fact in a
set of side by side running curves. If this is the case, surfaces should be removed from
the hub or shroud lists until a coalescent set of projection curves is reached.
For example, if there is a tip clearance at the blade tip, the blade top surface should not
be present in the shroud surfaces list.
Finally, press the Ok button to validate the hub and shroud surfaces declaration, or press Cancel to
discard the dialog box without validating the new definition.

5-2.2 Open Blade to Blade View


A blade to blade view is a normal view where all the representations are drawn in the coordinate
space formed by the span position (S), the azimuthal position (T for Theta) and the stream position
(M). By default, the geometry is represented with the M coordinate axis horizontal and the T coor-
dinate axis vertical.

 M is the curvilinear stream coordinate.

To open such a view, select Open Blade to Blade from the Window menu. CFView™ prompts for
an interactive definition of the view size and position. Once the position and size are provided,
CFView™ computes if necessary the blade to blade coordinates for the geometry to represent.
A blade to blade view is a standard three-dimensional view in which all the representations of scalar
fields described in Chapter 4 are available. For vector quantities, only the vector arrow representa-
tions are available, the vector line representation is not supported.
In blade to blade views, cutting planes at specific span height may be obtained from the Create Cut-
ting Plane dialog box or from the Blade to blade Surface dialog box described in section 5-2.3.

5-2.3 Visualization of Blade to Blade Surfaces


Surfaces at constant span or stream position can be defined in any 3D view. It is not necessary to
open a blade to blade view, blade to blade surfaces can be created and visualized directly in a Carte-
sian or a cylindrical view.
The creation of the blade to blade surfaces is performed using the Blade to blade surface dialog box
(Geometry / Blade to Blade Surface... or the item in Quick Access Pad).

FIGURE 5.2.3-1 Blade to Blade Surface creation

On the left side, the constant span or constant stream position is selected from 0 to 1 (e.g. S = 0.5 at
mid-span). The middle frame allows to sweep in the geometry with a user defined increment. On
the right side, the kind of representation can be selected:

CFView™ 5-3
Turbomachinery Specific Features Visualization in Blade to Blade Coordinates

• Quantity: representation of the active quantity color contour or vector field. This option is only
available if a quantity is selected at the time the dialog box is opened.
• Geometry: representation of the cut surfaces grid.
• Polygon: representation of the cut as a flat polygon. This representation is very fast but is lim-
ited to the views in STM coordinates.
The layout of the push buttons is similar to the one of the cutting plane creation dialog box:
• Press the Apply button in order to get a graphical representation of the surface corresponding to
the selected span or stream position.
• Press the Save button to save the surface which corresponds to the selected span or stream posi-
tion. The surface becomes part of the surfaces that can be selected later with the surface selec-
tion functionality (section 3-3).
• Press the Reset button in order to reset the parameters to their default value (a blade to blade sur-
face at mid-span).
• Press the Close button in order to discard the dialog box.
Figure 5.2.3-2 illustrates the use of the blade to blade feature. Cutting planes at a specified distance
between the hub and the shroud can be visualized in several coordinate spaces.

Mid span cut

FIGURE 5.2.3-2 Blade to Blade view of a Radial Compressor

On the left side of Figure 5.2.3-2 the mid-span cut is shown in red in the original XYZ coordinate
space. On the lower right side, the static pressure distribution on the same surface is shown in the
STM coordinate space. On the upper right, a zoom to the blade leading edge is shown.

5-4 CFView™
Compute Meridional View by Azimuthal Averaging Turbomachinery Specific Features

5-3 Compute Meridional View by Azimuthal


Averaging
In projects showing symmetry around the Z axis, the azimuthal (or pitch) average of scalar and vec-
tor quantities are calculated by weighted integration in theta direction, along R-Z constant lines.
The integration paths originate at the nodes of a bidimensional mesh: the meridional mesh. This
meridional mesh is a set of subsurfaces selected in the volumetric mesh: the meridional patches. In
order to have a complete meridional view, the cumulated areas of the Z-R projections of these
patches must cover up the area of the Z-R projection of the volumetric mesh.
A set of default patches for the meridional mesh is available in CFView™. However, it is still pos-
sible to define a different set of surfaces.
For blade passages meshed with a H topology, the patches are usually taken halfway between the
theta limits of the domain. For blade passages meshed with an O or similar topology, the patches are
usually taken as one of the periodic boundaries.
The weighted integration is performed in all the domains, in order to get an average over all the
meshed blade passages. The choice is given between two weighting modes:
• RhoV mode (mass flow averaging): the weight coefficient takes the value Density*Vm where
2 2
Vm = Vr + Vz is the meridional velocity coefficient
• None mode: area averaging takes place
By default, the RhoV mode is selected.

5-3.1 Meridional Patches Definition


The meridional patches may be defined interactively in a specific dialog box. This is necessary only
if the defaults patches are not satisfying, or when working with project computed with a FINE™/
Turbo version lower than 6.
To define the meridional patches, select Set Meridional Patches... from the Geometry menu, a
dialog box appears. Depending on the number of blocks, the dialog box is different.

CFView™ 5-5
Turbomachinery Specific Features Compute Meridional View by Azimuthal Averaging

If the mesh contains more than one domain, it may happen that more than one surface has to be
selected, each of them in their distinct domains.

FIGURE 5.3.1-1 Meridional patch definition for multiple domain

To add a patch to the meridional mesh:


• Select the domain from which it is extracted by clicking on the domain number in the Domains
list.
• Select the patch family by activating the I, J or K option and by setting the index value in the
Value entry. The surface is represented in blue in the currently active view.
• If necessary, select a subrange in the two surface indexing directions using the four entries in the
lower left corner of the Select frame. The representation in the active view is updated accord-
ingly.
• Press the add button to insert the surface in the Surfaces list.
To remove a patch from the Surfaces list or to verify the selected patches:
• Select a patch in the Surfaces list.
• Press the right mouse button, a popup menu appears:
— Select Show WireFrame in order to visualize the selected surface in the active view.
— Select Remove to remove the surface from the Surfaces list.
To select the weighting mode:
• select None for no weighting coefficient or
• select RhoV for a weighting coefficient having the value Density*Meridional Velocity Compo-
nent.

5-6 CFView™
Compute Meridional View by Azimuthal Averaging Turbomachinery Specific Features

If the mesh contains only one domain, the layout of the dialog box is simplified:

FIGURE 5.3.1-2 Meridional patch definition for single domain

The dialog box contains only the selection frame and the buttons to choose the weighting factors.
Once the meridional patches are selected,
• Press the Ok button to validate the choice and quit the dialog box,
• Press the Reset button to come back to the initial choice or
• Press the Close button to discard the dialog without applying the meridional patches selection.

 If the RhoV mode of weighting is selected, first ensure that a vector field Vxyz or
Wxyz is present. If the scalar field Density is not present, its value is assumed to be uni-
formly 1.

 If the Density field is not present, such a field can be generated by making use of the
derived quantities functionality (see section 4-2.1.8).

5-3.2 Compute & Open Meridional View


The computation of the azimuthal averaging is started by selecting Compute & Open Pitch Aver-
age from the Window menu.
A message "Computing pitch average" is displayed and a progress meter shows the computation
progression.
Once the computation is completed, a bidimensional project whose geometrical support is the R-Z
projection of the meridional mesh is opened. It contains scalar and vector fields which are respec-
tively the pitch average values of the scalar and vector fields of the original tridimensional project.
This project can be handled as any project: several views of the same data can be opened. It is also
possible to open different meridional average computations which are based on a different meridi-
onal patches set or on a different weighting factor.

CFView™ 5-7
Turbomachinery Specific Features TurboMachinery Mode

5-4 TurboMachinery Mode


The turbomachinery mode is a unifying mode for turbomachinery analysis. It combines the display
of a meridional view with the display of blade to blade surfaces and of blade surfaces in order to
facilitate the creation of standard views used in turbomachinery analysis.

5-4.1 Start TurboMachinery Mode


The turbomachinery mode can be activated in various ways:
• select Turbomachinery in the File menu, before or after opening a project,
• start CFView™ with the command line argument -turbomode or
• define an environment variable TURBOMACHINERY with a value ON (section 1-6.2 for a
description of how to set environment variables).
When a project is opened and the mode is active, or when the mode is activated on an already
opened project, a dialog box is raised.

FIGURE 5.4.1-1 Start TurboMachinery Mode

• Hub & Shroud section: Select the Edit Definition button to open the Define Hub And Shroud
dialog box. This allows to check and, if necessary, to modify the definition of the hub and of the
shroud that will be used to create blade to blade representations in the turbomachinery mode.
• Meridional Average section:
— Load Flow Solver Pitch Average to open automatically the FINE™/Turbo output file.
— Compute Pitch Average to compute a new meridional average output from FINE™/Turbo
3D outputs by defining the meridional patches thanks to the Edit CFView Meridional
Patches button that open the Define Meridional Patches dialog box. This allows to check
and, if necessary, to modify the meridional mesh used to compute and represent the pitch
averaged data.
• Select the Ok button to proceed or
• select the Cancel button to open the project in the standard mode.

5-4.2 TurboMachinery Mode Description


When this mode is enabled, a set of four standard views is displayed automatically as shown in Fig-
ure 5.4.2-1. These are:

5-8 CFView™
TurboMachinery Mode Turbomachinery Specific Features

• a meridional view obtained by pitchwise averaging. If Load Flow Solver Pitch Average is acti-
vated, the view is the results already computed by the EURANUS flow solver. If Compute
Pitch Average is activated, the solution is computed using the meridional patches list. In this
view, only the averaged domains are active by default. The blade surfaces are also inserted
(their boundaries are visible), but they are not active by default.
• a 3D view in Cartesian coordinates,
• a blade to blade view showing the blade passages at mid-span and
• a meridional view in turbomachinery coordinates showing the blade surfaces. In this view, the
blade surfaces are selected by default. The hub and shroud surfaces are also inserted (their
boundaries are visible), but they are not active by default.
In the surfaces list, specific groups for the hub, shroud and blades are defined. These groups are
facilitating the identification and selection of these surfaces.

FIGURE 5.4.2-1 Four standard views in TurboMachinery Mode

When a scalar quantity is selected, two additional buttons are available in the Representations/Plot
& Values subpanel:
• The Blade Section button allows to create plots at constant span height:
— select this button to start creating such plots. The blade view is automatically selected.
— click at the desired span height or provide its value in the string keyboard entry.
— the curve is inserted in a Cartesian plot as a function of the streamwise position.
• The Span distribution button allows to create plots showing the span profile:
— select this button to start creating such plots. The meridional view is automatically selected.
— press, drag and release with the left mouse button to specify the profile location or provide
the values in the string keyboard entry.

CFView™ 5-9
Turbomachinery Specific Features TurboMachinery Mode

— The curve is inserted in a Cartesian plot as a function of the normalized arc length.

5-4.3 Quit TurboMachinery Mode


To quit the turbomachinery mode, select TurboMachinery in the File menu. All the turbomachin-
ery specific views are deleted.

 Once the Turbomachinery mode has been started on a project, it is not possible to
modify the hub and shroud definition. In order to modify this definition, it is necessary to
close the project and reopen it.

5-10 CFView™
Overview Animations & Unsteady Data Analysis

CHAPTER 6: Animations &


Unsteady Data
Analysis

6-1 Overview
This chapter provides a description of animation capabilities in CFView™. The animation capabili-
ties are divided into two main areas: the animation of steady state data sets and animations of
unsteady data sets.
The first section describes the animations that can be performed on steady state data sets. These are:
• the animation of vector lines,
• the animation by mesh surfaces sweeping and
• the animation by cutting planes sweeping.

The second section describes how to create animations from unsteady data sets and how to record
such animations in video files.

6-2 Animations in Steady State Data Sets


CFView™ allows to represent pseudo particles moving along streamlines as well as scrolling struc-
tured surfaces and cutting planes.

CFView™ 6-1
Animations & Unsteady Data Analysis Animations in Steady State Data Sets

6-2.1 Animation of Vector Lines


The animation of vector lines applies to all the vector lines which have been computed from the
currently active vector quantity (see section 4-6.3 for a description of how to create vector lines).

To start the animation of the vector lines, select the button in the Stream line animation dialog
box from the Geometry/Animations/StreamLine Animation... menu. The animation consists of
markers or arrows moving along the streamlines with a velocity proportional to the local velocity
amplitude.

Stream line animation

FIGURE 6.2.1-1 Stream Line Animation

The max frame/sec control allows to limit the number of animation steps by second. During the
animation, a different value may be entered into the string area and validated by pressing the Apply
button.

To end or pause the animation, select respectively the button or from the dialog box. The
animation markers are respectively erased or frozen on the vector lines.

To start recording the animation, select the button . Once the animation parameters are set, or if
the animation parameters have to be modified during the animation:
• Select Apply to validate any modification of the content of the dialog box. This affects the ani-
mation in real time.
• Select Reset to cancel all modifications and the dialog box finds back its original status.
• Select Close to cancel the animation. The dialog box is closed and the animation markers are
erased from the vector lines.

a) Markers
The markers density is controlled by the marker Emission rate control in the dialog box.
The marker type used for the animation is the one which is associated to the vector lines. The actual
marker type of a vector line may be:
• the default marker type for the vector lines. This marker type may be modified in the Curve
Type Editor dialog box opened by selecting Curve Type... in the popup menu of the vector line
(see section 4-6.4) or

6-2 CFView™
Animations in Steady State Data Sets Animations & Unsteady Data Analysis

• the marker type applied to an individual vector line or to a group of vector lines. Refer to
section 4-6.5 for a description of how to modify the curve type attributes of vector lines.
The animated markers are always visible, independent of the visibility (Visible) of the vector lines
markers.

b) Arrows

FIGURE 6.2.1-1 Vector Line Parameters

The interface for drawing arrows on streamlines is shown in Figure 6.2.1-1. This can be accessed in
two ways:
• If a scalar quantity is active select Representation --> Steamlines --> Parameters and if a vec-
tor quantity is active select Representation --> Vector line --> Parameters.
• Right click on a streamline or a vector line and select Parameters.

In Vector Lines Parameters dialog box a new entry was added that will control the visibility, size
and density of arrows. The three widgets perform following functions:
• Visibility: by default this is set to off for backward compatility issues. To make arrows visible
on streamlines first set Visibility to on and secondly press Apply.

CFView™ 6-3
Animations & Unsteady Data Analysis Animations in Steady State Data Sets

After this whenever a new streamline is created, arrows will be drawn on it by default.
Arrows are made visible only when streamlines are drawn with LINE representation. In case of
TUBE or RIBBON representation no arrows are drawn.In order to draw moving arrows instead od
moving markers in streamline animation, user will have to activate arrow visibility option for the
streamline.
• Size of Arrows: Arrows are drawn in the form of two-dimensional filled equilateral triangles as
shown in Figure 6.2.1-2.

FIGURE 6.2.1-2 Arrow size

Size of arrow is a relative variable and its default value is 1. When this value is decreased a rela-
tively smaller equilateral triangle is drawn such that the front vertex of the triangle remains
unmoved. The two vertices in the aft position are made closer to the front vertex as well as to the
streamline. These two aft vertices are alwaysdrawn such that the equilateral triangle remains nor-
mal to camera view for all times.

6-4 CFView™
Animations in Steady State Data Sets Animations & Unsteady Data Analysis

• Density of Arrows: This variable controls the number of arrows per unit length. The default
value is such that approximately 20 arrows will be drawn on any streamline that encompasses
the length of the bounding box/sphere of the whole domain. This model is based on an already
existing model that is currently used for the default density of markers in streamline animation.
All the arrows are equidistant as shown in Figure 6.2.1-3.

FIGURE 6.2.1-3 Arrow density

When the streamlines are drawn with the non-uniform color, the color of the arrows also vary
depending the arrow location as shown in Figure 6.2.1-4. In case of uniform color is used, all
arrows are drawn in same color.

FIGURE 6.2.1-4 Arrow color

CFView™ 6-5
Animations & Unsteady Data Analysis Animations in Steady State Data Sets

6-2.2 Animation by Mesh Surfaces Scrolling


This functionality allows to sweep automatically across a family of mesh surfaces. The sweeping
animation is controlled from the Structured Surfaces Scrolling dialog box
To access this dialog box, select Surface IJK Scrolling... from the Geometry/Animations menu.

FIGURE 6.2.2-1 Structured Surface dialog box for animation

The dialog box contains several parts:


• the Index area with the three radio buttons I J K allowing to select the scrolling index,
• the Domains list appears if the mesh contains several domains. It allows to select the domains
in which the animation is performed,
• The Animation Control area contains the following animation control buttons:
— start/stop the animation recording.

— set the animation in decreasing index, double speed.

— set the animation in decreasing index, normal speed.

— set the animation in increasing index, normal speed.

— set the animation in increasing index, double speed.

— pause the animation, leaving the last represented surface.

— stop the animation, no represented surfaces is left.

— when the animation is paused, this button steps back to the previous surface.

— when the animation is paused, this button steps to the next surface.

Furthermore, two string editors provide additional control on the speed of the scrolling:
— The Step control allows to choose the value of the scrolling index increment between two
animation steps.
— The max frame/sec control allows to limit the number of animation steps by second.
• The buttons Geometry and Quantity appear only if a quantity is selected.
— The surfaces are represented by their grid wireframe if the option Geometry is selected.
— The surfaces are represented by a color contour if the option Quantity is selected.

6-6 CFView™
Animations in Steady State Data Sets Animations & Unsteady Data Analysis

Once the animation parameters are set, or if the animation parameters have to be modified during
the animation:
• Select Apply to validate any modification of the content of the dialog box. This affects the ani-
mation in real time.
• Select Reset to cancel all modifications and the dialog box finds back its original status.
• Select Close to cancel the animation. The dialog box is closed.

6-2.3 Animation by Cutting Planes Scrolling


To access the dialog box allowing to launch the animated scrolling of Cutting Planes, select Cut-
ting Plane Scrolling... from the Geometry/Animations menu.

FIGURE 6.2.3-1 : Cutting plane scrolling dialog box for animation

The dialog box contains several parts:


• The Normal area allows to control the cutting plane orientation:
— The X, Y and Z string editors allow to input the X, Y and Z components of the cutting plane
normal.

— The three buttons allow the choice of the direction of the cutting plane normal
which will be oriented respectively along the X, Y or Z axis.

— The three buttons allow to rotate the cutting plane around X,Y and Z axes.
Activating one of them with the left mouse button, and dragging the mouse to the left will
rotate the cutting plane clockwise, and to the right, counterclockwise.

• The Animation Control area allows to control the animation as described in section 6-2.2. The
Step string editor allows to input the distance between two consecutive cutting planes.
• The Geometry and Quantity buttons allow, when a quantity is selected, to choose between a
grid wireframe representation (the Geometry option) or a color contour representation (the
Quantity option).
• The Apply button allows to validate new parameters during the animation.
• The Reset button allows to restore the initial values of the animation parameters.
• The Close button stops the animations and discards the dialog box.

CFView™ 6-7
Animations & Unsteady Data Analysis Animations in Steady State Data Sets

6-2.4 Recording a steady animation


Steady animation includes streamlines, cutting planes and surface animations. The descriptions
given below only describes the case for Streamline animation. Everything described below was rep-
licated for cutting plane and structured surface animation. The interface for streamlines animation
recorder is shown in Figure 6.2.4-1.

FIGURE 6.2.4-1 Record steady animations

In order to record streamline animation user will have to perform following steps:
1. Right click on Record button to activate it (Figure 5b).
2. Animation Output Set Up dialog box (Figure 5c) will pop up. This dialog box is same as that
used for unsteady recording except for one change – Delete Image Files is active by default.
Make necessary changes. Press Ok.
3. Save Animation in GIF Format dialog box (Figure 5d) will pop up. Enter the name for the
animated GIF file. Press Ok.
4. Animate required frames using Play button. For each frame an image will be saved.
5. Right click on Record button to deactivate it. All the images saved during the interval when the
Record button was active are combined in the form of an animated GIF file with the name spec-
ified by the user.
If in step 3, user specifies the name of the animated GIF file to be “animated.gif”, the PNG
imagesin step 4 are created with names derived from “animated.gif” by appending “_steadycfvtmp”
to it (e.g animated_steadycfvtmp_t01.png, animated_steadycfvtmp_02.png, etc).

6-8 CFView™
Animation of Unsteady Data Sets Animations & Unsteady Data Analysis

When the user activates the Record button and presses Play button, an image is saved for each
frame. It may happen that the user gets busy with some other work and does not deactivate the
Record button after sometime. In that case the hard disk will get filled with images. This may even
lead to a system crash. To avoid such a scenario following approach has been undertaken. All the
three steady animations – streamline/cutting-plane/structured-surface animation – are repeated
after a certain number of frames. Suppose that the streamline animation gets repeated after every 10
frames. In that case, only the images for first 10 frames will be saved and although the animation
goes on indefinitely till the user presses Stop button, no image will be saved for any frame starting
from frame 11.

6-3 Animation of Unsteady Data Sets


CFView™ introduces the ability to animate representations of unsteady data sets. With FINE™/
Turbo data sets, it detects automatically that a computation project has been run as an unsteady one
and prompts for the range of time steps to be used.

• Select All Time Steps to perform an analysis on all the available time steps.
• Select Initial and set the initial and final time steps to the desired value for an analysis of a pre-
defined range.
• Press Ok to start the project opening.
• Press Cancel to cancel the project opening.
If the Partial Loader is used, the interval between consecutive time steps can also be selected, see
section 2-3.4.
When the project is loaded, the first time step is loaded and a set of animation control buttons is
added to the general toolbar.
This button allows to enable or disable the animation recording. It acts as a toggle: when the record-
ing is turned off, the button background is grey (this is the default) and when the recording is turned
on, the button background is yellow.
This button allows to come back to the first time step.
This button allows to reach the next time step. The same representations are drawn in the views, but
with the data from the next time step.
This button allows to start an animation of the current representation. The same representations are
drawn in the views, for each time step successively.
This button allows to stop a running animation.
This button allows to enable or disable the automatic restart at the first time step, when the anima-
tion has reached the last time step. If the feature is turned on, the first time step is considered as the

CFView™ 6-9
Animations & Unsteady Data Analysis Animation of Unsteady Data Sets

one following the last time step. If the feature is turned off, the animation stops when it reaches the
last time step.
This button allows to free the RAM usage at each time step when post-processing unsteady data
sets. By default it is activated. See section 4-2.2.4 for a more detailed description.
When working with an unsteady data set, the time value may be added in the graphical view by
selecting Time Label in the Quantity menu. The time label appears as a text “t=----” that can be
selected interactively for changing its position or its text type.
To create an animation, proceed as follows:
• first create the representations on the initial time steps.
• Start the animation either step by step ( ) or continuously ( ).

• Stop ( ) the animation or let it go to its end.


CFView™ automatically records a macro of the current representation and applies it to the next
time step. Initially, a minimum amount of data is loaded in the computer memory. The data needed
to create representations at further time steps is progressively loaded into the computer’s memory.
To prevent a rapid saturation of the available resources, the most memory consuming data is not
kept permanently.
For a typical animation, the first loop through the whole set of time steps requires data loading.
After the first loop, all the data needed have been loaded and the animation speed is increased sig-
nificantly.

6-3.1 Recording an unsteady animation


A new button (Start/Stop Animation Recording) has been added next to “Free Memory” button.
This will be available only for the unsteady cases .

By default the state of this button is “off”. When this button is clicked for the first time, the state is
changed to “on”, and an “Animation Output Set Up” dialog box pops up asking for the parameters
for creating the animation. This dialog box contains all the parameters that are needed for creation
of PNG images. The top part of the dialog box is very similar to the “Print Output Set Up” dialog
box that is invoked from File->Print menu. The lower part of the dialog box contains options
specific to the animation. “Other Options” allows the user to specify the delay between two frames
(in 1/100 th of a second) and the number of loops in the animation (0 corresponds to a never ending
loop). User can also choose to delete image files after an animated GIF has been created from them.
After the setting these parameters, a click on “Ok” button pops up file selection dialog box (“Save
Animation in GIF Format”) that allows the user to specify the name for the animated file. The
dialog boxes are shown in the figure given below:

6-10 CFView™
Animation of Unsteady Data Sets Animations & Unsteady Data Analysis

FIGURE 6.3.1-1 Animation output set up

When an animation has to be created follow the following steps:


● Click on “Start/Stop Animation Recording” button in order to change its state to “on”.
● Specify animation parameters in “Animation Output Set Up” dialog box and animation file name
in “Save Animation in GIF Format” dialog box.
● Go to all the frames that have to be animated (using NextTimeStep, SetActiveTimeStep,
UnsteadyAnimationStart/Stop).
● Once all the frames have been visited, click on “Start/Stop Animation Recording” button again
in order to change its state to “off”. This creates an animated GIF file with the name
and path specified by the user in Step 2.

In Step 3, a series of PNG images are created that are used for creating animation in Step 4. If the
user specifies the name of the animation file to be “animated.gif”, the PNG images are created with
names derived from “animated.gif” by appending “_cfvtmp” to it (e.g animated_cfvtmp_t01.png,
animated_cfvtmp_02.png, etc).

CFView™ 6-11
Animations & Unsteady Data Analysis Animation of Unsteady Data Sets

6-12 CFView™
Overview Macro Language

CHAPTER 7: Macro Language

7-1 Overview
This chapter describes the macro language of CFView™ and the available instruction set. The
macro script is a very powerful feature that allows to automate CFView™.
‘Macros scripts’ are programs that are written using a macro language. They can be produced either
by recording the actions performed during a visualization session or from scratch using a normal
text editor. Macro scripts can be recorded, saved, loaded and executed in CFView™, using the
items in the File / Macro menu (section 2-6.2).

7-2 Python Language


The core of the macro language of CFView™ is called Python. It is a very compact, extensible, ele-
gant and extremely powerful interpreted object-oriented language. The description of Python is
provided in a special manual (the “Python Tutorial” is available on the Python web site http://
www.python.org). In order to get a good introduction to Python read Chapter 3, Chapter 4 and
Chapter 5 of the Python User Manual.
Python has been extended with commands that allow to perform visualization operations. These
commands are described in section 7-3. Each command is presented in terms of:
• arguments,
• return value,
• associated menu item,
• actual operation performed,
• exceptions (errors) it will raise.
As an example, see the command string FileOpenProject(string filename):
• This command takes 1 argument of type string (strings in Python are single or doubled quoted).
• The argument should be the complete name of the CFView™ project file to load.

CFView™ 7-1
Macro Language Python Language Overview

• The command returns the name of the view that is created during the command execution.
• Its associated menu item is File/Open Project: the command performs the same operation as
the selection of this menu item.
• The actual operation performed is to open the project in a new view (the view appears in full
screen mode).
• If the project cannot be loaded the command will raise an IOError exception. By default, this
error message will be indicated in a dialogue box that pops up. If CFView™ was started in batch
mode, the error message is written in the shell terminal from which CFView™ was launched.
To load the project ‘/usr/people/me/case.cfv’ type: FileOpenProject(‘/usr/people/me/case.cfv’)

7-3 Python Language Overview


This section provides a brief overview of the basic features of the Python language. Interested read-
ers are recommended to consult the tutorial documents or the systematic description of the language
available on the Python web site (http://www.python.org).
Python is a real programming language, offering support for structured and object-oriented pro-
gramming together with a very high level of error checking and a lot of native features such as lists,
arrays, predefined mathematical functions and constants,...
Scripts are evaluated line by line. However, line evaluation continues on the next line if the charac-
ter ‘\’ is the last character of the line.

 The character “\” in a string will lead to tab character when combined with “t” (“\t”)
and to carriage return when combined with “n” (“\n”). Instead of writing “\”, “\\” has to
be used.

7-3.1 Adding Commented Lines


the ‘#’ character specifies that the rest of the line is a comment and will be skipped while the macro
is executed.

7-3.2 Support for Mathematical Operations


• the operators +, -, * and / are defined,
• parenthesis can be used and nested to any level,
• functions abs(x), int(x), floor(x), ceil(x) and sqrt(x) for square root are available,
• trigonometric functions sin(x), cos(x), tan(x), acos(x), asin(x), atan(x) are available, atan2(x,y)
returns atan(x/y),
• logarithmic functions log(x) for neperian logarithm, log10(x) for base 10 logarithm, exp(x),
sinh(x), cosh(x), tanh(x), asinh(x), acosh(x) are available,
• x to the power y is obtained by the function ‘pow(x,y)’,
• boolean values are returned by the operators > (larger than), < (less than), <= (less or equal
than), >= (larger or equal than), == (equal to), != (different from), and, or
• the constants pi and e are predefined.

7-2 CFView™
Python Language Overview Macro Language

 The mathematical operations supported in the Python language are different from
those available for the definition of derived quantities (see section 4-2.1.8 for a descrip-
tion of mathematical operations supported in derived quantities definition)

7-3.3 String Handling


Strings are handled in the following way:
• they are enclosed in single <‘> or double <“> quotes
• concatenation is obtained with the operator + (e.g. ‘cut’+’plane’ gives ‘cutplane’),
• duplication is obtained by the multiplication by an integer, the operator * (e.g. ‘enter’*2 gives
‘enterenter’) ,
• access to the ith element is obtained by the suffix ‘[i]’ and access to a substring is obtained by
the suffix [i:j] for a substring starting from the ith character up to the jth one (e.g. if s contains
‘cut’, s[0] is ‘c’ and s[1:2] is ‘ut’)
• numerical values contained in variables can be inserted in a string by enclosing the variable
name with reverse quotes (‘) or by using a formatting specification:
ex: s = ‘The Value of x is’ +‘x‘
s = ‘The Value of x is %3d’ %(x)
The formatting symbols are interpreted as follows (see section 7-4.1 for examples):
— %d formats in an integral value (rounded if necessary),
— %nd (where n is an integer) in an integral value having a length of exactly n characters
(space characters are inserted on the left if necessary),
— %n.mf (where n and m are integers and n>m) formats into a floating point value having at
most n characters length and a fractional part of m characters exactly,
— %n.me(where n and m are integers and n>m) formats into a scientific representation having
at most n characters length and a fractional part of m characters exactly.
• stripping of the leading or trailing white spaces is obtained by the function strip ( strip(‘ cut
plane ’) gives ‘cut plane’).

7-3.4 Lists Handling


A list is an ordered set of items.
• A list is defined by enclosing the comma separated items by square brackets. A list may be
empty
ex: my_list = [a,b]
empty_list = []
Note that a list definition can be extended over several lines without the ‘\’ terminating charac-
ter.
• An item is accessed by adding the suffix [i] to the list name (ex: my_list[1]). Note that list indi-
ces start at 0.
• Lists can be nested to any level (e.g. [[a,b],[c,d,e]] is a list made of 2 lists).
• Appending is obtained by the operator + (ex: my_list + my_list2) or by the function append
(ex:my_list.append([c, d])).

CFView™ 7-3
Macro Language Python Language Overview

• Multiplication (appending oneself n times) is obtained by the multiplication operator (ex:


my_list*3).
• The functions insert(index, value) inserts value at position index, the elements at upper position
are shifted.
• The function index(value) returns the index of the first item whose value is value.
• The function remove(value) removes the first item whose value is value.
• the functions sort(), reverse() and len() are, respectively, sorting, reversing the elements and
returning the number of elements in the list.

7-3.5 Program Flow Control : Conditional & Loop Statements


In Python, different kinds of flow control statements are available: the conditional if, elif state-
ments, and the for and while loop statements.
These instructions start by a specific control line terminated by colon. The body part (that is, the set
of statements depending on the control statement) is defined by the indented lines that are following
the control line. The indentation can be marked by a <TAB> or by white space characters. The end
of the loop body is marked by the first line which is not indented. Nested statements are obtained by
heading lines with successive levels of indentation.
• if statement:
ex: if x < 0 :
print ‘x is negative’
elif x==0 :
print ‘x is null’
else :
print ‘x is positive’
elif and else clauses may be omitted. A value of 1 is equivalent to true and a value of 0 is equiv-
alent to false
• loop statements: the for loop iterates on the elements of a list and the while loop iterates as long
as the condition is met. A break statement may be inserted to step out of the loop. In the follow-
ing examples the statement, “for x in a[:]:” means : for each element of the list a.
ex: for x in a[:]:
for x in range(0,10) :
while x>0 :
where the range function returns a list of integers starting from the first argument value to the sec-
ond argument value with a step indicated by the third argument if existing (default value is 1).

7-3.6 Function Definition


Function definition starts with the standard header
def function_name (arg1, arg2, arg3 = default_value, ...) :
where def is a reserved keyword. The arguments can be of any type (it is a user responsibility to
provide meaningful ones) and last arguments may have a default value (as arg3 in the above exam-
ple).

7-4 CFView™
Python Language Overview Macro Language

Each line of the function’s body is indented with a <TAB> character. The function definition ends
with the first line which is not indented by a <TAB> character.
All arguments are passed by value. When arguments are passed by value to a function, even if the
values of the arguments are modified inside the function, the values of the arguments, seen from the
main program or the calling function, are not modified by the execution of the function.
A returned value may be specified using the ‘return’ statement followed by the name of the variable
or by a value. In any case, a value is returned and not a reference on a local variable or object. The
type of the returned value is a list, this means that appending a new element in the returned list is
obtained by the statement ‘return.append(x)’.
Global scope variables can be accessed if they are declared as such by a statement ‘global’ (e.g.
‘global x’ specifies that the x variable is a global variable for the current function). The global vari-
able lifetime is not limited to the present scope.

7-3.7 File Handling


Files can be opened for reading and writing. A file is associated to a variable, that is initialized at its
opening:
f = open(fileName, mode, bufferSize)
where fileName is the full file name including its path and f is a variable that is used to handle the
file operation. The parameter mode is a character string whose value may be:
• ‘r’ or ‘rb’: file opened for reading,
• ‘w’ or ‘wb’: file opened for writing, creates it if not existing or the previous content is dis-
carded,
• ‘a’ or ‘ab’: file opened for appending, creates if not existing or writes at the end of the file.
The ‘b’ character is used only on Windows systems to indicate that the file is in binary mode, on a
Unix system, it is neglected. The parameter bufferSize is the integer value of the size of the buffer.
The system default size is chosen if the value is negative. The file is opened in the unbuffered mode
if the value is 0, a value of 1 specifies a line-buffered mode.
On the Windows platforms, file names may be specified with the \ or the / separator. Note that to
include a \ character in a string, it must be prefixed by a \. So a file name may be
‘C:\\my documents\\my script.py’ or
‘C:/my documents/my script.py’

The following functions can be used to handle the file content:


• f.close(): close file,
• f.flush(): flush file’s internal buffer,
• f.read(n): read at most n bytes from the file and return them as a string. if n is omitted, read up to
the end of the file,
• f.readline(): read one entire line,
• f.readlines():read until the end of the file and return a list of lines,
• f.seek(offset, whence=0): set file’s position, if whence =0 or is omitted, offset is the absolute
position, if whence=1 offset is relative to the current position and if whence = 2, offset is rela-
tive to the file end,
• f.tell(): returns file current position,

CFView™ 7-5
Macro Language Macro Script Examples

• f.write(string) write string to file (f.write(string+‘\n’) is writing the string content on a line).

7-3.8 Execute Python Script from another Python Script


The command execfile allows to start the execution of a Python script from a Python script.
E.g. : execfile(“macro1.py”)
This command starts the execution of the script file named macro1.py.

7-3.9 Create & Use Modules (Library of Functions)


The Python language provides the concept of module for grouping a set of functions in a same file.
The module name is the name of the file containing the functions.
The functions can be made available into a script in a similar way as the large set of utility functions
provided with CFView™. If a set of functions is defined in a file called MyModule.py, and the file is
located in the directory /people/myself/cfview_scripts, they can be made available in another script
through the following instructions:
sys.path.append(‘/people/myself/cfview_scripts’)
this declares to the system that some Python files are available in that directory. Then, two different
ways can be used to import the functions:
from MyModule import *
or
import MyModule
The first one sets all the functions defined in MyModule directly available, while the second form
makes them available with the MyModule. prefix (e.g. if a function f is defined in MyModule, it is
invoked by the command MyModule.f()).
The standard Python modules may be imported with both of the above mentioned forms. The direc-
tory declaration is not necessary.
It is also possible to load a macro using the following macro command:
MacroModuleLoad(string FileName)

 The standard CFView™ macro commands are part of the module CFView, when they
are used in another module, they have to be imported (from CFView™ import *).

 Limitation: it is not allowed to load 2 modules with the same name.

7-4 Macro Script Examples


7-4.1 Compute Surface Integrals
This section explains how to use the macro to compute various types of integrals.

7-6 CFView™
Macro Script Examples Macro Language

1. In CFView™ load the project provided with the CFView™ test case distribution from
Open toolbar button.
2. Select Record (File/Macro) to turn on the macro recorder by selecting.
3. Select the desired surface on which the integrals should be computed from the Sur-
faces subpanel by pressing the right mouse button and selecting the Select item in the
popup menu. Also you may create a new surface using Geometry menu options (sec-
tion 3-4, p. 3-11 for detailed information about surface creation).
4. Select the required field quantity to be integrated from Quantities subpanel (say 'Den-
sity').
At this point, all the operations regarding the surface creation and selection as well as the quantity
selection are recorded internally in CFView™.
5. Select Save… from File/Macro menu to save the macro script, this raises a file
chooser.
—Enter or select the file name in the file chooser.
—Press OK to validate the entry.
6. Using
a text editor, open the saved file ('.py').
7. Add the commands for surface integral computation and the display of the results of
the calculations in the active view (See section 7-5.22, p. 7-44 for a description of
each command):
a=GmtArea()
(area of the surface)
i=SclIntegral()
(scalar surface integral of 'Density')
wi=SclWeightedIntegral('Static Pressure')
("Static Pressure"-weighted surface integral)
pf=SclForce()
(vector surface integral of 'density')
pt=SclTorque(x,y,x)
(vectorial surface integral of 'Density' , taken as a
torque with respect to the point having coordinate x,y,z)
pta=SclTorqueAmplitude(x,y,z, i,j,k)
(scalar product of the same integral as SclTorque with the unit vector i,j,k)
QntFieldVector('Vxyz')
f=VectorFlux()
(flux of 'Velocity' through the active surfaces)
wf=VectorWeightedFlux('Density')
('Density'-weighted flux of 'Velocity' through the active surfaces)
InsertText(0.1,0.9,0.0,"Area . . . . . . . . . . . : %11.4e"%(a))
InsertText(0.1,0.8,0.0,"Integral density . . . . . : %11.4e"%(i))
InsertText (0.1,0.7,0.0,"Integral pressure x density : %11.4e"%(wi))
InsertText (0.1,0.6,0.0,'Flux velocity . . . . . . : %11.4e'%(f))

CFView™ 7-7
Macro Language Macro Script Examples

InsertText (0.1,0.5,0.0,'Mass flow . . . . . . . . : %11.4e'%(wf))


InsertText (0.1,0.4,0.0,'Torque around (0,0,1) . . : %11.4e'%(pta))
InsertText(0.1,0.3,0.0,"Force . . . . . . . . . . : %9.2e %9.2e %9.2e"%(pf[0], pf[1], pf[2]))
InsertText(0.1,0.2,0.0,'Torque . . . . . . . . . . : %9.2e %9.2e %9.2e'%(pt[0], pt[1], pt[2]))
See section 7-3.3, p. 7-3 for a detailed explanation of string formatting used in the Insert-Text com-
mands.
8. Open a new view of the same geometry:
—Select Open Cartesian from Window menu.
—Press, drag and release the left mouse button to specify the view limits.
—Select Full from View menu in order to have a full sized view.
—Select Execute... from File / Macro to open a file chooser.
—Select the file containing the modified recorded script as described above.
—Select OK, it displays all the results on the graphics area.

7-4.2 Export Field Values to a File


The following example shows how to export field values at some locations into an text file. The
coordinates of the points where the field values are to be extracted are read from a file and the result
is written in another file.

(file opening)
fi=open(‘/disk1/people/etienne/macros/listIn.dat’,’r’,0)
fo=open(‘/disk1/people/etienne/macros/listOut.dat’,’w’,0)
(write header line)
fo.write(‘Node# x_cord y_cord z_cord fieldValue\n’)
(select quantity -
if the following line is commented, the active quantity is used)
#QntFieldScalar(‘Static Pressure)
(import the type module for later use)
from types import *
(skip the first line, read the file lines and extract the quantity
value.)
s=fi.readlines()
for i in range(1,len(s)-1) :
(scan line)
lineList=[]
for x in splitfields(s[i]) :
if (x!=’’) : lineList.append(atof(x))
(write number and point coordinates)

7-8 CFView™
CFView™ Command Description Macro Language

fo.write(“%i %e %e %e”%(lineList[0], lineList[1], lineList[2], lineList[3]))


(compute value)
q=ProbeXYZ(lineList[1], lineList[2], lineList[3])
(write value - if the quantity is vectorial than q is a tuple)
if (q is TupleType) :
for j in range(0,len(q)) : fo.write(“ %e”%(q[j]))
else :
fo.write(“ “+‘q‘)
(write end of line)
fo.write(‘\n’)

(close files)
fi.close()
fo.close()

7-5 CFView™ Command Description


 Starting from CFView™ v8, to execute a macro created with an earlier version
CFView™ has to be started in one of the following ways:
— Use -backward argument when starting CFView™:
e.g. cfview -niversion 8.x -backward 74
— Set the environment variable CFVIEW_BACKWARD to 74 before launching
CFView™.
By default, the CFVIEW_BACKWARD variable is set to 82.

 All macros created with CFView™ v8.7, contain as a first line CFViewBack-
ward(84). This line should not be removed. If no such line is present, the macro can only
be executed if the CFVIEW_BACKWARD variable has been set to 74, as described
above.

 The number of macro arguments is limited to 255.

7-5.1 Commands Related to Defaults Settings


• FaceDisplacement(float f)
— Associated menu item: Preferences/Face Displacement.
— Operation (section 4-11.4.3, p. 4-62): sets the face displacement value.
• DefaultsLoad(string filename)
— Associated menu item: Preferences/Load Defaults....

CFView™ 7-9
Macro Language CFView™ Command Description

— Operation (section 4-11.2, p. 4-62): opens filename and loads its content as a new set of
default parameters.
— Exceptions: Raises IOError if the project cannot be loaded.
• DefaultDecorationTextType(TextType texttype, int lineAlign, int lineSpacing)
— Associated menu item: Preferences/Decoration Text type...
— Operation (section 4-11.1, p. 4-61): sets the default type for text insertion. The parameter
lineAlign may have a value of 0 (centring), 1 (left justification) or 2 (right justification). The
parameter lineSpacing may have a value of 0 (normal spacing), 1 (spacing 50% larger) or 2
(double spacing), section 7-5.29, p. 7-55 for the textType argument description.
• DefaultGridLineType(LineType line)
— Associated menu item: Preferences/Grid line type...
— Operation (section 4-11.1, p. 4-61): sets default type for the wire frame of mesh surfaces,
section 7-5.29, p. 7-55 for the lineType argument description.
• DefaultBoundaryCurveType(CurveType curve)
— Associated menu item: Preferences/Boundary curve type...
— Operation (section 4-11.1, p. 4-61): sets default type for the boundaries of mesh surfaces,
section 7-5.29, p. 7-55 for the curveType argument description.
• DefaultSectionCurveType(CurveType curve)
— Associated menu item: Preferences/Section curve type...
— Operation (section 4-11.1, p. 4-61): sets default type for curves associated to cartesian plots
on sections, section 7-5.29, p. 7-55 for the curveType argument description.
• DefaultNodeLineCurveType(CurveType curve)
— Associated menu item: Preferences/Node line curve type...
— Operation (section 4-11.1, p. 4-61): sets default type for curves associated to cartesian plots
along grid lines, section 7-5.29, p. 7-55 for the curveType argument description.
• DefaultPlotDataCurveType(CurveType curve)
— Associated menu item: Preferences/Plot data curve type...
— Operation (section 4-11.1, p. 4-61): sets default type for plot data curves, section 7-5.29, p.
7-55 for the curveType argument description.
• DefaultValidationCurveType(CurveType curve)
— Associated menu item: Preferences/Validation curve type...
— Operation (section 4-11.1, p. 4-61): sets default type for validation data curves, section 7-
5.29, p. 7-55 for the curveType argument description.
• DefaultComparisonCurveType(CurveType curve)
— Associated menu item: Preferences/Comparison curve type...
— Operation (section 4-11.1, p. 4-61): sets default type for curves presenting mesh interpolated
values to be compared with validation data, section 7-5.29, p. 7-55 for the curveType argu-
ment description.
• DefaultLocalValueType(MarkerType markerType, TextType textType, DoubleFormat dou-
bleFormat)
— Associated menu item: Preferences/Local value type...
— Operation (section 4-11.1, p. 4-61): sets type for local values, section 7-5.29, p. 7-55 for the
textType argument description, section 7-5.29, p. 7-55 for the markerType, textType and
doubleFormat arguments descriptions.

7-10 CFView™
CFView™ Command Description Macro Language

• DefaultComparisonToleranceValue(float f)
— Associated menu item: Preferences/Derived quantity epsilon...
— Operation: sets default value for the epsilon of a derived quantity.

7-5.2 Picture Output Generation


• PageLayout(int paperType, float pageHeight, float pageWidth, int orientation, float reduc-
tionHeight, float reductionWidth, int reductionLink)
— Associated item: File / Print... /Print Set Up Editor/Page Layout Editor.
— Operation (section 4-15.2, p. 4-68): sets the parameters describing the page layout for a
PostScript output. PaperType may be 0 (A4), 1 (A3), 2 (B5), 3 (B4), 4 (US 8.5 x 11), 5 (US
8.5 x 14),
6 (US 11x 17), 7 (US 4 x 5), 8 (slide 24 x 36 mm), 9 (other). Page height and width are given
in cm. Orientation may be 0 (automatic choice), 1 (landscape) or 2 (portrait). Reduction fac-
tors are in natural units and if reduction link is 1, reduction in width is not taken into
account.
— Exceptions: -
• Print(int graphicsFormat, int viewMode, int sizeMode, int bitmapped, int resolution, int
pixelWidth, int pixelHeight, int banner, string fileName, string title, int date, int quality)
— Associated item: File / Print... / Print Set Up Editor.
— Operation (section 4-15, p. 4-66): creates a hardcopy output.
— graphicsFormat indicates which picture file format to use: graphics format may be 0 (Post-
Script), 1 (EPS), 2 (PPM), 3(PGM), 4 (PBM), 5 (NTSC), 6(TIFF), 7(JPEG), 8(PNG).
— viewMode indicates if the active view is printed (viewMode =0) or if the whole graphics
area is printed (viewMode = 1).
— sizeMode indicates how the picture size is provided. The picture size is not provided in the
same way for all formats:
— for bitmapped formats (PPM, PGM, PBM, NTSC, TIFF, JPEG and PNG): the picture
size may be specified in pixelWidth and pixelHeight (sizeMode = 1) or computed from
the screen graphical size and the parameter resolution (sizeMode = 0).
— for vectorized formats (PostScript and EPS): the parameter is not taken into account and
the picture size is always computed from the screen graphics size and the parameter res-
olution.
— bitmapped is used only for vectorized formats: PostScript and EPS formatted output may be
bitmapped (bitmapped =1) or not (bitmapped=0).
— resolution is used for vectorized formats and for bitmapped formats if sizeMode is set to 0:
— for bitmapped formats (PPM, PGM, PBM, NTSC, TIFF, JPEG and PNG), resolution is
the scaling factor (in percent).
— for vectorized formats (PostScript and EPS), resolution is the resolution in dot per inch
(dpi).
— pixelWidth and pixelHeight are indicating the picture size in the case of bitmapped format
and sizeMode set to 1 (otherwise the values are not used).
— banner indicates if a banner is to be added to the picture (banner =1) of not (banner =0).
— fileName is the name of the file to be created. Please note that no check is performed about
the existence of this file and a pre-existing file would be replaced.

CFView™ 7-11
Macro Language CFView™ Command Description

— title is the text to be inserted in the banner if the banner parameter is set to 1 (otherwise, the
content is not used).
— date is a boolean value indicating if the print date should be mentioned in the banner or not.
This argument may be omitted.
— quality is an integer value, ranging from 0 to 3. It specified the internal size of the image
that will be computed, as well as the number of blur passes. “normal” corresponds to quality
= 0, “high” to quality = 1, “thin lines” to quality = 2, “very thin lines” to quality = 3
• PostScriptSave(string filename)
— Operation (section 4-15, p. 4-66): saves the current display in PostScript format. Aspect
ratio and resolution depend on the actual size of the display on the screen and are automati-
cally computed.
• EPSSave(string filename)
— Operation (section 4-15, p. 4-66): saves the current display in Encapsulated PostScript for-
mat. Aspect ratio and resolution depend on the actual size of the display on the screen.
• PPMSave(string filename), PGMSave(string filename), PBMSave(string filename)
— Operation (section 4-15, p. 4-66): saves the current display in PPM, PGM or PBM format.
• NTSCSave(string filename)
— Operation: saves the current display in NTSC format. Produces 3 files with suffix ‘.U’,
‘.Y’.and ‘.V’ that can be used to produce animations.

7-5.3 Commands Related to Project Handling


• string FileOpenProject(string filename)
— Associated menu item: File/Open Project...
— Operation (section 2-3, p. 2-9): opens filename as a CFView™ project. Returns the name of
the created view.
— Exceptions: Raises IOError if the project cannot be loaded.
• string FileOpenProjectSelection(string filename, string all or blocklist, int range, string all
or loadqnt, string quantityName)
— Associated menu item: File/Open Project Selection...
— Operation (section 2-3, p. 2-9): opens filename as a CFView™ project. Returns the name of
the created view. This macros allows to specify the blocks list and the quantities to load.
— Exceptions: Raises IOError if the project cannot be loaded
— This command can be used to load unsteady projects. The keyword 'unsteady' indicates that
a list of time steps to load will follow. The time steps refer to the file naming of Euranus out-
put. In this example 'FileOpenProjectSelection('/server/home/user/example.run' ,'5', '1', '3', '5
7', 'loadqnt' , 'Static Temperature', 'Y+', 'Cf', 'skiphubshroud', 'unsteady', '5 25 10')', the user
will load the interval of time steps from the first time step 5 to the last time step 25 with
interval steps of 10. This means the following files: project_t5.cgns, project_t15.cgns and
project_25.cgns.
• string OpenCGNSAutogrid(string filename)
— Associated menu item: File/Open Autogrid5 CGNS...
— Operation (section 2-3.2.3, p. 2-10): opens filename as a CFView™ project to visualize the
mesh created within AutoGrid5.
• string OpenCGNSProject(string fileName, string baseName)

7-12 CFView™
CFView™ Command Description Macro Language

— No Associated menu item


— Operation (section 2-3.2.4, p. 2-10): opens a CFD data set in the CGNS formatted file.
fileName is the name of the file and baseName is the name of the CGNS base to be loaded.
— Exceptions: Raises IOError if the project cannot be loaded.
• string OpenPlot3DProject(string geometryFileName, string solutionFileName, string func-
tionFileName, string nameFileName)
— Associated menu item: File/Open Plot3D Project...
— Operation (section 2-3.2.5, p. 2-11): opens a CFD data set in the PLOT3D format. The
geometryFileName argument is mandatory, while the three others are optional. geometry-
FileName is the name of the geometry file, geometryFileName is the name of the solution
file; functionFileName and nameFileName are the name of the function and name files.
— Exceptions: Raises IOError if the project cannot be loaded.
• DefaultPlot3DFileType(int format, int bigEndian, int blanking, int multiZone, int dim)
— Associated item: Default Plot3D type dialogue box raised from the Plot3D file chooser.
— Operation (section 2-3.2.5, p. 2-11): sets the parameters that are necessary to read correctly
the Plot3D formatted data sets.
format indicates the type of file formatting: 0 for ASCII, 1 for unformatted single precision,
2 for unformatted double precision, 3 for formatted single precision and 4 for format-
ted double precision.
bigEndian must have a value of 1 if the data set was created on a binary big endian compu-
ter or a value of 0 if it was created on a lower (or little) endian computer system.
blanking has a value of 1 if blanking information is included in the files, or a value of 0 if
such information is not included.
multiZone must have a value of 1 if the data set is a multi block grid, it must be set to 0 oth-
erwise.
dim indicates the dimensionally of the data set: its value must be 2 or 3.

• string UnsteadyProjectOpen(string filename, float time [,string fileName, float time]*)


— Operation: opens an unsteady project having more than one time step. Each time step is
specified by the corresponding file name and its time value. The command opens the first
time step in a new view and returns the name of the created view.
• int NumberOfTimeSteps()
— Operation: returns the number of time steps in the current project.
• SetActiveTimeStep(int i)
— Operation: loads the specified time step.
• NextTimeStep()
— Operation: loads the time step following the current one.
• FileCloseProject()
— Associated item: File / Close Project....
— Operation (section 2-3.5, p. 2-15): closes the project associated to the active view. All views
related to that project are closed too.
— Exception: raises an AttributeError if these is not active view.
• Quit()
— Operation: quit CFView™.

CFView™ 7-13
Macro Language CFView™ Command Description

7-5.4 Commands Related to Additional Views Creation


Most of the commands listed in this section are returning the name of the created view. This feature
allows to handle multiple views in a macro script. As an example, the following script opens a first
project. then a second one, and finally selects the view associated to the first project:
vp1 = FileOpenProject( ... )
Opens a first project and stores in vp1 the name of the view associ-
ated to the project.
vp2 = FileOpenProject( ... )
Opens another project and stores in vp2 the name of the view asso-
ciated to this second project. The active view is now vp2.
ViewActivate(vp1)
Re-selects the view associated to the first opened project. Any fur-
ther command applies now to the first project.
• string ViewOpen(double xmin, double xmax, double ymin, double ymax)
— Associated menu item: Window/Open Cartesian.
— Operation (section 2-5.5, p. 2-23): opens a new view of the current project at position (xmin,
xmax, ymin, ymax). Returns the name of the view created. The upper right corner of the
graphics area is (1, 1) and the lower left (-1, -1).
— Exceptions: raises an Attribute Error if there is no current project.
• string ViewOpenRTZ(double xmin, double xmax, double ymin, double ymax)
— Associated menu item: Window / Open Cylindrical.
— Operation (section 2-5.5, p. 2-23): opens a new view of the current project at position (xmin,
xmax, ymin, ymax) in the cylindrical coordinate system. Returns name of the view created.
The upper right corner of the graphics area is (1, 1) and the lower left (-1, -1).
— Exceptions: raises an Attribute Error if there is no current project.
• string ViewOpenSTM(double xmin, double xmax, double ymin, double ymax)
— Associated menu item: Window / Open Blade to Blade.
— Operation (section 5-2.2, p. 5-3): Opens a new view of the current project at position (xmin,
xmax, ymin, ymax) in the STM coordinate system. Returns name of the view created. The
upper right corner of the graphical area is (1, 1) and the lower left (-1, -1)
— Exceptions: raises an Attribute Error if there is no current project.

7-5.5 Commands Related to Animation Control


The following section describes the macros for unsteady animation control.
• RecordAnimation(bool b)
— Operation: executed when the user clicks on “Start/Stop Animation Recording” button.
• SetRecordAnimParam(int viewmode, int sizemode, int scaling, int xpixels, int ypixels, bool
bannermode, string bannertext, bool datemode, int delay, int loops, bool deleteimagefiles-
mode, string animationfilename)
— Associated menu item: Start/Stop Animation Recording button.
— Operation: this macro sets the values of animation parameters.
— viewmode: 0 saves the the active view and 1 saves the graphics window.

7-14 CFView™
CFView™ Command Description Macro Language

— sizemode: 0 means that the scaling mode will be used, 1 means that the pixels mode will be
used.
— scaling: performs a scale of the picture (maximum: 1600 and minimum: 30).
— xpixels and ypixels: define the the number of pixels along X and Y directions (maximum:
5000 and minimum: 16)
— bannermode: includes a banner if it sets to 1.
— bannertext: text included in the banner if bannermode is set to 1.
— datemode: the date is included in the animation.
— delay: imposes a delay between 2 frames (in 1/100th of a second).
— loops: includes a number of loops in the animation.
— deleteimagefilesmode: deletes the intermediate pictures when saving the animation.
— animationfilename: name of the animation file.
• AnimPrint()
— Operation: this macro is similar to Print macro (section 7-5.2). It creates PNG image files
using the information that has been set through SetRecordAnimParam macro.
• AnimationLoop(bool b)
— Operation: this macro activates the loop for the recorded animation if the boolean is set to 1.
• FreeMemory(bool b)
— Operation: activates or deactivates the "Free Memory On/Off" button respectively (section
2-2.2.5 on page 2-6).
The following section describes the macros for steady animation control. It includes all of these:
streamline, cutting plane, and structured surface animations.
• RecordSteadyAnimation(bool b)
— Operation: its usage is similar to RecordAnimation macro used for unsteady animation.
This macro is executed when the Record button is activated (b = 1) or deactivated (b = 0).
• SteadyAnimationNextStep()
— Operation: draws the next frame for steady animation.
• SetRecordSteadyAnimParam(int viewmode, int sizemode, int scaling, int xpixels, int ypix-
els, bool bannermode, string bannertext, bool datemode, bool annotatemode, string annota-
tetext, int annotatelocation, bool bordermode, int delay, int loops, bool
deleteimagefilesmode, string animationfilename)
— Operation: Its usage is similar to SetRecordAnimParam macro used for unsteady anima-
tion. This macro sets the values of animation parameters.
• StreamLineAnimationInit()
— Operation: initializes and draws the first frame of the animation.
• StreamLineAnimationStop()
— Operation: stops the animation and clears the markers used for the animation
• CuttingPlaneScrollingInit()
— Operation: initializes and draws the first frame of the animation.
• CuttingPlaneScrollingStop()
— Operation: stops the animation and clears the markers used for the animation
• SurfaceIJKScrollingInit()

CFView™ 7-15
Macro Language CFView™ Command Description

— Operation: initializes and draws the first frame of the animation.


• SurfaceIJKScrollingStop()
— Operation: stops the animation and clears the markers used for the animation.

7-5.6 Commands Related to Multiple Views Handling


• ViewActivate(string viewName)
— Associated Item: view selection by clicking with the left mouse button.
— Operation (section 2-5.5, p. 2-23): activates the view having name viewName.
— Exceptions: if view is not existing will raise Attribute Error.
• GraphicsViewActivate()
— Operation: if the current view is a 2D or a 3D view, the command does nothing. If the cur-
rent view is a Cartesian plot view, a new 2D or 3D view is opened, with the same position
and size as the Cartesian plot view.
• PlotViewActivate(string quantityName)
— Operation: activates the Cartesian plot view associated to the specified quantity. If the quan-
tity exists in the project and if there is not already a Cartesian plot view associated to it, a
new Cartesian plot view is created.
• ViewTile()
— Associated menu item: Window / Tile Views.
— Operation (section 2-5.5, p. 2-23): tiles all the views on the display.
— Exceptions: -
• ViewAlign(string viewName)
— Associated menu item: Window / Align Views.
— Operation: sets the camera of the active view in the same position and orientation as the
camera in the view having the specified name.
• ViewSwap(string viewName)
— Associated menu item: Window / Swap Views.
— Operation: exchanges the limits specification between the active view and the one with the
provided name.
• ViewSuperpose(string viewName)
— Associated menu item: Window / Superpose Views.
— Operation: sets the limits of the view with the provided name equal to the limits of the active
view and sets the active view transparent.
• ArrangeIcons()
— Associated menu item: Window / Arrange Icons.
— Operation (section 2-5.5, p. 2-23): arranges the iconized views on the display.
— Exceptions: -
• Update()
— Associated menu item: Window / Refresh.
— Operation (section 2-5.5.2, p. 2-23): refreshes the graphical area.
— Exceptions: -

7-16 CFView™
CFView™ Command Description Macro Language

7-5.7 Commands Related to Turbomachinery Mode


• SetTurboMode(), UnsetTurboMode()
— Associated menu item: File / Turbomachinery.
— Operation: enables or disables the turbomachinery mode.
• OpenTurboModeStandard3DView(int forceNew)
— Operation: opens a standard three dimensional view at its default location. If the forceNew
value is different from 0, a new view is created (and replaces the already existing one if nec-
essary).
• OpenTurboModeBladeToBladeView(int forceNew)
— Operation: opens a blade to blade view at its default location. If the forceNew value is dif-
ferent from 0, a new view is created (and replaces the already existing one if necessary).
• OpenTurboModeBladeView(int forceNew)
— Operation: opens a blade view at its default location. If the forceNew value is different from
0, a new view is created (and replaces the already existing one if necessary).
• OpenTurboModeMeridionalView(int forceNew)
— Operation: opens a meridional view at its default location. If the forceNew value is different
from 0, a new view is created (and replaces the already existing one if necessary).

7-5.8 Commands Related to Meridional View Creation


• string OpenPitchAveraged(int mode, int listLength, ...., string weightOption)
• SetDefaultPitchAveragePatches(int mode, int listLength, ...., string weightOption)
— Associated menu item: Geometry / Set Meridional Patches...
— Explanation of arguments meaning:
mode: specifies how the meridional mesh is provided in the following arguments. Three
modes are supported:
if mode = 1, the surfaces list is provided as a set of names and the listLength value is
the number of surfaces in the meridional mesh.
if mode = 2, the surfaces list is provided as a serie of 3 integral values: domain number,
index family, index value, it defines one of the subsurfaces belonging to the meridi-
onal mesh, the list length argument is the total number of integer values defining the
whole set of subsurfaces. Thus, for example, one subsurface needs three numbers,
and the list length argument value is 3 if the meridional mesh contains only one sub-
surface, 6 if the meridional mesh contains two subsurfaces, etc... (see also section 7-
5.13, p. 7-24)
if mode = 3, the surfaces list is provided as a serie of mesh surfaces described by nor-
malized parameters. These parameters are the domain index, the surface family
index, the normalized index value and the normalized range to be considered (see the
StructuredSurfaceSave command in section 7-5.13, p. 7-24 for a more detailed expla-
nation on these parameters. In this case, the listLength value is the number of sur-
faces in the meridional mesh.

weightOption: a string value specifying the applied weighting. The supported values are:
“1” means a value 1 is given to the weighting coefficient,
“Density*Vxyz” or “Density*Wxyz” means that a mass flow weighting is applied.

CFView™ 7-17
Macro Language CFView™ Command Description

— Operation: the command OpenPitchAveraged() computes the pitch average based on the
provided meridional mesh and open a new view in which the results are shown. The com-
mand SetDefaultPitchAveragePatches() defines the default meridional mesh used by the
command OpenDefaultPitchAverageView().
• string OpenDefaultPitchAveragedView()
— Associated menu item: Window / Compute & Open Pitch Average
— Operation: computes and opens a pitch average view, by using the default meridional
patches taken from the project file or specified by the command SetDefaultPitchAverage-
Patches().

 When the user creates a pitch averaged view, the numerotation is modified. For exam-
ple, for a multistage project including 6 blocks, the user creates a meridional view in
which there is only 4 patches leading to a different resulting numerotation. The function
StructuredDomainSize will not return the same results in the 3D view and in the pitch
averaged view.

7-5.9 Commands Related to Active View Only


Unless differently stated, all these commands perform no action if no view is active.
• string ViewName()
— Operation: returns the name of the currently active view.
— Exceptions: if no view is active, raises a “Run Time Error”.
• ResetViewContent()
— Associated menu item: Window / Reset View
— Operation: resets the view to its default content. For 3D and 2D views, all solid surfaces
boundaries are shown and the camera is set in its original position. For Cartesian plot views,
the command removes all the curves.
• DeleteViewContent()
— Operation: delete all the content of the active view.
• ViewPushBack(), ViewBringToFront()
— Associated menu item: View / Push Back.
— Operation: pushes the active view behind the other ones or bring it in front of others.
• ViewClose()
— Associated menu item: Window / Close.
— Operation (section 2-5.5.4, p. 2-23): closes the current view. After this operation no view is
active.
— Exceptions: raises an Attribute Error if there’s no current view.
• Border(int b)
— Associated menu item: View / Parameters / Border.
— Operation (section 2-5.4.2, p. 2-21): suppresses (b=0) or activates (b=1) the view border.
• Transparent(int b)
— Associated menu item: View / Parameters / Transparent.
— Operation (section 2-5.4.2, p. 2-21): sets the current view in transparent mode (b=0) or in
opaque mode (b=1).

7-18 CFView™
CFView™ Command Description Macro Language

• LimitsFull()
— Associated menu item: View / Full.
— Operation (section 2-5.5.5, p. 2-23): sets current view to full size.
• Limits(float xmin, float xmax, float ymin, float ymax)
— Associated menu item: View / Move and View / Resize.
— Operation (section 2-5.5.5, p. 2-23): sets the lower left corner of the active view to (xmin,
ymin) and its upper right corner to (xmax, ymax). The lower left corner of the graphics area
is in (-1,-1) and its upper right corner is in (1,1).
• ViewIconize()
— Associated menu item: View / Minimise.
— Operation (section 2-5.5.5, p. 2-23): iconizes the current view.
— Exceptions: raises an Attribute Error if no view is active.
• LimitsPref()
— Associated menu item: View / Preferred Size.
— Operation (section 2-5.5.5, p. 2-23): resets the current view to the size it had before a Vie-
wIconize command (only if the last resizing command was ViewIconize).
• UpdateUndo()
— Associated menu item: Update / Undo.
— Operation (section 4-10.1, p. 4-56): deletes the last added representation.

7-5.10 Commands Related to Viewing Geometry of Active View


Unless stated differently, all these commands perform no action if no view is active.
• Projection(int m)
— Associated menu items: View / Parameters / Stretched, Orthographic and Perspective
— Operation (section 2-5.2.1, p. 2-17): sets the projection mode in stretched (m=0), ortho-
graphic (m=1) or perspective mode (m=2).
— Exceptions: raises Attribute Error if m is not 0, 1 or 2.
• Normal(float nx, float ny, float nz)
— Associated menu item: View / Parameters / Normal
— Operation (section 2-5.2, p. 2-16): sets the camera to point in a direction parallel to the vec-
tor (nx, ny, nz).
• UpVector(float nx, float ny, float nz)
— Associated menu item: View / Parameters / UpVector
— Operation (section 2-5.2, p. 2-16): sets the up direction parallel to the vector (nx, ny, nz).
• FullRender(bool b)
— Associated menu item: View / Parameters / FullRender
— Operation (section 2-5.4.2 on page 2-21): activates the Full Render mode if b is set to 1.
• FastPreview(bool b)
— Associated menu item: View / Parameters / Fast Preview
— Operation (section 2-5.4.2 on page 2-21): activates the Fast Preview mode.
• ViewOriginal(bool onlyVisibleGeometry)

CFView™ 7-19
Macro Language CFView™ Command Description

— Associated item: original viewing button.


— Operation (section 2-5.3, p. 2-18): if onlyVisibleGeometry = 0 : takes all the geometry into
account for the fit. If onlyVisibleGeometry = 1: takes only the visible geometry into
account for the fit (the “fit camera” button fits only the visible geometry).
• ViewPlaneX/Y/Z()
— Associated item: projection viewing buttons.
— Operation (section 2-5.3, p. 2-18): projects the current view on a X, Y, or Z plane.
• ViewRotateX/Y/Z(float a)
— Associated item: rotates viewing buttons.
— Operation (section 2-5.3, p. 2-18): rotates the current camera around an axis defined by the
target point and the axis X, Y, or Z. Rotation angle is given by ‘a’.
• ViewDolly(float a)
— Associated item: dolly viewing button.
— Operation (section 2-5.3, p. 2-18): rotates the view around the view axis from an angle a.
• ViewRotate(float u, float v, float -)
— Associated item: free rotation viewing button.
— Operation (section 2-5.3, p. 2-18): rotates the view of an angle u around the horizontal axis
perpendicular to the view axis and of an angle v around the view axis;
• ViewScroll(float u, float v, float -)
— Associated item: translation viewing button.
— Operation (section 2-5.3, p. 2-18): Translates the view from vector (u,v). (2,2) corresponds
to a translation from the lower right corner to the upper left corner.
• ViewZoom(float f)
— Associated item: zoom button.
— Operation (section 2-5.3, p. 2-18): performs a zoom in/out operation by multiplying the
camera width and height by f. Values larger than 1 result in a zoom out operation, while val-
ues smaller than one result in a zoom in operation.
• ViewZoomAreaIn(float xmin, float xmax, float ymin, float ymax)
— Associated item: zoom area viewing button.
— Operation (section 2-5.3, p. 2-18): Zooms in the view. The rectangle defined by (xmin,
xmax, ymin, ymax) becomes the whole scene after the operation. On 3D and 2D views, a
zoom of (-1, 1, -1, 1) is a full view zoom (i.e. has no effect). In Cartesian plot views, the
arguments correspond to the abscissa and ordinate axes ranges.
• ViewZoomAll()
— Associated menu item: zoom all viewing button.
— Operation (section 2-5.3, p. 2-18): Performs a fitting operation.
• ViewTarget(float f)
— Associated item: target viewing button.
— Operation (section 2-5.2, p. 2-16): moves the camera along the line of view. The new posi-
tion is obtained by multiplying the distance between the camera and the view point by f.
• ViewPlane(float f)
— Associated item: plane viewing button.

7-20 CFView™
CFView™ Command Description Macro Language

— Operation (section 2-5.2, p. 2-16): moves the camera target and the associated clipping
planes along the line of view. The new target position is obtained by multiplying the distance
between the camera and the view point by f. The clipping plane are moved by an equal dis-
tance.
• SetCamera(float p1, float p2, float p3, float t1, float t2, float t3, float v1, float v2, float v3,
float w, float h, float p1_old, float p2_old, float p3_old, float t1_old, float t2_old, float
t3_old, float v1_old, float v2_old, float v3_old, float w_old, float h_old)
— Associated menu item: dynamic viewing button (also see Figure 2.5.2-1).
— Operation (section 2-5.3, p. 2-18): sets the camera position and viewing parameters).
— Arguments:
— p1, p2, p3 are the coordinates of the camera position (the view point, see figure on p. 1-
16 of the manual).
— t1, t2, t3 are the coordinates of the target point.
— v1, v2, v3 are the coordinates of the vertical vector direction.
— w and h are respectively the width and height of the view.

 The arguments 1 to 11 represent the current camera position. The arguments 12 to 22


refer to the previous camera position (they are written with “_old”)
• SetCameraWidth(float f), SetCameraHeight(float f)
— Operation: sets the camera width / height to the specified value.

7-5.11 Commands Related to Mesh Representation


These commands are related to the active view. no action is performed if no view is active.
• PostDefaultSurfaces()
— Operation: adds the representation of the boundaries of the default surfaces. This command
is performed when a new 2D or 3D view is opened.
• GmtToggleBoundary(), GmtBoundaryVisibility(int b, [string name])
— Associated menu item: Geometry / Boundary.
— Operation (section 3-5.1, p. 3-19): toggles or sets visibility of the boundaries of surfaces.
The b argument is interpreted as a boolean value: if b=0, the boundary visibility is turned
off, otherwise it is turned on. If a name is provided, the visibility of the specified surface is
set, otherwise all the active surfaces boundaries visibility is set. There may be more than one
name passed as argument.
• GmtToggleBoundarySolid()
— Associated menu item: Geometry / Solid Boundary.
— Operation (section 3-5.2, p. 3-19): toggles the visibility of the boundaries of the active sur-
faces having a solid boundary condition.
• UpdateBoundaryLineType(LineType lineType)
— Operation: sets the line type attributes for the boundary lines of the active surfaces (section
7-5.29, p. 7-55 for a description of the LineType argument).
• GmtToggleGrid(), GmtGridVisibility(int b, [string name])
— Associated menu item: Geometry / Grid.

CFView™ 7-21
Macro Language CFView™ Command Description

— Operation (section 3-5.4, p. 3-19): toggles or sets the visibility of the grid (mesh wire frame)
of surfaces. The b argument is interpreted as a boolean value: if b=0, the grid visibility is
turn off, otherwise it is turned on. If a name is provided, the visibility of the specified surface
is set, otherwise the visibility off all the active surfaces is set. There may be more than one
name passed as argument.
• GmtScale(float sx, float sy, float sz)
— Associated menu item: Geometry / Scale.
— Operation: sets the scale of the current view in x, y, and z directions to sx, sy and sz.
— Exceptions: Negative or zero scales will produce a ValueError.
• GmtRepetitionToggle(), GmtRepetitionSet(int b)
— Associated menu item: Geometry / Repetition on/off.
— Operation (section 3-5.13, p. 3-28): toggles or sets repetition on domains having at least one
active surface in the view. The argument b is interpreted as a boolean value: if b=0, the rep-
etition is disabled, otherwise it is enabled.
• repetitionType GetMeshRepetitionType(), repetitionType GetDomainRepetitionType(int
domId), repetitionType GetSurfaceRepetitionType(string name)
— Operation: returns the repetition description associated to the current project, to the specified
domain or to the specified surface. A domain is specified by its index, between 1 and the
number of domains. A surface is specified by its name. The returned value is a variable list
of parameters. The first parameter in the list indicates the repetition type:
— 0: no repetition. In that case the list does not include other parameters.
— 1: repetition by translation. The following parameters in the list are the 3 compo-
nents of the translation vector, followed by the number of repetition.
— 2: repetition by rotation. The following parameters indicate the rotation angle, then
the three components of the rotation axis direction and then the three components of
the point defining the rotation axis position.
— 3: repetition by mirroring. The following parameters are the three components of the
point defining the mirror position followed by the three components of the normal to
the mirror.
All components of vectors and positions are specified in Cartesian coordinates.
• SetDomainRepetitionType(int domId, repetitionType type)
— Operation (section 3-5.13, p. 3-28): sets the type of repetition for the specified domain (see
previous command for a description of the arguments).
— Exceptions: invalid domain index will produce a ValueError.
• GmtRepetitionNumber(int n)
— Associated menu item: Geometry / Repetition Number.
— Operation (section 3-5.13, p. 3-28): sets the number of repetitions on domains having at least
one active surface in the view.
— Exceptions: Negative or zero number will produce a ValueError.
• AddRprCellList, RprCellList, RemoveRprCellList(float sizeFactor, int domainIndex, int
cellListSize, int cellIndex1, ..., int cellIndexn)
— Associated menu item: Geometry/Cells
— Operation (section 3-6, p. 3-29): adds or removes cells representation; sizeFactor is the scal-
ing factor applied to the cell representation; cellListSize is the number of cells respectively:
added to the representation, represented, or removed from the representation, their indexes
are contained in the remaining parameters: cellindex1,...cellIndexn.

7-22 CFView™
CFView™ Command Description Macro Language

• ShowSelectedSurfacesNormal(string names)
— Associated menu item: Right-click on selected surface
— Operation: shows the normals on the surfaces defined by names
• ReverseSelectedSurfacesNormal (string name)
— Associated menu item: Right-click on selected surface
— Operation: reverses the normals on the surfaces defined by names
• RemoveSelectedSurfacesNormal(string name)
— Associated menu item: Right-click on selected surface
— Operation: removes the normals on the surfaces defined by names

7-5.12 Commands to Obtain Informations on Data Set


• [int, int, int] StructuredDomainSize(int i)
— Operation: returns the number of points in the I, J and K directions for the domain i.
— Exception: if i is out of the valid range (i.e. is lower than 0, equal to 0 or larger than the
number of domains) the function returns three null values. If the value for i is not an integer,
a Syntax Error exception is raised.
• string ProjectFile()
— Operation: returns the file name with path and extension of the data set associated to the
active view.
— Exception: raises a RuntimeError if there is no active view.
• int SurfaceExist(string name)
— Operation: returns 1 if a surface or a group of surfaces having the provided name is existing
in the current project. Returns 0 otherwise.
• int NumberOfDomains ()
— Operation: returns the number of domains of the active project. For instance, to get the
value, use the following lines:
nDom = NumberOfDomains ()
print ‘NumberofDomains=’, nDom
• int NumberOfPoints (string name)
— Associated item: Surfaces / Right-click on the selected surface
— Operation: returns the number of points of the active surfaces.
• int GetDomainIndexByName(string name)
— Operation: returns the domain index for the domain called name.
• int GetDomainIndexByRegex(string name)
— Operation: returns the domain index (or a list of indexes) based on regular expressions
defined by name.
• SurfaceLimitIndices(string name)
— Operation: returns a list [i0,i1,i2,i3,i4,i5] which contains IJK information on the surface
called name. The information are:
i0: I*min of the surface = Imin if J or K constant surface & Jmin if I constant surface
i1: I*max of the surface = Imax if J or K constant surface & Jmax if I constant surface
i2: J*min of the surface = Jmin if K constant surface & Kmin if I or J constant surface

CFView™ 7-23
Macro Language CFView™ Command Description

i3: J*max of the surface = Jmax if K constant surface & Kmax if I or J constant surface
i4: 0, 1, 2 respectively if I, J or K constant surface
i5: constant indice of the surface
• GetFluidType()
— Operation: returns the fluid type of the computation.
• ThermoTableCompute(string “TableName”, float arg1, float arg2)
— Operation: returns the value of a thermodynamic field according to the table name, arg1 and
arg2 are two real numbers for the two thermodynamic field input values.
— Examples:
. If the table is the 1D saturation table: Table name=PSA, arg1 is the pressure (real number)
and arg2 is the option (integer) that controls the returned value:
1=D liquid; 2=D vapor; 3=H liquid; 4=H vapor; 5=S liquid; 6=S vapor; 7=E liquid;
8=E vapor
rl=ThermoTableCompute("PSA",1e+5,1)
rl is D liquid at 100000 Pa.
. If the the table is a 2D table:
s = ThermoTableCompute("SHP",2.73e+6,187000)
s is the entropy for the enthalpy= 2.73e+6 an pressure = 187000 Pa
Warning: The RHS table does not return D but the ratio P/D

7-5.13 Commands Related to Surface Creation


• string CutPlaneSave(float p_x, float p_y, float p_z, float n_x, float n_y, float n_z, int coord,
string name)
— Associated item: Geometry / Create Cutting Plane....
— Operation (section 3-4.2, p. 3-13): creates and saves the cutting plane defined by the point
(p_x, p_y, p_z) and the normal direction (n_x, n_y, n_z).
The last two parameters (coordinateSystem and name) can be omitted for backward com-
patibility.
•p_x, p_y, p_z are the coordinates of the point defining the plane,
•n_x, n_y, n_z are the coordinates of the normal to the plane,
•coord indicates in which coordinates system p1, p2, p3, d1, d2, d3 are provided. If this
parameter is omitted, the assumed coordinates system is the one of the active view. Values
of 0, 1 and 2 correspond respectively to Cartesian, cylindrical and blade to blade coordi-
nates system.
•name is the root name for the created surfaces and the name of the group if a group is cre-
ated. If this parameter is omitted, a root name is generated automatically: ‘CUT’ followed
by a number.
If the cut is crossing several domains, the name of the group is returned. This name is iden-
tical to the name provided as last argument or is the automatically generated root name. If
only one domain is cut, the name of the created surface is returned. If the cut specification
does not cross the grid, no value is returned.
— Exceptions: A zero direction (dx=dy=dz=0) will trigger a ValueError.

7-24 CFView™
CFView™ Command Description Macro Language

— Typical uses of this function are:


•Creation of a cut and setting the active surface to the cut only (whatever the number of cut
domains):
cutName = CutPlaneSave( ... ),
SelectFromView(cutName).
•Creation of a cut and check of its existence:
cutName = CutPlaneSave( ... )
from types import *
if (type(cutName) != StringType) : print “Cut plane do not cross the grid”
•Creation of a cylindrical cut at R=0.5 and computation of its area:
cutName = CutPlaneSave(0.5, 0., 0., 1., 0., 0., 1, ‘cutAtR05’)
SelectFromView(cutName)
a = GmtArea()
•Creation of a cut and exclusion of some a priori known domains from it:
cutName = CutPlaneSave(..., ‘myCut’)
DeleteFromProject(‘myCut.D5’, ‘myCut.D4’)
Note that the last argument in the CutPlaneSave command enforces that the name of the
group is ‘myCut’ and that each cut surface has a name of the form ‘myCut.Dn’ where n is
the domain number. The DeleteFromProject command destroys the surfaces if they exist. If
a surface does not exist, the argument is ignored.

 Please note that, along with the version 3.8-22 of CFView™, the automatic naming of
cut planes has changed. Macros scripts including the names created automatically in ear-
lier versions may not work with newer version. The macro scripts where the cut planes
names are handled by means of Python variables do not have this limitation.
• CutSurfaceSave (float p1_x, float p1_y, float p1_z, float n1_x, float n1_y, float n1_z, int
coord1, float p2_x, float p2_y, float p2_z, float n2_x, float n2_y, float n2_z, int coord2, string
name)
— Associated item: Geometry / Split Surface...
— Operation: extracts the portions of active surfaces delimited by two planes. This macro is
based on the macro CutPlaneSave (see description of the parameters in section 7-5.13)
• string SurfaceIJKSave(2, 8, int domainIndex, int surfaceType, int surfaceValue, int Is1, int
Js1, int Is2, int Js2, int displayMode)
— Associated item: none.
— Operation (section 3-4.1, p. 3-11): creates, saves and returns the name of a mesh surface for
one domain. The two first parameters should be present with their prescribed value. The
parameter ‘domainIndex’ specifies the domain number (first domain is 0). The parameter
‘surfaceType’ indicates the surface type: I (index=0), J (index=1) or K (index=2) constant.
The parameter indexValue is the index of the surface within its family. Is1, Js1, Is2 and Js2

CFView™ 7-25
Macro Language CFView™ Command Description

indicate the node ranges for the surface as indicated in the table here below. The parameter
displayMode is not used. The values are in the range 0, “number of points”-1, where
“number of points” is the number of points in the respective direction.

Surface family Is1 / Is2 Js1 / Js2


Jmin / Jmax Kmin / Kmax
I
Imin / Imax Kmin / Kmax
J
Imin / Imax Jmin / Jmax
K

 The use of this function is discouraged. The command StructuredSurfaceSave is a


more flexible alternative and the recording of structured surfaces creation is using the
StructuredSurfaceSave command.
• string StructuredSurfaceSave(int domainIndex, int surfaceType, float surfaceValue, float
IFirst, float JFirst, float ILast, float JLast)
— Associated menu item: Geometry / Create IJK Surface....
— Operation: creates, saves and returns the name of a mesh surface for one domain. The
parameter ‘domainIndex’ specifies the domain number (first domain is 1). The parameter
‘surfaceType’ indicates the surface index: I (index=0), J (index=1), K (index=2).The follow-
ing parameters: surfaceValue, IFirst, JFirst, ILast, JLast, are float-valued. They are the nor-
malized values of the integer indices in function of their respective ranges. The parameter
surfaceValue is the float-valued index of the surface within its family (0. represents the low-
est index value, 1. represents the highest index value).The parameters IFirst, JFirst, ILast
and JLast, are normalized in the same way, they indicate the node ranges for the surface.
— Example:
Creation of a surface at mid-domain for a constant I value:
StructuredSurfaceSave(1, 0, 0.5, 0, 0, 1, 1)
• LimitedCutPlaneSave(float p1, float p2, float p3, float d1, float d2, float d3)
— Operation (section 3-3.4, p. 3-10): creates and saves the cutting plane defined by the point
(p_x, p_y, p_z) and the normal direction (n_x, n_y, n_z).
• IggCurveLoadAndCut(string fileName)
— Associated menu item: Geometry / Create Cutting Surface Along Igg Curve....
— Operation (section 3-4.3 on page 3-15): loads an IGG™ curve and creates a revolution sur-
face into the active project.
• DeleteSurface(string name)
— Operation (section 3-3, p. 3-3): removes all representations of the surface in the active view.
If the surface is a cut, a mesh surface, a blade to blade surface or an iso-surface, all represen-
tations in other views are removed also and the surface is removed from the surface list.

7-5.14 Commands Related to Surface or Group Surface Selection


(section 3-3, p. 3-3)
Some of the functions described below are taking a variable number of arguments. If the arguments
to be passed to the command are contained in a list, the form apply(command,list) may be used to
call the command with the arguments contained in the list.

7-26 CFView™
CFView™ Command Description Macro Language

ex: for i in range(1,10):


mySurfacesList.append(CutPlaneSave(....))
apply(SelectFromProject, mySurfacesList)

• SurfaceRename(string oldName, string newName)


— Associated operation: surface or group renaming from the Surface Selection dialogue box.
— Operation (section 3-2, p. 3-1): change the name of the indicated surface or group from old-
Name into newName.
— Exception: raises an Attribute Error if newName is missing or is already used by another
surface or group. The error is raised also if oldName does not correspond to an existing sur-
face or group.
• [...] GetViewSurfaceList()
— Operation: this command returns the list of all the surfaces that are represented in the active
view. Note that for the surfaces that have been introduced as part of a group, only the group
name is included in the list.
• [...] GetViewActiveSurfacesList()
— Operation: this command returns the list of surfaces that are currently selected in the active
view.
• SelectFromView(string name1, string name2, ...)
— Operation (section 3-3, p. 3-3): activates the surfaces having names name1, name2, etc...
• SelectFromViewRegExp(string regexp), UnselectFromViewRegExp(string regexp)
— Operation: activates or inactivates the surfaces having names matching the regular excep-
tions regexp (for example ‘*’ will match all, ‘*solid*’ will match all solids, etc...).
• RemoveFromView(string name1, string name2, ...)
— Operation (section 3-3, p. 3-3): removes the surfaces having names name1, name2, etc from
the active view. The operation only removes the representation on the indicated surface. The
surface will still exist but is not displayed (e.g. a colour contour is no longer displayed).
Instead of using the command RemoveFromView you could also use the options Select-
FromView and DeleteAll options to remove all representations of the selected surfaces.
Finally there is also the option DeleteAllRepresentationsFromView.
• RemoveFromViewRegExp(string regexp)
— Associated menu item: -
— Operation: removes the surfaces having names matching the regular exceptions regexp (for
example ‘*’ will match all, ‘*solid*’ will match all solids, etc...) from the active view. The
operation only removes the representation on the indicated surface. The surface will still
exist but is not displayed (e.g. a colour contour is no longer displayed). Instead of using the
command RemoveFromView you could also use the options SelectFromView and
DeleteAll options to remove all representations of the selected surfaces. Finally there is also
the option DeleteAllRepresentationsFromView.
• [...] GetProjectSurfaceList()
— Operation: returns the list of all the surfaces that are existing in the project. Note that for sur-
faces that are part of a group, both the group name and all its members are included in the
list.
• SelectFromProject(string name1, string name2, ...)
— Associated menu item: Geometry / Select Surfaces....

CFView™ 7-27
Macro Language CFView™ Command Description

— Operation (section 3-3, p. 3-3): selects the surfaces having names name1, name2, etc from
the project into the active view.
• SelectFromProjectRegExp(string regexp)
— Operation: activates the surfaces from the project having names matching the regular excep-
tions regexp (for example empty string (‘’) will match all and simply typing ‘solid’ will
match all solids etc...).
• SelectTypeFromProject(string type), UnselectTypeFromView(string type)
— Operation: activates or inactivates all the surfaces which have a boundary condition type
identic to the specified one (only the first 3 letters are considered, i.e. type may be sol, con,
ext, inl, out, rot, mir, per, sin or sng).
• DeleteFromProject(string name1, string name2, ...)
— Operation (section 3-3, p. 3-3): deletes the surfaces having names name1, name2, ..., from
the project (and also from the active view). DeleteFromProject removes all representations
on the indicated surfaces in all the views of the project AND deletes the surface(s) from the
project ONLY IF the surface was created during the project session. The names name1,
name2,..., can also be the name of a group of surfaces: DeleteFromProject deletes the
groups but not the surfaces inside.
• DeleteFromProjectRegExp(string regexp)
— Operation: deletes the surfaces from the project having names matching the regular excep-
tions regexp (for example ‘*’ will match all, ‘*solid*’ will match all solids etc...). Delete-
FromProject removes all representations on the indicated surfaces in all the views of the
project AND deletes the surface(s) from the project ONLY IF the surface was created during
the project session.
— (e.g. a cutting plane).
• SurfaceActivate(float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
— Associated menu item: Geometry / Activate Surface ().
— Operation (section 3-3.3, p. 3-9): toggles the selection status of the surface intersected by the
line defined by the points (p1x,p1y,p1z) and (p2x,p2y,p2z). If more than one surface is inter-
sected, the closest one to the camera is selected (section 2-5.2, p. 2-16).

 The arguments of the function SurfaceActivate are (p1x,p1y,p1z,p2x,p2y,p2z). p1and


p2 are two points in Cartesian coordinates. When using the function in the meridional
view, (Z,R,Theta) coordinates are used to locate a point
(p1z,p1r,p1theta,p2z,p2r,p2theta).
• CreateSurfaceGroup(string groupName, string surfaceName, ...)
— Operation (section 3-2.4, p. 3-2): create a group with the specified name and containing the
surfaces provided in argument.
• SelectedSurfacesAdd(string surfaceName)
— Associated item: Right-click on the selected surfaces / Make Active
— Operation: add the selected surfaces to the current selected surfaces list.
• SelectedSurfacesRemove(string surfaceName)
— Associated item: Right-click on the selected surfaces / Make Inactive
— Operation: remove the selected surfaces to the current selected surfaces list.
• GroupRemove(string groupName)
— Operation (section 3-2.4, p. 3-2): suppresses a group, leaving intact all its members.

7-28 CFView™
CFView™ Command Description Macro Language

7-5.15 Commands Related to Blade to Blade Definition


• SetHubSurfaces(string name1, string name2, ...), SetShroudSurfaces(string name1, string
name2, ...)
— Associated item: Geometry / Set Hub and Shroud...
— Operation (section 5-2.1, p. 5-1): declares the provided surfaces name list as the hub (or the
shroud) of a turbomachine.
— Exception: raises an Attribute Error if the hub and shroud definitions have already been pro-
vided and some representations using on this definition have been created (e.g.: opening of a
blade to blade view, creation of a cutting surface defined in blade to blade coordinates).

 The call to these function must be validated by a call to ComputeStmFromHubAnd-


Shroud()
• ComputeSTMFromHubAndShroud(int mode)
— Associated item: Geometry / Set Hub and Shroud
— Operation (see previous command definition): validates the definition of the hub and shroud
groups of surfaces. This command must be called before creating representations that are
using the hub and shroud definitions. The mode value is used to define an additional opera-
tion:
mode=0: a blade to blade full sized view is opened
mode=1: a blade to blade half-sized view is opened
mode=2: should not be used in macro script
mode=3 or any other value: no blade to blade view is opened.
— Exception: raises an Attribute Error if the hub and shroud surfaces lists do not allow to com-
pute blade to blade coordinates.

7-5.16 Commands Related to Surface Rendering


These commands apply to the active surfaces of the active view. No action is performed if no view
is active.
• RenderHidden(), RenderUniform(), RenderFlat(), RenderGouraud(), RenderPhong(),
RenderNone()
— Associated menu items: Render / and Render / Shading.
— Operation (section 3-5, p. 3-18): applies specified rendering option (either hidden line
removal, uniform shading, etc...) to all active surfaces in the active view.
• RenderToggleMarker(), RenderToggleEdge(), RenderToggleFace()
— Associated menu item: Render / Visibility.
— Operation: toggles visibility status of the grid nodes (markers), edges, or faces.
• RenderToggleMarkerLight(), RenderToggleEdgeLight(), RenderToggleFaceLight()
— Associated menu item: Render / Light.
— Operation: toggles lighting status of the grid nodes (markers), edges or faces.
• UpdateMaterial(Color diffuse, Color specular, float gloss, Color transmission, float specu-
larAmount, bool hasEnvironementMapping, string reflection,map, float reflection-
Amount)
— Associated menu item: Update / Surface Material....
— Operation (section 3-5.11, p. 3-21): sets the reflection properties of all active solid surfaces.

CFView™ 7-29
Macro Language CFView™ Command Description

— diffuse: the color of the material in HSV format. Default is (210.857,0.25,0.54902).


— specular: the color of the specular highlight of the material. Default is white color (0,0,1).
— gloss: the extend of the specular highlight of the material. Range: [1,30]. Default is 5.
— transmission: the color used for transparent object. The r,g,b values should be the same.
default is black (0, 0, 0).
— specularAmount: the specular amount of the surface. Range[ 0,1]. Default is 1.0.
— hasEnvironmentMapping: 1 if the surface has environement mapping, 0 otherwise.
Default is 0 ( no environment mapping)
— reflectionMap: the name of the environment map. Default is “metal-polished”. The list of
available environment maps is:
metal - polished, metal - steel, metal - chrome, metal - alu, mirror - sky, mirror - mountain,
mirror - trees, mirror - hall, shading - gradient, shading - tone, shading - anisotropic.
— reflectionAmount: the amount of reflection. Range[0,1]. Default is 0.85.
• DisplayShadow(bool itDisplayShadow)
— Associated menu item: View / Parameter / Display shadow
— Operation: displays or hides the shadow under the geometry (ItDisplayShadow = 0 : hides
shadow, itDisplayShadow = 1 : shows shadow)
• UpdateLight( float positionX, float positionY, float positionZ, float directionX, float direc-
tionY, float directionZ, bool itIsLocalLight, float lightIntensity)
— Operation: changes the parameters of the light of the active view.
— positionX, positionY, positionZ: position of the point light in camera space. The length of
the vector position gives the relative distance r to the center of rotation. A bounding box
enclosing the scene is computed. The extent of the bounding box is b. The real distance of
the point to the center of rotation is given by the formula 1.5 * b * r.
— directionX, directionY, directionZ: normalized vector representing the direction of a direc-
tional light
— itIsLocalLight: 0 = directional light; 1 = omni light
— lightIntensity: represents the intensity of the light. The range is [0,1] and the default is 1.0.
Corresponds to the slide “light intensity” divided by 100.
— Additional note:
- With directional light, only the direction is taken into account (not the position).
- With omni light, only the position is taken into account( not the direction).
• SetOpacity( float opacityValue)
— Operation: sets the opacityValue to all the active surfaces and to all the active color con-
tours.
— opacityValue: represents the opacity of the surface. Range:[ 0,1] (0: completely transparent,
1: completely opaque)
• DeleteSolid()
— Associated menu item: Update / Delete / Solid.
— Operation: deletes surface rendering on all active surfaces.

7-5.17 Commands Related to Quantity Selection


These commands trigger a Name Error if the quantity is unknown.

7-30 CFView™
CFView™ Command Description Macro Language

• int QntFieldExist(string name)


— Operation: the function is testing if a quantity with the specified name is existing in one or
several domains. If the quantity is existing the function returns a non null value. This macro
can not be used for solid quantities (see macro QntSurfaceExist for this purpose).
• int QntSurfaceExist(string name)
— Operation: the function is testing if a solid quantity with the specified name is existing on
one or several surfaces. If the quantity is existing the function returns a non null value.
• QntFieldScalar(string quantity), QntFieldVector(string quantity)
— Associated menu item: Quantity / Field Data.
— Operation (section 4-2.1.1, p. 4-3): selects quantity as the active quantity.
• QntFieldLoad(string quantity)
— Operation (section 4-2.2.1, p. 4-12): if the specified quantity is not already loaded from file,
it is loaded.
— Exception: a ValueError is produced if the name is not valid.
• QntFieldRemove(string quantity)
— Associated item: the Quantity Status dialogue box.
— Operation (section 4-2.2.3, p. 4-13): if the specified quantity is a derived quantity, it is
removed. Otherwise, no operation is performed.
— Exception: a ValueError is produced if the quantity name is not valid.
• QntFieldDerived(int mode, string name, string definition [,string definition2, string
definition3])
— Associated menu item: Quantity / Field Data / Define New Quantity...
— Operation: creates a new field quantity named ‘name’. The parameter ‘mode’ specifies the
new quantity type: 0 for a scalar, 1 for a vector with a definition expressed as a combination
of vectorial quantities or 2 for a vector with a definition specified component by component.
If ‘mode’ has a value of 2, the parameters ‘definiton2’ and ‘definition3’ must be present,
otherwise they can be omitted.
• FieldCurl(string quantity), FieldDivergence(string quantity), FieldGradient(string quan-
tity)
— Associated menu items: Quantity /Field Data / Curl, Divergence, Gradient.
— Operation: (section 4-2.1.7, p. 4-10) calculates the Curl, Divergence or Gradient of the oper-
and field and creates a new field quantity named respectively: Curl, Grad, Div followed by:
(name of the operand field).
• QntSolidScalar(string quantity), QntSolidVector(string quantity)
— Associated menu item: Quantity / Solid Data.
— Operation (section 4-2.1.3, p. 4-7): selects quantity as the active quantity.
• ThermoDynDerQnt(string quantity)
— Associated menu item: Quantity / Thermodynamics
— Operation (section 4-2.1.4 on page 4-7): selects quantity as the active quantity.
• QntPlot(string quantity)
— Associated menu item: Quantity / Plot Data.
— Operation (section 4-5, p. 4-38): creates a new plot view with the plot data quantity and
makes it the active view.
• string QntValid(string quantity), string QntValidCompare(string quantity)

CFView™ 7-31
Macro Language CFView™ Command Description

— Associated menu item: Quantity / Validation Data.


— Operation (section 4-4, p. 4-37): creates a new plot view with the validation data, makes it
the current view. Furthermore, QntValidCompare extracts and draws collocated simulated
data. The functions are returning the name of the view in which the data are inserted.
• QntValidLoad(string fileName)
— Associated menu item: File / Load Validation Data...
— Operation (section 2-4, p. 2-15): loads the indicated file and inserts the validation data it
contains.
• QntSolidRemove(string quantity)
— Operation: unloads the quantity and place a small bitmap file (unload icon) adjacent to the
quantity in Quantities/Solid Data box in the QAP.
• QntSolidRemoveAll()
— Operation: unloads all solid quantities in Quantities box and places an unload icon beside
each solid quantity.
• QntFieldRemove(string quantity)
— Operation: unloads the quantity and place a small bitmap file (unload icon) adjacent to the
quantity in Quantities box in the QAP.
• QuantityFieldRemoveAll()
— Operation: unloads all field quantities in Quantities box and places an unload icon beside
each field quantity
• ParticuleTracesAll(), ParticuleTracesOnGrid(int Imin, int Imax, int Istep, int Jmin, int
Jmax, int Jstep)
— Associated menu item: Quantity / Particle Traces
— Operation (section 4-8, p. 4-54): adds the representation of the particle traces data related to
any of the active INLET boundaries. ParticuleTracesOnGrid restricts the traces to those on a
subset of cells whose index is defined by a I index between Imin and Imax, one each Istep
and a J index between Jmin and Jmax, one each Jstep.

7-5.18 Commands Related to Quantity Probing


• float / [float, float] / [float, float. float] ProbeIJK(int domId, int i, int j, int k):
Operation: this function returns the value of the active quantity at the grid point of the domain
domId and whose indices are provided (domId=1 correspond to the first domain). The required
number of indices depends on the grid type:
— for 3D structured grids i, j and k are required (values between 1 and the maximum number of
grid nodes should be provided);
— for 2D structured grids (including 2D grids issued from Turbomachinery mode, see section
5-4.2), only i and j are important. In that case, one can use whatever value for k.
For instance: ProbeIJK(1,1,0) will give the same result as ProbeIJK(1,1,1).
— for unstructured grids, only i is important.
The returned value depends on the grid dimensionality and on the type of the active quantity. If
the active quantity is a scalar, the returned type is a float. If the active quantity is a vector, the
returned type is [float, float, float] in 3D grids and [float, float] in 2D grids.
• float / [float, float] / [float, float. float] ProbeXYZ(float x, float y, float z):
Operation: this function returns the value of the active quantity at the point whose geometric
position is provided. With 2D grids, the z parameter is not used and may be omitted.

7-32 CFView™
CFView™ Command Description Macro Language

The returned value depends on the grid dimensionality and on the type of the active quantity. If
the active quantity is a scalar, the returned type is a float. If the active quantity is a vector, the
returned type is [float, float, float] in 3D grids and [float, float] in 2D grids.
— Error: raises a ValueError if no quantity is selected or if the point falls outside of the meshed
domain.
• float / [float, float] / [float, float. float] ProbeTIJK(int domId, int i, int j, int k):
Operation: for unsteady projects with N time steps reconstructed from a project with harmonics,
this function returns an array of N+1 values of the active quantity. The first value is the time
step, the rest are the values in time of the active quantity at the grid point of the domain domId
and whose indices are provided (domId=1 correspond to the first domain). The required
number of indices depends on the grid type:
— for 3D structured grids i, j and k are required (values between 1 and the maximum number of
grid nodes should be provided);
— for 2D structured grids, i and j are required;
— The returned value depends on the grid dimensionality and on the type of the active quantity.
If the active quantity is a scalar, the returned type is a float. If the active quantity is a vector,
the returned type is [float, float, float] in 3D grids and [float, float] in 2D grids.
• QuantitySetScalarIJK(string quantity_name, int domain_nb, float value, float i, float j,
float k)
— Operation: this will set the value of scalar field with name quantity_name at cell index (i, j,
k) in domain domain_nb to value.
• QuantitySetVectorIJK(string quantity_name, int domain_nb, float val_X, float val_Y, float
val_Z, float i, float j, float k)
— Operation: this will set the value of vector field with name quantity_name at cell index (i, j,
k) in domain domain_nb to (val_X, val_Y, val_Z).
• [float, float] QuantityRangeDomain(int domId, float Imin, float Imax, float Jmin, float
Jmax, float Kmin, float Kmax)
Operation: this function returns the minimum and maximum values of the active quantity in the
specified domain range.
The domain range is specified by the arguments:
— domId is the domain number (first domain has the number 1).
— Imin and Imax specify the normalised node range in the I direction. Imin and Imax must
have a value between 0 and 1 (0 meaning the first node index and 1 meaning the last one).
These values are denormalized automatically.
— Jmin and Jmax specify the normalised range in the J direction;
— Kmin and Kmax specify the normalized range in the K direction.
If the quantity is a vector, the returned range is the range of the amplitude.
— Example, this command can be used to obtain the quantity range at a mid-range grid surface
(mid range in the I direction)

QuantityRangeDomain(1, 0.5, 0.5, 0,1 0,1)

• float QuantityStdDevDomain(int domId, float Imin, float Imax, float Jmin, float Jmax,
float Kmin, float Kmax)
— Operation: this function returns the standard deviation of the active quantity over a domain
range. The domain range is specified as explained here above for the QuantityRangeDo-
main command.
• [float, float] QuantityRangeActiveSurfaces()

CFView™ 7-33
Macro Language CFView™ Command Description

— Operation: this function returns the minimum and maximum values of the active quantity on
the active surfaces. If the active quantity is a vector, the standard deviation is the standard
deviation of the vector magnitude.
• float QuantityStdDevActiveSurfaces()
— Operation: this function returns the standard deviation of the active quantity on the active
surfaces.If the active quantity is a vector, the standard deviation is the standard deviation of
the vector magnitude.
• SaveActiveSurfaces(string fileName)
— Associated menu item: Representation / Export Active Surfaces...
— Operation: this function exports the values of the active quantity on the selected surfaces.
The output is stored in the file called fileName. The first line represents the name of the sur-
face, the second line contains the number of coordinates (X,Y,Z), the second number is there
for backward compatibility and shows the number of colums for the quantity (1 for a scalar
and vector), then the number of points is stored and the last information is the name of the
quantity between two “|”.

7-5.19 Commands Related to Scalar Quantity Representations


Unless stated differently, these commands raise an Attribute Error if the selected quantity is not a
scalar.
• DeleteAll()
— Associated menu item: Update / Delete / All.
— Operation: deletes all representations of the active quantity on the active surfaces.
• SelectBoundaryCurves(string name)
— Associated menu item: Right-click on the curve in the active view.
— Operation: selects the curves of the geometry defined by name.
• UpdateLineType(LineType t)
— Associated menu item: Update / Line Type Editor....
— Operation: sets last representation line type to t (section 7-5.29, p. 7-55 for argument
description).
• UpdateMarkerType(MarkerType m)
— Associated menu item: Update / Marker Type Editor....
— Operation: sets last representation marker type to m (section 7-5.29, p. 7-55 for argument
description).
• UpdateCurveType(CurveType c)
— Associated menu item: Update / Curve Type Editor....
— Operation: sets last representation type and marker type to c (section 7-5.29, p. 7-55 for
argument description).
• UpdateSectionCurveType(CurveType c)
— Operation: sets last representation type and marker type to c (section 7-5.29, p. 7-55 for
argument description) to all the curves of the cartesian plot.
• ThickerCurveType(), ThinnerCurveType()
— Operation: increases or decreases the line width and markers size for the currently active
curves.

7-34 CFView™
CFView™ Command Description Macro Language

7-5.19.1 Local Values


• RprLocalValue(float px, float py, float pz, float dx, float dy, float dz)
— Associated menu item: Representation / Local Value
— Operation (section 4-3.1.1 on page 4-15): displays a local value (or local vector) at the inter-
section between the ray defined by point(px,py,pz) and direction(dx,dy,dz) and the active
surfaces of the active view.
• SaveLocalValues(string fileName)
— Associated menu item: Representation / Export Local Values...
— Operation: exports all local values corresponding to the active quantity in the file fileName.
• DeleteLocalValue()
— Associated menu item: Update / Delete / Local Value.
— Operation: deletes the local values of the active quantity on the active surfaces.
• UpdateDoubleFormat(DoubleFormat f)
— Associated menu item: Update/ Numbers Format Editor...
— Operation (section 4-10.5, p. 4-61): sets the number format of the active local value to f (sec-
tion 7-5.29, p. 7-55 for argument description).
• UpdateTextType(TextType t)
— Associated menu item: Update / TextType Editor...
— Operation (section 4-10.3.1, p. 4-57): sets the text type of the active local values.

7-5.19.2 Color Contours


• SclContourFlat(), SclContourSmooth(), SclContourStrip(), SclContourNone()
— Associated menu item: Representation / Color Contour.
— Operation (section 4-3.3, p. 4-18): applies specified quantity coloring option (either flat,
smooth, strip or no contour).
• SclContourTFlat(float min, float max, [float min, float max]), SclContourTSmooth(float
min, float max, [float min, float max]), SclContourTStrip(float min, float max, [float min,
float max])
— Associated menu item: Representation / Color Contour
— Operation: applies specified quantity coloring option (either flat, smooth or strip). Only the
part of the surfaces having value between min and max will be visible. It is allowed to spec-
ify one or two ranges.
• SclContourFilled(), SclContourWireFrame(), SclContourMarkersOnly()
— Operation: sets the type of coloring for the active color contours: respectively a filled sur-
face, a wire frame or only the markers at grid points location.
• SclContourToggleMarker(), SclContourToggleEdge(), SclContourToggleFace()
— Associated menu item: Representation / Color Contour / Visibility On/Off
— Operation: toggles the visibility status of the grid points, edges or faces of the color contour
representations on the active surfaces.
• SclContourToggleMarkerLight(), SclContourToggleEdgeLight(), SclContourToggleFace-
Light()
— Associated menu item: Representation / Color Contour / Light On/Off.

CFView™ 7-35
Macro Language CFView™ Command Description

— Operation: toggles the lighting status of the points, edges or faces of the current color con-
tour representations on the active surfaces.
• DeleteContour()
— Associated menu item: Update / Delete / Color Contour.
— Operation: deletes the color contour representations on the active surfaces.

7-5.19.3 Isolines
• SclIsolinePoint(float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
— Associated menu item: Representation / Isolines / Local Isoline.
— Operation (section 4-3.2.1, p. 4-16): draws the isolines containing the intersection between
the line defined by the points (p1x,p1y,p1z) and (p2x,p2y,p2z) and each of the active sur-
faces.
• SclIsolineValue(float value)
— Associated menu item: Representation / Isolines / Local Isoline.
— Operation (section 4-3.2.1, p. 4-16): draws the ‘value’ isoline on each of the active surfaces.
• SclIsolineRange(float min, float max, float inc)
— Associated menu item: Representation / Isolines / Isolines...
— Operation (section 4-3.2.2, p. 4-17): draws a set of isolines starting from the value min to the
value max with increment inc.
• SclIsolineMulti(2, 4, float min, float max, float inc, int color)
— Associated menu item: Representation / Isolines / Isolines...
— Operation (section 4-3.2.2, p. 4-17): draws a set of isolines starting from the value min up to
the value max with increment inc. The isolines are colored according to their value (Color
=0) or not (color=1).
• SclIsolineColorLock(int c)
— Associated menu items: Representation/ Isoline / Color Contour and Color Uniform.
— Operation: sets the coloring attribute to color contour (c=0) or to color uniform (c=1).
• DeleteIsoline()
— Associated menu item: Update / Delete / Isoline.
— Operation: deletes the isolines on the active surfaces.

7-5.19.4 Iso-Surfaces
• SclIsoSurfaceValue(float value)
— Associated menu item: Representation / Iso-Surface.
— Operation (section 4-3.5, p. 4-27): builds an iso-surface based on a field value.
• SclIsoSurfacePoint(float p1x, float p1y, float p1z, float p2x, float p2y, float p2z)
— Associated menu item: Representation / Iso-Surface.
— Operation (section 4-3.5, p. 4-27): builds iso-surfaces containing the intersection of the line
defined by the points (p1x,p1y,p1z) and (p2x,p2y,p2z) and the active surfaces.
• SclIsoSurfaceSave([float value])
— Associated menu item: Representation / Iso-Surface Save.

7-36 CFView™
CFView™ Command Description Macro Language

— Operation (section 3-4.5, p. 3-17): saves an iso-surface and includes it into the project and
current view surface sets. If a value is provided, the iso-surface corresponding to that value
is computed and saved, otherwise, the iso-surface currently represented is saved. The macro
also resturns the name of the created iso-surface.
— Exceptions: if no scalar quantity or if no current iso-surface.
• DeleteIsoSurface()
— Associated menu item: Update / Delete / Iso-Surface.
— Operation: deletes the current iso-surface.

7-5.19.5 Plot Generation


These commands add plot curves in the plot view associated to the active quantity. If the plot view
is not existing, it is created. If no quantity is selected, an Attribute Error is raised.
• string RprSection(float p1x, float p1y, float p1z, float p2x, float p2y, float p2z, float dx, float
dy, float dz, [string sectionName, int coordSys])
— Associated menu item: Representation / Cartesian Plot / Along Section
— Operation (section 4-3.6.3, p. 4-28): if the current quantity is a scalar, displays a plot curve
of the intersection between the plane defined by the point (p1x,p1y,p1z), the point
(p2x,p2y,p2z), the direction of the plane (dx, dy, dz) (it refers to a vector belonging to the
plane) and the active surfaces.
The sectionName argument is optional and indicates the name of the section.
The coordSys argument is optional and specifies the coordinates system in which the posi-
tion and direction are provided. If no value is provided, it is assumed that the position and
direction are provided in the same coordinates system as the active view.
The function returns the name of the cartesian plot view in which the curve is inserted.
• string RprSclSectionInPlot(float p1x, float p1y, float p1z, float p2x, float p2y, float p2z, float
dx, float dy, float dz, string sectionName, int coordSys, string surfaceName)
— Operation (section 4-3.6.3, p. 4-28): this command is the same as the previous one, except
that the intersection is made between the plane and the surface whose name is provided.
• string BladeSection(float s)
— Operation: adds to the active quantity plot (create it if no already existing) a plot of the
active quantity at span height s. The command returns the name of the view in which the
curve is inserted.
• string SclPlotNormalizedGridLine(int lineIndex, float lineValue, float startNode, float end-
Node, [string surfName])
— Associated menu item: Representation / Cartesian Plot/ Along Grid Line...
— Operation (section 4-3.6.4, p. 4-29): creates a plot curve along a grid line. The grid line is a
line along I constant if lineIndex=0 or along J constant if lineIndex=1 (where I and J are the
local grid direction on the surface). The argument lineValue is the normalized index of the
line:
lineValue=0 for the first line on the surface,
lineValue=0.5 for the line with index equals to the half of the maximum index,
lineValue=1.0 for the line with the maximum index value.
The startNode and endNode arguments are the normalized grid point indices that indicate
the range of the grid nodes to consider (startNode=0 and endNode=1 means the whole grid
line).
• string SclPlotGridLine(2, 4, int index, int i, int min, int max)
— Associated menu item: Representation / Cartesian Plot/ Along Grid Line...

CFView™ 7-37
Macro Language CFView™ Command Description

— Operation (section 4-3.6.4, p. 4-29): adds to the active quantity plot view (creates it if not
existing) a plot curve along the grid line i from node number min to node number max
(index = 0 or 1 for a line along surface index I or J, respectively). The two first parameters
must be present with their prescribed values (2 and 4).The function returns the name of the
cartesian plot view in which the curve is inserted.
• string SclPlotBoundarySolid()
— Associated menu item: Representation / Cartesian Plot / Along Solid Boundary.
— Operation (section 4-3.6.2, p. 4-28): adds to the active quantity plot view (creates it if not
existing) a plot of the active quantity along active solid surfaces boundaries.The function
returns the name of the cartesian plot view in which the curve is inserted.
• string SclPlotBoundary()
— Associated menu item: Representation / Cartesian Plot / Along Boundary.
— Operation (section 4-3.6.1, p. 4-28): adds to the active quantity plot view (creates it if not
existing) a plot of the active quantity along active surfaces boundaries.The function returns
the name of the cartesian plot view in which the curve is inserted.
• SelectPlotCurves(string name)
— Operation: selects the specified plot curves.
• DeletePlotCurves(string name)
— Operation: deletes the specified plot curves.

7-5.19.6 Stream Lines


A streamline represents a line created from the velocity vector but colored by the selected scalar
quantity. These commands raise an Attribute Error if the current quantity is not scalar.
• StreamLineLocal (float px, float py, float pz, float dx, float dy, float dz)
— Associated menu item: Representation / Stream Line / Local.
— Operation (section 4-6.3.1, p. 4-43): draws stream lines starting at each intersection between
an active surface and the line defined by the points (px, py, pz) and the direction (dx, dy, dz).
• StreamLineSection(float p1x, float p1y, float p1z, float p2x, float p2y, float p2z, float dx,
float dy, float dz)
— Associated menu item: Representation / Stream line / Section
— Operation (section 4-6.3.2, p. 4-43): draws stream lines starting at the intersection between
the plane defined by point (p1x,p1y,p1z), point (p2x,p2y,p2z) and direction (dx, dy, dz) and
the active surfaces of the active view.
• StreamLineSectionPoints(int n)
— Associated menu item: Representation / Stream line / Section.
— Operation (section 4-6.3.2, p. 4-43): sets the number of section points being stream line
starting points.
• StreamLineGridNodes(2, 4, int index, int i, int min, int max)
— Associated menu item: Representation / Stream line / From Grid Line...
— Operation (section 4-6.3.3, p. 4-44): draw stream lines starting at the nodes of the grid line i
(index = 0 or 1 for a line along local I or J, respectively) from node number min to node
number max.
• StreamLineType ()

7-38 CFView™
CFView™ Command Description Macro Language

— This macro is here for backward compatibility. It is only recorded from older CFView™ ver-
sion, and should not be used anymore. It has been replaced by 5 new macros:
StreamLineRepresentation, StreamLineAdvancedParameters, StreamLineComputa-
tionParameters, StreamLineCurveType, StreamLineSurfaceType).
• StreamLineCurveType(CurveType c)
— Operation: sets the streamline curve type for the active streamline (only used when the
"Line" representation is chosen).
— CurveType: standard curve settings (see section 7-5.29).
• StreamLineSurfaceType(SurfaceType m)
— Operation: sets the streamline surface property for the active streamlines (only used when
the "Ribbon"/"Tube" representations are chosen).
— SurfaceType: standard material settings (see section 7-5.29).
• StreamLineRepresentation(int representationType, int colorType, string colorQuantity,
float r0, float initialDirectionX, float initialDirectionY, float initialDirectionZ, int itHasVar-
iableSize, int itHasVariableTwist, float twistScaleFactor, float sizeScaleFactor, int TubeV-
erticesCount)
— Operation: sets the streamline representation parameters for the active selected quantity
— representationType: 0 = line, 1 = ribbon, 2 = tube (mandatory). Default is 0.
— colorType: 0 = uniform, 1 = custom quantity, 2 = velocity color (mandatory). Default is 0.
— colorQuantity: name of the selected scalar quantity.
— ro: size of the tube/ribbon. Default is 1.
— initialDirectionX, initialDirectionY, initialDirectionZ: direction of the first normal of the
ribbon/tube. Default is 0,1,0.
— itHasVariableSize: 1 = variable size, 0 = uniform size. Default is 0.
— itHasVariableTwist: 1 = variable twist, 0 = uniform twist. Default is 0.
— sizeScaleFactor: multiplication factor to emphasis size changes. Real positive values are
allowed. Default is 1.
— twistScaleFactor: multiplication factor to emphasis twist changes. All values are allowed.
Default is 1.
— tubeVerticesCount: the number of vertices of the polygonal basis of a tube. All integer
value >= 3 are allowed. Default is 8.
• StreamLineAdvancedParameters(bool itHasCoincidentPointRemoval, bool itHasLapla-
cianFilter, bool itHasTwistSubdivision, float minimumDistance, int laplacianFilterPass-
Count, int laplacianFilterKernelSize, float twistSubdivisionMinimumAngle, int
twistSubdivisionMaximumPoints)
— itHasCoincidentPointRemoval: 1 = coincident point removal, 0 = no coincident point
removal. Default is 1.
— itHasLaplacianFilter: 1 = laplacian filter, 0=no laplacian filter. Default is 0.
— itHasTwistSubdivision: 1 = twist subdivision, 0 = no twist subdivision. Default is 0,
— minimumDistance: coincident point removal distance. Default is 0.01.
— laplacianFilterPassCount: number of passes of laplacian filtering. Default is 1. (only used
when itHasLaplacianFilter = 1)
— laplacianFilterKernelSize: size of the laplacian filter kernel. Default is 3. (only used when
itHasLaplacianFilter = 1)

CFView™ 7-39
Macro Language CFView™ Command Description

— twistSubdivisionMinimumAngle: minimum twist angle threshold in degree. All angles


greater than twistSubdivisionMinimumAngle will be refined (only used when itHasTwist-
Subdivision = 1 )
— twistSubdivisionMaximumPoints: maxiumum number of points inserted when refining
(only used when itHasTwistSubdivision = 1)
• StreamLineComputationParameters(int pointsLineMax, int pointsCellMax, int pointsCel-
lAverage, int mode, int direction, int sectionPoints, string vectorQuantity )
— Operation: sets the streamline computation parameters for the active selected quantity
— pointsLineMax: maximum number of curve points. Default = 2000.
— pointsCellMax. Maximum number of curve points in a cell. Default = 20.
— pointsCellAverage. Average number of curve points in a cell. Default = 4.
— mode: 0 = volume, 1 = surface. Default = 0
— direction: 1 = forward, -1 = backward, 0 = both. Default = 1.
— sectionPoints: number of points when creating a VecLineSection. Default = 4,
— vectorQuantity: the vector quantity used to compute the stream line
• StreamLineArrowParameters (bool visibility, float size, float density)
— Associated menu item: Representation / Streamline / Parameters...
— Operation: this macro changes the default arrow parameters for all streamlines to be drawn.
• RprLocalValueOnStreamline()
• SelectStreamLineCurves(string Names)
— Associated menu item: Mouse left-clicking in the graphics area while holding <Ctrl>.
— Operation: selects the streamlines with the corresponding names.
• UpdateStreamLineArrowParameters(bool visibility, float size, float density)
— Operation: changes the arrow parameters for all the selected streamlines. This is executed
from Parameters... dialog box when right click is performed on selected streamlines.
• UpdateStreamLineRepresentation(int representationType, int colorType, string
colorQuantity, float r0, float initialDirectionX, float initialDirectionY, float initialDirec-
tionZ, int itHasVariableSize, int itHasVariableTwist, float twistScaleFactor, float sizeScale-
Factor, int TubeVerticesCount)
— Associated menu item: Mouse right-clicking in the graphics area / Parameters...
— Operation: updates the representation parameters for the selected streamlines (see macro
StreamLineRepresentation for the complete description of the parameters, section 7-5.19).
• UpdateStreamLineAdvancedParameters(bool itHasCoincidentPointRemoval, bool itH-
asLaplacianFilter, bool itHasTwistSubdivision, float minimumDistance, int laplacianFil-
terPassCount, int laplacianFilterKernelSize, float twistSubdivisionMinimumAngle, int
twistSubdivisionMaximumPoints)
— Associated menu item: Mouse right-clicking in the graphics area / Parameters...
— Operation: updates the advanced parameters for the selected streamlines (see macro Stream-
LineAdvancedParameters for the complete description of the parameters, section 7-5.19).
• UpdateStreamLineCurveType(CurveType c)
— Operation: updates the streamline curve type for the active streamline (only used when the
"Line" representation is chosen).
— CurveType: standard curve settings (see section 7-5.29).
• UpdateStreamLineSurfaceType(SurfaceType m)

7-40 CFView™
CFView™ Command Description Macro Language

— Operation: updates the streamline surface property for the active streamlines (only used
when the "Ribbon"/"Tube" representations are chosen).
— SurfaceType: standard material settings (see section 7-5.29).

7-5.20 Commands Related to Vector Quantity Representations


• DeleteAll()
— Associated menu item: Update / Delete / All.
— Operation: deletes all representations of the active quantity on the active surfaces.

7-5.20.1 Local Vector


• RprLocalValue(float px, float py, float pz, float dx, float dy, float dz)
— Associated menu item: Representation / Local Vector
— Operation (section 4-3.1.1, p. 4-15): displays a local value (or local vector) at the intersec-
tion between the ray defined by point(px,py,pz) and direction(dx,dy,dz) and the active sur-
faces of the active view.

7-5.20.2 Vectors Representations


These commands raise an Attribute Error if the current quantity is not vectorial.
• VectorAll(int Imin, int Imax, int Istep, int Jmin, int Jmax, int Jstep)
— Associated menu item: Representation / Vector On Grid Nodes.
— Operation (section 4-6.1.2, p. 4-39): adds the quantity vectors on the active surfaces. Vectors
are drawn on nodes between Imin and Imax, one each Istep in first direction and between
Jmin and Jmax, one each Jstep in the second direction.
• VectorAllGridNodes()
— Associated menu item: Representation / Vector On Grid Nodes.
— Operation (section 4-6.1.2, p. 4-39): adds the quantity vectors on the active surfaces.
• VectorNormalizedGridNodes(float iMin, float iMax, int iStep, float jMin, float jMax, int
jStep, [string surfaceName])
— Associated menu item: Representation / Vector On Grid Nodes.
— Operation (section 4-6.1.2, p. 4-39): draws vectors arrows at the node specified on a surface:
iMin, iMax, jMin, jMax are specifying the subset of nodes in the I and J ranges. These are
normalized indices (with a value between 0 and 1).
iStep and jStep are specifying the density of the vectors arrows:
1 mean on all grid nodes,
2 means on 1 over 2 grid nodes,
i means on 1 over i grid nodes.
If no surfaceName argument is provided, the active surfaces set is considered, otherwise,
only the specified surface is considered.
• VecGridLine(2, 4, int index, int i, int min, int max)
— Associated menu item: Representation / Along Grid Line...
— Operation (section 4-6.1.5, p. 4-40): adds the vectors along the grid line i (index =0,1 or 2
for a line along I, J or K, respectively) from node number min to node number max.
• VectorNormalizedGridLine(int type, float value, float min, float max, [string sur-
faceName])

CFView™ 7-41
Macro Language CFView™ Command Description

— Associated menu item: Representation / Along Grid Line...


— Operation (section 4-6.1.5, p. 4-40): adds the vectors along the grid line. The type argument
is 0 for a line along the surface I direction or 1 for a line along the surface J direction. The
value argument is between 0 and 1 and is the normalized index of the grid line. The min and
max parameters are the normalized indices of the first and last grid nodes to consider along
the grid line. If no surfaceName argument is provided, the active surfaces set is considered,
otherwise only the specified surface is considered.
• VecThreshold(float min, float max)
— Associated menu item: Representation / Thresholded.
— Operation (section 4-6.1.3, p. 4-40): displays the vector arrows on all the active surfaces, but
restricts the display of the vectors to those having an amplitude between min and max.
• VectorComponentType(int type)
— Operation: sets the vector component to be represented in the next vector representations:
0 for full vector
1 the normal component
2 the tangent component
3 the normal component of the vectors from which the mean vector is substracted (the mean
vector is computed on the surface)
4 the tangent component of the vectors from which the mean vector is substracted.
• VectorScale(float scale)
— Operation: sets the scale at which the vectors arrows are drawn.
• VectorArrowHeadSize(float width, float height)
— Operation: sets the size of the vectors arrows heads. The size is specified in percent of the
total arrow length. The width and height arguments must be in the interval 0 - 100.
• VectorArrowHeadType(int type)
— Operation: sets the head type of the vectors arrows. A value of 1 is used to indicate filled
arrows heads (the default) and a value of 0 for non filled heads.
• VectorType(float denominator, float numerator, float arrowHeight, float arrowWidth, int
filledArrow, int color, int rprType)
— Associated menu item: Representation / Vector Type...
— Operation (section 4-6.2, p. 4-41): sets the vector representation scale factor to numerator/
denominator, arrow height and width, filled arrow heads (filledArrow =1) or not filled
arrows heads (filledArrow=0) and color according to the amplitude (color =1) or uniform
color (color =0). The parameter rprType specifies the type of vector representation: full vec-
tors (rprType=0), normal component (rprType=1), tangential component (rprType=2), nor-
mal difference (rprType=3) or tangential difference (rprType=4).
• RprSection(float p1x, float p1y, float p1z, float p2x, float p2y, float p2z, float dx, float dy,
float dz)
— Associated menu item: Representation / Section
— Operation (section 4-6.1.4, p. 4-40): displays the vectors on the intersection between the
plane defined by point (p1x,p1y,p1z), point (p2x,p2y,p2z) and direction (dx, dy, dz) and the
active surfaces of the active view.
• VectorColorLock(int p)
— Associated menu items: Representation / Color Contour and Color Uniform.
— Operation: sets the coloring mode for the next vectors to be represented in uniform color
(p=1) or in a color corresponding to their amplitude (p=0).

7-42 CFView™
CFView™ Command Description Macro Language

• DeleteVectors()
— Associated menu item: Update / Delete / Vectors
— Operation: deletes the vector representations on the active surfaces
• DeleteLocalVectors([string name])
— Operation: deletes the local vectors, the vectors on section and the vectors on grid lines.
Without argument, the command deletes the currently selected vectors. With an argument,
the command deletes the vector representation having the specified name.
• DeleteGridVectors([string name])
— Operation: deletes the vectors on grid nodes. Without argument, the command deletes the
currently selected vectors. With an argument, the command deletes the vector representation
having the specified name.

7-5.20.3 Vector Lines


(section 4-6.3, p. 4-43)
These commands raise an Attribute Error if the current quantity is not vectorial.
• VecLineLocal(float px, float py, float pz, float dx, float dy, float dz)
— Associated menu item: Representation / Vector Lines / Local.
— Operation (section 4-6.3.1, p. 4-43): draws vector lines starting at each intersection between
an active surface and the line defined by the points (px, py, pz) and the direction (dx, dy, dz).
• VecLineSection(float p1x, float p1y, float p1z, float p2x, float p2y, float p2z, float dx, float
dy, float dz)
— Associated menu item: Representation / Vector line / Section.
— Operation (section 4-6.3.2, p. 4-43): draws vector lines starting at the intersection between
the plane defined by point (p1x,p1y,p1z), point (p2x,p2y,p2z) and direction (dx, dy, dz) and
the active surfaces of the active view.
• VecLineSectionPoints(int n)
— Associated menu item: Representation / Vector line / Section.
— Operation (section 4-6.3.2, p. 4-43): sets the number of section points being vector line start-
ing points.
• VecLineGridNodes(2, 4, int index, int i, int min, int max)
— Associated menu item: Representation / Vector line / From Grid Line...
— Operation (section 4-6.3.3, p. 4-44): draw vector lines starting at the nodes of the grid line i
(index = 0 or 1 for a line along local I or J, respectively) from node number min to node
number max.
• DeleteVectorLines()
— Associated menu item: Update / Delete / Vector Lines.
— Operation: deletes the vector line representations associated to one of the active surfaces.
• VecLineMaxPoints(int maxPointsPerLine, int maxPointsPerCell, int AveragePointsPer-
Cell)
— Associated menu item: Representation / Vector line / Parameters...
— Operation (section 4-6.4, p. 4-44): sets the maximum number of points per line, per cell,
average number of points per cell for the computation of vector lines.
• VecLineSurface(int mode)

CFView™ 7-43
Macro Language CFView™ Command Description

— Associated menu item: Representation / Vector line / Parameters...


— Operation (section 4-6.4, p. 4-44): sets the mode of computation of vector lines as volumic
(mode = 0) or restricted to a surface (mode=1).
• VecLineDirection(int dir)
— Associated menu item: Representation / Vector line / Parameters...
— Operation (section 4-6.4, p. 4-44): sets the direction mode for the computation of vector
lines: backward (dir = -1), in both direction (dir=0) or forward (dir=1).
• VecLineColorLock(), VecLineColorContour()
— Associated menu item: Representation / Vector line / Parameters...
— Operation (section 4-6.4, p. 4-44): sets the vector line coloring mode to uniform or to
colored according to the local vector amplitude. This applies to the last created vector line
group. By default, the coloring is uniform.
• VecLineType(int maxPointsPerLine, int maxPointsperCell, int AveragePointsoercell, int
mode, int color, int dir, int modeOption, int sectionPoints, CurveType c)
— Associated menu item: Representation / Vector line / Parameters...
— Operation (section 4-6.4, p. 4-44): sets the parameters for vector lines computation: maxi-
mum number of points per line, per cell, average number of points per cell, volumic (mode =
0) or restricted to a surface (mode=1), backward (dir = -1), in both direction (dir=0) or for-
ward (dir=1). The parameters color and modeOption are not used. The number of vector
lines on a section is set to sectionPoints and the curve type to c.
• VecLineCartPlot()
— Associated menu item: right-click on the generated streamline or vector line colored by
a scalar quantity.
— Operation: created a Cartesian Plot for the generated streamline or vectorline according the
selected scalar.

7-5.21 Commands Related to Time Label


• SetTimeLabel(int b)
— Operation: displays (b=1) or remove (b=0) the time label in the active view.
• ToggleTimeLabel()
— Operation: displays if not visible or remove from the active view the time label.
• TimeLabelPosition(float x, float y)
— Operation: sets the position of the time label. The x and y values are normalized positions:
x=-1 and y=-1 is the lower left corner,
x=1 and y=1 is the upper right corner,
x=0 and y=0 is the centre of the view.
• TimeLabelTextType(TextType type)
— Operation: sets the text type attributes for the time label.

7-5.22 Commands for Computing Integrals on Surfaces


• float GmtArea()
— Associated menu item: Representation / Surface Integral / Surface Area

7-44 CFView™
CFView™ Command Description Macro Language

— Operation: returns the computed area of all the active surfaces ( ∫ dS ).


S

• float SclIntegral()
— Associated menu item: Representation / Surface Integral / Scalar Integral
— Operation: returns the scalar surface integral of the active quantity on the active sur-


faces ( q ⋅ dS ) .
S
— Exceptions: having either no active quantity or a vector quantity as active quantity will trig-
ger a Type Error.
• float SclAverage()
— Associated menu item: Representation / Surface Integral / Scalar Average
— Operation: returns the scalar average value of the current scalar quantity. It is equivalent to
the ratio of the results returned by the commands SclIntegral() and GmtArea() (see here
above for the mathematical definitions).
• [float, float, float] SclForce()
— Associated menu item: Representation / Surface Integral / Vector Integral
— Operation: returns the vectorial surface integral of the active quantity on the active surfaces


in a similar way as the force on a surface is obtained from the static pressure ( q ⋅ dS ) .
S

— Exceptions: Having either no active quantity or a vector quantity as active quantity will trig-
ger a Type Error.

 The direction of the normal vector depends on the surface type:

- for cutting planes, the normal is provided as part of the cut definition;
- for structured surfaces, it depends on the surface family. The following table summa-
rizes the convention used.

Surface I= cste J=cste K=cste


Normal vector direction I decreasing J increasing K decreasing
TABLE 1. convention used for the normal vector direction

• [float, float, float] SclTorque(float px, float py, float pz)


— Operation: returns the vectorial surface integral of the active quantity on the active surfaces
in a similar way as the torque - with respect to the reference point (rx, ry, rz) - on a surface is


obtained from the static pressure (q): ( q ⋅ ( r × dS ) ) . Note that the normal vector direction
S
is taken as explained in the SclForce() command.
— Exceptions: No scalar quantity selected.
• float SclBoundaryForce()
— Operation: similar to sclForce, but active surfaces are restricted to boundaries and the local
normal to the surface is set to point outside of the domain.
— Exceptions: Having either no active quantity or a vector quantity as active quantity will trig-
ger a Type Error.

CFView™ 7-45
Macro Language CFView™ Command Description

• [float, float, float] SclAverageForce()


— Associated menu item: Representation / Surface Integral / Vector Average
— Operation: returns the vector average of the current scalar quantity. It is equivalent to the
ratio of the results returned by the commands SclForce() and GmtArea() (see here above
for the mathematical definitions).
• [float, float, float] SclBoundaryTorque(float px, float py, float pz)
— Operation: similar to sclTorque, but the active surfaces are restricted to boundaries and the
orientation of the local normal to the surface points outside of the domain.
— Exceptions: Having either no active quantity or a vector quantity as active quantity will trig-
ger a Type Error. SclBoundaryTorque can only be used on boundaries of the domain (the
existing surfaces).
• float SclTorqueAmplitude(float px,float py, float pz, float dx, float dy, float dz)
— Operation: similar to sclTorque, the scalar product with the unit vector (dx, dy, dz) is
returned
— Exceptions: Having either no active quantity or a vector quantity as active quantity will trig-
ger a Type Error.
• float SclBoundaryTorqueAmplitude(float px,float py, float pz, float dx, float dy, float dz)
— Operation: similar to SclBoundaryTorque, the scalar product with the unit vector (dx, dy, dz)
is returned.
— Exceptions: Having either no active quantity or a vector quantity as active quantity will trig-
ger a Type Error.
• float VectorFlux()
— Associated menu item: Representation / Surface Integral / Flux
— Operation: returns the flux of the active vector quantity through the active surfaces


( v • dS ).
S
— Exceptions: having either no active quantity or a scalar quantity as active quantity will trig-
ger a Type Error.
• float SclWeightedIntegral(string weight)
— Associated menu item: (QAP) Representations / Integrals / Weighted Integral
— Operation: returns the computed weighted (by scalar quantity named “weight”) surface inte-
gral of the active quantity on the active surfaces.
— Exceptions: having either no active quantity or a vector quantity as active quantity will trig-
ger a Type Error. Having no weight will consider a zero weight and will return zero.
• float VectorWeightedFlux(string weight)
— Associated menu item: Representations / Surface Integral / Weighted Flux / Qnt
— Operation: returns the weighted (by scalar quantity named “weight”) surface flux of the
active quantity on the active surfaces.
— Exceptions: having either no active quantity or a scalar quantity as active quantity will trig-
ger an Type Error. Having no weight will consider a zero weight and will return zero.
• float WeightedIntegral()
— Operation: computes the following ratio:

7-46 CFView™
CFView™ Command Description Macro Language

the numerator is the integral over the active surfaces of the active quantity multiplied by the
current weight equation (see SetProjectWeightEquation command below) and the denom-
inator is the integral over the active surfaces of the current weight equation.
— Exceptions: having either no active quantity will trigger an Type Error.
• SetProjectWeightEquation(string equation)
— Operation: sets the current weight equation used in the WeightedIntegral command.
• float VecIntegral(string fieldName)
— Associated menu item: (QAP) Representations / Integrals / Vector Integral
— Operation: integrates the active vector field fieldName on all active surfaces and prints the
three components of the resulting vector.
• float Massflow(string name)
— Associated menu item: (QAP) Representations / Integrals / Massflow
— Operation: returns the massflow value for the selected surfaces.
— Exceptions: an error is raised if the quantities Wxyz, Vxyz or Density are not present in the
list of quantities.

7-5.23 Commands for Computing Mechanics


• SetTorqueAxis(float Origin.x, float Origin.y, float Origin.z, float Direction.x, float Direc-
tion.y, float Direction.z, bool isPointTorque)
— Operation: defines the origin and the direction of the Torque axis. (section 4-2.1.2 on page 4-
3)
— If isPointTorque is set to 1, the torque will be computed with respect to a point. In this case,
the resulting torque is a vector field.
• float MechanicsDerived(string fieldName)
— Operation: computes mechanics quantities on all active solid surfaces. (section 4-2.1.2 on
page 4-3)
— fieldName can be Force, Scalar Torque and Vector Torque.

7-5.24 Commands for Computing Integrals Along Curves


• float / [float, float, float] CurveSegmentIntegral(float p1x, float p1y, float p1z, float p2x,
float p2y, float p2z, float dx, float dy, float dz)
— Associated menu item: Representation / Curve Integral.
— Operation (section 4-13, p. 4-65): computes the integral along the curves defined by the
intersection of the active surfaces and the plane containing the points (p1x,p1y,p1z) and
(p2x,p2y,p2z) and parallel to the direction (dx, dy, dz). If the current equation (defined by
the SetProjectEquation command) is a scalar, the integral is
∫ ( eq ⋅ dl ) where eq is the
c
equation. If the current equation corresponds to a vectorial expression, the integral is

∫ eq × dl .
c
• SetProjectEquation(int mode, string name, string definition [,string definition2, string
definition3])
— Associated menu item: Representation / Curve Integral.

CFView™ 7-47
Macro Language CFView™ Command Description

— Operation: defines a new equation for the integration along curves. The parameter ‘mode’
specifies the new equation type: 0 for a scalar, 1 for a vector with a definition expressed as a
combination of vectorial quantities or 2 for a vector with a definition specified component
by component. If ‘mode’ has a value of 2, the parameters ‘definiton2’ and ‘definition3’ must
be present, otherwise they can be omitted.

7-5.25 Commands Related to Plot Manipulation


All These commands raise an Attribute Error if no quantity is selected or if no plot view is associ-
ated to the active quantity.
• PlotOriginal(), FitCurves()
— Associated menu item: Update / Plot / Original.
— Operation (section 4-3.7, p. 4-30): restores the original parameters for the current plot view.
• PlotPlaneX(), PlotPlaneY(), PlotPlaneZ(), PlotArcLen(), PlotNormalizedArcLen()
— Associated menu items: Update / Plot / Function of X, Function of Y, Function of Z,
Function of Arc Length.
— Operation (section 4-3.7.1, p. 4-30): sets the quantity distribution (i.e. horizontal axis) a
function of X, Y, Z or arc length.
• PlotOrdinateX(), PlotOrdinateY(), PlotOrdinateZ(), PlotOrdinateArcLen(), PlotOrdi-
nateQnt(), PlotOrdinateR(), PlotOrdinateTheta(), PlotOrdinateNormArcLen( ), PlotOrdi-
nateS( ), PlotOrdinateM( ).
— Operation: sets the ordinate distribution (the vertical axis) a function of X, Y, Z, the arc
length, the active quantity, the radius R with respect to the Z axis, the azimuth angle Theta
with respect to the Z axis, the normalized arc length, the spanwise position, or the stream-
wise position. The last two commands have a meaning only if hub and shroud are properly
defined.
• PlotFctOfQnt(),PlotFctOfR(), PlotFctOfTheta(), PlotFctOfS(), PlotFctOfM(),
PlotFctOfM_NORM()
— Operation: sets the abscissa distribution (i.e. the horizontal axis) a function of the quantity,
the radius with respect to the Z axis, the azimuthal angle with respect to the Z axis, the span
wise position or the stream wise position. The last three commands have a meaning only if
hub and shroud are properly defined.
• PlotCurvesMerge( string name1, string name2, ...)
— Operation: performs the merging of plot curves.
• SetAbscissaRange(float min, float max), SetOrdinateRange(float min, float max)
— Operation: set the range on the horizontal or vertical axis.
• FitAbscissa(), FitOrdinate()
— Operations: adjusts the range of the horizontal / vertical axis in such a way that the curves
are completely visible.
• ZoomInAbscissa(), ZoomOutAbscissa(), ZoomInOrdinate(), ZoomOutOrdinate()
— Operations: performs an automatic zoom in/out on the range by 10%.
• PlotZoom(float z)
— Operations: zooms in or out by a factor equals to z (zoom in for z>0 and zoom out for z<0)
• ZoomArea(float xmin, float xmax, float ymin, float ymax)

7-48 CFView™
CFView™ Command Description Macro Language

— Operations: performs a zoom operation on the axes range in such a way that the view coordi-
nates xmin, xmax, ymin and ymax correspond to the visible area (i.e. axis range).
• SetHReverse(), SetVReverse(), UnsetHReverse(), UnsetVReverse()
— Operations: sets the horizontal or vertical axis in decreasing scale or set in increasing scale.
• SetHLogarithmic(), SetVLogarithmic(), SetHLinear(), SetVLinear()
— Operation:sets the horizontal or vertical axis in logarithmic or linear scale.
• PlotCurveUndo()
— Associated menu item: Update / Plot / Curve Undo
— Operation: removes last added curve.
• PlotCurveType(CurveType c)
— Associated menu item: Update / Curve Type Editor...
— Operation: sets the last added curve type to c.
• PlotCurveOutput(string fileName)
— Associated menu item: Update / Plot / Curve Output...
— Operation: writes the plot curves data in ASCII format in the file with specified name.
• ActivePlotCurveOutput(string fileName, string curveName)
— Operation: writes the currently specified plot curves data in ASCII format in the file with
specified name and sets default type for curves associated to cartesian plots.
— Associated menu item: 'Export to file'. When right-clicking on the curve in the Cartesian plot
window.
• NumOfHMajorTicks(int n), NumOfVMajorTicks(int n)
— Operation: sets the number of labelled graduations on the horizontal or vertical axis.
• NumOfHMinorTicks(int n), NumOfVMinorTicks(int n)
— Operation: sets the number of intermediate graduations on the horizontal or vertical axis.
• SetHTicksDistance(float d), SetVTicksDistance(float d)
— Operation: sets the margin size around the graduation numbers on the horizontal or vertical
axis.
• SetHTicksTextType(TextType type), SetVTicksTextType(TextType type)
— Operation: sets the text type for the graduation numbers on the horizontal or vertical axis.
• HAxisLabelText(string text), VAxisLabelText(string text)
— Operation: sets the horizontal or vertical axis label text.
• HAxisLabelFontType(int type, float size), VAxisLabelFontType(int type, float size)
— Operation: set the font type and size for the horizontal or vertical axis label. The following
font types are available: roman (0), sans serif (1), typewriter (2), stroked (3), system default
(4), newfield (5), enfield (6), brooktondale (7), kuma (8), arial (9) or times (10).
• HAxisLabelLargerFont(), HAxisLabelSmallerFont(), VAxisLabelLargerFont(), VAxisLa-
belSmallerFont()
— Operation: increases or decreases the text size of the horizontal or vertical axis label.
• HAxisLabelFontColor(Color c), VAxisLabelFontColor(Color c)
— Operation: sets the color for the horizontal or vertical axis label.
• HAxisLabelPosition(int p), VAxisLabelPosition(int p)

CFView™ 7-49
Macro Language CFView™ Command Description

— Operation: sets the position of the horizontal or vertical axis label. The following positions
are available: at the axis end (0), near the axis origin (2) or in the middle of the axis (4).
• HAxisLabelDistance(float d), VAxisLabelDistance(float d)
— Operation: sets the width of the internal margin around the horizontal or vertical axis label.
• LimitsCurveArea(float xmin, float xmax, float ymin, float ymax)
— Operation: sets the limits of the curve area within a Cartesian plot view.
• AxisFit()
— Operation: computes the curve area size in such a way that it takes a maximum space, with-
out having the axis number s and labels cut by the view border.
• ShowHorizontalGridLines(), ShowVerticalGridLines(), HideHorizontalGridLines(), Hide-
VerticalGridLines()
— Operation: sets visible or hidden the horizontal or vertical grid lines.
• HorizontalGridLinesType(LineType type), VerticalGridLinesType(LineType type)
— Operation: sets the line type attributes for the horizontal or vertical grid lines.
• PlotType(int fitOnInsert, int logX, int varX, int logY, int varY, float minX, float maxX, float
minY, float maxY)
— Associated menu item: Update / Plot / Axis Editor...
— Operation: sets some parameters of the current cartesian plot: automatic scaling at curve
insertion (fitOnInsert=1) or not (fitOnInsert=0), logarithmic scale in X or Y direction (logx
or logY =1) or not (logX or logY =0) and variable associated to the axis: varX or varY = 0
2 2
(X), 1 (Y), 2 (Z), 3 (arc length), 4 (active quantity), 5 (radius = X + Y ), 6 (theta =
y
atan ⎛ --⎞ )
⎝ x⎠

• PlotHAxisLabel(float dist, int position, TextType type, string label), PlotVAxisLabel(float


dist, int position, TextType t, string label)
— Associated menu item: Update / Plot / Axis Editor...
— Operation: sets the parameters of the horizontal and vertical axis label: ‘dist’ is the distance
from the axis, int is the position relative to the axis (valid values and their associated posi-
3 5 6
tions are 1 7 ), the text type is set to type and the label text is set to label.
2 4 0
• PlotHAxisTicks(int ticks, int userTicks, int logScale, int smallTicks, float dist, float offset,
float min, float max), PlotVAxisTicks(int ticks, int userTicks, int logScale, int smallTicks,
float dist, float offset, float min, float max)
— Associated menu item: Update / Plot / Axis Editor...
— Operation: sets the parameters of the axis ticks: no ticks (ticks =0) or automatic ticks
(ticks=1 and userTicks=0) or user defined ticks (ticks=userTicks=1), logarithmic scale is
indicted by logScale=1 (0 otherwise), major ticks are drawn starting at ‘offset’, one each
‘dist’, ‘min’ and ‘max’ are the axis range and ‘smallTicks’ are inserted between two succes-
sive major ticks.
• PlotHAxisTicksLabels(float dist, int position, TextType t, DoubleFormat f), PlotVAxisTick-
sLabels(float dist, int position, TextType t, DoubleFormat f)
— Associated menu item: Update / Plot / Axis Editor...

7-50 CFView™
CFView™ Command Description Macro Language

— Operation: sets the ticks labels parameters for the horizontal or vertical axis: dist is the dis-
tance from the axis, position may be down / left (position =0) or up / right (position =1), the
text type is set to ‘t’ and the double format to ‘f’.
• PlotHGridLines(LineType majorLines, LineType minorLines), PlotVGridLines(LineType
l, LineType minorLines)
— Associated menu item: Update / Plot / Axis Editor...
— Operation: sets the horizontal or vertical grid major and minor lines type.
• GetViewCurveList()
— Operation: returns the list of curves names of the created Cartesian Plot.
• SetPlotSectionLimited()
— Associated menu item: Right-click on the selected curves / Limited section
— Operation: restricts the plot between the two selected points instead of a complete line on
whole domain passing through the two selected points.
• SetPlotSectionUnlimited()
— Associated menu item: Right-click on the selected curves / Unlimited section
— Operation: removes the restriction applied by the macro SetPlotSectionLimited. The curve
is a complete line on whole domain passing through the two selected points (default behav-
ior)
• DeletePlot()
— Associated menu item: Update / Delete / Cartesian Plot.
— Operation: deletes the current plot view or the Cartesian plot view associated to the active
quantity and all associated curves.

7-5.26 Commands Related to Colormap & Range Selection


These commands will raise an Attribute Error if no quantity is selected.
• RprColormap(int i)
— Associated menu item: Representation / Colormap.
— Operation (section 4-7.1, p. 4-50): if i is different from zero, puts colormap of the active
quantity on view, else removes the colormap.
• ColormapLimits(float xmin, float xmax, float ymin, float ymax)
— Operation: sets the limits of the colormap in the view.
• ColormapSmoothOnly(), ColormapStripesOnly(), ColormapSmoothAndStripes()
— Operation (section 4-7.3.1, p. 4-51): sets the kind of displayed color ramp: either only the
smooth coloring ramp, only the stripes coloring ramp or both of them.
• ColormapAxisAtLeft(), ColormapAxisAtRight()
— Operation (section 4-7.3.2, p. 4-51): sets on which side of the colormap is displayed the axis
ticks numbers and label.
• UpdateColormapBW(), UpdateColormapGreyscale(), UpdateColormapColor(), Update-
ColormapJet(), UpdateColormapCool(), UpdateColormapHot(), UpdateColormapSum-
mer(), UpdateColormapAutumn(), UpdateColormapWinter(), UpdateColormapSpring(),
UpdateColormapBone(), UpdateColormapCopper(), UpdateColormapPink()
— Associated menu item: Update / Colormap / Reset B&W, Reset GreyScale, Reset Color

CFView™ 7-51
Macro Language CFView™ Command Description

— Operation (section 4-7.3, p. 4-51): sets the color map to black and white, greyscale or
COLOR ramp.
• RprRangeIn(float qmin, float qmax)
— Associated menu item: Representation / Range / Range Set.
— Operation (section 4-7.2, p. 4-50): sets the range of the active quantity to (qmin, qmax).
• RprRangeActiveSurfaces()
— Associated menu item: Representation / Range / Range Active Surfaces.
— Operation (section 4-7.2, p. 4-50): sets the range of the active quantity to its range on the
active surfaces.
• RprRangeAll()
— Associated menu item: Representation / Range / Range Default.
— Operation (section 4-7.2, p. 4-50): sets the range of the active quantity to the global range.
• ColormapNumOfBigTicks(int n)
— Operation (section 4-7.3, p. 4-51): sets the number of graduation marks on the axis. This
number is rounded automatically in such a way that rounded values are displayed.
• ColormapTicksNumberDistance(float d)
— Operation (section 4-7.3, p. 4-51): sets the distance between the graduated numbers and the
axis.
• ColormapTicksNumberTextType(TextType type)
— Operation (section 4-7.3, p. 4-51): sets the text type attributes for the graduation numbers
(see section 7-5.29, p. 7-55 for a description of TextType arguments).
• ColormapLabelText(string t)
— Operation (section 4-7.3, p. 4-51): sets the label text of the colormap.
• ColormapLabelTextSize(int s)
— Operation (section 4-7.3, p. 4-51): sets the size of the colormap label.
• ColormapLabelTextType(TextType type)
— Operation (section 4-7.3, p. 4-51): sets the parameters of the colormap label text (see section
7-5.29, p. 7-55 for a description of the TextType argument).

7-5.27 Commands Related to Text Manipulation


• string InsertText(float px, float py, float -, string text)
— Associated menu item: Update / Insert Text.
— Operation (section 4-9.1, p. 4-55): inserts decoration text at position (px, py), (-1,-1) is the
lower left corner of the active view and (1,1) is its upper right corner. Returns the reference
name of the text string.
• string InsertText2(string name, float px, float py, float -, string text)
— Associated menu item: Update / Insert Text.
— Operation (section 4-9.1, p. 4-55): inserts decoration text having a specified name at position
(px, py), (-1,-1) is the lower left corner of the active view and (1,1) is its upper right corner.
Returns the reference name of the text string. The text name is used to further reference to
the decoration text for type attributes handling. The name is a unique identification key, if a
text exists already with the provided name, it is modified (instead of inserting a new text).
• SetTextFontName(string name, string fontName)

7-52 CFView™
CFView™ Command Description Macro Language

— Operation (section 4-9.2, p. 4-55): sets the font of the text with the specified name. The valid
font names are Arial, Times, Roman, Sansserif, TypeWriter, Stroked, NewField, Enfield,
Brooktondale and Kuma.
• SetTextFontSize(string name, int size)
— Operation (section 4-9.2, p. 4-55): sets the font size of the text with the specified name.
• SetTextColor(string name, float h, float s, float v)
— Operation (section 4-9.2, p. 4-55): sets the color of the text with the specified name. The
color is provided in its hue, saturation and value decomposition (section 7-5.29, p. 7-55 for
further reference).
• SetTextAlignement(string name, int h, int v)
— Operation (section 4-9.2, p. 4-55): sets the horizontal and vertical alignment of the text with
specified name. The alignment is the position of the text with respect to the position point.
The h argument is interpreted as follows: h=-1 for a text placed at the right of the position
point, h=1 for a text placed at the left of the position point, h=0 for a text centred around the
point position. The v argument is interpreted as follows: v=-1 for a text below the position
point, v=1 for a text above the position point and v=0 for a text centred vertically on the
position point.
• SetTextLineAlignement(string name, int l)
— Operation (section 4-9.2, p. 4-55): sets the text justification. This has only a sense for multi-
ple lines text. The parameter l is interpreted as follows: l=0 for centred lines, l=1 for lines
aligned on their left side and l=2 for lines aligned on their right side.
• SetTextLineSpacing(string name, int s)
— Operation (section 4-9.2, p. 4-55): sets the text line spacing (used only for multi-line texts).
A value s=0 is for normal line spacing, s=1 for one and a half spacing and s=2 is for double
line spacing.
• SetTextFrameVisibility(string name, int v)
— Operation (section 4-9.2, p. 4-55): sets visible (v=1) or hides (v=0) of the enclosing rectan-
gular box around the specified text.
• SetTextPosition(string name, float x, float y)
— Operation: sets the text position within the view: x=-1 is the left side, x=1 is the right side,
y=-1 is the bottom side and y=1 is the upper side.
• DeleteText(string name)
— Operation (section 4-9.3, p. 4-56): deletes the text having the specified name.
• DeleteTextAll(), DeleteTextLast()
— Associated menu items: Update / Delete / Text Last and Text All.
— Operation (section 4-9.3, p. 4-56): deletes all or last inserted decoration text in the active
view.
The following commands are maintained for backward compatibility. However, their use is strongly
discouraged as it does not cover all the functionality.
• TextActivate(string name), TextDeActivate()
— Associated menu item: Text selection / de-selection by clicking with the left mouse button
— Operation: selects or de-selects text item with reference name given by ‘name’.
— Exceptions: will raise an Name Error if the name is unknown.
• TextModify(string text, float px, float py, float -, TextType t)

CFView™ 7-53
Macro Language CFView™ Command Description

— Associated menu items: text updates through Text Editor dialogue box.
— Operation (section 4-9.2, p. 4-55): sets the currently selected text attributes: text is its con-
tent, (px, py) its position (see the InsertText() command) and its text type is set to ‘t’.
— Exceptions: will raise an Attribute Error if no text is currently selected.

7-5.28 Commands Related to Axes Systems Representations


(section 2-5.6, p. 2-25)

7-5.28.1 Orientation Axes


• ViewAxes()
— Associated menu item: Geometry / Coordinate System / Axis.
— Operation: toggles simple axis representation.
• AxisSize(float s)
— Operation: sets the size of the orientation axes if they are represented (the default value is
0.03).
• AxisPosition(float x, float y)
— Operation: sets the axis position in way independent from the represented geometry: x=-1 is
the left side, x=1 is the right side, y=-1 is the bottom side and y=1 is the upper side.
• CoordSystem1Origin(float px, float py, float pz)
— Associated menu item: Geometry / Coordinate System / Axis
— Operation: sets simple axis representation origin at point (px, py, pz) and creates it if not
existing.

7-5.28.2 Graduated Axes


• ViewAxesGlobal()
— Associated menu item: Geometry / Coordinate System / Graduated Axis.
— Operation: toggles graduated axis representation.
• SetGradAxis1Range(float min, float max), SetGradAxis2Range(float min, float max),
SetGradAxis3Range(float min, float max),
— Operation: set the range of the graduated axes along the first, second or third direction. The
min arguments are defining the origin of the represented coordinate system and must be
smaller than the related max value.
• SetGradAxis1TicksSpacing(float s), SetGradAxis2TicksSpacing(float s),
SetGradAxis3TicksSpacing(float s)
— Operation: set the spacing between the graduation on the first, second and third axis respec-
tively.
• CoordSystem2Origin(float px, float py, float pz)
— Associated menu item: Geometry / Coordinate System / Graduated Axis.
— Operation: sets graduated axis representation origin at point (px, py, pz).
— Exceptions: will raise an Attribute Error if graduated axis does not exist.
• SetGradAxis1Horizontal(), SetGradAxis2Horizontal(), SetGradAxis3Horizontal()
— Operation: set the graduation numbers orientation on the axis to horizontal. The numbers are
displayed horizontally whatever the axis orientation.

7-54 CFView™
CFView™ Command Description Macro Language

• SetGradAxis1Perpendicular(), SetGradAxis2Perpendicular(),
SetGradAxis3Perpendicular()
— Operation: set the graduation numbers orientation perpendicular to the axis line.
• SetGradAxisTicksSize(float s)
— Operation: sets the size of the graduation ticks (as a percentage of the axis length). The
default value is 0.01.
• SetGradAxisNumbersSize(int s), SetGradAxisNumbersFont(string fontName), Set-
GradAxisNumbersColor(Color c)
— Operation: set the text size, text font or text color of the graduation numbers. The valid font
names are Arial, Times, Roman, Sans-serif, TypeWriter, Stroked, NewField, Enfield, Brook-
tondale and Kuma. See section 7-5.29, p. 7-55 for the description of color arguments.
• SetGradAxis1LabelPosition(int p), SetGradAxis2LabelPosition(int p),
SetGradAxis3LabelPosition(int p)
— Operation: set the position of the axis label. The value of p may be 1 for placing the label at
the top end of the axis or 0 for placing the label at mid-range.
• SetGradAxisLabelsSize(int s), SetGradAxisLabelsFont(string fontName), SetGradAxisLa-
belsColor(Color c)
— Operation: set the text size, text font or text color of the axes labels. The valid font names are
Arial, Times, Roman, Sans-serif, TypeWriter, Stroked, NewField, Enfield, Brooktondale and
Kuma. See section 7-5.29, p. 7-55 for the description of color arguments.
• SetGradAxisLineType(LineType type)
— Operation: set the line type attributes used to draw the axes lines and the graduation ticks.
See section 7-5.29, p. 7-55 for the description of LineType arguments.

7-5.29 Description of Argument List for Some Standard Features


• Color: float h, float s, float v
A color is described in the HSV model (Hue, Saturation, Value, section 4-10.3.2, p. 4-58) by the
parameter triplet: float h, float s, float v; with 0 < h < 360, 0 < s < 1 and 0 < v < s. Some examples
are black (0,0,0), white (0,0,1), red (0,1,1), yellow (60,1,1), green (120,1,1), cyan (180,1,1), blue
(240,1,1) and magenta (300,1,1).
• TextType: int fontType, int fontSize, int horzAlignement, int vertAlignement, float px, float
py, float pz, float spacing, int rotation, Color c (section 4-10.3.3, p. 4-59)
int fontType (value between 0 and 10): roman (0), sans serif (1), typewriter (2), stroked (3), system
default(4), newfield (5), enfield (6), brooktondale(7), kuma (8), times (9) or arial (10);
int horizontalAlignement, int verticalAlignement (value between 0 and 2): centre (0), left or upper
(1) and right or lower (2);
float px, float py, float pz coordinates of the vector indicating the text path.
float spacing: specified in character height;
int rotation (value between 0 and 4): follow path (0), right (1), down (2), left (3) or up (4).
• LineType: Color c, int pattern, int endCap, int lineJoin, int visibility, float width (section 4-
10.4.1, p. 4-59)
int pattern (value between 0 and 8): solid (0), simple dashed (1), dotted (2), dashes and dots altern-
ing (3), dashes and double dots alterning (4), dashes and triple dots alterning (5), long dashes (6),

CFView™ 7-55
Macro Language Utilities for Handling Curves

very long dashes and short dashes alterning (7) and very long dash and double short dashes altern-
ing(8),
int endCap (value between 0 and 2): “butt” line end-cap (0), “square” line end-cap (1) and “round”
line end-cap (2),
int lineJoin (with value between 0 and 2): “mitre” line join (0), “bevel” line join (1), “round” line
join (2),
int visibility: with value 0 (not visible) or 1 (visible).
• MarkerType: Color c, int light, float size, int symbol, int filled, int visibility (section 4-10.4.2,
p. 4-60)
int light: with ligthing (1) or without lighting (0),
int symbol (with value between 0 and 10): star (0), times (1), plus (2), dot (3), box (4), circle (5),
diamond (6), up triangle (7), down triangle (8), left triangle (9), right triangle (10).
int filled filled symbol (1) or not (0)
• CurveType: LineType l, MarkerType m
Curve Type description is a juxtaposition of a line type description and a marker type description
• DoubleFormat: int sign, int exponent, int accuracy (section 4-10.5, p. 4-61) int sign: number
are signed (1) or not (0),
int exponent: scientific notation is used when necessary (0), always (1) or never (2),
int accuracy: number of significant digits.

7-6 Utilities for Handling Curves


A Point and a Curve class are provided to handle curves. A typical use of this feature is to create a
curve for which each point is obtained from a user defined computation and then shown as a Carte-
sian plot in the CFView™ graphics window.
This section provides first a complete description of the Point and Curve classes. Then an example
is provided as an illustration.

7-6.1 Point Class


This class may be used for point or vector handling. It contains the following operations:
• constructor from 3 floating point values with a default value of 0.
e.g.: p = Point(1.0,1.0,1.0)
p = Point(1.0)
• mathematical operators: +, -, *, /
operations are applied component by component.
• [float, float, float] asTuple(): return point coordinate as a tuple (a list) containing 3 elements.
• float norm (Point): returns the norm of the vector.

7-56 CFView™
Utilities for Handling Curves Macro Language

7-6.2 Curve Class


This class allows to create representations and to handle curves (defined by a list of points) in a
macro script. This class allows to compute in a macro a series of values and insert them in a carte-
sian plot and also, it allows to handle in a macro curves that are existing in a CFD data set.
• constructor from name. If the name corresponds to an existing curve (e.g. a stream line, a sur-
face boundary), then its points list is taken from this curve and it is accessible only for reading
operations. If the name does not correspond to an existing curve, a new curve is created, having
zero points after the creation operation.
c = Curve(‘mycurve’) creates a new curve.
c = Curve(VecLineLocal(pix,piy,piz, 0,0,1)) gets the streamline curve for further handling.
• char type(): returns the curve type (‘c’for a curve that was already existing in the data set or ‘p’)
• int numOfPoints(): returns the number of points,
• float length(): returns the curve length,
• Point point(int i): returns the ith point in the curve,
• addPoint(Point p): appends the point to the curve definition (the curve should not be a curve
existing in the data set),
• Point pointAtDistance(float d): returns the Point at arc length d,
• [float, Point] closestPoint(Point p, Point v): returns the curve point closest to the Point p and
the distance which is evaluated along the v direction.
• showInPlot(string quantityName, [quantityValues]): creates a graphic representation of the
curve associated to a set of values defined on each of the curve points. The string quantity-
Name is used for labelling the coordinate axis. The parameter [quantityValues] is a list of val-
ues; there must be a number of values equal to the number of curve points. The curve defines
the geometrical location of the associated values.
A plot data curve is created (having the curve name), inserted in the data set and its representa-
tion in a cartesian plot is raised.
• float / [float, float] / [float, float, float] computeIntegral(int type, string eqX, string eqY,
string eqZ): returns the integral along the curve of the specified mathematical expression. Type
and expression specification is identical to the derived quantities. If type is 0, the expression
should be a valid scalar definition and provided as the eqX argument; the arguments eqY and
eqZ are ignored and may be omitted. If the type equals 1, the expression should be a valid vec-
torial definition provided as eqX arguments. If type is 2, the expression should be considered as
a vector provided component by component in the eqX, eqY and eqZ arguments.
Scalar integration is the usual line integration ( ∫ ( eqX ⋅ dl ) ), while the vector integral is the inte-
gral of the vector (or external) product between the integrand and the normalized vector tangent
to the curve ( ∫ eq × dl ).

CFView™ 7-57
Macro Language Utilities for Handling Curves

7-58 CFView™
List of Shortcut Keys

APPENDIX A:List of Shortcut


Keys

The following table is listing all the keyboard shortcuts that are defined in CFView™.

Project Handling

Shift-p Open the file chooser to select a project (section 2-3)


p Open the partial loader (section 2-3.4)
Ctrl-q Quit CFView™ (section 2-3.5)
’ Graphical area refresh (section 2-5.5.2)
w Toggle the reverse video / normal video mode (section 4-11.4.1)
u Undo
q Redo
Shift-r Repetition on/off

Views Handling

f Maximise size (section 2-5.5.5)


7 Preferred size (section 2-5.5.5)
. Minimise (section 2-5.5.5)
m Start the interactive move / resize mode (section 2-5.5.5)
r Start the interactive move / resize mode (section 2-5.5.5)
Shift-n Open a new view in Cartesian coordinates (section 2-5.5.1)
Ctrl-n Close the active view (section 2-5.5.4)
/ Swap views (section 2-5.5.8)
= Align views (section 2-5.5.9)
+ Superpose views (section 2-5.5.10)
- Toggle view transparency (section 2-5.4.2)
Shift-v Toggle full rendering mode (section 2-5.4.2)

CFView™ A-1
List of Shortcut Keys

Shift-b Toggle border line (section 2-5.4.2)

Camera Position

o Set the camera to the original position (section 2-5.4.1)


x Project along the first direction (section 2-5.4.1)
y Project along the second direction (section 2-5.4.1)
z Project along the third direction (section 2-5.4.1)
Surface
Representation
Ctrl-s Surfaces selection dialog box (section 3-3.2)
Ctrl-a Interactive surfaces selection tool (section 3-3.3)
Ctrl-z Mesh surfaces creation dialog box (section 3-4.1)
Shift-l Cutting plane creation dialog box (section 3-4.2)
g Toggle active surfaces grid representation (section 3-5.4)
b Toggle active surfaces boundary representation (section 3-5.1)
h Toggle hidden line surfaces representation (section 3-5.6)
Shift-f Toggle flat colored representation (section 3-5.8)
Shift-s Toggle Gouraud shading representation (section 3-5.9)
Shift-h Switch off rendering (section 3-5.10)
Shift-t Surface color edition dialog box (section 3-5.11)

Text

Ctrl-t Starts text insertion tool (section 4-9.1)


Scalar Quantities
Representation
i Multiple isolines dialog box (section 4-3.2.2)
j Local isolines (section 4-3.2.1)
Shift-q Flat color contours (section 4-3.3.1)
c Smooth color contours (section 4-3.3.2)
v Local value insertion mode (section 4-3.1.1)
d Cartesian plot along section (section 4-3.6.3)
l Cartesian plot along grid line (section 4-3.6.4)
Shift-i Iso-surface (section 4-3.5)
u Undo-suppress last representation (section 4-10.1)
Ctrl-r Toggle colormap representation (section 4-7.1)
Vector Quantities
Representation
j Local vector lines (section 4-6.3.1)
Shift-j Vector lines from a section (section 4-6.3.2)
Ctrl-j Vector lines from grid line (section 4-6.3.3)
q Vector lines parameters dialog box (section 4-6.3.3)
c Vector field (section 4-6.1.2)
t Threshold vector field (section 4-6.1.3)
v Local vector (section 4-6.1.1)

A-2 CFView™
List of Shortcut Keys

d Vectors along a section (section 4-6.1.4)


l Vectors along a grid line (section 4-6.1.5)
s Vector type dialog box (section 4-6.2.3)
u Undo (remove last representation) (section 4-10.1)
Ctrl-r Toggle colormap representation (section 4-7.1)

CFView™ A-3
List of Shortcut Keys

A-4 CFView™
Overview Input File Format

APPENDIX B: Input File Format

B-1 Overview
This chapter describes the file formats supported by CFView™. Three file formats are supported:
• The native file format
• The FINE™/Turbo project file
• The CGNS file format (support is partial)

This chapter is made of three sections corresponding to these formats. For the native format, the
section is divided in 5 parts:
• Create identification file,
• Create boundary condition file,
• Create unstructured cell connectivity (for unstructured meshes only),
• Create geometry and quantity files,
• CFView™ tools (please contact "[email protected]" before using the provided tools).

The FINE™/Turbo file format is not described in details as this file is internal to the FINE™/Turbo
package. Finally, it is described how to import CGNS data.
It is recommended to attentively read the "General Concepts" section which introduces the input
files and outlines their different types. The remaining sections provide the way to create these files.

CFView™ B-1
Input File Format Native File Format

B-2 Native File Format


B-2.1 General Concepts
As mentioned in Chapter 1, there are four data types which are field data, surface data, validation
data and plot data. These data represent scalar or vector quantities at node coordinates as well as
along specific curves. The files containing these data are separated from the files containing the
node and curve coordinates.
Therefore, the CFView™ input data file system consists of a series of files. They are grouped in
various types of files:
1. Identification file
This file contains general information about the project. Especially, it includes all the file names
containing the boundary conditions and the geometry and quantity data.
•Format: ASCII
•Number: one by project.
2. Boundary condition files (for structured meshes)
These files contain information concerning the boundaries of the project such as the boundary
condition (external, solid, periodic, inlet...), the location and the connections with other
domains.
•Format: ASCII
•Number: one by domain.
3. Topology & Boundary Condition files (for unstructured meshes)
These files contain information on the topology and the boundaries of the project.
•Format: binary
•Number: one by domain
4. Geometry files
These files are used to store field data, surface data, validation data and plot data node coordi-
nates.
•Format: binary
•Number: - one by domain for the field data and surface data.
- one for each validation data and plot data.
5. Quantity files
They are used to store the values of the scalars and the vectors of each data type at each nodes
and points defined in the Geometry files.
•Format:binary
•Number: - one by domain for each field data and surface data.
- one for each validation data and plot data.
6. Meridional support file
This file is used to provide the geometrical support for blade to blade views
•Format:binary or ASCII
•Number:- one by project
7. Particle tracks file
This file is used to import externally computed particle tracks

B-2 CFView™
Native File Format Input File Format

•Format:binary or ASCII
•Number:- one by project
8. ASCII validation data files
These files are used for interactive loading of validation data.

The data type concepts and the generation of the input data files are explained in the following sec-
tions.

 CFView™ accepts structured and unstructured meshes. The CFView™ input file sys-
tem for unstructured meshes is very similar to the structured meshes. There are some dif-
ferences in the Identification file (see "Create Identification File" section) but the main
difference is the existence of the Topology & Boundary Condition file.

B-2.2 Create Identification File


The Identification file contains general information about the project. Its name is characterized by
the ".cfv" extension. It includes all the file names containing boundary conditions, geometry and
quantity data.
The identification file is an ASCII file which contains numbers and character strings. It is com-
posed of the following parts:
1. Project identification.
2. Mesh identification.
3. Domain(s) identification.
4. Validation data identification.
5. Plot data identification.
These 5 parts are described below with concrete examples. A complete example of an Identification
file is given at the end of this section.

 For unstructured meshes, the differences with the structured meshes lie in the Mesh
and Domain identification parts. See these parts for more details.

 File names must be written with absolute paths. CFView™ check firstly this absolute
path, if the expected file is not there, CFView™ check secondly in the directory where
the .cfv is located and if the expected file is not there, CFView™ check thirdly in the
directory defined by the relative path "../_mesh". If the expected file is located in none of
these three locations, CFView™ will not find it.

B-2.2.1 Project Identification


The project identification consists of five arbitrary character strings.
• The project name: It is given by the first character string. If no information is given, a
blank character string of arbitrary length has to be entered.
• The version number: It is represented by the second character string. If no information is
given, a blank character string of arbitrary length has to be entered.
• The solver description: It consists of the three remaining character strings. If no information is
given, a blank character string of arbitrary length has to be entered for
each of them.

CFView™ B-3
Input File Format Native File Format

While working with CFView™, a specific command allows to display this project identification
into the graphic area. An example of a project identification is:
EXTERNAL FLOW - NUMECA

TEST CASE 999.111

EULER EQUATIONS

MESH SIZE 40*35*105

INLET CONDITIONS: MACH NUMBER 2.8

B-2.2.2 Mesh Identification


The mesh identification gives general information on the mesh geometry and specifies the Geome-
try and Quantity file names for field data and surface data. It consists of 4 general specifications, 1
field data and 1 surface data specification.

a) General Specifications
These are:
1. The dimension: - 2D
- 3D

2. The type: - STRUCTURED


- UNSTRUCTURED
- HEXANS

3. The coordinate system:- CARTESIAN

4. The kind of repetition: - NONE


- TRANSLATION
- ROTATION
- MIRROR
The specifications have to be written on one character string in the above order. You can input 2D
projects by specifying the dimension parameter as 2D. For example, a three dimensional structured
mesh in a Cartesian coordinate system without repetition is specified as follows:
3D STRUCTURED CARTESIAN NONE
With repetition option, it is possible to translate, rotate or mirror the complete mesh geometry spec-
ifying:
• The translation vector, mirror plane point or rotation axis point.
• The mirror plane normal or rotation axis direction.
• The rotation angle in degrees.
For example, the translation in y direction (0,1,0) has the following input:
3D STRUCTURED CARTESIAN TRANSLATION 0. 1. 0.
For example, the rotation around the axis parallel with Z axis, passing through the point (2,2,2), and
with an angle of 90 degrees has the following input:
3D STRUCTURED CARTESIAN ROTATION 2. 2. 2. 0. 0. 1. 90

B-4 CFView™
Native File Format Input File Format

The mirror example, with the Y plane specified as mirror plane has the following input:
3D STRUCTURED CARTESIAN MIRROR 0. 0. 0. 0. 1. 0.

 The repetition of the geometry when using ROTATION type is only working with 3D
projects.

b) Field Data Specification


The field data specification consists of field data names. Field data are scalars and/or vectors and
are defined for each domain. The only restriction is that the scalar quantities have to be entered
before the vector quantities. The input consists of the number of scalar quantities followed by the
names of these quantities. These names must be surrounded by || (e.g.: |density|). The names cannot
contain any of the following characters: |, [ or ]. The same has to be repeated for the vector quanti-
ties.
For example, when specifying three scalars (density, entropy, and Mach number) and two vectors
(velocity and vorticity), the input is:
3

|density| |mach number| |entropy|

|velocity| |vorticity|

c) Surface Data Specification


The surface data specification consists of surface data names. They represent the quantities con-
fined on solid surfaces such as the heat transfer coefficient. The input consists of the number of sca-
lar quantities followed by the names of these quantities. These names must be surrounded by || (e.g.:
|density|). The same has to be repeated for the vector quantities. The only restriction is that the sca-
lar quantities have to be entered before the vector quantities.
For example, if surface data consists of one scalar (heat transfer coefficient) and one vector quantity
(the surface stress), the input is:
1

|heat transfer coefficient|

|surface stress|

 A mesh geometry without surface data can also be considered. In this case the number
of quantities are set to zero and the lines containing the quantity names are not present.

B-2.2.3 Domain(s) Identification


The domain identification specifies the number of domains, the number of points for each domain,
the Geometry file names, the Boundary Condition file names and the Quantity file names for field
data and surface data.
The first string line identifies the number of domains. For example, for a mesh with two domains,
the string input is:
2

CFView™ B-5
Input File Format Native File Format

Next input is repeated for each domain.


The second string line depends on the grid type (structured/unstructured).
• For structured meshes, it specifies:
— the repetition type. It can be any of the allowed repetition types. If not specified then the rep-
etition type taken for the block is the project repetition type.
— the number of nodes in the I, J and K directions. For example, for a domain of 60 nodes in
the I direction, 70 nodes in the J direction and 50 nodes in the K direction, the string input is:
60 70 50
For 2D structured meshes, only the nodes in J directions and I have to be specified.
• For unstructured meshes, it specifies the number of nodes and the number of cells.
After this line, you have to specify:
• The Geometry file name (containing the node coordinates).
• The Boundary Condition file name.
• The Quantity file name of each field data and surface data.
The order of the quantity file names is the same as the field and surface data quantity names (refer
to section "Mesh Identification" above).
The specification of the quantity file name of the surface data includes the identification of the
domain boundaries and patches.
In the example below, surface data for the first domain are assigned to the second patch of the first
boundary and for the second domain to the first patch of the second boundary. The boundary and
patch concepts are explained in the section describing the generation of Boundary Condition file.
For this example the domain identification is as follows:
2

60 70 50

extflow.d1.g

extflow.d1.bc

extflow.d1.s.1

extflow.d1.s.2

extflow.d1.s.3

extflow.d1.v.1

extflow.d1.v.2

1 2 extflow.d1.sd.s.1

extflow.d1.sd.v.1

40 70 50

extflow.d2.g

extflow.d2.bc

extflow.d2.s.1

extflow.d2.s.2

extflow.d2.s.3

B-6 CFView™
Native File Format Input File Format

extflow.d2.v.1

extflow.d2.v.2

2 1 extflow.d2.sd.s.1

extflow.d2.sd.v.1

 An input file without surface data can also be considered. In this case the number of
surface data is set to zero and the lines containing the field quantity names and the file
names are not present.

B-2.2.4 Validation Data Identification


The Validation Data identification identifies data from experiments or other computations which
are needed for comparison. Validation data are restricted to data on a single curve, either in 2D or
3D space. The number of such curves has to be input in one line of the identification file. For exam-
ple if a project has one validation data curve, the input line has to be:
1
After this line, you have to specify:
• The name of the curve.
• The quantity name(s).
• The Geometry file name of the curve.
• The Quantity file name(s).
For example, if a curve named "cross-section" has two validation quantities, the static pressure, and
the temperature, the file should be as follows:
1

|cross-section|

|static pressure|

|temperature|

extflow.vld.g

extflow.vld.s.1

extflow.vld.s.2

 An input file without validation data can also be considered. In this case the number of
validation data is set to zero and the lines containing the field quantity names and the file
names are not present.

B-2.2.5 Plot Data Identification


The Plot Data are usually functional data the user wishes to visualize, for instance a flow solver
convergence history. Any other function of one, two or three variables given in the form of numeri-
cal table can be handled in the same way. Plot data are restricted to data on a single curve, either in
1D, 2D or 3D.
The number of such curves has to be input in one line of the Identification file.
After this line, you have to specify:

CFView™ B-7
Input File Format Native File Format

• The name of the curve.


• The quantity name(s).
• The Geometry file name of the curve, containing the abscissa values.
• The Quantity file name(s).
For example, a run has 250 iterations with the mean density and the maximum total energy residu-
als. Before specifying the residuals names, the name of the curve must be defined. For example,
"convergence history" has two residuals (mean density and the maximum total energy). The input is
as follows:
1

|convergence history|

|mean density residual|

|max total energy residual|

extflow.pld.g

extflow.pld.s.1

extflow.pld.s.2

 An input file without plot data can also be considered. In this case the number of plot
data is set to zero and the lines containing the field quantity names and the file names are
not present.

B-2.2.6 Geometry Support for Blade to Blade Views


Additionally you can specify a meridional mesh to be used for computing STM (s, theta, m) views.
This coordinate space is particularly interesting for visualisation project having a symmetry around
the Z axis. The meridional support mesh has to be a 2D mesh defined in the (z,r) space. The m coor-
dinate will be computed as the distance along J constant lines from the current point to the line I=0.
The s coordinate will be computed as the distance along I constant lines from the current point to
the line J=0. This corresponds to a blade to blade view in turbo-machinery applications.
The meridional support mesh is specified by the geometry file name of the mesh. Additionally, if
the version description (2nd line of the file) contains the keyword AutoGrid-Mesh, it is assumed
that the mesh is an AutoGrid™ mesh (i.e. all domains have the I direction as streamwise, the J
direction as spanwise and all points are on the support curves). This allows a faster computation of
the (s,t,m) coordinates.

B-8 CFView™
Native File Format Input File Format

J
I

FIGURE B.2.2-1Meridional support mesh

In general, the computation of a mesh point is based on its projection in the ZR plane. The s and m
coordinates are interpolated from the neighbouring support mesh points. Additionally s and m coor-
dinates are normalised.
The geometry file format for a support mesh with 17 nodes in the I direction and 11 in the J direc-
tions is presented in Figure B2.2-1.

 The use of this functionality is discouraged. The interactive specification of hub and
shroud surfaces is a more flexible way to create blade to blade views.

NUMECA File Format v-1.0


POINTLIST_GRID -dim 2 -n1 17 -n2 11
<NI_BEG>
ZR
....
<NI_END>

where the "..." stands for the list of the (Z,R) coordinates ordered as list of curves in the I direction

B-2.2.7 Example of Complete Identification File


The complete identification file of the example chosen in the above sections is given on next page:
EXTERNAL FLOW - NUMECA

TEST CASE 999.111

EULER EQUATIONS

MESH SIZE 40*35*105

INLET CONDITIONS: MACH NUMBER 2.8

CFView™ B-9
Input File Format Native File Format

3D STRUCTURED CARTESIAN NON

|density| |mach number| |entropy|

|velocity| |vorticity|

|heat transfer coefficient|

|surface stress|

60 70 50

domain1.g

domain1.bc

density.d1.s

static_pressure.d1.s

velocity.d1.v

vorticity.d1.v

30 70 50

domain2.g

domain2.bc

density.d2.s

static_pressure.d2.s

velocity.d2.v

vorticity.d2.v

 Geometry and Quantity files have to be generated for each domain except for the vali-
dation and plot data. There is no restriction on the file name and extension.

 Quantity file names have to be specified in the same order as the quantity names
defined in the mesh identification part. There is no restriction on the file name and exten-
sion.

 Note that the trailing 0 are indicating that no validation data or plot data are associated
to the data set.

B-10 CFView™
Native File Format Input File Format

B-2.3 Create Boundary Condition Files


A Boundary Condition file is generated for each domain. It contains the multi-block connectivity
description, the type of the boundary condition of non-connected domain boundaries. Furthermore,
a name for the domain and for each boundary part (or path) can be provided.
The number of boundaries for each domain depends on the mesh dimension, 4 in 2D case and 6 in
3D case. CFView™ attributes the following numeration to these boundaries which has to be
respected when generating the Boundary Condition file:
1. For 2D mesh, there are 4 boundaries with the following numbering:
• Boundary 1:I=1
• Boundary 2:J=1
• Boundary 3:J=Jmax
• Boundary 4:I=Imax
2. For 3D mesh, there are 6 boundaries with the following numbering (see Figure B.2.3-1):
• Boundary 1:I=1
• Boundary 2:J=1
• Boundary 3:K=1
• Boundary 4:K=Kmax
• Boundary 5:J=Jmax
• Boundary 6:I=Imax

FACES K = Kmax
4
J = Jmax
5
1
I=1
BLOCK
K
J 6
2
I = Imax
I J=1
3
K=1

FIGURE B.2.3-1: 3D standard notation for the boundary faces in the computational domain.

CFView™ B-11
Input File Format Native File Format

To generate this file, follow the steps below. The example refers to the figure here below.

I=1
Patch 3

Patch 2
10 20
20 20

10 10 20 10
1 10

K
11

J Patch 1

FIGURE B.2.3-2: Example of patches distribution on the first boundary.

1. Give the name of the domain. If not provided or if the provided name is ’unknown’, CFView™
will provide a default name.
2. Give the number of nodes in the I, J and K directions. For a domain of 10 nodes in the I direc-
tion, 20 nodes in the J direction and 10 nodes in the K direction, the string input is:
10 20 10
3. For each boundary and in the order given above (from 1 to 4 for 2D, from 1 to 6 for 3D):
• Give the number of patches on the boundary. In our example, the first boundary has 3
patches, the string input is:
3
•For each patch of the boundary, give the patch name if existing (if no name is provided,
CFView™ uses a default name), then the boundary condition and the ending and starting
node coordinates:

Boundary condition: There are 8 boundary conditions which are identified by three letters:
matching connection: CON
non matching connection CNM or CONNM
external: EXT
inlet: INL
mirror: MIR
outlet: OUT
matching periodic: PER
non matching periodic PNM or PERNM
singular: SNG
solid: SOL

B-12 CFView™
Native File Format Input File Format

In our example, the boundary condition is solid for the first patch, inlet for the second and outlet for
the third, the string input is:
SOL

INL

OUT

Node coordinates: For 2D cases, the coordinates correspond to the I and J indices of the starting
and ending nodes of the patch. For 3D cases, they correspond to the indices (see table below) of the
lowest and the highest nodes of the patch (see Figure B.2.3-2):
For I=constant boundary J and K indices.
For J=constant boundary I and K indices.
For K=constant boundary I and J indices.

In our example, the string input is:


SOL 1 1 20 10

INL 1 10 10 20

OUT 10 10 20 20

For matching and non matching "connection" and "periodic" boundary conditions, an additional
string is needed beside the node coordinates. This string is composed of:
• 3 numbers : - the domain number. It indicates the domain which is connected to the current
domain.
- the boundary number. It indicates the boundary which is connected to the
current boundary.
- the patch number. It indicates the patch which is connected to the current
patch.

CFView™ B-13
Input File Format Native File Format

PATCH ORIENTATION: SAME CORNER PATCH ORIENTATION: REVERSE


POSITION
FROM TO FROM TO

n2 n2 n2 n1
1
n1 n1 n1 n2

1 1 1 1

n2 n1 n2 n2
2
n1 n2 n1 n1

1 2 1 2
3 3

n2 n1 n2
n2
3
n1 n2 n1 n1

1 1
4 4
n2 n1
n2 n2
4
n1 n1 n1 n2

1 1

n1, n2: first and second variable coordinate indices along the patch

FIGURE B.2.3-3 Standard notation for the block faces and the orientation of edges in the -
computational domain.

Additionally for matching "connection" and "periodic" boundary conditions the relative orientation
of the connected patches has to be specified:
• 1 letter:
"R" or "E" to indicate the orientation between the connected patches. Figure B.2.3-3 gives the
different orientations between the connected faces. If they have the same orientation, the corre-
sponding letter is E, otherwise it is R. To find the orientation, do the following steps: 1/ put the
connected surfaces face to face. 2/ project the local axis of both surfaces on two rectangles as
shown in Figure B.2.3-3. 3/ Permute the axis of the first rectangle to put them in the bottom left
corner. 4/ permute the same number of time the axis of the second rectangle. 4/ find the corre-
sponding case in table of Figure B.2.3-3.
• 1 number:
It indicates the relative corner position of the connected patches (see Figure B.2.3-3).
Figure B.2.3-4 gives an example of a two-domain application. The two domains are connected by
boundary number 1 (i=1).

B-14 CFView™
Native File Format Input File Format

The Boundary Condition file input for the first domain is:
100 50 50

EXT 11 50 50

EXT 11 100 50

CON 11 100 50 231E3


1

INL 11 100 50
1

EXT 11 100 50

EXT 11 50 50

The Boundary Condition file input for the second domain is:
100 50 50

EXT 11 50 50

EXT 11 100 50

CON 11 100 50 131E3


1

OUT 11 100 50

1
EXT 11 100 50

EXT 11 50 50

CFView™ B-15
Input File Format Native File Format

1 50 50 100 50 50

1 1 50
100 1 50
1 50 1 100 50 1
K
J
111
Boundary 3 I 100 1 1
CON 100 1 1 I 111
Domain 2 Boundary 3
J CON
100 50 1 Domain 1
1 50 1 K

FIGURE B.2.3-4 Example of connectivity between two domains.

B-2.4 Unstructured Cell Connectivity File

4
F2

F1
F3
3

1
2
2 v
1
2
1 1 2 1

u
2
F4

FIGURE B.2.4-1 Local Tetrahedra Topology.

For structured meshes, the Boundary Condition file contains the I, J, K indices of the boundaries,
the associated conditions (solid, external...)and are in an ASCII format.

B-16 CFView™
Native File Format Input File Format

For unstructured meshes, the topology file in binary format contains the mesh topology and the
boundary conditions if existing. The boundaries of unstructured meshes can have different patches
associated to different boundary conditions.
In order to create this binary file, you have to go through the following steps:
1. Create the topology file in an ASCII format.
2. Generate the binary file by using the cfv.ucc tool. See the “CFView Tools” section for more
details about this tool. The topological domain is a set of right-hand side oriented cells. These
cells can be defined for 3D as Tetrahedral (4 nodes), Hexahedral (8 nodes), Prism (6 nodes),
Pyramid (5 nodes) and for 2D Triangle (3 nodes) or Quadrilateral (4 nodes). An example of Tet-
rahedral with four nodes is given in Figure B.2.4-1. The topology and the node coordinates
define the orientation and the local coordinate system (u, v, w) of each cell.
The order of the nodes for each cell is important. The first specify the origin of the local coordi-
nates, the other specify the u, v and w axes. Be careful to follow the right-hand side of these axes.
In Figure B.2.4-1, the order of the nodes is “1 2 3 4". You can chose another origin, for example the
node 3. The cell topology becomes “3124”. You can also impose the direction of u along the direc-
tion 1-4. The input becomes “1423”.

 The node indexing is given by the sequential order of the node's coordinates in the
Geometry file. Therefore, the first point of Geometry file is node 1, the second is node is
node 2... etc.

B-2.4.1 Create Topology File in ASCII Format


To generate this file, follow the steps below. Our example contains 4 cells (see figure here below).

1432 2 5
5234 Solid
2147
6417
7

3
1

6
4

FIGURE B.2.4-2Example of a 3D unstructured mesh. with 4 cells and 7 nodes.

1. Give the number of domains and the dimension (2D or 3D). In our example, the string input
is:
13

CFView™ B-17
Input File Format Native File Format

2. Give the mesh type (X or H). The mesh can be Homogeneous (H), if all the cells have the same
number of nodes, or Heterogeneous (X), if the cells have different numbers of nodes. In case of
Homogeneous meshes, you have to specify the type of element by giving the number of nodes
per cell. In our example, the string input is:
H4
For a Heterogeneous mesh, it would be:
X
3. For each domain:
•Enter the number of nodes, the number of cells and the number of patches (a patch is
associated to a boundary condition such as solid, external, connection...). If there is no
patch, enter 0. In our example, there are seven nodes, four cells and 1 solid patch. The
string input is:
741
Depending of the mesh type, the following specifications are different:
For Homogeneous meshes
•For each cell, enter its nodes. In our example, the string input is:
1432

2147

5234

6417
•For each patch, if existing, give the boundary condition, the number of patch cells, the
number of nodes per cell and their nodes:
Boundary conditions: There are 8 boundary conditions which are identified by a
number:
connection: 1
external: 2
inlet: 3
mirror: 4
outlet: 5
periodic: 6
singular: 7
solid: 8

Number of patch cells and number of nodes per cell: a patch is a part of the boundary.
Specify the number of cells for the patch and the number of nodes per cell.
In our example, the string input is
823

524

247

B-18 CFView™
Native File Format Input File Format

The complete ASCII boundary condition file for our example is:
13

H4

741

1432

2147

5234

6417

823

254

247

For Heterogeneous meshes


•For each cell, enter the number of nodes per cell. For instance if cell 1 is a tetrahedral (4
nodes) and cell 2 is a prism (6), the string input is:
46
•For each cell, enter its nodes. For example, the string input is:
1432

142567
•For each patch, if existing, give the boundary condition, the number of patch cells, the
number of nodes for each cells and their nodes:
For example, if a solid patch has two cells, one with 3 nodes and the other with 4 nodes,
the string input is
82

34

143

1654

B-2.5 Create Geometry & Quantity Files


The Geometry and Quantity files are binary files and have a specific format. In order to create these
binary files, CFView™ provides tools. These tools take ASCII files in entry and produce the binary
files. The tools and the format of the ASCII input file are described in this section.
The ASCII format of the Geometry and Quantity files is described in the section below. For each
kind of Geometry files and Quantity files, the CFView™ tools to be used will be indicated. A com-
plete description of each tool is given in the next section.

 If you are an experienced programmer, you can skip the use of these tools by making a
program which directly converts your binary data files (coming from a solver) in
CFView™ format. Please, take contact with NUMECA International (sup-
[email protected]) to have more details about how to make such interface.

CFView™ B-19
Input File Format Native File Format

B-2.5.1 ASCII Geometry Files


These files contain the geometric data of the project and are required to generate the input binary
files using CFView™ tools. They consist of point coordinates given in a special order. This order
defines that I index is changing first, followed by J and then by K. For 2D problems the K coordi-
nate is not present.
A Geometry file is associated to each data type, except for the surface data which have the same
Geometry file as the field data. Following these data types, the tools you use to generate the binary
file are changing. Turn to section “CFView tools” for a complete description of these tools.
A short description of the Geometry files is outlined below for each data type.

 The Geometry files have a “.g” extension.

a) Field Data & Surface Data Geometry File


It consists of point coordinates at the mesh nodes. Turn to “cfv.gscl” tool for single domain applica-
tions and to “cfv.mdga” tool for multi domain applications.

b) Validation Data Geometry File


It consists of point coordinates on a curve on which validation data are defined. Turn to “cfv.gscl”
tool to create this file.

c) Plot Data Geometry File


It consists of three columns containing values. Each columns can be represented as the absciss of a
plot. The ordinate value is given in a plot data Quantity file. Turn to “cfv.gscl” tool to create this
file.

B-2.5.2 ASCII Quantity Files


Quantity files store values defined at mesh nodes or on specific curves. They consist of scalars or
vectors. For the scalar quantities, one value is given per node. The vector quantities need the input
of all vector components.
Turn to “cfv.scal”, “cfv.gscl”, “cfv.mdfda” to create these files.

 The Quantity files have a “.s” extension for scalars and a “.v” extension for vectors.

B-2.6 CFView™ Tools for Native File Format


This section contains the description of the CFView™ tools and the format of the ASCII input files.

 Before using these tools, we invite the user to contact support team at "sup-
[email protected]" concerning their availability and maintenance as these are very old
tools.

Notations
• Ndom: number of domains.
• Ndim: number of dimensions.
• Nscal: number of scalars.

B-20 CFView™
Native File Format Input File Format

• Nvec: number of vectors.


• Npnts: number of points.
• Value (i,j,k,scal): value of the scalar “scal” at the i,j,k node.
• Value (i,j,k,vec): value of the vector "vec" at the i,j,k node.

cfv.scl
• Purpose: This command generates several binary scalar files from a single input ASCII quantity
file. Use this tool if you want to split a file containing many scalars defined at the same points in
several files containing one scalar.
• Type: % cfv.scl <input file name> <output root name>
•<input file name>: name of an ASCII Quantity file with format:

Nscal, Npnts Npnts = ni * nj * nk

Value (i,j,k,scal) do loop for scal = 1 to Nscal

for k=1 to nk

for j=1 to nj

for i=1 to ni

•<output root name>:root name of the binary scalar files, which are created. A
".s."+number extension is added to the root name. The number starts at 1 and is
incremented for each scalar.
• Example: An ASCII file "example" contains 2 scalars (T and P) defined in 4 points. The input
ASCII file will be:
24

T1 P1

T2 P2

T3 P3

T4 P4

Type: % cfv.scl example scalars


The result is two files whose names are: "scalar.s.1" and "scalar.s.2".

cfv.stov
• Purpose: This command generates one binary vector file from several input binary scalar files.
• Type: % cfv.stov <input file name 1> ... <input file name x> <output root name>
•<input file name x>:name of a binary scalar file. For example, this file can be created
using the "cfv.scal" command.
•<output root name>:root name of the binary vector file which is created. A ".v" exten-
sion is added to the root name.

CFView™ B-21
Input File Format Native File Format

cfv.vec
• Purpose: This command generates one binary file from a single input ASCII file. It is useful if
you want to transform a 2D quantity or geometry file in a 3D file. A zero z coordinate or value
will be added to your data.
• Type: % cfv.vec <input file name> <output root name>
•<input file name>:name of an ASCII quantity or geometry file with format:

Ndim, Npnts Npnts = ni * nj * nk

Value (i,j,k,vec) do loop for k=1 to nk

for j=1 to nj

for i=1 to ni

•<output root name>:root name of the binary quantity or geometry files which are cre-
ated. There is no added extension.
• Example: An ASCII file "example" contains 3 points in 2D on which a quantity is given. The
input ASCII file will be:
23

U1 V1

U2 V2

U3 V3

Type: % cfv.vec example vector


The result is a "vector" file which contains:

U1 V1 0

U2 V2 0

U3 V3 0

cfv.gscl
• Purpose: This command generates several binary scalar files and one binary geometry file from
an single input ASCII Quantity file. Use this tool if you want to split an input file containing
point coordinates and scalars in several files: one containing the point coordinates and each
other containing a scalar.
• Type: % cfv.gscl <input file name> <output root name>
•<input file name>: name of an ASCII file with format:

Ndim, Nscal,Npnts Npnts = ni * nj * nk

x(i,j,k) y(i,j,k) z(i,j,k) Value do loop for k=1 to nk


(i,j,k,scal)
for j=1 to nj

for i=1 to ni

for scal = 1 to Nscal

B-22 CFView™
Native File Format Input File Format

•<output root name>: root name of the binary scalar files which are created. A ".g"
extension is added to the root name for the binary geometry file. A ".s."+number
extension is added to the root name for the binary scalar file. The number starts at 1
and is incremented for each scalar.
• Example:An ASCII file "example" contains 2 scalars (T and P) defined in 4 points. The input
ASCII file will be:

324

X1 Y1 Z1 T1 P1

X2 Y2 Z2 T2 P2

X3 Y3 Z3 T3 P3

X4 Y4 Z4 T4 P4

Type: % cfv.gsclexample scalars


The result is three files with the names: "scalar.g", "scalar.s.1" and "scalar.s.2".

cfv.ascii
• Purpose: This command converts a binary file in an ASCII file.
• Type: % cfv.ASCII <input file name>
•<input file name>:name of a binary file.

cfv.scale
• Purpose: This command multiplies the content of a binary geometry file by a scalar which is
interactively entered.
• Type: % cfv.scale <input file name>
•<input file name x>: name of an binary geometry file.

cfv.mdga
• Purpose: This commands generates several binary Geometry files from a single ASCII Geome-
try file.
• Type: % cfv.mdga <input file name> <output root name>
•<input file name>:name of an ASCII or binary Geometry file with format:

Ndom, Ndim Npnts = ni * nj * nk

Npnts do loop for dom = 1 to Ndom

x(i,j,k) y(i,j,k) z(i,j,k) do loop for k=1 to nk

for j=1 to nj

for i=1 to ni

CFView™ B-23
Input File Format Native File Format

•<output root name>:root name of the binary geometry files which are created. A
".d"+number+".g" extension is added to the root name for the binary Geometry files.
The number starts at 1 and is incremented for each domain.
• Example:An ASCII file "example" contains two 3D domains of respectively 4 and 5 points. The
input ASCII file will be:

23

X1 Y1 Z1

X2 Y2 Z2

X3 Y3 Z3

X4 Y4 Z4

X1' Y1' Z1'

X2' Y2' Z2'

X3' Y3' Z3'

X4' Y4' Z4'

X5' Y5' Z5'

Type: % cfv.mdga example geometry


The result is two files whose names are: "geometry.d1.g" and "geometry.d2.g".

cfv.mdfda
• Purpose: This command generates several binary Quantity (scalar and vector) files from a sin-
gle ASCII Quantity file.
• Type: % cfv.mdfda <input file name> <output root name>
•<input file name>: name of an ASCII or binary Quantity file which format is:

Ndom, Ndim, Nscal, Nvec Npnts = ni * nj * nk


Npnts do loop for dom = 1 to Ndom
value (i,j,k, x) for k=1 to nk
for j=1 to nj
for i=1 to ni
do loop for x=1 to Nscal+Ndim*Nvec

•<output root name>: root name of the binary Quantity files which are created. A
".s"+number extension is added to the root name for the binary scalar files. The
number starts at 1 and is incremented for each scalar. A ".v"+number extension is
added to the root name for the binary vector files. The number starts at 1 and is
incremented for each vector.

B-24 CFView™
Native File Format Input File Format

• Example: An ASCII file "example" contains one 3D domain of 4 points. There are 2 scalars (T,
P) and one vector V (Vx, Vy, Vz). The input ASCII file will be:

1321

T1 P1 Vx1 Vy1 Vz1

T2 P2 Vx2 Vy2 Vz2

T3 P3 Vx3 Vy3 Vz3

T4 P4 Vx4 Vy4 Vz4

T5 P5 Vx5 Vy5 Vz5

Type: % cfv.mdfda example scalar


The result is five scalar binary files ("scalar.s1", "scalar.s2", "scalar.s3", "scalar.s4", "scalar.s5")
and one vector binary file (scalar.v1).

cfv.ugc
• Purpose: This command generates one or more unstructured topology files from an ascii input
file.
• Type: % cfv.ugc<input file name> <output root name>
•<input file name>: name of an ascii file whose format is described in the "Creating the
ASCII Topology & Boundary Condition File" section.
•<output root name>: root name of the unstructured topology files which are created. A
".d"+number+".gb" extension is added to the root name. The number starts at 1 and
is incremented for each domain.

cfv.v56, cfv.v65
• Purpose: The binary input files of CFView 3.5 have a different format than those from CFView
3.6. In order to convert the CFView 3.5 files into the CFView 3.6 format, or vice versa, use
respectively the cfv.v56 or cfv.v65 tool.
• Type: % cfv.v56 <input file name>
•<input file name>:name of a binary file. Can be * if the user wants to convert all the
files at the same time.
• Example: A directory contains all the files of a CFView3.5 project, including the ASCII files
(xxx.cfv and xxx.bc files) and the binary files (scalar, vector and geometry files). To convert
these files into readable files for CFView 3.6, type the following:
Type: % cfv.v56 *
This command will sort out the binary files from the ASCII files and will convert the binary
ones into CFView 3.6 files.

CFView™ B-25
Input File Format FINE™/Turbo File Format

B-3 FINE™/Turbo File Format


CFView™ is able to read directly the FINE™/Turbo project files. These projects are 3D or 2D
structured multi-blocs projects. The FINE™/Turbo data sets are split in a variable number of files,
however, the files that has to be selected in CFView™ are always characterized by the ".run" or the
".cfv" extension.
Please refer to the FINE™/Turbo User Manual for further information on the format of these files.

B-4 CGNS File Format Support


CFView™ is able to read data sets contained in CGNS formatted files. CGNS is a general purpose
format for CFD data storage and cross system compatibility (see http://www.cgns.org for a com-
plete presentation of the format).
The present version of CFView™ supports 2D and 3D structured multi-block and unstructured data
sets. The loading of a CGNS file from the file chooser is restricted to CGNS files containing only
one base. If a CGNS file contains more than one base, it is possible to open it using the macro com-
mand CGNSProjectOpen, where both the file name and the base name are specified (see section 7-
5.3).

B-26 CFView™
Index

INDEX
A Paste 4-32
Align Views 2-25 Range 4-31
Animation Reverse 4-31
Cutting Planes 6-7
Size 4-35
IJK Surfaces 6-6
Cells 3-29, 7-22
Recording 2-6
cfv.ASCII B-23
Steady 6-1
cfv.gscl B-22
Streamlines 6-2
cfv.mdfda B-24
Unsteady 6-9
cfv.mdga B-23
Vector Line 6-2
cfv.scale B-23
AutoGrid 4-62
cfv.scl B-21
Axes
cfv.stov B-21
Graduated 2-26
cfv.ugc B-25
Orientation 2-25
cfv.v56, cfv.v65 B-25
Axis 4-33, 7-54
cfv.vec B-22
Azimuthal Average 5-5, 5-9, 7-17
CGNS 2-10
B CGNS File B-26
Background Color 1-4 Close Project 2-15
Blade Section 5-9 Color 4-18
Blade to Blade 2-23, 5-1, 7-29 Background 1-4, 4-62
Border 2-22 Editor 4-58
Boundaries Color Contour 4-18, 7-35
Curve Type 3-19 Flat 4-18
Representation 3-19 Smooth 4-19
Boundary
Strip 4-19
Conditions B-2
Threshold 4-19
Boundary Condition 3-4
Update 4-21
Boundary Surfaces 3-2
Colormap 4-50, 7-51
C Range 2-6
Camera Command Line 1-4
Dynamic 2-18 Compute Meridional 5-7
Position 2-18, 2-20, 2-21 Compute Pitch Average 2-23
Projection 2-17, 2-18, 2-20 Conventions 1-3
Rotation 2-19 Coordinate System 2-6, 2-26
Zoom 2-19 Copy 4-32
Camera Control 7-20 Cursor Position 2-8
Cartesian Plot 4-28, 7-16, 7-37, 7-48 Curve Integrals 4-65, 7-47
Axis Label 4-33 Cutting Plane 3-6, 3-13
Axis Variable 4-30 Cutting Planes 6-7, 7-24
Copy 4-32 Scrolling 6-7
Delete Curve 4-32
Export 4-36 D
Data
Graduation 4-33
Derived 4-11
Grid Lines 4-34
Particle Traces 4-2
Limited Section 4-32
Plot Data 4-2, 4-38
Logarithmic 4-31
Range 4-50
Merge 4-32
Validation Data 4-2, 4-37

CFView™ i
Index

INDEX
Decoration Text 4-55 Hub 5-1, 5-8, 7-29
Default Settings 4-61
I
Default View 2-20
Identification
Delete
File B-2
Surface 3-8
Mesh B-4
Derived Quantity 4-11
IJK Surfaces 3-13
Double Buffering 1-6
Installation 1-3
Dynamic Viewing 2-18
Integrals 2-8, 4-63
E Interactive Selection 3-29
Elements Viewing 3-29 Isolines 4-16, 7-36
EPS Format 4-68 Iso-Surface 3-17
Export Save 3-18
Active Surfaces 4-65 Iso-Surfaces 4-27, 7-36
Plot Curves 4-36
J
F JPEG Format 4-68
Face Displacement 4-62
Field Data 4-3 K
File Keyboard Input 2-8
Topology B-2
File Format B-26 L
Files Lagrangian 4-54
Boundary Conditions B-6 License 1-3
Geometry B-2, B-6 Limited Section 4-32
Python 7-1 Line Type 4-18, 4-21, 4-49, 7-34
Quantity B-6 Local Values 4-15, 7-35
Fit 2-20
Font M
Editor 4-59 Macro 2-28, 3-10, 7-1
Force 4-63, 7-45 Cartesian Plot 7-16
Free RAM 4-14 Defaults Settings 7-9
Full Render 2-21 Modules 2-30, 7-6
Operators 7-2
G Picture 7-11
Geometry Play 2-29
Repetition 3-28
Project 7-12
Gouraud 3-21
Record 2-29
Graphics
Save 2-30
Drivers 1-6
Unsteady 7-13
Graphics Area 2-7
Update 7-16
Graphics Options 1-6
View 7-14
Graphics Update 2-23
Marker
Grid 3-19
Editor 4-60
H Marker Type 4-16, 4-21, 4-49, 4-60, 7-34
Hardware Requirement 1-3 Massflow 4-64
Heterogeneous B-19 Menu Bar 2-3
Hidden Lines 3-20 Merge 4-32
Homogeneous B-18 Meridional Average 2-23, 5-5

ii CFView™
Index

INDEX
Meridional Patch 5-5, 5-8, 7-17 Q
Mesh B-2 Quantity 7-31
Mesh Representation 7-21 Delete 4-12, 4-14
Mesh Size 7-23 Derived 4-11
Mesh Surface 3-6, 3-11 Field Data 4-3
Mesh Surfaces 7-26 Loading 4-12
Message 2-7 On Wall 4-2
Modules 2-30, 7-6 Particle Traces 4-54
Move 2-24 Plot Data 4-38
MPEG 2-6 Range 2-6, 2-8, 4-50, 7-33
MSW 1-6 Scalar 4-2
Multiple Projects 2-12 Selection 4-3
Solid Data 4-7
N Status 4-13
Native Format 2-10, B-2 Surface 4-11
Number Format 4-16, 4-61 Thermodynamic 4-7
Types 4-1
O
Unload 4-12
Opengl 1-6
Validation Data 4-37
Operators 4-11
Vector 4-2, 4-38
Orientation Axes 2-25
Quick Access Pad 2-6
Orthogonal 2-22
Output
R
Active Surfaces 4-65
Range 4-50, 7-33
Print Image 4-66
Range Colors Type 4-19
P Record Macro 2-29
Partial Loading 2-12 Refresh 2-23
Particle Traces 4-2, 4-54, 7-32 Render 2-21
Paste 4-32 Rendering 3-21, 4-62, 7-29
PBM Format 4-68 Color 3-21
Perspective 2-17, 2-22, 7-19 Gouraud 3-21
PGM Format 4-68 Hidden Lines 3-20
Pitch Average 2-23 Repetition 3-28, 7-22
Play Macro 2-29 Representation
Cartesian Plot 4-28
Plot Curve 4-32
Color Contour 4-18
Plot Data 4-2, 4-38
Delete 4-56
Plot3D 2-11
Isolines 4-16
PNG format 4-67
Iso-Surface 4-27
PostScript 4-67
Local Values 4-15
PPM Format 4-68
Particle Trace 4-54
Project 2-9
Undo 4-56
Close 2-5, 2-15
Vector 4-39
Fine Turbo 2-10
Vector Line 4-43
Open 2-5, 2-12
Reset 2-23
Projection 7-19
Resize 2-24
Push Back 2-24
Reverse Video 1-4, 4-62
Python 2-28, 7-1

CFView™ iii
Index

INDEX
S T
Save Macro 2-30 Templates 2-28
Scalar 4-2 Text 4-55
Scale 2-18, 7-22 Create 2-5
Scrolling 6-7 Editor 4-57
IJK Surfaces 6-6 Font 4-55
Select Open 2-12 Insert 4-55, 7-52
Selection 3-10 Type 4-55
Shading 3-21 Text Type 4-16
ShortCut 2-5 Thermodynamic Data 4-7
Shroud 5-1, 5-8, 7-29 Threshold 4-19
Solid Data 4-2, 4-7 Range Colors Type 4-19
Span Distribution 5-9 TIFF Format 4-68
Split Surface 3-16 Tile Views 2-24
Start CFView™ 1-4 Time Label 7-44
Streamlines 4-22, 4-43, 7-43 Time Step 7-13
Animation 6-2 Toolbar 2-5
Delete 4-26 Torque 4-63, 7-45
Grid Line 4-24 Transparent 2-22
Local 4-23 Troubleshooting 1-7
Parameters 4-25 Turbomachinery Mode 5-8, 7-17
Section 4-23
U
Update 4-26
Undo 4-56, 7-19
Stretched 2-22
Unsteady Animation 2-6
Structured B-2
Unstructured B-2
Superpose Views 2-25
Surface Update 2-23, 7-16
Macro 3-10 Update Abort 1-6
Transparency 3-21 User Interface 2-2
Surfaces 3-2
V
Blade to Blade 5-3
Validation Data 2-15, 4-2, 4-37
blade to blade 3-6
Vector 4-2, 4-38, 7-41
Cutting Planes 6-7
Arrow Shape 4-42
Delete 3-6, 3-8
Color 4-41
Filter 3-6
Delete 4-42
Group 3-2, 3-6, 3-8
Size 4-41
Hub 5-1, 5-8
Type 4-42
List 3-2
Vector Field 4-39
Rename 3-6, 3-9
Vector Line 4-43, 7-43
Scrolling 3-11, 3-13, 6-6
Delete 4-49
Selection 3-2, 3-3, 3-4, 3-6, 3-8, 3-9, 3-29
Grid Line 4-44
Shroud 5-1, 5-8
Local 4-43
Split 3-16
Parameters 4-44
Visualisation 3-5, 3-8
Section 4-43
Wireframe 3-19 View
Surfaces Integrals 4-63, 7-44 Align 2-25
Swap Views 2-25 Arrange Icons 2-25

iv CFView™
Index

INDEX
Azimuthal Average 5-5
Blade to Blade 5-1, 5-3
Border 2-22
Camera 2-16
Cartesian 2-5, 2-23
Close 2-5, 2-23
Cylindrical 2-5, 2-23
Maximize 2-23
Minimize 2-24
Move 2-24
Push Back 2-24
Reset 2-23
Resize 2-24
Size 2-5, 2-23, 2-24, 4-62
Superpose 2-25
Swapping 2-25
Tile 2-24
Transparency 2-22
Viewer Debugger 2-30
Viewing Buttons 2-8

W
Warnings 2-7
Weighted Integrals 4-63, 7-46
Wireframe 4-21

X
X11 1-6
X-Projection 2-19

Y
Y-Projection 2-19

Z
Zoom 2-19
Z-Projection 2-19

CFView™ v

You might also like