You are on page 1of 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 Overview 1-2 Introduction Features Approach & Acknowledgments 1-3 Conventions Used in this Manual 1-4 Outline 1-5 Running CFView Basic Installation Starting CFView 1-6 Advanced Options Command Line Arguments Customizing Graphics Options Double Buffering Reverse Video Update Abort Graphics Drivers 1-7 Troubleshooting CHAPTER 2: Graphical User Interface, Projects & Views 2-1 Overview 2-2 Graphical User Interface (GUI) Menu Bar Pull-down Menu Menu General Organization Keyboard Shortcuts ToolBar Open & Close Project Buttons View Handling Buttons Coordinate Axis Buttons Quantity Range Control Buttons Unsteady Animation Buttons Quick Access Pad (QAP) Graphics Area Message Area Keyboard & Viewing Control Area Keyboard Input Area Quantity Range Monitor Information Output Area 2-3 Project Management File Chooser Supported File Formats Open CFView Native File Format (.cfv) Open FINE/Turbo File Format (.run & .cgns) Open Autogrid5 CGNS (.cgns) Open CGNS Formatted File (.cgns) Open Plot3D Formatted Files

1-1 1-1 1-1 1-1 1-2 1-3 1-3 1-3 1-3 1-4 1-4 1-4 1-6 1-6 1-6 1-6 1-6 1-7 2-1 2-1 2-2 2-3 2-3 2-3 2-5 2-5 2-5 2-5 2-6 2-6 2-6 2-6 2-7 2-7 2-8 2-8 2-8 2-8 2-9 2-9 2-10 2-10 2-10 2-10 2-10 2-11

CFView

iii

Contents

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

2-12 2-12 2-15 2-15 2-16 2-16 2-16 2-17 2-18 2-18 2-18 2-18 2-18 2-19 2-19 2-19 2-20 2-20 2-20 2-20 2-20 2-20 2-21 2-21 2-21 2-21 2-21 2-22 2-22 2-22 2-22 2-22 2-23 2-23 2-23 2-23 2-23 2-23 2-23 2-24 2-24 2-24 2-24 2-24 2-24 2-25 2-25 2-25 2-25

iv

CFView

Contents

Add Coordinate Axes Insert Orientation Axes Insert Graduated Axes Graduated Axis Representation Control 2-6 Templates & Macro Scripts Apply Templates Use Macro Scripts Play Active Macro Record User Actions Clear Active Macro Load Macro Save Active Macro Execute Macro Script Data File Save All Macro Recording Since Session Start Load Macro Module Viewer/Debugger CHAPTER 3: Creating & Handling Surfaces 3-1 Overview 3-2 What are Surfaces in CFView? Surfaces Types Activation/Selection of Surfaces Project Surfaces List Surfaces Groups 3-3 Select Surfaces From Quick Access Pad Surfaces List Set Surfaces Activation State Visualize for Quick Identification Reverse Surface(s) Normal Visualize Surface(s) Normal Check Number Of Points Create/Delete Group Rename Surface/Group Delete Surfaces from Project Surface Creation Shortcut Buttons Surface Selection by Filter Frame From Geometry Menu Surface Selection Visualization of Group Composition Visualization for Quick Identification Remove all Surface Representations in the Active View Delete Surfaces from Project Rename Surface or Group Interactive Surface Selection Surface Selection using Macro 3-4 Create Surfaces Create Mesh Surface

2-25 2-25 2-26 2-27 2-28 2-29 2-29 2-29 2-29 2-29 2-29 2-30 2-30 2-30 2-30 2-30 3-1 3-1 3-1 3-2 3-2 3-2 3-2 3-3 3-3 3-3 3-4 3-5 3-5 3-5 3-5 3-6 3-6 3-6 3-6 3-6 3-7 3-8 3-8 3-8 3-8 3-8 3-9 3-9 3-10 3-11 3-11

CFView

Contents

Create Cutting Plane Create Cutting Surfaces defined from IGG curve Split Surfaces Create Iso-surfaces Compute Iso-surface Save Iso-surface 3-5 View Surfaces View Surfaces Boundaries View Solid Boundaries Update Surfaces Boundaries Representation View Grid Wireframe Update Grid Wireframe Representation Hidden Lines Rendering Uniform Coloring Flat Shading Gouraud Shading Remove Rendering Effects Modify Rendering Color Diffuse Specular Highlight Opacity Reflection Set Visibility, Light & Shadow Attributes Toggle Light Contour Toggle Light Grid Toggle Light Face Display Shadow Light Editor Graphics Repetition Surfaces Representation Selectability 3-6 View Elements (Unstructured Meshes Only) CHAPTER 4: Flow Quantities Visualization 4-1 Overview 4-2 Select & Create Flow Quantities Quantity Types Select Field Quantity Select Mechanical data Select Solid Quantity Select Computed Thermodynamic Quantity Definition of Computed Thermodynamical Quantities Perfect Gas Incompressible Fluid Real Gas Select Vector Component Apply Differential Operators: Gradient, Divergence or Curl. Create Derived Quantity Field Quantities & Computer Memory Management

3-13 3-15 3-16 3-17 3-17 3-18 3-18 3-19 3-19 3-19 3-19 3-20 3-20 3-20 3-21 3-21 3-21 3-21 3-23 3-23 3-24 3-24 3-25 3-26 3-26 3-26 3-27 3-27 3-28 3-29 3-29 4-1 4-1 4-1 4-1 4-3 4-3 4-7 4-7 4-7 4-8 4-8 4-9 4-9 4-10 4-11 4-12

vi

CFView

Contents

Quantities Load on Demand Unload Quantities Field Quantities Status Dialog Box RAM Management and Unsteady Post-processing 4-3 Visualize Scalar Data Local Values Display Local Values Update Local Values Delete Local Values Isolines Draw Local Isoline Drawing Multiple Isolines Update Isolines Delete Isolines Color Contours Flat Smooth Strip Thresholding (Flat, Smooth and Strip) Color Contour Transparency Update Color Contour Delete Color Contours Streamlines Local Streamline Streamline from Section Streamline from Grid Line Streamlines Parameters Update Streamline Delete Color Streamlines Iso-Surfaces Cartesian Plots Cartesian Plot along Surface Boundaries Cartesian Plot along Solid Surface Boundaries Cartesian Plot along Section Cartesian Plot along a Grid Line Update Cartesian Plot Change Axis Variable & Range Update Curve Type Copy/Paste/Merge Curves Delete Plot Curves Change Axis Ticks & Labels Ticks & Numbers Axis Label Add Grid Lines in Cartesian Plot Resize Cartesian Plot Cartesian Plot Axis Editor Dialog Box Update/Plot Menu Export Plot Curve(s) in File 4-4 Represent Validation Data

4-12 4-12 4-13 4-14 4-15 4-15 4-15 4-15 4-16 4-16 4-16 4-17 4-18 4-18 4-18 4-18 4-19 4-19 4-19 4-20 4-21 4-22 4-22 4-23 4-23 4-24 4-25 4-26 4-26 4-27 4-28 4-28 4-28 4-28 4-29 4-30 4-30 4-31 4-32 4-32 4-33 4-33 4-33 4-34 4-35 4-35 4-36 4-36 4-37

CFView

vii

Contents

4-5 Represent Plot Data 4-6 Visualize Vector Data Arrow Representation Local Vector Vector on Grid Nodes Thresholded Vector on Grid Nodes Vectors along Section Vectors along Grid Line Update Vector Representation Change Representation Scale Change Color & Line Type Vector Type Dialog Box Delete Vector Representations Vector Lines Local Vector Line Vector Lines from Section Vector Lines from Grid Line Vector Lines Parameters Stream ribbons and stream tubes Update Vector Line Representation Update Color Update Curve Type Delete Vector Lines 4-7 Colormap & Representations Range Insert Colormap Control Representations Range Range Set Range Default Range Active Surfaces Update Colormap Representation Smooth & Strip Maps Change Colormap Position & Size Update Axis Graduations & Label Ticks & Numbers Colormap Label Select Colored, Greyscale or Black & White Mapping 4-8 Represent Particle Traces Data Update Particle Traces Representations Delete Particle Traces 4-9 Decoration Texts Insert Text Update Texts Delete Texts 4-10 Update Representations Undo Delete Representation Type Editors Text Type Editor Color Controller

4-38 4-38 4-39 4-39 4-39 4-40 4-40 4-40 4-41 4-41 4-41 4-42 4-42 4-43 4-43 4-43 4-44 4-44 4-46 4-49 4-49 4-49 4-49 4-50 4-50 4-50 4-50 4-51 4-51 4-51 4-51 4-51 4-52 4-52 4-53 4-53 4-54 4-54 4-55 4-55 4-55 4-55 4-56 4-56 4-56 4-56 4-57 4-57 4-58

viii

CFView

Contents

Font Type Controller Curve, Line & Marker Type Editors Line Type Editor Marker Type Editor Numbers Format Editor 4-11 Edit, Save & Restore Defaults What Are Defaults ? Load Defaults from File Save Defaults to a File Other User Preferences Reverse Video AutoGrid Face Displacement 4-12 Surface Integrals Surface Integrals of Scalar Quantities Surface Integrals of Vector Quantities 4-13 Curve Integrals 4-14 Export Quantities Distribution 4-15 Output Generation Output Format Description PNG PostScript Other Formats PostScript Page Layout Editor CHAPTER 5: Turbomachinery Specific Features 5-1 Overview 5-2 Visualization in Blade to Blade Coordinates Hub & Shroud Surfaces Definition Open Blade to Blade View Visualization of Blade to Blade Surfaces 5-3 Compute Meridional View by Azimuthal Averaging Meridional Patches Definition Compute & Open Meridional View 5-4 TurboMachinery Mode Start TurboMachinery Mode TurboMachinery Mode Description Quit TurboMachinery Mode CHAPTER 6: Animations & Unsteady Data Analysis 6-1 Overview 6-2 Animations in Steady State Data Sets Animation of Vector Lines Markers Arrows Animation by Mesh Surfaces Scrolling Animation by Cutting Planes Scrolling

4-59 4-59 4-59 4-60 4-61 4-61 4-61 4-62 4-62 4-62 4-62 4-62 4-62 4-63 4-63 4-64 4-65 4-65 4-66 4-67 4-67 4-67 4-68 4-68 5-1 5-1 5-1 5-1 5-3 5-3 5-5 5-5 5-7 5-8 5-8 5-8 5-10 6-1 6-1 6-1 6-2 6-2 6-3 6-6 6-7

CFView

ix

Contents

Recording a steady animation 6-3 Animation of Unsteady Data Sets Recording an unsteady animation CHAPTER 7: Macro Language 7-1 Overview 7-2 Python Language 7-3 Python Language Overview Adding Commented Lines Support for Mathematical Operations String Handling Lists Handling Program Flow Control : Conditional & Loop Statements Function Definition File Handling Execute Python Script from another Python Script Create & Use Modules (Library of Functions) 7-4 Macro Script Examples Compute Surface Integrals Export Field Values to a File 7-5 CFView Command Description Commands Related to Defaults Settings Picture Output Generation Commands Related to Project Handling Commands Related to Additional Views Creation Commands Related to Animation Control Commands Related to Multiple Views Handling Commands Related to Turbomachinery Mode Commands Related to Meridional View Creation Commands Related to Active View Only Commands Related to Viewing Geometry of Active View Commands Related to Mesh Representation Commands to Obtain Informations on Data Set Commands Related to Surface Creation Commands Related to Surface or Group Surface Selection Commands Related to Blade to Blade Definition Commands Related to Surface Rendering Commands Related to Quantity Selection Commands Related to Quantity Probing Commands Related to Scalar Quantity Representations Local Values Color Contours Isolines Iso-Surfaces Plot Generation Stream Lines Commands Related to Vector Quantity Representations Local Vector

6-8 6-9 6-10 7-1 7-1 7-1 7-2 7-2 7-2 7-3 7-3 7-4 7-4 7-5 7-6 7-6 7-6 7-6 7-8 7-9 7-9 7-11 7-12 7-14 7-14 7-16 7-17 7-17 7-18 7-19 7-21 7-23 7-24 7-26 7-29 7-29 7-30 7-32 7-34 7-35 7-35 7-36 7-36 7-37 7-38 7-41 7-41

CFView

Contents

Vectors Representations Vector Lines Commands Related to Time Label Commands for Computing Integrals on Surfaces Commands for Computing Mechanics Commands for Computing Integrals Along Curves Commands Related to Plot Manipulation Commands Related to Colormap & Range Selection Commands Related to Text Manipulation Commands Related to Axes Systems Representations Orientation Axes Graduated Axes Description of Argument List for Some Standard Features 7-6 Utilities for Handling Curves Point Class Curve Class APPENDIX A:List of Shortcut Keys APPENDIX B:Input File Format B-1 Overview B-2 Native File Format General Concepts Create Identification File Project Identification Mesh Identification General Specifications Field Data Specification Surface Data Specification Domain(s) Identification Validation Data Identification Plot Data Identification Geometry Support for Blade to Blade Views Example of Complete Identification File Create Boundary Condition Files Unstructured Cell Connectivity File Create Topology File in ASCII Format Create Geometry & Quantity Files ASCII Geometry Files Field Data & Surface Data Geometry File Validation Data Geometry File Plot Data Geometry File ASCII Quantity Files CFView Tools for Native File Format B-3 FINE/Turbo File Format B-4 CGNS File Format Support

7-41 7-43 7-44 7-44 7-47 7-47 7-48 7-51 7-52 7-54 7-54 7-54 7-55 7-56 7-56 7-57 A-1 B-1 B-1 B-2 B-2 B-3 B-3 B-4 B-4 B-5 B-5 B-5 B-7 B-7 B-8 B-9 B-11 B-16 B-17 B-19 B-20 B-20 B-20 B-20 B-20 B-20 B-26 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 program. 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) configurations 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 quantitative analysis of the field. This analysis can be performed on any surface and consists of representations 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 turbomachinery 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 computational 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 animated 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 libraries 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 create, 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 information. 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
1-5.1

Running CFView
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
1.

Starting CFView
) or

CFView may be started from the FINE interface by pressing the CFView button ( 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. Typically, 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
1-6.1

Advanced Options
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 module (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 DISPLAY 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 variable.

-driver <driver name>: starts CFView with the specified graphics accelerator (see for information 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 description 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 enabled (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 continuing 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 consists 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 automatically the current computational project. More than one project can be opened simultaneously (see section 2-3.3 for multiple project handling and section 2-3.2 for a detailed description of the supported file formats). 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. The flow quantity and the type of representation are selected. Isolines, color contours, streamlines, iso-surfaces, solid rendering, Cartesian plots are among the most frequently used representations 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. If necessary, the viewing point can be modified (see section 2-5) and the representation parameters can be modified through dialog boxes (see section 4-10). The final picture is printed in one of the available graphic formats (PNG, JPEG, PostScript...).

2.

3.

4. 5.

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 Figure 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, Geometry, 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, structured 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 followed by an arrow. lowed by three dots (...).

items opening a dialog box or a chooser used for the selection of items in a list. These items are fol-

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, repetitions,

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 Validation Data...).

The plot data: they are related to arbitrary X-Y plots, such as convergence history or quantities 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 representations 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... command. 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 composed 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 description 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 description. 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 performs 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 animation 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 contextual 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


FIGURE 2.2.6-1 Keyboard

information output area & 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 window, 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 subset 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 boundaries 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 permission 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, automatically 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 selecting meridional averaged variables. Refer to section B-2, to have a complete description of this format.

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 associated 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 selecting 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 precision 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 proposes 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 comparative 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 complete project. This functionality reduces the CPU time and memory usage and is especially interesting 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 Figure 2.3.4-1.

The left frame in the dialog box allows loading part of the geometry by selecting their corresponding 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 Figure 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 Figure 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. Remember 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 simultaneously and independently displayed and manipulated. A window is called a view in CFView terminology. 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 possible 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 resizing, 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 manipulations 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 u: view right vector

view point

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 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 projection (Orthographic). CFView provides a convenient way to modify the position 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.

Perspective :

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 direction. 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 parameters 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 system.

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 horizontal 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 simultaneously.

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. 2. 3.

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.

These buttons allow also a continuous rotation:


1. 2. 3.

Press on the middle mouse button to initiate a rotation operation. 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. 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. 2. 3.

Press on the left mouse button to initiate a rolling operation. Then drag the mouse to the left or to the right to roll clockwise or counterclockwise. Release when finished.

This button allows also a continuous rotation:


1. 2. 3.

Press on the middle mouse button to initiate a rotation operation. 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. 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. 3.

Then drag the mouse to the left or to the right to zoom in or out. Release when finished.

This button allows also a continuous zoom in or zoom out operation:


1. 2. 3.

Press on the middle mouse button to initiate the zoom operation. 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. 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. 2. 3.

Press and release the button to initiate an area zoom operation. Move the mouse to the active view and press the left mouse button on the first corner of the rectangular area. 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 handling 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. 2.

Choose Normal from the Parameters pull right menu. 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. 2.

Choose Up Vector from the Parameters pull right menu. 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 representations, 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 camera 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. 2.

Activate the view to make transparent. 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. 2.

Activate the view to edit. 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. 2.

Move the mouse to the active view and press the left mouse button on the first corner of the rectangular area. 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 meridional (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 associated 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 overlapping 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 operation 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. 2. 3.

Select the first view with the mouse. Choose Swap Views from the View pull down menu. 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. 2. 3.

Select the model view for alignment. Choose Align Views from the View pull down menu. 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. 2. 3.

Activate the view to superpose. Choose Superpose Views from the View pull down menu. 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 toggles: 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. 2.

Select the axis representation in the view by clicking on it. A set of highlighting markers are appearing. 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. 2. 3.

Select the axis representation in the view by clicking on it. The highlighting markers are shown. Press the right mouse button, a pop up menu appears. 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 further details on these parameters). The pop-up menu also offers shortcuts to enlarge or shrink all the text sizes in the represented graduated 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 executed 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 template 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 commands. CFView provides a way to record a sequence of user commands as they are performed 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
1. 2. 3.

Apply Templates

In order to apply an existing template on another data set, proceed as follows: Load the project in CFView or select a view that is relative to the desired project. Select Apply Template... from the File menu. A file chooser appears. 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 condition 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 templates. 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 different 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, GetMeshRepetitionType, , 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 QntFieldDerived and QntFieldRemove are cleaned (section 7-5.17). Only those instances are considered 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 commands 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 correspond 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 correspond 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 : for 3D projects :

all the (2D) domains. only the solid boundaries patches, if existing; otherwise all the boundary patches defined in the data set.

3-2.2
Active

Activation/Selection of Surfaces
: when requested, surface representations, rendering or flow quantities representations are applied to the surface. Surface integrals are computed on the set of active surfaces. they may be present on the screen but are not affected by the users requests.

CFView defines an activation state for each surface. Surfaces have two possible states:

Inactive

The surfaces status is displayed in the Surfaces subpanel in the Quick Access Pad. After the creation 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 created 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
3-3.1

Select Surfaces
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 buttons 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 indicated 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
are highlighted in blue. .

left mouse button is used to build a browsing selection, the surfaces in the browsing selection 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 selection. 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 surfaces 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 surfaces, 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 computing the massflow on selected surfaces, the normals should be oriented in the same direction. Currently, 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 surface 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 representations 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 anymore 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 performed 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. 2.

Select one surface. Click the left mouse button on the surface name. Only this item remains highlighted. 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 surface 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 renaming 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. 2. 3. 4.

Start the interactive selection mode by selecting Activate Surface() from the Geometry menu. Move the mouse to the desired surface. Click the left mouse button. The surface activation status is toggled. Its name and selection status are displayed in the message area, at the bottom of the graphical area. 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 constant I, J, or K surfaces and save the most interesting surfaces for further analysis. In a multidomain configuration it is possible to select the domain to be scanned through the chooser displaying 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 representation 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 quantity 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 interesting 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. 3. 4. 5.

Choose a representation mode. Click the left mouse button on Geometry or Quantity. Choose a surface family. Click the left mouse button on the desired J, K Index button or I. Choose the upper and lower limits for the non constant indexes. 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. 7.

The selected surface can be visualized and saved by respectively clicking on the Apply and Save buttons. 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 unstructured meshes is done through arbitrary cutting planes The keyboard shortcut for Create IJK Surface... is: <Ctrl-z> and the item is accessible 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 dialog box buttons
FIGURE 3.4.2-1 Create 2.

X, Y, Z plane buttons Cutting Plane dialog box

Step by step scrolling control

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 cutting plane into the project surfaces list. If the cut is crossing several domains, a group is formed that contains the cuts from each domain. Close the dialog box by clicking on the Close button. The keyboard shortcut for Create Cutting Plane... is: <Shift-l>and the item is accessible in the Quick Access Pad: .

9.

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 XYZ 3 0.0 0.0 0.0 0.05 0.05 0.05 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 Surface Along Igg Curve.... space coordinates of each point first line comment space coordinates (i.e. XYZ, YXZ, ZR or RZ) number of points to define 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 followed:

3-4.5.1 Compute Iso-surface


1. 2.

Select a scalar quantity in the Quantities subpanel or in the Quantity menu. Choose Iso-Surface from the Representation pull down menu or press the Representations / Contours & Iso Values subpanel. Choose the iso-surface value by using one of the following possibilities: button in the

3.

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-surface, 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


button in the Representations/Grid subpanel. This item acts

To turn on the display of the mesh boundaries in the active surfaces, choose Boundary from the Geometry menu or click on the 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 enabled. button in the Representations/Grid subpanel must be

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


button in the Representations/Grid subpanel. This item acts

To turn on the display of the wireframe geometry of the active surfaces, choose Grid from the Geometry menu or click on the 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 enabled. button in the Representations/Grid subpanel must be

Select the grid wireframe to be modified: click with the left mouse button on a wireframe, 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 boundary representations 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 enabled. button in the Representations/Grid subpanel must be

Select the surface representation to be modified: click with the left mouse button on a represented 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 clicking 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 completely 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 combination. 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 environment mapping technique is applied on the selected surface(s) when the option use reflection mapping 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 Amount: changes the reflectivity property of the surface.

map

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 control 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 generating 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, position 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. 2. 3.

Choose Repetition Number from the Geometry menu. Input the desired number of repetitions in the keyboard input area to set the number of repetitions - <Enter>. 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 selectability is disabled. button. When the button is raised and grey colored, the

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 element 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. Modifying 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 rendering 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 remaining 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. Therefore, 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 supports 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 commonly 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
is inserted on the left of the selected quantity name. marker

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/Computed 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 Thermodynamics 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: Vxyz Absolute Total Temperature = Static Temperature + ----------------2Cp Wxyz Relative Total Temperature = Static Temperature + -----------------2Cp

2 2

Speed of sound =

Static Pressure Density Vxyz ----------------------------------------2 Speed of sound Wxyz ----------------------------------------2 Speed of sound
2 2

Absolute Mach Number =

Relative Mach Number =

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


Cp Entropy = ------ log

Static Pressure --------------------------------------------Reference Pressure

(1 )

Static Temparture ------------------------------------------------------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. Absolute Total Enthalpy = Cp Static Temperature + 0.5 Vxyz Relative Total Enthalpy = Cp Static Temperature + 0.5 Wxyz
2

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

Absolute Total Pressure = Static Pressure + Density Vxyz 2

4-8

Relative Total Temperature Relative Total Pressure = Static Pressure ----------------------------------------------------------------Static Temperature


( 1)

Absolute Total Temperature Absolute Total Pressure = Static Pressure ------------------------------------------------------------------Static Temperature

( 1 )

CFView

Select & Create Flow Quantities

Flow Quantities Visualization

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 Temperature is required to visualize the entropy if the quantity is already provided by the flow solver. Static Pressure 2 Absolute Total Enthalpy = Cp Static Temperature + 0.5 Vxyz + ---------------------------------Density Static Pressure 2 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 piecewisepolynomial 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 component 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 , x +y xVy yVx Vt = ------------------------ and Vm = 2 2 x +y Vr + Vz where x and y are the local geometrical coordinates,
2 2 2 2

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/Gradient, 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 Quantity Vector Quantity Vector Quantity Scalar 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 quantities list, respectively as: Div, Grad, or Curl followed by the name of the operand field in parentheses. 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 quantities 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. Select Field or Surface:

2.

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 product),

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 quantity 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. Compared 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 available. 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. 2. 3.

Press the right mouse button on any of the scalar or vector field quantity available in the Quantities sub-panel. A popup menu is displayed where the last item in the popup menu is Unload. 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 Quantities 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 users 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 animation 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 representations. 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 quantities 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 & Values subpanel.

button in the Representations/Plots

2.

Select a point in the graphical area by clicking with the left mouse button. CFView interpolates 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 surfaces 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 the Representations/Contours & Iso Values subpanel. Choosing an iso-value can be done in three different ways:

in

2.

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. 2.

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. 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 associated 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 subranges.

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 surface 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 subpanel. 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 second 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 editor can be accessed through the Preferences/Range colors type menu. As can be seen in Figure 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 respectively.

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 command 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. 2.

Click on the first color contour to modify, then pressing the <Ctrl> key, click on the other color contour representations to modify. 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). tions. Note that the color parameter does not have any effect in this context (see section 410.4.2 for an explanation of the marker parameters)

Select Marker Type... to edit the type of markers used for the "markers only" representa-

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 quantity 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 surfaces 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 computed 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. 2.

Select Local from Representation/Streamline menu. 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-nonmatching 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. 2.

Choose Section from Representation/Streamline menu. 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. 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 section.

3.

CFView

4-23

Flow Quantities Visualization

Visualize Scalar Data

4.

To create the originating section of streamlines through the active surface (selected in the Surfaces 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 2.

line definition dialog box for streamline plot

In the Index area, click the desired radio button. The i and j radio buttons do not necessarily correspond 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. 4.

Set a value of the constant index in the Value box between 1 and the maximum value indicated. 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. 6.

Click the Apply button to start the streamline computation and display. 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 average, the color, the direction, the curve type can be changed in the following way.
1. 2. 3.

Choose Parameters... from the Representation/Streamline menu. A dialog box appears, as shown in Figure 5. 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 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. 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.

4.

5. 6.

Parameters definition dialog box for streamline plot 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. 9. 10.

Click the Apply button to apply the modifications. Click the Reset button to discard the modifications and go back to the initial parameters. 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. 2.

Click on the first streamline to modify, then pressing the <Ctrl> key, click on the other streamlines to modify. 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 currently selected streamlines are suppressed from the screen.

By selecting Update/Delete/Streamline: all the color streamline associated to the active quantity 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 sentations/Contours & Iso Values subpanel. Choose the iso-surface value:

button in the Repre-

2.

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 further 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. 2. 3.

Select the surfaces on which the section has to be represented. Choose Along Section from the Representation/Cartesian Plot menu or click on the Section button in the Representations/Plot & Values subpanel. 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 immediately mapped in the Cartesian plot view, while the traces of the sections appear on the active surfaces.

R Z Pressure profile on a radial compressor blade.

FIGURE 4.3.6-1

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 Section 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. 2.

Select the desired surfaces. 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 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.

CFView

4-29

Flow Quantities Visualization

Visualize Scalar Data

3. 4. 5. 6.

Click on the Value string input and enter a number included in the limits. 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. 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. 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 Editor (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. 2.

In the sub menu Function of, select the desired item to change the variable which is attached to the axis. Select Fit Range in order to set the minimum and maximum range values to those of the represented 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. Select Set Range... to enter a new range. There are two possible ways of doing this:

3.

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. 5.

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. 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. 4. 5.

Select the Curve Type... item: a Curve Type Editor dialog box is raised. Modify the line and marker attributes (see section 4-10.4 for a detailed explanation of the parameters for line and markers) 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 orientation

Numbers text type

Graduations

Numbers 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 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. 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 parameters 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 following:

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 Cartesian 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. 4.

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. 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 validation data curve may be modified by using the Default Validation Data Curve Type Editor (Preferences/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 (Surface 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 procedure. 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 Editor (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 Representation 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 coordinates 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 the Representations/Vectors subpanel. A dialog box appears.

button in

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. 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. Click the Apply button to represent the vector field. Click the Close button to discard the dialog box. The keyboard shortcut for Vector on Grid Nodes is: <c>.

3. 4. 5.

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 surface 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


Representations/Vectors subpanel.

button in the

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 surfaces 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 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>. button in the Representations/

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 Representations/Vectors subpanel. The above dialog box appears.

button in the

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. 8. 9. 10.

Select the constant index: click on the desired Index button and set its value in the Value entry. In the Node Range frame, set the value of the first and last node to consider along the line. Click the Apply button to see the vectors along the grid line. 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 average 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 button. 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 vector 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. 2.

Choose Representation/Vector Type.... The dialog box appears. 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 buttons.

set the factor to a value of 1 by pressing on 1/1 button.


5. 6. 7. 8.

Select Color Uniform to have vectors drawn in a single color or Color Contour to have vectors colored according to their amplitude. Click the Apply button to redraw the vectors with the selected parameters without closing the dialog box. Click the Reset button to reset the changes and go back to the original values. 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 Representations/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 Representations/Vector Lines subpanel. Select the starting point. This can be done in different ways:

button in the

2.

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 Representations/Vector Lines subpanel.

button in the

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 surfaces. 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 button in the Representations/Vector Lines subpanel. A dialog box appears as shown in Figure 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. 3. 4.

Select the constant index. Click on the desired Index button. Set the value of this constant index in the Value box. 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. 6.

Click the Apply button to start the vector line computation and display. 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.41.

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 4.

Lines Parameters

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). 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.

5.

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. Click the Apply button to apply the modifications. Click the Reset button to discard the modifications and go back to the initial parameters. Click the Close button to close the dialog box.

7. 8. 9.

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 parameters). 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 its 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 coordinate 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 complexity.

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 filter 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" algorithm 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 corresponding warning messages "warning: Curve contains coincident points. Can not compute normals" 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 generation 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 interpolation 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
4-7.1

Colormap & Representations Range


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 contours, 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 isolines 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 Representation/Scalar Range/Range Active Surfaces or Representation/Vector Range/Range Active Surfaces 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 button, 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 button, select the item Ticks & Numbers....

Numbers orientation

Numbers text type

Graduations

Numbers 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 graduations, 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 accordingly.

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 particle 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 button. 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
4-9.1
1. 2. 3.

Decoration Texts
Insert Text
button in the main tool bar.

Texts may be added in the active view in the following way: Choose Update/Insert Text menu or click on the

Click in the active view at the position where the text should appear. 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 representation 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. 2.

Choose Delete from the Update menu. A submenu appears. 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 dialog 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 Controller

Color Controller

Alignment Controller Spacing Controller

Anchor Point Controller

dialog box buttons

Anchor alignment 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 button (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 components 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 representation 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 preferences. 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 corresponding 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 following 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 REVERSEVIDEO environment variable (see section 1-6.1 for a description of command line argument and environment 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 on all the active surfaces.

in the Representations/Integrals subpanel to compute this integral


Scalar Average

( q dS ) dS
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

click on the button

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 )
S

menu or click on the button in the Representations/Integrals subpanel to compute the Vector Integral divided by the Surface Area

Weighted Integral

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 Density*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

q w dS w dS

: select this item in the Representation/Surface Inte-

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


S

in the Representations/Integrals subpanel to compute this integral on

dS

: select this item in the Representation/Surface Integral

: select the button

in the Representations/

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 quantity 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 clicking 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 performed 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

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 (bitmapped) 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 independent 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 maximum 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 applications. 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 position 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 coordinate 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 representations 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 Cutting 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 Cartesian 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 limited 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 position. The surface becomes part of the surfaces that can be selected later with the surface selection functionality (section 3-3).

Press the Reset button in order to reset the parameters to their default value (a blade to blade surface 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 vector 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 possible 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
Vm = Vr + Vz is the meridional velocity coefficient
2 2

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 accordingly.

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 Component.

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 uniformly 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 Average 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 respectively 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 meridional 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 Figure 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 activated, 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 turbomachinery 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 capabilities 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 structured 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 animation markers are respectively erased or frozen on the vector lines. from the dialog box. The

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 animation 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 vector 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 relatively 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 normal 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 animation 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 Cutting 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 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. 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 replicated 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 specified 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 predefined 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 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. 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 animation 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 ( Stop (
) or continuously ( ).

) 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 computers 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 significantly.

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

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

and path specified by the user in Step 2.

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, elegant 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 readers 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 programming 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 character \ 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), sinh(x), cosh(x), tanh(x), asinh(x), acosh(x) are available,

logarithmic functions log(x) for neperian logarithm, log10(x) for base 10 logarithm, exp(x), 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 description 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 character.

An item is accessed by adding the suffix [i] to the list name (ex: my_list[1]). Note that list indices 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 statements, 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 equivalent 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 following 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 second argument value with a step indicated by the third argument if existing (default value is 1).

7-3.6

Function Definition
def function_name (arg1, arg2, arg3 = default_value, ...) :

Function definition starts with the standard header

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 example).

7-4

CFView

Python Language Overview

Macro Language

Each line of the functions 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 variable 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 discarded,

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 files 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 files 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 relative 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
E.g. :

Execute Python Script from another Python Script


execfile(macro1.py)

The command execfile allows to start the execution of a Python script from a Python script.

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 directory 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
7-4.1

Macro Script Examples


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.
Record (File/Macro) to turn on the macro recorder by selecting.

2. Select 3. Select

the desired surface on which the integrals should be computed from the Surfaces 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 (section 3-4, p. 3-11 for detailed information about surface creation).

the required field quantity to be integrated from Quantities subpanel (say 'Density'). 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

4. 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.
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))
6. Using

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 commands.
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 CFViewBackward(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 75.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 argument description.

DefaultLocalValueType(MarkerType markerType, TextType textType, DoubleFormat doubleFormat)

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 reductionHeight, 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 factors 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 (PostScript), 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 resolution.

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 automatically computed.

EPSSave(string filename) Operation (section 4-15, p. 4-66): saves the current display in Encapsulated PostScript format. 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 output. 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 functionFileName, 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. geometryFileName 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 formatted double precision. bigEndian must have a value of 1 if the data set was created on a binary big endian computer 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 otherwise. 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 associated to the project.

vp2 = FileOpenProject( ... )


Opens another project and stores in vp2 the name of the view associated to this second project. The active view is now vp2.

ViewActivate(vp1)
Re-selects the view associated to the first opened project. Any further 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 deleteimagefilesmode, 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 ypixels, bool bannermode, string bannertext, bool datemode, bool annotatemode, string annotatetext, int annotatelocation, bool bordermode, int delay, int loops, bool deleteimagefilesmode, string animationfilename)

Operation: Its usage is similar to SetRecordAnimParam macro used for unsteady animation. 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 current 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 quantity 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 necessary).

OpenTurboModeBladeToBladeView(int forceNew) Operation: opens a blade to 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).

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 meridional 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 subsurface, 6 if the meridional mesh contains two subsurfaces, etc... (see also section 75.13, p. 7-24) if mode = 3, the surfaces list is provided as a serie of mesh surfaces described by normalized 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 explanation on these parameters. In this case, the listLength value is the number of surfaces 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 command 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 SetDefaultPitchAveragePatches(). When the user creates a pitch averaged view, the numerotation is modified. For example, 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 theres 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 ViewIconize 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), orthographic (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 vector (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 values 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 position 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 distance.

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. 116 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 surfaces 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 repetition 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 components 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 scaling 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 compatibility.

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 coordinates system.

name is the root name for the created surfaces and the name of the group if a group is created. 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 identical 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 earlier 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 I J K Is1 / Is2 Jmin / Jmax Imin / Imax Imin / Imax Js1 / Js2 Kmin / Kmax Kmin / Kmax Jmin / Jmax

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 following parameters: surfaceValue, IFirst, JFirst, ILast, JLast, are float-valued. They are the normalized 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 lowest 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 surface 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 representations 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 oldName 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 surface 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 exceptions 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 SelectFromView 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 surfaces 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 exceptions 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 exceptions regexp (for example * will match all, *solid* will match all solids etc...). 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.

(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 intersected, 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 provided 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 ComputeStmFromHubAndShroud()

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 operation: 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 compute 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 specularAmount, bool hasEnvironementMapping, string reflection,map, float reflectionAmount)

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 directionY, 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 directional 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 contours.

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 quantity)

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 operand 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 QuantityRangeDomain 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 surface, 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 intersection 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 (section 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 specify one or two ranges.

SclContourFilled(), SclContourWireFrame(), SclContourMarkersOnly() Operation: sets the type of coloring for the active color contours: respectively a filled surface, 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(), SclContourToggleFaceLight()

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 contour 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 surfaces.

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 position 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 endNode, [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 version, and should not be used anymore. It has been replaced by 5 new macros: StreamLineRepresentation, StreamLineAdvancedParameters, StreamLineComputationParameters, 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 itHasVariableSize, int itHasVariableTwist, float twistScaleFactor, float sizeScaleFactor, int TubeVerticesCount)

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 itHasLaplacianFilter, bool itHasTwistSubdivision, float minimumDistance, int laplacianFilterPassCount, 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) itHasLaplacianFilter = 1)

laplacianFilterKernelSize: size of the laplacian filter kernel. Default is 3. (only used when

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 itHasTwistSubdivision = 1 )

twistSubdivisionMaximumPoints: maxiumum number of points inserted when refining


(only used when itHasTwistSubdivision = 1)

StreamLineComputationParameters(int pointsLineMax, int pointsCellMax, int pointsCellAverage, 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 initialDirectionZ, int itHasVariableSize, int itHasVariableTwist, float twistScaleFactor, float sizeScaleFactor, 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 itHasLaplacianFilter, bool itHasTwistSubdivision, float minimumDistance, int laplacianFilterPassCount, 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 StreamLineAdvancedParameters 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 intersection between the ray defined by point(px,py,pz) and direction(dx,dy,dz) and the active surfaces 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 surfaceName])

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 vectors (rprType=0), normal component (rprType=1), tangential component (rprType=2), normal 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 starting 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 AveragePointsPerCell)

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: maximum 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 forward (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 surfaces ( q dS ) .
S

Exceptions: having either no active quantity or a vector quantity as active quantity will trigger 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 trigger 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 summarizes the convention used.
Surface Normal vector direction
TABLE 1. convention

I= cste I decreasing

J=cste J increasing

K=cste K decreasing

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 trigger 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 trigger 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 trigger 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 trigger 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 trigger 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 integral of the active quantity on the active surfaces.

Exceptions: having either no active quantity or a vector quantity as active quantity will trigger 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 trigger 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 denominator 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 Direction.y, float Direction.z, bool isPointTorque)

Operation: defines the origin and the direction of the Torque axis. (section 4-2.1.2 on page 43)

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 )
c

where eq is the

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 associated 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(), PlotOrdinateQnt(), PlotOrdinateR(), PlotOrdinateTheta(), PlotOrdinateNormArcLen( ), PlotOrdinateS( ), 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 streamwise position. The last two commands have a meaning only if hub and shroud are properly defined.

PlotFctOfQnt(),

PlotFctOfR(), PlotFctOfM_NORM()

PlotFctOfTheta(),

PlotFctOfS(),

PlotFctOfM(),

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 coordinates 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(), VAxisLabelSmallerFont()

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, without having the axis number s and labels cut by the view border.

ShowHorizontalGridLines(), ShowVerticalGridLines(), HideHorizontalGridLines(), HideVerticalGridLines()

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 (X), 1 (Y), 2 (Z), 3 (arc length), 4 (active quantity), 5 (radius =
y atan - ) x

X + Y ), 6 (theta =

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 posi3 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 successive major ticks.

PlotHAxisTicksLabels(float dist, int position, TextType t, DoubleFormat f), PlotVAxisTicksLabels(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 distance 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 behavior)

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(), UpdateColormapJet(), UpdateColormapCool(), UpdateColormapHot(), UpdateColormapSummer(), 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 multiple 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 rectangular 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 content, (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
SetGradAxis3TicksSpacing(float s)

s),

SetGradAxis2TicksSpacing(float

s),

Operation: set the spacing between the graduation on the first, second and third axis respectively.

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(),
SetGradAxis3Perpendicular()

SetGradAxis2Perpendicular(),

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), SetGradAxisNumbersColor(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, Brooktondale and Kuma. See section 7-5.29, p. 7-55 for the description of color arguments.

SetGradAxis1LabelPosition(int
SetGradAxis3LabelPosition(int p)

p),

SetGradAxis2LabelPosition(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), SetGradAxisLabelsColor(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 410.4.1, p. 4-59)
int pattern (value between 0 and 8): solid (0), simple dashed (1), dotted (2), dashes and dots alterning (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 alterning(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 Cartesian 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 cartesian 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 surface 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 (cfor 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 quantityName is used for labelling the coordinate axis. The parameter [quantityValues] is a list of values; 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 representation 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 vectorial 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 p Ctrl-q w u q Shift-r Views Handling f 7 . m r Shift-n Ctrl-n / = + Shift-v Maximise size (section 2-5.5.5) Preferred size (section 2-5.5.5) Minimise (section 2-5.5.5) Start the interactive move / resize mode (section 2-5.5.5) Start the interactive move / resize mode (section 2-5.5.5) Open a new view in Cartesian coordinates (section 2-5.5.1) 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) Toggle full rendering mode (section 2-5.4.2) Open the file chooser to select a project (section 2-3) Open the partial loader (section 2-3.4) Quit CFView (section 2-3.5) Graphical area refresh (section 2-5.5.2) Toggle the reverse video / normal video mode (section 4-11.4.1) Undo Redo Repetition on/off

CFView

A-1

List of Shortcut Keys

Shift-b Camera Position o x y z Surface Representation Ctrl-s Ctrl-a Ctrl-z Shift-l g b h Shift-f Shift-s Shift-h Shift-t Text Ctrl-t Scalar Quantities Representation i j Shift-q c v d l Shift-i u Ctrl-r Vector Quantities Representation j Shift-j Ctrl-j q c t v

Toggle border line (section 2-5.4.2)

Set the camera to the original position (section 2-5.4.1) Project along the first direction (section 2-5.4.1) Project along the second direction (section 2-5.4.1) Project along the third direction (section 2-5.4.1)

Surfaces selection dialog box (section 3-3.2) Interactive surfaces selection tool (section 3-3.3) Mesh surfaces creation dialog box (section 3-4.1) Cutting plane creation dialog box (section 3-4.2) Toggle active surfaces grid representation (section 3-5.4) Toggle active surfaces boundary representation (section 3-5.1) Toggle hidden line surfaces representation (section 3-5.6) Toggle flat colored representation (section 3-5.8) Toggle Gouraud shading representation (section 3-5.9) Switch off rendering (section 3-5.10) Surface color edition dialog box (section 3-5.11)

Starts text insertion tool (section 4-9.1)

Multiple isolines dialog box (section 4-3.2.2) Local isolines (section 4-3.2.1) Flat color contours (section 4-3.3.1) Smooth color contours (section 4-3.3.2) Local value insertion mode (section 4-3.1.1) Cartesian plot along section (section 4-3.6.3) Cartesian plot along grid line (section 4-3.6.4) Iso-surface (section 4-3.5) Undo-suppress last representation (section 4-10.1) Toggle colormap representation (section 4-7.1)

Local vector lines (section 4-6.3.1) Vector lines from a section (section 4-6.3.2) Vector lines from grid line (section 4-6.3.3) Vector lines parameters dialog box (section 4-6.3.3) Vector field (section 4-6.1.2) Threshold vector field (section 4-6.1.3) Local vector (section 4-6.1.1)

A-2

CFView

List of Shortcut Keys

d l s u Ctrl-r

Vectors along a section (section 4-6.1.4) Vectors along a grid line (section 4-6.1.5) Vector type dialog box (section 4-6.2.3) Undo (remove last representation) (section 4-10.1) 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 "support@numeca.be" 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
B-2.1

Native File Format


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 coordinates.

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 sections. CFView accepts structured and unstructured meshes. The CFView input file system for unstructured meshes is very similar to the structured meshes. There are some differences 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 composed of the following parts:
1. 2. 3. 4. 5.

Project identification. Mesh identification. Domain(s) identification. Validation data identification. 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: The version number:

It is given by the first character string. If no information is given, a blank character string of arbitrary length has to be entered. It is represented by the second character string. If no information is given, a blank character string of arbitrary length has to be entered. given, a blank character string of arbitrary length has to be entered for each of them.

The solver description: It consists of the three remaining character strings. If no information is

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 Geometry 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 The type: - STRUCTURED - UNSTRUCTURED - HEXANS The coordinate system:- CARTESIAN The kind of repetition: - NONE - TRANSLATION - ROTATION - MIRROR

2.

3.

4.

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 specifying:

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 quantities. 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| 2 |velocity| |vorticity|

c) Surface Data Specification


The surface data specification consists of surface data names. They represent the quantities confined on solid surfaces such as the heat transfer coefficient. 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 same has to be repeated for the vector quantities. The only restriction is that the scalar 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| 1 |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 repetition 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 example 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| 2 |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 numerical 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 residuals. 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| 2 |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 coordinate 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 r

z
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 coordinates are normalised. The geometry file format for a support mesh with 17 nodes in the I direction and 11 in the J directions 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 3 |density| |mach number| |entropy| 2 |velocity| |vorticity| 1 |heat transfer coefficient| 1 |surface stress|

2 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 0 0

Geometry and Quantity files have to be generated for each domain except for the validation 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 extension. 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:


2.

Boundary 1:I=1 Boundary 2:J=1 Boundary 3:J=Jmax Boundary 4:I=Imax 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 1 I=1 K J 2 I J=1 3 K=1 BLOCK 6 I = Imax J = Jmax 5

For 3D mesh, there are 6 boundaries with the following numbering (see Figure B.2.3-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 2 10 20

Patch 3

20 20 10 10 20 10

1 10 K 11

J
FIGURE B.2.3-2: 1. 2.

Patch 1

Example of patches distribution on the first boundary.

Give the name of the domain. If not provided or if the provided name is unknown, CFView will provide a default name. Give the number of nodes in the I, J and K directions. For a domain of 10 nodes in the I direction, 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: non matching connection external: inlet: mirror: outlet: matching periodic: non matching periodic singular: solid:

CON CNM or CONNM EXT INL MIR OUT PER PNM or PERNM SNG 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 For J=constant boundary For K=constant boundary J and K indices. I and K indices. 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 FROM n2 n1 1 1 n2 n1 TO

CORNER POSITION

PATCH ORIENTATION: REVERSE FROM n2 n1 1 1 n1 n2 TO

n2 n1 1 n2

n1

2
2 3 1

n2 n1 n1

n2

2 3

n2 n1 1 4 n2 n1 1 n1

n1 n2

3
1

n2 n1

n2 n1

4 n2

4
1

n2 n1 n2

n1

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 corresponding 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 corresponding 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 1 EXT 1 EXT 1 CON 1 INL 1 EXT 1 EXT 11 50 50 11 100 50 11 100 50 11 100 50 231E3 11 100 50 11 50 50

The Boundary Condition file input for the second domain is:
100 50 50 1 EXT 1 EXT 1 CON 1 OUT 1 EXT 1 EXT 11 50 50 11 100 50 11 100 50 11 100 50 131E3 11 100 50 11 50 50

CFView

B-15

Input File Format

Native File Format

1 50 50 1 1 50 K J 111 Boundary 3 CON Domain 2 100 50 1 1 50 1 I 100 1 1 I J K 111 1 50 1

100 50 50 100 1 50 100 50 1

100 1 1 Boundary 3 CON Domain 1

FIGURE B.2.3-4

Example of connectivity between two domains.

B-2.4

Unstructured Cell Connectivity File


4 F1 F3 3 w
1 2 2 1

F2

v
2 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. 2.

Create the topology file in an ASCII format. 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 Tetrahedral 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 coordinates, 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 direction 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 5234 2147 6417 7

5 Solid

3 1

6 4
FIGURE B.2.4-2Example 1.

of a 3D unstructured mesh. with 4 cells and 7 nodes.

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: external: inlet: mirror: outlet: periodic: singular: solid: 1 2 3 4 5 6 7 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 complete 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 (support@numeca.be) 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 coordinate 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 applications 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 "support@numeca.be" 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 Value (i,j,k,scal) Npnts = ni * nj * nk 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" extension 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 Value (i,j,k,vec) Npnts = ni * nj * nk 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 created. 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 x(i,j,k) y(i,j,k) z(i,j,k) Value (i,j,k,scal) Npnts = ni * nj * nk do loop for k=1 to nk 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 Geometry 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 x(i,j,k) y(i,j,k) z(i,j,k) Npnts = ni * nj * nk do loop for dom = 1 to Ndom 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 4 X1 Y1 Z1 X2 Y2 Z2 X3 Y3 Z3 X4 Y4 Z4 5 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 single 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 value (i,j,k, x) Npnts = ni * nj * nk do loop for dom = 1 to Ndom 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 4 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 complete 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 command CGNSProjectOpen, where both the file name and the base name are specified (see section 75.3).

B-26

CFView

Index

INDEX
A Align Views 2-25 Animation Cutting Planes 6-7 IJK Surfaces 6-6 Recording 2-6 Steady 6-1 Streamlines 6-2 Unsteady 6-9 Vector Line 6-2 AutoGrid 4-62 Axes Graduated 2-26 Orientation 2-25 Axis 4-33, 7-54 Azimuthal Average 5-5, 5-9, 7-17 B Background Color 1-4 Blade Section 5-9 Blade to Blade 2-23, 5-1, 7-29 Border 2-22 Boundaries Curve Type 3-19 Representation 3-19 Boundary Conditions B-2 Boundary Condition 3-4 Boundary Surfaces 3-2 C Camera Dynamic 2-18 Position 2-18, 2-20, 2-21 Projection 2-17, 2-18, 2-20 Rotation 2-19 Zoom 2-19 Camera Control 7-20 Cartesian Plot 4-28, 7-16, 7-37, 7-48 Axis Label 4-33 Axis Variable 4-30 Copy 4-32 Delete Curve 4-32 Export 4-36 Graduation 4-33 Grid Lines 4-34 Limited Section 4-32 Logarithmic 4-31 Merge 4-32 Paste 4-32 Range 4-31 Reverse 4-31 Size 4-35 Cells 3-29, 7-22 cfv.ASCII B-23 cfv.gscl B-22 cfv.mdfda B-24 cfv.mdga B-23 cfv.scale B-23 cfv.scl B-21 cfv.stov B-21 cfv.ugc B-25 cfv.v56, cfv.v65 B-25 cfv.vec B-22 CGNS 2-10 CGNS File B-26 Close Project 2-15 Color 4-18 Background 1-4, 4-62 Editor 4-58 Color Contour 4-18, 7-35 Flat 4-18 Smooth 4-19 Strip 4-19 Threshold 4-19 Update 4-21 Colormap 4-50, 7-51 Range 2-6 Command Line 1-4 Compute Meridional 5-7 Compute Pitch Average 2-23 Conventions 1-3 Coordinate System 2-6, 2-26 Copy 4-32 Cursor Position 2-8 Curve Integrals 4-65, 7-47 Cutting Plane 3-6, 3-13 Cutting Planes 6-7, 7-24 Scrolling 6-7 D Data Derived 4-11 Particle Traces 4-2 Plot Data 4-2, 4-38 Range 4-50 Validation Data 4-2, 4-37

CFView

Index

INDEX
Decoration Text 4-55 Default Settings 4-61 Default View 2-20 Delete Surface 3-8 Derived Quantity 4-11 Double Buffering 1-6 Dynamic Viewing 2-18 E Elements Viewing 3-29 EPS Format 4-68 Export Active Surfaces 4-65 Plot Curves 4-36 F Face Displacement 4-62 Field Data 4-3 File Topology B-2 File Format B-26 Files Boundary Conditions B-6 Geometry B-2, B-6 Python 7-1 Quantity B-6 Fit 2-20 Font Editor 4-59 Force 4-63, 7-45 Free RAM 4-14 Full Render 2-21 G Geometry Repetition 3-28 Gouraud 3-21 Graphics Drivers 1-6 Graphics Area 2-7 Graphics Options 1-6 Graphics Update 2-23 Grid 3-19 H Hardware Requirement 1-3 Heterogeneous B-19 Hidden Lines 3-20 Homogeneous B-18 Hub 5-1, 5-8, 7-29 I Identification File B-2 Mesh B-4 IJK Surfaces 3-13 Installation 1-3 Integrals 2-8, 4-63 Interactive Selection 3-29 Isolines 4-16, 7-36 Iso-Surface 3-17 Save 3-18 Iso-Surfaces 4-27, 7-36 J JPEG Format 4-68 K Keyboard Input 2-8 L Lagrangian 4-54 License 1-3 Limited Section 4-32 Line Type 4-18, 4-21, 4-49, 7-34 Local Values 4-15, 7-35 M Macro 2-28, 3-10, 7-1 Cartesian Plot 7-16 Defaults Settings 7-9 Modules 2-30, 7-6 Operators 7-2 Picture 7-11 Play 2-29 Project 7-12 Record 2-29 Save 2-30 Unsteady 7-13 Update 7-16 View 7-14 Marker Editor 4-60 Marker Type 4-16, 4-21, 4-49, 4-60, 7-34 Massflow 4-64 Menu Bar 2-3 Merge 4-32 Meridional Average 2-23, 5-5

ii

CFView

Index

INDEX
Meridional Patch 5-5, 5-8, 7-17 Mesh B-2 Mesh Representation 7-21 Mesh Size 7-23 Mesh Surface 3-6, 3-11 Mesh Surfaces 7-26 Message 2-7 Modules 2-30, 7-6 Move 2-24 MPEG 2-6 MSW 1-6 Multiple Projects 2-12 N Native Format 2-10, B-2 Number Format 4-16, 4-61 O Opengl 1-6 Operators 4-11 Orientation Axes 2-25 Orthogonal 2-22 Output Active Surfaces 4-65 Print Image 4-66 P Partial Loading 2-12 Particle Traces 4-2, 4-54, 7-32 Paste 4-32 PBM Format 4-68 Perspective 2-17, 2-22, 7-19 PGM Format 4-68 Pitch Average 2-23 Play Macro 2-29 Plot Curve 4-32 Plot Data 4-2, 4-38 Plot3D 2-11 PNG format 4-67 PostScript 4-67 PPM Format 4-68 Project 2-9 Close 2-5, 2-15 Fine Turbo 2-10 Open 2-5, 2-12 Projection 7-19 Push Back 2-24 Python 2-28, 7-1 Q Quantity 7-31 Delete 4-12, 4-14 Derived 4-11 Field Data 4-3 Loading 4-12 On Wall 4-2 Particle Traces 4-54 Plot Data 4-38 Range 2-6, 2-8, 4-50, 7-33 Scalar 4-2 Selection 4-3 Solid Data 4-7 Status 4-13 Surface 4-11 Thermodynamic 4-7 Types 4-1 Unload 4-12 Validation Data 4-37 Vector 4-2, 4-38 Quick Access Pad 2-6 R Range 4-50, 7-33 Range Colors Type 4-19 Record Macro 2-29 Refresh 2-23 Render 2-21 Rendering 3-21, 4-62, 7-29 Color 3-21 Gouraud 3-21 Hidden Lines 3-20 Repetition 3-28, 7-22 Representation Cartesian Plot 4-28 Color Contour 4-18 Delete 4-56 Isolines 4-16 Iso-Surface 4-27 Local Values 4-15 Particle Trace 4-54 Undo 4-56 Vector 4-39 Vector Line 4-43 Reset 2-23 Resize 2-24 Reverse Video 1-4, 4-62

CFView

iii

Index

INDEX
S Save Macro 2-30 Scalar 4-2 Scale 2-18, 7-22 Scrolling 6-7 IJK Surfaces 6-6 Select Open 2-12 Selection 3-10 Shading 3-21 ShortCut 2-5 Shroud 5-1, 5-8, 7-29 Solid Data 4-2, 4-7 Span Distribution 5-9 Split Surface 3-16 Start CFView 1-4 Streamlines 4-22, 4-43, 7-43 Animation 6-2 Delete 4-26 Grid Line 4-24 Local 4-23 Parameters 4-25 Section 4-23 Update 4-26 Stretched 2-22 Structured B-2 Superpose Views 2-25 Surface Macro 3-10 Transparency 3-21 Surfaces 3-2 Blade to Blade 5-3 blade to blade 3-6 Cutting Planes 6-7 Delete 3-6, 3-8 Filter 3-6 Group 3-2, 3-6, 3-8 Hub 5-1, 5-8 List 3-2 Rename 3-6, 3-9 Scrolling 3-11, 3-13, 6-6 Selection 3-2, 3-3, 3-4, 3-6, 3-8, 3-9, 3-29 Shroud 5-1, 5-8 Split 3-16 Visualisation 3-5, 3-8 Wireframe 3-19 Surfaces Integrals 4-63, 7-44 Swap Views 2-25 T Templates 2-28 Text 4-55 Create 2-5 Editor 4-57 Font 4-55 Insert 4-55, 7-52 Type 4-55 Text Type 4-16 Thermodynamic Data 4-7 Threshold 4-19 Range Colors Type 4-19 TIFF Format 4-68 Tile Views 2-24 Time Label 7-44 Time Step 7-13 Toolbar 2-5 Torque 4-63, 7-45 Transparent 2-22 Troubleshooting 1-7 Turbomachinery Mode 5-8, 7-17 U Undo 4-56, 7-19 Unsteady Animation 2-6 Unstructured B-2 Update 2-23, 7-16 Update Abort 1-6 User Interface 2-2 V Validation Data 2-15, 4-2, 4-37 Vector 4-2, 4-38, 7-41 Arrow Shape 4-42 Color 4-41 Delete 4-42 Size 4-41 Type 4-42 Vector Field 4-39 Vector Line 4-43, 7-43 Delete 4-49 Grid Line 4-44 Local 4-43 Parameters 4-44 Section 4-43 View Align 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

You might also like