Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

MP CCIdoc

Download as pdf or txt
Download as pdf or txt
You are on page 1of 725

MpCCI 3.1.

MpCCI

I Overview

MpCCI 3.1.0-1 Documentation Part I Overview PDF version January 20, 2009

MpCCI is a registered trademark of Fraunhofer SCAI www.scai.fraunhofer.de/mpcci

Fraunhofer Institute
Algorithms and Scientic Computing Fraunhofer Institute for Algorithms and Scientic Computing SCAI Schloss Birlinghoven, 53754 Sankt Augustin, Germany Abaqus and SIMULIA are trademarks or registered trademarks of Dassault Syst`mes e ANSYS is a registered trademark of Ansys, Inc. FLUENT is a registered trademark of Fluent Inc. FLUX is a registered trademark of Cedrat of Grenoble, France ICEPAK is a registered trademark of Fluent Inc. MSC.Marc is a registered trademark of MSC.Software Corporation PERMAS is a registered trademark of Intes GmbH STAR-CD is a registered trademark of CD adapco Group RadTherm is a registered trademark of ThermoAnalytics Inc. FLEXlm is a registered trademark of Macrovision Perl has a copyright by Larry Wall and others ActivePerl has a Community License Copyright of Active State Corp. OpenSSH has a copyright by Tatu Ylonen, Espoo, Finland Java is a registered trademark of Sun Microsystems, Inc. MPICH-1 and MPICH-2 has a copyright by University of Chicago and Mississippi State University Linux is a registered trademark of Linus Torvalds UNIX is a registered trademark of The Open Group Windows, Windows XP and Windows Vista are registered trademarks of Microsoft Corp.

I Overview

Contents

I Overview Contents
Preface Typographical Conventions Contents of all MpCCI Manuals 4 6 21

MpCCI 3.1.0-1

I 3

Preface

I Overview

Preface
MpCCI (Mesh-based parallel Code Coupling Interface) is the standard for simulation code coupling. MpCCI has been developed at the Fraunhofer Institute SCAI in order to provide an application independent interface for the coupling of dierent simulation codes.

Codes Supported by MpCCI


MpCCI 3.1 enables a direct communication between the coupled codes by providing adapters for a growing number of commercial codes. These code adapters make use of the already existing application programming interfaces (APIs) of the simulation tools. This technique allows for an easy installation of MpCCI at the end users site without changing the standard installation of the simulation codes. A list of currently supported codes is given in the Release Notes.

Internal Architecture
The MpCCI 3.1 environment consists of several components: MpCCI Code Adapter allow to adapt MpCCI to commercial codes through their standard code APIs without any changes in the source of the simulation code. The MpCCI Graphical User Interface provides a comfortable way to dene the coupling setup and to start the simulation - independent of the codes involved in the coupled application. The MpCCI Coupling Server is the heart of the MpCCI system. Environment handling, communication between the codes, neighborhood computation, and interpolation are part of this kernel.

Standardized Quantities
One major advantage of having compatible code adapters for all codes supported by MpCCI is the standardization of coupling parameters and procedures independent from the used code pairing. MpCCI provides unied quantity denitions for Global quantities: time, iteration, residuals Mass source and sink: production species Momentum sources: e. g. Lorentz forces Energy sources: e. g. joule heat Material properties: e. g. electrical conductivity

MpCCI 3.1.0-1

I Overview Boundary condition values: e. g. temperature or pressure Boundary condition gradients: e. g. heat ux density Grid data: nodal positions or displacements And chemical components: e. g. for reaction kinetics

Preface

MpCCI Manuals
The MpCCI documentation is split up into several manuals which are also called parts. Each part aims at a special kind of readers. Release Notes The Release Notes contain information on changes versus prior versions of MpCCI. They are thus interesting for users, who have some experience with earlier versions of MpCCI. Installation Guide The Installation Guide describes how to install MpCCI. It also contains information about the licensing. Getting Started is intended for new users of MpCCI. The most important features of MpCCI are described by following a typical setup of a coupled simulation. User Manual The User Manual contains a complete overview of the functions and features of MpCCI. This includes information on code coupling, command line options and functions of the MpCCI GUI. Codes Manual The Codes Manual contains code-specic information. For each code which can be coupled with MpCCI a section is included. Tutorial is a collection of examples which are explained in detail. Programmers Guide The Programmers Guide is intended for users who want to write their own code adapters or who want to use MpCCI as a library.

MpCCI 3.1.0-1

I 5

Typographical Conventions

I Overview

Typographical Conventions
This manual adheres to a set of typographical conventions so that you can recognize actions and items. The following list illustrates each of the conventions: Text you enter from the keyboard or outputs is written in a typewriter font and surrounded by a gray box, e. g. : mpcci gui Filenames are enclosed in quotation marks, "example.txt". All paths are given with a slash (/) as directory separator, e. g. "mpcci/doc/pdf". On Windows systems this must be replaced by a backslash (\). Meta variables represent values and are enclosed in angle brackets as in <MpCCI home>. They can appear everywhere and always should be replaced by appropriate values. Environment variables are always written in uppercase typewriter letters, like VARIABLE. Buttons in the MpCCI GUI look like buttons, e. g. Next . Entries of the menu have a colored background, sub-menus are separated by an arrow. FileOpen Project means the submenu Open Project of the File menu. Other options which can be selected are written like Option. Names of software are written in a sans-serif font, like MpCCI. Links can be clicked directly in the PDF and HTML versions of the manual and are marked blue there, this applies to links within the manual like IV-2 Setting up a Coupled Simulation or to web pages www.scai.fraunhofer.de/mpcci. E. g.

MpCCI 3.1.0-1

I Overview

Contents of all MpCCI Manuals

Contents of all MpCCI Manuals


I Overview 1
4 6 21

Preface Typographical Conventions Contents of all MpCCI Manuals

II
1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 2 3 3.1 3.2 4

Release Notes
Changes and New Features in the initial MpCCI Introduction . . . . . . . . . . . . . . . . . . . . . . . . Installation, Conguration and Licensing . . . . . . . Coupling Server . . . . . . . . . . . . . . . . . . . . . . MpCCI Visualizer . . . . . . . . . . . . . . . . . . . . . MpCCI GUI . . . . . . . . . . . . . . . . . . . . . . . . Command Line Interface . . . . . . . . . . . . . . . . . Abaqus . . . . . . . . . . . . . . . . . . . . . . . . . . . Flowmaster . . . . . . . . . . . . . . . . . . . . . . . . FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . . ICEPAK . . . . . . . . . . . . . . . . . . . . . . . . . . PERMAS . . . . . . . . . . . . . . . . . . . . . . . . . RadTherm . . . . . . . . . . . . . . . . . . . . . . . . . STAR-CD . . . . . . . . . . . . . . . . . . . . . . . . . Prerequisites for MpCCI Installation Supported Platforms in MpCCI 3.1.0 Platforms Supported by the MpCCI 3.1.0 Server . . . . . . . . . . . . . . . . . . . . . . . . . . Codes Supported by MpCCI 3.1.0 on Dierent Platforms . . . . . . . . . . . . . . . . . . . . . Known Bugs and Limitations in MpCCI 3.1.0 3.1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1
4 4 4 4 4 5 5 5 5 5 6 6 6 6 7 8 8 10 14

III
1

Installation Guide
Installation Overview

1
5

MpCCI 3.1.0-1

I 7

Contents of all MpCCI Manuals 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3 3.1 3.2 4 4.1 4.2 4.3 5 5.1 5.2 5.2.1 5.2.2 5.3 5.4 5.5 6 6.1 6.2 7 8 8.1 8.2 8.3 8.4 9 10 Before the Installation Downloading MpCCI . . . . . . . . Where to Install . . . . . . . . . . The Perl Interpreter . . . . . . . . The Java Runtime Environment . . OpenSSH for Microsoft Windows . . MpCCI-RSH for Microsoft Windows MPICH for Microsoft Windows . . .

I Overview 6 6 7 8 9 10 11 11

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

Installation of the MpCCI Software 12 Multi-platform for UNIX, Linux and Microsoft Windows . . . . . . . . . . . . . . . . . . . . . . 12 Local Microsoft Windows Installation with the MSI . . . . . . . . . . . . . . . . . . . . . . . . 13 Immediately After the Installation - Quick Installation Tests without Your Home Directory under Microsoft Windows . . . . . . . . . . . . . . . . . . Testing the MpCCI Working Environment and Perl . . . . . . . . . . . . . . . . Testing whether MpCCI Finds Your Simulation Codes . . . . . . . . . . . . . . Licensing Request for a License File . . . . . . . . . . . . . Installing and Activating a License . . . . . . . . Congure a License Manager as UNIX service . . Congure a License Manager as Windows service Dening the License Server . . . . . . . . . . . . Multiple License Servers . . . . . . . . . . . . . . Testing the License Server . . . . . . . . . . . . . a License 16 . . . . . . . . 16 . . . . . . . . 16 . . . . . . . . 17 19 19 20 21 21 24 26 26

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

Conguring the MpCCI Users Environment 27 Accessing Remote Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Conguring MpCCI via Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Testing the MpCCI Installation and Communication Troubleshooting Secure shell in general . . . . . . . . . . . . OpenSSH under Microsoft Windows . . . . . rsh, rcp and rlogin under Microsoft Windows MPICH under Microsoft Windows . . . . . . Installing Perl Installing Java 30 32 32 32 32 35 37 39

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

MpCCI 3.1.0-1

I Overview

Contents of all MpCCI Manuals

IV
1 1.1 1.2 1.3 2 2.1 2.2 2.2.1 2.2.2 2.3 2.4 2.5 2.5.1 2.5.2 2.5.3 2.6 2.7 2.7.1 2.7.2 2.7.3 2.7.4 3 3.1 3.2

Getting Started
Multi-Physics Computation Multi-Physics . . . . . . . . . . Solution of Coupled Problems . Code Coupling with MpCCI . . with MpCCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1
4 4 5 6 8 8 8 9 10 10 11 13 14 15 15 16 18 19 20 20 23

Setting up a Coupled Simulation A Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . CFD Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FE Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting the MpCCI GUI . . . . . . . . . . . . . . . . . . . . . . Models Step Choosing Codes and Model Files . . . . . . . . . Coupling Step Denition of Coupling Regions and Quantities Dene Coupling Regions . . . . . . . . . . . . . . . . . . . . . . Select the Components for each Interconnected Code . . . . . . Specify the Quantities which will be Exchanged . . . . . . . . . Edit Step Further Coupling Options . . . . . . . . . . . . . . Go Step Starting Servers and Codes . . . . . . . . . . . . . . Conguring the Initial Exchange Mode . . . . . . . . . . . . . . Setting Option Parameters . . . . . . . . . . . . . . . . . . . . Starting the Coupled Simulation . . . . . . . . . . . . . . . . . Interrupting the Computation . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

Checking the Results 24 The MpCCI Visualizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Post-Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

V
1 1.1 2 2.1 2.2 2.3 2.3.1 2.3.2 2.3.3 2.4

User Manual
Introduction Basic Structure of MpCCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The MpCCI Software Package Introduction . . . . . . . . . . . . . . . . . The MpCCI Home Directory . . . . . . . . Environment and Environment Variables . MPCCI ARCH - Architecture Tokens . . MPCCI DEBUG - for Debugging . . . . . MPCCI INITIAL EXCHANGE . . . . . . MpCCI Project and Output Files . . . . .

1
8 8 10 10 11 12 13 14 15 16

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

MpCCI 3.1.0-1

I 9

Contents of all MpCCI Manuals 2.4.1 2.4.2 2.4.3 2.4.4 2.5 2.6 2.7 2.7.1 2.7.2 2.7.3 2.7.4 3 3.1 3.1.1 3.1.2 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.4 3.4.1 3.4.2 3.4.3 3.4.4 3.5 3.5.1 3.5.2 4 4.1 4.1.1 4.1.2 4.2 MpCCI Project Files . . . . . . . . . . MpCCI Server Input Files . . . . . . . Log Files . . . . . . . . . . . . . . . . Tracele . . . . . . . . . . . . . . . . . The MpCCI Resource Directory . . . . Temporary Files . . . . . . . . . . . . Third Party Software Used by MpCCI Perl . . . . . . . . . . . . . . . . . . . Java . . . . . . . . . . . . . . . . . . . MPI . . . . . . . . . . . . . . . . . . . Remote Shell and Remote Copy . . . . Code Coupling Multi-Physics . . . . . . . . . . . Physical Domains . . . . . . . . . Coupling Types . . . . . . . . . . Data Exchange . . . . . . . . . . Pre-Contact Search . . . . . . . . Minimal Distance . . . . . . . . . Intersection . . . . . . . . . . . . Orphaned Nodes and Elements . Flux and Field Interpolation . . Coupling Algorithms . . . . . . . Course of the Coupling Process . Stationary Problems . . . . . . . Transient Problems . . . . . . . . Exchange of Time Step Size . . . Subcycling . . . . . . . . . . . . Restarting a Coupled Simulation Running MpCCI in a Network . . Client-Server Structure of MpCCI Hostlist les . . . . . . . . . . . . Remote Shell and Remote Copy . Coupled Analysis in Batch Mode Mesh Checks . . . . . . . . . . . Bounding Box Checks . . . . . . Mesh Quality Checks . . . . . . . Graphical User Interface Starting and Exiting MpCCI GUI Starting MpCCI GUI . . . . . . . Exiting MpCCI GUI . . . . . . . . MpCCI GUI Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

I Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 16 16 16 17 18 20 20 20 20 20 21 21 21 22 24 25 26 27 29 29 30 30 31 31 36 37 38 39 39 41 42 42 57 57 57 58 58 58 59 59

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

10 I MpCCI 3.1.0-1

I Overview 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.3 4.3.1 4.3.2 4.4 4.4.1 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.5 4.5.1 4.5.2 4.6 4.6.1 4.7 4.7.1 4.7.2 5 5.1 5.2 5.3 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.4 5.4.1 5.4.2 5.4.3 5.4.4 5.4.5 5.4.6 File Menu . . . . . . . . . . . . . . . . . Batch Menu . . . . . . . . . . . . . . . . License Menu . . . . . . . . . . . . . . . Tools Menu . . . . . . . . . . . . . . . . Preferences Menu . . . . . . . . . . . . . Codes Menu . . . . . . . . . . . . . . . . Help Menu . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . Code Parameters . . . . . . . . . . . . . Requirements . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . Generate Regions . . . . . . . . . . . . . Options Part . . . . . . . . . . . . . . . Quantity properties . . . . . . . . . . . Quantity Sender . . . . . . . . . . . . . Predened Sets . . . . . . . . . . . . . . Requirements . . . . . . . . . . . . . . . Edit Step . . . . . . . . . . . . . . . . . Control . . . . . . . . . . . . . . . . . . Contact . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . Conguring the MpCCI Coupling Server Remote File Browser . . . . . . . . . . . File Browser Handling . . . . . . . . . . How to mount a new le system . . . . Command Line Interface Using the Command Line Interface Overview of All Subcommands . . Starting MpCCI . . . . . . . . . . . mpcci gui . . . . . . . . . . . . . mpcci morpher . . . . . . . . . . . mpcci observe . . . . . . . . . . . mpcci pm . . . . . . . . . . . . . . mpcci vis . . . . . . . . . . . . . mpcci xterm . . . . . . . . . . . . Information and Environment . . . mpcci arch . . . . . . . . . . . . . mpcci doc . . . . . . . . . . . . . mpcci info . . . . . . . . . . . . . mpcci env . . . . . . . . . . . . . mpcci home . . . . . . . . . . . . . mpcci where . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Contents of all MpCCI Manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 61 62 63 63 63 63 64 64 64 64 65 65 65 66 66 69 71 71 74 76 76 80 80 81 84 84 86 88 89 90 93 94 95 96 97 98 99 100 102 104 105

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . .

MpCCI 3.1.0-1

I 11

Contents of all MpCCI Manuals 5.5 5.5.1 5.5.2 5.5.3 5.5.4 5.5.5 5.5.6 5.6 5.6.1 5.6.2 5.6.3 5.6.4 5.6.5 5.6.6 5.6.7 5.6.8 5.6.9 5.6.10 5.6.11 5.6.12 5.6.13 6 6.1 6.1.1 6.1.2 6.1.3 6.2 6.2.1 6.2.2 6.3 7 8 Installation and Licensing . mpcci license . . . . . . . mpcci list . . . . . . . . . mpcci lmutil . . . . . . . mpcci ssh . . . . . . . . . mpcci test . . . . . . . . . mpcci update . . . . . . . Job Control . . . . . . . . . mpcci backup . . . . . . . mpcci batch . . . . . . . . mpcci batch LSF . . . . . mpcci batch PBS . . . . . mpcci batch N1GE . . . . . mpcci batch LoadLeveler mpcci batch GLOBUS . . . mpcci clean . . . . . . . . mpcci kill . . . . . . . . . mpcci ps . . . . . . . . . . mpcci ptoi . . . . . . . . . mpcci server . . . . . . . mpcci top . . . . . . . . . MpCCI Visualizer Using the MpCCI Visualizer Data Flow . . . . . . . . . . Supported Platforms . . . . Starting the Visualizer . . . MpCCI Visualizer for .ccv . . Control Window . . . . . . Viewer Window . . . . . . . MpCCI Visualizer for VTFx . MpCCI Grid Morpher MpCCI Project Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

I Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 107 108 109 110 111 114 115 116 117 119 120 121 122 123 124 125 127 128 129 135

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

136 . 136 . 136 . 137 . 137 . 137 . 137 . 139 . 144 145 146

VI
1 1.1 1.2

Codes Manual
Overview Common MpCCI Subcommands for Simulation Codes . . . . . . . . . . . . . . . . . . . . . . Unit Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1
8 9 11

12 I MpCCI 3.1.0-1

I Overview 2 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.3 2.4 2.4.1 2.5 2.5.1 2.6 3 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3 3.4 4 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.2 Abaqus Quick Information . . . . . . . . . . . . . . . . Supported Coupling Schemes . . . . . . . . . . Supported Platforms and Versions . . . . . . . References . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . Coupling Process . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . Post-Processing . . . . . . . . . . . . . . . . . . Code-Specic MpCCI Commands . . . . . . . . Code Environment . . . . . . . . . . . . . . . . Prerequisites for a coupled simulation . . . . . Code Adapter Reference . . . . . . . . . . . . . Patched Input File . . . . . . . . . . . . . . . . Trouble shooting, open issues and known bugs ANSYS Quick Information . . . . . . . . . Supported Coupling Schemes . . . Supported Platforms and Versions References . . . . . . . . . . . . . . Adapter Description . . . . . . . . Coupling Process . . . . . . . . . . Model Preparation . . . . . . . . . APDL Script . . . . . . . . . . . . Models Step . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . Running the Computation . . . . . Code-Specic MpCCI Commands . Code Adapter Reference . . . . . . Flowmaster Quick Information . . . . . . . . . Supported Coupling Schemes . . . Supported Platforms and Versions References . . . . . . . . . . . . . . Adapter Description . . . . . . . . Coupling Process . . . . . . . . . .

Contents of all MpCCI Manuals 12 12 12 12 13 13 14 14 14 15 16 17 19 20 21 21 22 22 23 24 24 24 24 24 25 26 26 29 33 34 36 37 38 39 40 40 40 40 40 41 41

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

MpCCI 3.1.0-1

I 13

Contents of all MpCCI Manuals 4.2.1 Model Preparation . . . . . . . . 4.2.2 Models Step . . . . . . . . . . . . 4.2.3 Coupling Step . . . . . . . . . . . 4.2.4 Go Step . . . . . . . . . . . . . . 4.3 Code-Specic MpCCI Commands 4.4 Code Adapter Description . . . . 5 5.1 5.1.1 5.1.2 5.1.3 5.1.4 5.2 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.3 5.4 5.4.1 5.4.2 6 6.1 6.1.1 6.1.2 6.1.3 6.1.4 6.2 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.3 6.4 6.4.1 6.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

I Overview . . . . . . . . . . . . . . . . . . . . . . . . 41 44 44 45 46 47 48 48 48 48 48 49 49 49 51 51 54 56 61 62 62 63 66 66 66 66 66 66 67 67 68 72 72 74 75 76 76 76

FLUENT Quick Information . . . . . . . . . Supported Coupling Schemes . . . Supported Platforms and Versions References . . . . . . . . . . . . . . Adapter Description . . . . . . . . Coupling Process . . . . . . . . . . Model Preparation . . . . . . . . . Models Step . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . Running the Computation . . . . . Code-Specic MpCCI Commands . Code Adapter Reference . . . . . . The MpCCI UDF Library . . . . . UDF-Hooks . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

FLUX Quick Information . . . . . . . . . . . Supported Coupling Schemes . . . . . Supported Platforms and Versions . . References . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . Coupling Process . . . . . . . . . . . . Model Preparation . . . . . . . . . . . pyFlux script . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . Code-Specic MpCCI Commands . . . Code Environment . . . . . . . . . . . Prerequisites for a coupled simulation Code Adapter Description . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

14 I MpCCI 3.1.0-1

I Overview 7 7.1 7.1.1 7.1.2 7.1.3 7.1.4 7.2 7.2.1 7.2.2 7.2.3 7.2.4 7.2.5 7.2.6 7.3 7.4 7.4.1 8 8.1 8.1.1 8.1.2 8.1.3 8.1.4 8.2 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.2.6 8.3 8.4 9 9.1 9.1.1 9.1.2 9.1.3 9.1.4 9.2 9.2.1 9.2.2 9.2.3 MSC.Marc Quick Information . . . . . . . . . . . Supported Coupling Schemes . . . . . Supported Platforms and Versions . . References . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . Coupling Process . . . . . . . . . . . . Model Preparation . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . Post-Processing . . . . . . . . . . . . . Code-Specic MpCCI Commands . . . Code Environment . . . . . . . . . . . Prerequisites for a coupled simulation

Contents of all MpCCI Manuals 78 78 78 78 78 79 80 80 80 81 82 82 83 84 85 85 86 86 86 86 86 87 88 88 89 89 90 92 94 95 96 97 97 97 97 97 97 98 98 98 98

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . .

PERMAS Quick Information . . . . . . . . . . . . . . . . Supported Coupling Schemes . . . . . . . . . . Supported Platforms and Versions . . . . . . . References . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . Coupling Process . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . Post-Processing . . . . . . . . . . . . . . . . . . Code-Specic MpCCI Commands . . . . . . . . Trouble shooting, open issues and known bugs RadTherm Quick Information . . . . . . . . . Supported Coupling Schemes . . . Supported Platforms and Versions References . . . . . . . . . . . . . . Adapter Description . . . . . . . . Coupling Process . . . . . . . . . . Model Preparation . . . . . . . . . Models Step . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

MpCCI 3.1.0-1

I 15

Contents of all MpCCI Manuals 9.2.4 Go Step . . . . . . . . . . . . . . 9.2.5 Running the Computation . . . . 9.2.6 Post-Processing . . . . . . . . . . 9.3 Code-Specic MpCCI Commands 10 10.1 10.1.1 10.1.2 10.1.3 10.1.4 10.2 10.2.1 10.2.2 10.2.3 10.2.4 10.2.5 10.2.6 10.3 10.4 10.4.1 10.4.2 10.4.3 10.5 10.5.1 10.5.2 10.5.3 10.6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

I Overview . . . . . . . . . . . . . 99 . 99 . 102 . 102 103 103 103 104 104 104 104 104 107 107 109 112 113 115 116 116 118 119 124 124 124 125 127

STAR-CD Quick Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Coupling Schemes . . . . . . . . . . . . . . . . . . . . . . Supported Platforms and Versions . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . Post-Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code-Specic MpCCI Commands . . . . . . . . . . . . . . . . . . . . Grid Morphing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MpCCI Grid Morpher . . . . . . . . . . . . . . . . . . . . . . . . . . . Restart with MpCCI Grid Morpher . . . . . . . . . . . . . . . . . . . pro-STAR Grid Morpher . . . . . . . . . . . . . . . . . . . . . . . . . Code Adapter Reference . . . . . . . . . . . . . . . . . . . . . . . . . STAR-CD 3.26 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . STAR-CD 4.0x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automatic model preparation for STAR-CD 3.26 and STAR-CD 4.0x Trouble shooting, open issues and known bugs . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

VII
1 2 2.1 2.2 2.2.1 2.2.2 2.3 2.4 2.5 2.6

Tutorial
Introduction Vortex-Induced Vibration Problem Description . . . . . Model Preparation . . . . . . Fluid Model . . . . . . . . . . Solid Model . . . . . . . . . . Models Step . . . . . . . . . . Coupling Step . . . . . . . . . Edit Step . . . . . . . . . . . Go Step . . . . . . . . . . . . of a . . . . . . . . . . . . . . . . . . . . . . . . Thin-Walled Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1
6 8 8 9 9 9 10 13 14 14

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

. . . . . . . .

16 I MpCCI 3.1.0-1

I Overview 2.7 2.8 3 3.1 3.2 3.2.1 3.2.2 3.3 3.4 3.5 3.6 3.7 3.7.1 3.7.2 3.8 4 4.1 4.2 4.2.1 4.2.2 4.2.3 4.2.4 4.3 4.4 4.5 4.6 4.7 4.8 5 5.1 5.2 5.2.1 5.2.2 5.3 5.4 5.5 5.6 5.7 5.8

Contents of all MpCCI Manuals 17 17 20 20 20 21 22 23 25 28 29 33 33 35 35 37 37 38 38 39 40 41 42 43 44 47 51 52 54 54 55 55 56 57 60 64 65 68 69

Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discussion of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Elastic Flap in a Duct Problem Description . . . Model Preparation . . . . Solid Model . . . . . . . . Fluid Model . . . . . . . . Models Step . . . . . . . . Coupling Step . . . . . . . Edit Step . . . . . . . . . Go Step . . . . . . . . . . Running the Computation Starting the Simulation . End of the Simulation . . Discussion of Results . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

Exhaust Manifold Problem Description . . . . Model Preparation . . . . . Solid Model . . . . . . . . . Fluid Model . . . . . . . . . Uncoupled Flow Simulation Prepare Models for Coupled Models Step . . . . . . . . . Coupling Step . . . . . . . . Edit Step . . . . . . . . . . Go Step . . . . . . . . . . . Running the Computation . Post-processing . . . . . . . Busbar System Problem Description . . . Model Preparation . . . . Fluid Model . . . . . . . . Electromagnetic Model . . Models Step . . . . . . . . Coupling Step . . . . . . . Edit Step . . . . . . . . . Go Step . . . . . . . . . . Running the Computation Discussion of Results . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

MpCCI 3.1.0-1

I 17

Contents of all MpCCI Manuals 6 6.1 6.2 6.2.1 6.2.2 6.3 6.4 6.5 6.6 6.7 6.8 7 7.1 7.2 7.2.1 7.2.2 7.3 7.4 7.5 7.6 7.7 7.7.1 7.7.2 7.8 8 8.1 8.2 8.2.1 8.2.2 8.3 8.4 8.5 8.6 8.7 8.7.1 8.8 Pipe Nozzle Problem Description . . . Model Preparation . . . . Fluid Model . . . . . . . . Solid Model . . . . . . . . Models Step . . . . . . . . Coupling Step . . . . . . . Edit Step . . . . . . . . . Go Step . . . . . . . . . . Running the Computation Discussion of Results . . . Cube in a Duct Heater Problem Description . . . Model Preparation . . . . Radiation Model . . . . . Fluid Model . . . . . . . . Models Step . . . . . . . . Coupling Step . . . . . . . Edit Step . . . . . . . . . Go Step . . . . . . . . . . Running the Computation Starting the Simulation . End of the Simulation . . Discussion of Results . . . Y-Junction Problem Description . . . Model Preparation . . . . Network Model . . . . . . Fluid Model . . . . . . . . Models Step . . . . . . . . Coupling Step . . . . . . . Edit Step . . . . . . . . . Go Step . . . . . . . . . . Running the Computation Starting the Simulation . Discussion of Results . . .

I Overview 70 70 70 71 73 73 75 76 76 78 79 80 80 81 81 81 83 84 86 86 90 90 92 92 96 96 96 97 99 101 103 105 106 109 109 110

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

VIII
1

Programmers Guide
Introduction

1
6

18 I

MpCCI 3.1.0-1

I Overview 2 2.1 2.1.1 2.1.2 2.2 2.2.1 2.2.2 2.2.3 2.3 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 Code API Code Integration and Simulation Code Requirements . Data Exchange and Data Access . . . . . . . . . . . . MpCCI Interface for Code Integration . . . . . . . . . . Code Integration with the MpCCI API Kit . . . . . . . A Simple Example . . . . . . . . . . . . . . . . . . . . Step-by-Step Procedure for Code Integration . . . . . Code Coupling with the Example . . . . . . . . . . . . Code Conguration Directory . . . . . . . . . . . . . . MpCCI GUI Conguration File gui.xcf . . . . . . . . . Code Information: <CodeInfo> . . . . . . . . . . . . . Codes Menu: <CodesMenuEntries> . . . . . . . . . . . Models Step: <ModelsMenuEntries> . . . . . . . . . . Component Types: <ComponentTypeDimensions> . . List of quantities: <SupportedQuantities> . . . . . . Go Step: <GoMenuEntries> . . . . . . . . . . . . . . . Environments for Scanner, Starter, Stopper and Killer General MpCCI GUI Elements . . . . . . . . . . . . . . Testing gui.xcf . . . . . . . . . . . . . . . . . . . . . . Perl Scripts . . . . . . . . . . . . . . . . . . . . . . . . Using Information from gui.xcf in Scripts . . . . . . . Scanner.pm . . . . . . . . . . . . . . . . . . . . . . . . Starter.pm . . . . . . . . . . . . . . . . . . . . . . . . Stopper.pm . . . . . . . . . . . . . . . . . . . . . . . . Info.pm . . . . . . . . . . . . . . . . . . . . . . . . . . Subcmd.pm . . . . . . . . . . . . . . . . . . . . . . . . Testing the Perl Scripts . . . . . . . . . . . . . . . . . MpCCI Coupling Manager Functions . . . . . . . . . . Denition of Output Functions: MpCCI Message init Initialization: MpCCI Init . . . . . . . . . . . . . . . . Get Initial Exchange Mode: MpCCI Get init actions Data Exchange: MpCCI Transfer . . . . . . . . . . . . End of Coupled Simulation: MpCCI Exit . . . . . . . . Denition of Nodes: MpCCI Def nodes . . . . . . . . . Denition of Elements: MpCCI Def elems . . . . . . . MpCCI Driver Functions . . . . . . . . . . . . . . . . . Description Values . . . . . . . . . . . . . . . . . . . . Methods Called before/after some Action . . . . . . . Mesh Denitions . . . . . . . . . . . . . . . . . . . . . Data Exchange . . . . . . . . . . . . . . . . . . . . . . Data Structures and Predened Macros . . . . . . . . Coupling Components . . . . . . . . . . . . . . . . . .

Contents of all MpCCI Manuals 7 8 8 9 11 11 14 25 28 29 29 29 30 31 32 33 35 36 42 43 43 43 45 45 45 46 47 48 49 50 52 53 54 55 56 58 60 61 62 63 64 64

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI 3.1.0-1

I 19

Contents of all MpCCI Manuals

I Overview 65 66 68 68 68 68 69 70 70 72 74 74 75 75 106 127 130 131 143 146 147 148 149 151 152 155 157 160 163 164 168 170 171 172 172 176 178

2.8.2 Quantities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.8.3 Loop Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.3.10 3.3.11 3.4 3.4.1 3.4.2 3.4.3 3.4.4 MpCCI SDK Code Coupling Library The MpCCI SDK Concepts . . . . . . . . . . Communication levels . . . . . . . . . . . . Coupling quantities . . . . . . . . . . . . . . Synchronization concepts and data transfer Coupling Regions . . . . . . . . . . . . . . . Neighborhood Search and Interpolation . . The MpCCI SDK coupling server scheme . . MpCCI SDK Functions . . . . . . . . . . . . Naming Conventions and Terminology . . . MpCCI SDK Data Types . . . . . . . . . . . Initialization and Coupling Denition . . . Coupling Communication . . . . . . . . . . Remeshing . . . . . . . . . . . . . . . . . . Termination . . . . . . . . . . . . . . . . . . Control . . . . . . . . . . . . . . . . . . . . Miscellaneous functions . . . . . . . . . . . Overview of the MpCCI SDK functions . . . MpCCI Input File . . . . . . . . . . . . . . . Structure of the Input File . . . . . . . . . . Code block . . . . . . . . . . . . . . . . . . Quantities block . . . . . . . . . . . . . . . Control block . . . . . . . . . . . . . . . . . Contact block . . . . . . . . . . . . . . . . . Switches block . . . . . . . . . . . . . . . . Jobs block . . . . . . . . . . . . . . . . . . . Parameters block . . . . . . . . . . . . . . . Coupling block . . . . . . . . . . . . . . . . Additional block . . . . . . . . . . . . . . . Include Mechanism . . . . . . . . . . . . . . An Example . . . . . . . . . . . . . . . . . . Start-up and Initialization . . . . . . . . . . Coupling Denition . . . . . . . . . . . . . . Coupled Computation . . . . . . . . . . . . Termination . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

IX

Appendix

1
4

Quantity Reference

20 I

MpCCI 3.1.0-1

I Overview Literature Glossary Keyword Index

Contents of all MpCCI Manuals 41 42 46

MpCCI 3.1.0-1

I 21

MpCCI 3.1.0

MpCCI

II Release Notes

MpCCI 3.1.0-1 Documentation Part II Release Notes PDF version January 20, 2009

MpCCI is a registered trademark of Fraunhofer SCAI www.scai.fraunhofer.de/mpcci

Fraunhofer Institute
Algorithms and Scientic Computing Fraunhofer Institute for Algorithms and Scientic Computing SCAI Schloss Birlinghoven, 53754 Sankt Augustin, Germany Abaqus and SIMULIA are trademarks or registered trademarks of Dassault Syst`mes e ANSYS is a registered trademark of Ansys, Inc. FLUENT is a registered trademark of Fluent Inc. FLUX is a registered trademark of Cedrat of Grenoble, France ICEPAK is a registered trademark of Fluent Inc. MSC.Marc is a registered trademark of MSC.Software Corporation PERMAS is a registered trademark of Intes GmbH STAR-CD is a registered trademark of CD adapco Group RadTherm is a registered trademark of ThermoAnalytics Inc. FLEXlm is a registered trademark of Macrovision Perl has a copyright by Larry Wall and others ActivePerl has a Community License Copyright of Active State Corp. OpenSSH has a copyright by Tatu Ylonen, Espoo, Finland Java is a registered trademark of Sun Microsystems, Inc. MPICH-1 and MPICH-2 has a copyright by University of Chicago and Mississippi State University Linux is a registered trademark of Linus Torvalds UNIX is a registered trademark of The Open Group Windows, Windows XP and Windows Vista are registered trademarks of Microsoft Corp.

II Release Notes

Contents

II Release Notes Contents


1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 Changes and New Features in the initial MpCCI 3.1.0 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation, Conguration and Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MpCCI Visualizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MpCCI GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Abaqus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Flowmaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4 4 4 4 5 5 5 5 5 6 6 6 6 7 8 8 10 14

1.10 ICEPAK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.11 PERMAS 1.12 RadTherm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.13 STAR-CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3 3.1 3.2 4 Prerequisites for MpCCI Installation Supported Platforms in MpCCI 3.1.0 Platforms Supported by the MpCCI 3.1.0 Server . . . . . . . . . . . . . . . . . . . . . . . . . Codes Supported by MpCCI 3.1.0 on Dierent Platforms . . . . . . . . . . . . . . . . . . . . Known Bugs and Limitations in MpCCI 3.1.0

MpCCI 3.1.0-1

II 3

1 Changes and New Features in the initial MpCCI 3.1.0

II Release Notes

1 Changes and New Features in the initial MpCCI 3.1.0


1.1 Introduction
The release notes relate to MpCCI 3.1.0. The feature improvements and bug xes from MpCCI 3.0.6 have been applied to MpCCI 3.1.0. MpCCI 3.1.0 represents a new release change over MpCCI 3.0.6. The communication protocol between the MpCCI GUI and the remote machine has been improved for a better le browsing. MpCCI 3.1.0 is available as an upgrade from an existing MpCCI 3.0.6 installation.

1.2 Installation, Conguration and Licensing


Installation Users who have yet to upgrade to MpCCI 3.1.0 could install MpCCI over the MpCCI 3.0.6. Licensing Users will need an appropriate license le to access MpCCI 3.1.

1.3 Coupling Server


Interpolation Schemes Interpolation schemes for 1D and 3D coupling are improved. A new parameter InsideOnly has been added for the Minimal Distance algorithm. This option is available in the MpCCI GUI at the Edit Step ( V-4.5 Edit Step ). It will disable the shape function extrapolation. Only values inside an element are transferred.

1.4 MpCCI Visualizer


Under Microsoft Windows and Linux MpCCI now oers a new viewer for its traceles. The new viewer is automatically chosen by mpcci vis if available. Because the format it supports is VTFx the tracele will be converted before calling the viewer. For more information the new viewer provides an online documentation. The old viewer still remains available and is automatically chosen on the other platforms.

II

MpCCI 3.1.0-1

II Release Notes

1.9 FLUENT

1.5 MpCCI GUI


MpCCI GUI is now using the native rsh/ssh client for communicating to the remote machine. Batch Menu A new batch menu can be accessed directly from MpCCI GUI for submitting, killing, status a job from a queuing system. The job submission can be congured from MpCCI GUI and directly sent to the queuing system. The list of supported batch queuing has been extended to: LSF, PBS, SGE, LoadLeveler. Remote File Chooser The performance of the Remote File Chooser is improved. The communication protocol has been extended to rsh.

1.6 Command Line Interface


Batch The job submission to a queuing system is also available from the command line interface (see V-5.6 Job Control ).

1.7 Abaqus
MpCCI 3.1.0 supports Abaqus 6.7 and Abaqus 6.8. Abaqus 6.8 can run in parallel on dierent hosts with MpCCI 3.1.0. Abaqus 6.7 noties in such case that the number of CPUs exceed the number of CPUs available. Running Abaqus 6.7 in parallel is limited to the local machine.

1.8 Flowmaster
MpCCI 3.1.0 supports Flowmaster 7.5.x,Flowmaster 7.6.x .

1.9 FLUENT
FLUENT 12.0.7 is now supported in addition to FLUENT 6.3.26. When running FLUENT in parallel a host le will be passed to FLUENT.

MpCCI 3.1.0-1

II 5

1 Changes and New Features in the initial MpCCI 3.1.0

II Release Notes

FLUENT 6.2.16 has been removed from the distribution. The adapters may be available on demand.

1.10 ICEPAK
ICEPAK 4.4.8 is now supported in addition to ICEPAK 4.4.6.

1.11 PERMAS
PERMAS 12 is supported.

1.12 RadTherm
RadTherm 9.0.1 and RadTherm 9.1.0 are supported. Older RadTherm releases has been removed.

1.13 STAR-CD
STAR-CD 4.08.006 is supported in addition to STAR-CD 4.06.007 and STAR-CD 4.04.006.

II

MpCCI 3.1.0-1

II Release Notes

2 Prerequisites for MpCCI Installation

2 Prerequisites for MpCCI Installation


Please see 3 Supported Platforms in MpCCI 3.1.0 for platform-specic prerequisites.

Required Disc Space A full MpCCI installation (all platforms and all code adapters, plus a multi-platform Java JRE and the MpCCI-RSH and the OpenSSH and MPICH for Microsoft Windows) requires a free disc space of approx. 1.8 GB and is a collection of about 9000 les. Third Party Software Perl Java MpCCI-RSH for Windows is provided by MpCCI 3.1.0. This allows an access to all Windows operating system XP and Vista (See III-2.6 MpCCI-RSH for Microsoft Windows ).

MpCCI 3.1.0-1

II 7

3 Supported Platforms in MpCCI 3.1.0

II Release Notes

3 Supported Platforms in MpCCI 3.1.0


Platform lists for supported simulation codes are given in the Codes Manual.

3.1 Platforms Supported by the MpCCI 3.1.0 Server


Platform HP-UX 11.00 on PA-RISC HP-UX 11.22 on Itanium I HP-UX 11.23 on Itanium II IBM AIX 5.1 on Power3 processor IBM AIX 5.2 on Power3 processor IBM AIX 5.3 on Power3 processor Linux with glibc 2.2 (RedHat 7., SuSE <= 8.0) Linux with glibc 2.3 (RedHat 9, SuSE >= 8.1) Linux with glibc 2.3 on AMD Opteron 64 bit Linux with glibc 2.3 on AMD64 or EM64T Linux with glibc 2.3 on Intel EM64T Linux with glibc 2.3 on Itanium Microsoft Vista 32 bit on Intel x86 Microsoft Vista 64 bit blend (AMD Opteron or EM64T) Microsoft Vista 64 bit on AMD Opteron Microsoft Vista 64 bit on Intel EM64T Microsoft Windows XP on DEC alpha Microsoft Windows XP on Intel x86 Microsoft Windows XP64 blend (AMD Opteron or EM64T) Microsoft Windows XP64 on AMD Opteron Microsoft Windows XP64 on Intel EM64T Microsoft Windows XP64 on Intel Itanium OSF1 V5.1 with Alpha processor SGI IRIX64 6.5 on R10000 SUN Solaris >= 2.7 on AMD64 compatible processor SUN Solaris >= 2.7 on Sparc processor SUN Solaris >= 2.7 on X86 compatible processor SUSE ES 10 with glibc 2.4 on AMD Opteron 64 bit SUSE ES 10 with glibc 2.4 on AMD64 or EM64T SUSE ES 10 with glibc 2.4 on Intel EM64T Bits 32/64 32/64 32/64 32/64 32/64 32/64 32 32 32/64 32/64 32/64 32/64 32 32/64 32/64 32/64 64 32 32/64 32/64 32/64 32/64 64 32/64 32/64 32/64 32 32/64 32/64 32/64 MpCCI arch. hpux11 parisc hpux1122 ia64 hpux1123 ia64 aix51 power aix52 power aix53 power linux x86 glibc22 linux x86 linux amd64 linux x64 linux em64t linux ia64 vista x86 vista x64 vista amd64 vista em64t mswin alpha mswin x86 xp64 x64 xp64 amd64 xp64 em64t xp64 ia64 osf alpha irix65 mips4 solaris amd64 solaris sparc solaris x86 sles10 amd64 sles10 x64 sles10 em64t Support OK OK OK OK use aix51 power use aix51 power OK, no visualizer OK OK use linux x86 OK OK OK OK OK OK not supported OK OK OK OK use mswin x86 OK, no visualizer OK not supported OK not supported OK use linux x86 OK

II

MpCCI 3.1.0-1

II Release Notes

3.1 Platforms Supported by the MpCCI 3.1.0 Server

The above list is valid for MpCCI alone, i. e. the MpCCI executables. This does not automatically include all code adapters. Some simulation codes can only be coupled on a subset of the above platforms. A list of platforms for the supported codes is given in the following section and for each code in the corresponding chapter of the Codes Manual.

MpCCI 3.1.0-1

II 9

3 Supported Platforms in MpCCI 3.1.0

II Release Notes

3.2 Codes Supported by MpCCI 3.1.0 on Different Platforms


Codes can only be supported on platforms they support themselves. HP-UX 11.00 on PA-RISC ANSYS Abaqus FLUENT PERMAS STAR-CD 90, 100, 110 6.6, 6.7-2 6.3.26 11 3.26 (hpux1122 ia64) (hpux11 parisc)

HP-UX 11.22 on Itanium I

HP-UX 11.23 on Itanium II ANSYS Abaqus FLUENT MSC.Marc PERMAS STAR-CD 90, 100, 110 6.7-1, 6.7-2, 6.8-1, 6.8-2 6.3.26 2005r3, 2007r1 11 3.26

(hpux1123 ia64)

IBM AIX 5.1 on Power3 processor FLUENT ICEPAK PERMAS STAR-CD 6.3.26, 12.0.7 6.3.34 11 3.26, 4.04.006, 4.06.007, 4.08.006

(aix51 power)

Linux with glibc 2.2 (RedHat 7., SuSE <= 8.0)

(linux x86 glibc22)

Linux with glibc 2.3 (RedHat 9, SuSE >= 8.1) ANSYS Abaqus FLUENT ICEPAK MSC.Marc PERMAS RadTherm STAR-CD 90, 100, 110 6.6, 6.7-1, 6.7-2, 6.8-1, 6.8-2 6.3.26, 12.0.7 6.3.34, 6.3.36 2005r3, 2007r1 11 9.0.1, 9.1.0 3.26, 4.04.006, 4.06.007, 4.08.006

(linux x86)

10 II

MpCCI 3.1.0-1

II Release Notes

3.2 Codes Supported by MpCCI 3.1.0 on Dierent Platforms (linux amd64)

Linux with glibc 2.3 on AMD Opteron 64 bit ANSYS Abaqus FLUENT ICEPAK MSC.Marc RadTherm STAR-CD 90, 100, 110 6.6 6.3.26, 12.0.7 6.3.34, 6.3.36 2005r3, 2007r1 9.0.1, 9.1.0 3.26, 4.04.006, 4.06.007, 4.08.006

Linux with glibc 2.3 on Intel EM64T ANSYS Abaqus FLUENT ICEPAK PERMAS RadTherm STAR-CD 100, 110 6.6 6.3.26, 12.0.7 6.3.34, 6.3.36 11, 12 9.0.1, 9.1.0 3.26, 4.04.006, 4.06.007, 4.08.006

(linux em64t)

Linux with glibc 2.3 on Itanium ANSYS Abaqus FLUENT RadTherm STAR-CD

(linux ia64)

90, 100, 110 6.7-1, 6.7-2, 6.8-1, 6.8-2 6.3.26, 12.0.7 9.1.0 3.26, 4.04.006, 4.06.007, 4.08.006 (vista x86)

Microsoft Vista 32 bit on Intel x86

Microsoft Vista 64 bit blend (AMD Opteron or EM64T) ANSYS 110 FLUENT 6.3.26, 12.0.7 ICEPAK 6.3.34 Microsoft Vista 64 bit on AMD Opteron ANSYS 110 FLUENT 6.3.26, 12.0.7 ICEPAK 6.3.34 (vista amd64)

(vista x64)

MpCCI 3.1.0-1

II 11

3 Supported Platforms in MpCCI 3.1.0 Microsoft Vista 64 bit on Intel EM64T ANSYS 110 FLUENT 6.3.26, 12.0.7 ICEPAK 6.3.34 Microsoft Windows XP on Intel x86 ANSYS Abaqus FLUENT FLUX Flowmaster ICEPAK MSC.Marc RadTherm 90, 100, 110 6.6, 6.7-1, 6.7-2, 6.8-1, 6.8-2 6.3.26, 12.0.7 10.2 7.5, 7.6 6.3.34 2005r3, 2007r1 9.0.1, 9.1.0 (xp64 x64) (mswin x86) (vista em64t)

II Release Notes

Microsoft Windows XP64 blend (AMD Opteron or EM64T) ANSYS Abaqus FLUENT FLUX ICEPAK PERMAS 110 6.6, 6.7-1, 6.7-2, 6.8-1, 6.8-2 6.3.26, 12.0.7 10.2 6.3.34 11 (xp64 amd64)

Microsoft Windows XP64 on AMD Opteron ANSYS Abaqus FLUENT ICEPAK 110 6.6 6.3.26, 12.0.7 6.3.34

Microsoft Windows XP64 on Intel EM64T ANSYS Abaqus FLUENT ICEPAK 110 6.6 6.3.26, 12.0.7 6.3.34

(xp64 em64t)

OSF1 V5.1 with Alpha processor ANSYS 90, 100, 110 MSC.Marc 2005r3, 2007r1 STAR-CD 3.26

(osf alpha)

12 II

MpCCI 3.1.0-1

II Release Notes SGI IRIX64 6.5 on R10000 ANSYS Abaqus FLUENT MSC.Marc STAR-CD 90, 100, 110 6.6 6.3.26 2005r3, 2007r1 3.26

3.2 Codes Supported by MpCCI 3.1.0 on Dierent Platforms (irix65 mips4)

SUN Solaris >= 2.7 on Sparc processor ANSYS FLUENT ICEPAK MSC.Marc RadTherm STAR-CD 90, 100, 110 6.3.26, 12.0.7 6.3.34 2005r3, 2007r1 9.1.0 3.26, 4.04.006, 4.06.007, 4.08.006

(solaris sparc)

SUSE ES 10 with glibc 2.4 on AMD Opteron 64 bit ANSYS FLUENT ICEPAK MSC.Marc RadTherm STAR-CD 90, 100, 110 6.3.26, 12.0.7 6.3.34, 6.3.36 2005r3, 2007r1 9.0.1, 9.1.0 3.26, 4.04.006, 4.06.007, 4.08.006

(sles10 amd64)

SUSE ES 10 with glibc 2.4 on Intel EM64T ANSYS FLUENT ICEPAK RadTherm STAR-CD 100, 110 6.3.26, 12.0.7 6.3.34, 6.3.36 9.0.1, 9.1.0 3.26, 4.04.006, 4.06.007, 4.08.006

(sles10 em64t)

MpCCI 3.1.0-1

II 13

4 Known Bugs and Limitations in MpCCI 3.1.0

II Release Notes

4 Known Bugs and Limitations in MpCCI 3.1.0

14 II

MpCCI 3.1.0-1

MpCCI 3.1.0

MpCCI

III Installation Guide

MpCCI 3.1.0-1 Documentation Part III Installation Guide PDF version January 20, 2009

MpCCI is a registered trademark of Fraunhofer SCAI www.scai.fraunhofer.de/mpcci

Fraunhofer Institute
Algorithms and Scientic Computing Fraunhofer Institute for Algorithms and Scientic Computing SCAI Schloss Birlinghoven, 53754 Sankt Augustin, Germany Abaqus and SIMULIA are trademarks or registered trademarks of Dassault Syst`mes e ANSYS is a registered trademark of Ansys, Inc. FLUENT is a registered trademark of Fluent Inc. FLUX is a registered trademark of Cedrat of Grenoble, France ICEPAK is a registered trademark of Fluent Inc. MSC.Marc is a registered trademark of MSC.Software Corporation PERMAS is a registered trademark of Intes GmbH STAR-CD is a registered trademark of CD adapco Group RadTherm is a registered trademark of ThermoAnalytics Inc. FLEXlm is a registered trademark of Macrovision Perl has a copyright by Larry Wall and others ActivePerl has a Community License Copyright of Active State Corp. OpenSSH has a copyright by Tatu Ylonen, Espoo, Finland Java is a registered trademark of Sun Microsystems, Inc. MPICH-1 and MPICH-2 has a copyright by University of Chicago and Mississippi State University Linux is a registered trademark of Linus Torvalds UNIX is a registered trademark of The Open Group Windows, Windows XP and Windows Vista are registered trademarks of Microsoft Corp.

III Installation Guide

Contents

III Installation Guide Contents


1 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3 3.1 3.2 4 4.1 4.2 4.3 5 5.1 5.2 Installation Overview Before the Installation Downloading MpCCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Perl Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Java Runtime Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . OpenSSH for Microsoft Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MpCCI-RSH for Microsoft Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPICH for Microsoft Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation of the MpCCI Software Multi-platform for UNIX, Linux and Microsoft Windows . . . . . . . . . . . . . . . . . . . . . Local Microsoft Windows Installation with the MSI . . . . . . . . . . . . . . . . . . . . . . . Immediately After the Installation - Quick Installation Tests without a License Your Home Directory under Microsoft Windows . . . . . . . . . . . . . . . . . . . . . . . . . Testing the MpCCI Working Environment and Perl . . . . . . . . . . . . . . . . . . . . . . . Testing whether MpCCI Finds Your Simulation Codes . . . . . . . . . . . . . . . . . . . . . Licensing Request for a License File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing and Activating a License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 5.2.2 5.3 5.4 5.5 6 6.1 6.2 Congure a License Manager as UNIX service . . . . . . . . . . . . . . . . . . . . . . Congure a License Manager as Windows service . . . . . . . . . . . . . . . . . . . . 5 6 6 7 8 9 10 11 11 12 12 13 16 16 16 17 19 19 20 21 21 24 26 26 27 27 29

Dening the License Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Multiple License Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Testing the License Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conguring the MpCCI Users Environment Accessing Remote Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conguring MpCCI via Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI 3.1.0-1

III

Contents 7 8 8.1 8.2 8.3 8.4 9 10 Testing the MpCCI Installation and Communication Troubleshooting

III Installation Guide 30 32 32 32 32 35 37 39

Secure shell in general . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . OpenSSH under Microsoft Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rsh, rcp and rlogin under Microsoft Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . MPICH under Microsoft Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing Perl Installing Java

III

MpCCI 3.1.0-1

III Installation Guide

1 Installation Overview

1 Installation Overview
Please check the Release Notes for installation prerequisites and supported platforms rst. MpCCI installation does not require much, there are just a few steps you need to do. There are two ways to install MpCCI, the multi-platform installation which can be used for all platforms and the Windows installer. Download Password Before the installation you should contact the MpCCI team at mpcci scai.fraunhofer.de to obtain a password for the software download. Multi-platform Installation 1. Download tar archive: Visit the MpCCI website of Fraunhofer SCAI at www.scai.fraunhofer.de/mpcci, to download a compressed tar archive "mpcci-*.tar.gz" containing the MpCCI software. 2. Extract MpCCI software: Create a directory and unzip/untar the downloaded le within this directory. This new directory is the MpCCI root directory which is referred to as <MpCCI home>. 3. Add MpCCI to your PATH: Append the MpCCI binaries directory "<MpCCI home>/bin" to your PATH environment variable such that the command mpcci is available. A detailed description of this procedure is given in 3.1 Multi-platform for UNIX, Linux and Microsoft Windows . Windows Installer 1. Download Windows installer: Visit the MpCCI website of Fraunhofer SCAI at www.scai.fraunhofer.de/mpcci and download the Windows installer for your platform. 2. Run the installer: Start the installer, which also oers to install third-party software needed by MpCCI. The installer also sets up your environment. See also 3.2 Local Microsoft Windows Installation with the MSI . Licensing MpCCI uses a FLEXlm license server, the setup is described in 5 Licensing .

MpCCI 3.1.0-1

III

2 Before the Installation

III Installation Guide

2 Before the Installation


2.1 Downloading MpCCI
For the MpCCI download you need a download password! MpCCI is only available via internet download: Go to the MpCCI homepage www.scai.fraunhofer.de/mpcci. Select the point Download at the left. Enter username and password and press Login. Select the MpCCI version you want to download in the list appearing on the left. There are two download variants: The Multi-platform Download which can be used for all platforms and le-server installations. The Windows Installer Download which is only suitable for local installations for Windows XP systems. Choose the appropriate variant and proceed. Multi-platform Download Select the platforms. More information on the supported platforms is given in the Release Notes. Select modules. For coupling with commercial software you need the appropriate modules. Always select MpCCI itself! Select whether you want to include the JRE in your download. See 10 Installing Java You can also select to download OpenSSH or MPICH for Windows XP. for details.

Press the Start Download button. The webserver now prepares a download le according to your choices, which may take some minutes. After that you can download the zipped download le "mpcci-<MpCCI-version>.tar.gz". Proceed with the installation as described in 3.1 Multi-platform for UNIX, Linux and Microsoft Windows . Windows Installer Download Please select your Windows platform and download the suitable installer "mpcci-<MpCCI-version>-<MpCCI arch>.exe".

III

MpCCI 3.1.0-1

III Installation Guide

2.2 Where to Install

2.2 Where to Install


MpCCI is not just a multi-code software but also a multi-platform software. That means all kinds of UNIX, Linux and Microsoft Windows platforms can live together within in a single directory on any machine, whether it is a UNIX, Linux or Microsoft Windows system. The command mpcci runs on any platform. We should mention that Microsoft Windows is used as a synonym for various Windows systems, Windows XP, Windows 64 and Windows Vista. MpCCI uses architecture tokens to identify a platform. The architecture tokens is herein after referred to as <MpCCI arch>. The architecture tokens are directory names and used to locate the binary executables. A list of architecture tokens and currently supported platforms is given in the Release Notes. You may later on rename the MpCCI home directory or move the MpCCI home directory to a dierent location or even a dierent le server since MpCCI never works with absolute pathnames nor is any le patched during the installation. Under Microsoft Windows MpCCI never depends on any registry key. As long as you keep your PATH environment variable up-to-date MpCCI will work by just typing mpcci . System dependent information is collected at runtime and the required system dependent settings are done automatically. There is no need to congure your MpCCI installation for a specic platform or for your local machine. Whatever operating system you are using, MpCCI behaves identical or at least similar. The major dierence between the UNIX world and Microsoft Windows is that under Microsoft Windows the X11 window system is not available per default and you can not redirect the graphical display output from your local machine to a remote UNIX or Microsoft Windows computer. If you want to use the remote execution facilities of MpCCI, please ensure that the X11 forwarding mechanism works. The server must allow connections from remote computers and no rewall may block the port 6000. If you have a computer network and an NFS le server or Samba is available in your local area network there is denitely no need to have a separate installation on each local desktop computer, whether it is a UNIX, Linux or Microsoft Windows system. Nevertheless, if you like you may install MpCCI locally on your desktop computer or copy the MpCCI home directory from the le server onto your local machine.

Microsoft Windows only Version and the Microsoft Windows Installer


For standalone Microsoft Windows systems without access to le servers we oer a separate MSI (MicroSoft-Installer) version of MpCCI. The Microsoft Windows MSI versions of MpCCI are identical with the Microsoft Windows parts of the multi-platform version. The dierence is the installation procedure itself, not the software. During the MSI installation some Microsoft Windows registry entries are created which allows to uninstall MpCCI later on using the Microsoft Windows uninstaller. Furthermore MpCCI is added to the Windows Start-Commands list. Although you used the MSI version you may move or rename the MpCCI home directory as with the

MpCCI 3.1.0-1

III

2 Before the Installation

III Installation Guide

multi-platform installation. MpCCI will still work as before. However your Microsoft Windows uninstall information is then corrupted since all your links or your desktop icons are lost and the uninstaller will not be able to remove your MpCCI installation. In fact you do not need to have the MSI version if MpCCI can be installed on a le server. There is no advantage compared to the multi-platform installation. You may simply remove MpCCI from your Microsoft Windows system by deleting the MpCCI home directory.

Recommendations
Each computer in a network used to run MpCCI jobs needs to have access to an MpCCI installation. We recommend to have a multi-platform le server installation and the MpCCI home directory on the le server is then mounted to your local computer. Otherwise, in case of a compute cluster with local discs only you would need to copy the MpCCI home directory on each computer separately. If your HOME directory is shared among the computers in a network you may also have your private MpCCI installation, e. g. under HOME/bin. In this case your HOME directory acts as a le server. This is the preferred method in case you are in trouble with your IT. Avoid a local installation if possible. A le server installation is the preferred way to use MpCCI in a heterogeneous network.

2.3 The Perl Interpreter


Since MpCCI is a multi-platform software you can never re up any binary executable directly - these executables are wrapped by scripts. To avoid the maintenance of dierent script languages (Bourne shell "/bin/sh" under UNIX and Linux and ".BAT" les under Microsoft Windows) in fact all MpCCI commands are Perl scripts and MpCCI requires a working Perl installation. Perl is a platform independent script language which allows to run identical scripts under UNIX as well as Microsoft Windows. Perl was invented by Larry Wall. Perl is a public domain software distributed under the GNU Public License (GPL) and can be downloaded for free from the world wide web. Perl needs to be installed separately on your local computer. Perl is not part of the MpCCI installation. If Perl is already installed on your system - this is true for nearly any UNIX and Linux system - you may check the Perl version by typing perl -version

III

MpCCI 3.1.0-1

III Installation Guide For MpCCI under UNIX and Linux you need at least Perl 5.6.

2.4 The Java Runtime Environment

ActivePerl for Microsoft Windows


Perl is never part of your Microsoft Windows system. We recommend to have the ActivePerl 5.8.8 or higher installed. There are several issues with Perl versions before ActivePerl 5.8.0. To be up to date with your ActivePerl you may follow the link www.activestate.com/Products/ActivePerl. ActivePerl is the best available Microsoft Windows port of Perl. A 64 bit version of ActivePerl for Windows 64 is available. If you need to install Perl or upgrade your Perl installation, please see For MpCCI under Microsoft Windows you need at least Perl 5.8. 9 Installing Perl .

2.4 The Java Runtime Environment


The MpCCI GUI is a Java application. At least a JavaTM 2 Runtime Environment (JRE) or higher is required. This corresponds to Java 1.4.2. Anyway, there is no need to have the full Java development environment installed. For the MpCCI GUI the Java JRE is sucient. If you already have Java 1.4.2 or higher installed you are ne. Please check your current Java version by typing java -version If the output of the command above contains the string gcj (GCC) you are using GNU Java. This may lead to a library problem when the MpCCI GUI is started. In this case, you should use the Java JRE of the MpCCI installation. A multi-platform Java JRE may be part of the MpCCI installation and of the Microsoft Windows MSI installation. There is no need to have Java installed before you install MpCCI. If you still prefer to have your private full Java installation, please see 10 Installing Java .

Recommendations
In case of a multi-platform le server installation you should always download the Java JRE together with MpCCI. You do not know in advance whether an MpCCI user has Java installed on his local machine or not, specially in a heterogeneous compute environment. If not MpCCI has the fallback possibility to use the Java JRE that comes with MpCCI.

MpCCI 3.1.0-1

III

2 Before the Installation

III Installation Guide

However, you should not install Java on your local machine just because of MpCCI. Instead you should use the Java as part of the MpCCI installation.

2.5 OpenSSH for Microsoft Windows


OpenSSH is a free ssh distribution. OpenSSH is required under Microsoft Windows to execute commands on remote Microsoft Windows or UNIX systems from a Microsoft Windows or a UNIX system. OpenSSH makes Microsoft Windows interoperable with other Microsoft Windows systems and UNIX. OpenSSH is part of the MpCCI installation and may be nally installed on the y. You should not download OpenSSH for Microsoft Windows from the web and install it. In fact you should not have OpenSSH installed before the MpCCI installation.

Recommendations
Do never install OpenSSH separately. Please let MpCCI do this job. Together with MpCCI some bug xes for the OpenSSH are installed and the OpenSSH is automatically congured.

OpenSSH for Microsoft Windows is already installed


You are familiar with OpenSSH and already worked with OpenSSH. Please save your existing "<Home>/.ssh" directory - e. g. rename it ssh - to avoid the lost of your already generated and working RSA-keys. Uninstall OpenSSH. After MpCCI was successfully installed OpenSSH will be installed on the y. After the nal OpenSSH installation remove the directory "<Home>/.ssh". Do not forget to rename your saved ssh directory back to .ssh.

OpenSSH for Microsoft Windows and cygwin


There are known issues if OpenSSH and cygwin are installed in parallel on the same machine, e. g. both come with an "ls" command accessing dierent and possibly incompatible versions of the same ".dll" les. In this case the OpenSSH may fail. Best is to have either the OpenSSH installed or your existing cygwin installation includes a working ssh service. In the latter case the OpenSSH installation is not required. If you need the OpenSSH and the cygwin installation in parallel then please make sure that the OpenSSH binaries directory is in front of your PATH environment variable.

10 III

MpCCI 3.1.0-1

III Installation Guide

2.7 MPICH for Microsoft Windows

2.6 MpCCI-RSH for Microsoft Windows


MpCCI comes with its own rshd and rlogind services for Windows. This package includes both, the services and the rsh and rcp commands. Although this software is part of MpCCI, is not necessarily bound to MpCCI. Therefore the service is - like the OpenSSH- a separate installation under Microsoft Windows. MpCCI-RSH is required under Microsoft Windows to execute commands on remote Microsoft Windows or UNIX systems from a Microsoft Windows or a UNIX system. MpCCI-RSH makes Microsoft Windows interoperable with other Microsoft Windows systems and UNIX Using the MpCCI Microsoft Windows installer, the MpCCI-RSH package is automatically installed and started. Otherwise if you have a computer network and an NFS le server or Samba is available in your local area network and need to install the MpCCI-RSH package, you can execute the installation program "<MpCCI home> \mswin\mpccirsh\setup.exe". After the installation of MpCCI-RSH you need to prepare the .rhosts le and rsh environment, see Preparing the .rhosts le and the rsh environment . 8.3

2.7 MPICH for Microsoft Windows


MPICH for Microsoft Windows is required to execute the MpCCI server process under Microsoft Windows. MPICH is part of the MpCCI installation and may be installed on the y. You do not need to download MPICH for Microsoft Windows and install it. There will be no conicts between the MPICH which comes with MpCCI and any existing MPICH. You may also have MPICH 1 and MPICH 2 installed in parallel without any conicts.

Recommendations
Do never install MPICH separately. Please let MpCCI do this job.

MpCCI 3.1.0-1

III 11

3 Installation of the MpCCI Software

III Installation Guide

3 Installation of the MpCCI Software


If you intend to install MpCCI under UNIX or Linux or on a le server you should have downloaded a multi-platform distribution le. For a local Microsoft Windows installation you download an "MSI" le.

3.1 Multi-platform for UNIX, Linux and Microsoft Windows


For all supported platforms you will nd a distribution on the MpCCI download site. No matter on which systems you are logged on, UNIX, Linux or Microsoft Windows, the installation procedure is identical. You need not to be an Microsoft Windows administrator or the UNIX root user if you do not extract the MpCCI distribution le within protected directories. MpCCI can be installed everywhere, e. g. in your private MpCCI home directory, "$HOME/MpCCI" or "%USERPROFILE%\MpCCI". After downloading your MpCCI distribution le you have to 1. create your MpCCI home directory 2. change to your MpCCI home directory: cd <MpCCI home> 3. extract the MpCCI les from the downloaded le with the command tar zxvf mpcci-<MpCCI-version>.tar.gz or, if the z option is not available, with the commands gunzip mpcci-<MpCCI-version>.tar.gz tar xvf mpcci-<MpCCI-version>.tar The tar command may not - we believe never - be available under Microsoft Windows. The MpCCI software is now installed on your system.

Do not Forget to Set Your PATH Environment!


To use MpCCI without having trouble the MpCCI binaries directory "<MpCCI home>/bin" needs to be in the PATH. If the MpCCI binaries directory is not in the PATH a remote connection to this machine from a remote host via any MpCCI software is impossible. If you already have a previous release of MpCCI in the PATH, please append the newest release in front of the PATH and not at the end. Otherwise the mpcci command selected will always start the previous release. According to your login shell under UNIX and Linux (see "/etc/passwd") you need to set: Bourne shell ("/bin/sh") users

12 III

MpCCI 3.1.0-1

III Installation Guide

3.2 Local Microsoft Windows Installation with the MSI

PATH=<MPCCI_HOME>/bin:$PATH export PATH

Korn shell (ksh) and bash users

export PATH=<MPCCI_HOME>/bin:$PATH

c-shell (csh) and tc-shell (tcsh) users

setenv PATH <MPCCI_HOME>/bin:$PATH

and under Microsoft Windows

set PATH=<MPCCI_HOME>\bin;%PATH%

Please keep in mind that a list separator is : under UNIX and ; under Microsoft Windows.

3.2 Local Microsoft Windows Installation with the MSI


Log on as an administrator or make sure that you have administrative rights. You need administrative rights because of the required modication in the Microsoft Windows registry. Please execute the downloaded self-extracting archive, e. g. "mpcci-<MpCCI-version>-mswin x86.exe" for Windows XP 32-bit on Intel x86 processor. This installation procedure builds a proper MpCCI software environment under Microsoft Windows.

MpCCI 3.1.0-1

III 13

3 Installation of the MpCCI Software

III Installation Guide

You pick up those components, e. g. code adapters, you want to install from the components list.

You can provide the license server information, i. e. hostname and port number of your license server.

14 III

MpCCI 3.1.0-1

III Installation Guide

3.2 Local Microsoft Windows Installation with the MSI

During the installation the prerequisites are tested and you have the chance to install the missing third party software (Java JRE, MPICH, OpenSSH, MpCCI-RSH, Perl) on the y.

The MpCCI software is now installed on your system. There is no need for any further conguration. The environment is automatically updated by the installer. If the installer has not been able to set the path to MpCCI automatically, please set it manually as described in the previous section.

MpCCI 3.1.0-1

III 15

4 Immediately After the Installation - Quick Installation Tests without a License

III Installation Guide

4 Immediately After the Installation - Quick Installation Tests without a License


4.1 Your Home Directory under Microsoft Windows
Under UNIX your home directory is known to applications via the environment variable HOME, which is always dened. Under Microsoft Windows the environment variable HOME may be dened, however the standard under Microsoft Windows is to use the variable USERPROFILE. To make Microsoft Windows behave like a UNIX and vice versa MpCCI ignores any existing HOME variable and automatically (re)denes the variable HOME identical to either HOME=%USERPROFILE% HOME=%HOMEDRIVE%\%HOMEPATH% HOME=C:\ At least HOMEDRIVE and HOMEPATH should always be dened on Microsoft Windows. Your home directory is herein after referred to as <Home>. Under Microsoft Windows MpCCI strictly ignores any environment variable HOME. MpCCI assigns the variable HOME. You need to have read-write-execute access rights for your <Home> directory.

4.2 Testing the MpCCI Working Environment and Perl


The rst command you should execute is mpcci env If under Microsoft Windows the OpenSSH and MPICH are not installed, MpCCI will then do the postinstallations. Please follow the installation instructions. If you are working under Microsoft Windows, you need to have administrative rights. mpcci env should not fail and the output then shows the system information collected by MpCCI at runtime. If you are running under Microsoft Windows and a virus scanner is installed, the mpcci env may be quite slow at the rst execution. During the collection of system information a lot of les are visited and executed and the virus scanner has to updated its cache for the rst time. Once executed there will be no major delay any longer.

16 III

MpCCI 3.1.0-1

III Installation Guide

4.3 Testing whether MpCCI Finds Your Simulation Codes

Testing whether Perl can really compile all MpCCI modules


Type in the command mpcci test -modload This test should not fail. The last output line you should see is: Successfully loaded and compiled all Perl modules from the above list.

Testing the Perl/Tk installation


Launch the MpCCI project manager with the command mpcci pm This test may fail if the Perl/Tk toolkit is not installed. If you would like to use the MpCCI project manager GUI you need to install the Perl/TK toolkit. Under Microsoft Windows Perl/Tk is part of the ActivePerl distribution.

Other Possible Tests


You may start further tests which do not require an MpCCI license. The command mpcci test will help you to test the MpCCI access and communication with remote systems. For help please just type mpcci help test .

4.3 Testing whether MpCCI Finds Your Simulation Codes


Depending on the code adapters you installed together with MpCCI you may now test whether MpCCI is able to nd your code installations. Please type just mpcci

MpCCI 3.1.0-1

III 17

4 Immediately After the Installation - Quick Installation Tests without a License and check what codes are listed. You may see the output Subcommands: Abaqus ANSYS FLUENT FLUX Flowmaster IcePak MSC.Marc PERMAS StarCD codename

III Installation Guide

Tools Tools Tools Tools Tools Tools Tools Tools Tools Tools

related related related related related related related related related related

to to to to to to to to to to

Abaqus. ANSYS. FLUENT. FLUX. Flowmaster. IcePak. MSC.Marc. PERMAS. StarCD. codename.

For each code listed you may type mpcci <code name> to get more help on the code specic commands and options. To list the releases of a code that MpCCI needs to nd on your system please type mpcci <code name> -releases , or in abbreviated form mpcci <code name> rel . Under UNIX and Linux the executables for each code must be in the PATH. Under Microsoft Windows MpCCI reads the Microsoft Windows registry entry for a code. You need to have an ordinary installation of this code. More detailed information may be listed using the command mpcci <code name> -information , or in abbreviated form mpcci <code name> info .

Non standard code installation


If you are a developer of a simulation code and you would like to test your development version of the code - we assume this is not a standard installation and confuses the part of MpCCI which collects information for your code - you may dene an environment variable that lists the names of the executable les. MPCCI CODEWORD EXENAMES=executable1:executable2:... Currently this feature is implemented for Abaqus and MSC.Marc.

18 III

MpCCI 3.1.0-1

III Installation Guide

5.1 Request for a License File

5 Licensing
After the installation of MpCCI you need to acquire a license le from Fraunhofer SCAI. MpCCI uses the FLEXlm based oating license mechanism. The FLEXlm license server has to be started on the license server host for which you require a license le.

5.1 Request for a License File


We need two pieces of information from you to generate a license le: 1. information about your license server host, 2. information about your desired MpCCI license features. First decide on which host you would like to run the license server. This could be any host in a network or in case of a local installation it is your local machine. On this computer please type in the command mpcci license -sysid or abbreviated mpcci lic sys . You should see an output line like SERVER hostname 00087519576d 47000 A FLEXlm license is bound to the MAC address of your network device. If you have multiple network devices installed (Ethernet card, Wireless LAN, Docking Station on a Notebook) you may see multiple hostids. For the MpCCI license server daemon the ID of the permanent integrated ethernet card address is the correct one. Secondly, we need information about your desired MpCCI license features. MpCCI knows two basic FLEXlm features, mpcci_sessions mpcci_procs which denes how many independent coupled sessions ( mpcci sessions ) can be run simultaneously and how many MpCCI coupling processes are allowed in the sum of all simultaneous MpCCI coupling sessions ( mpcci procs ). The feature mpcci sessions will be checked out and decremented by 1 during each single MpCCI session (each click on the Start button of the server in the Go panel of the MpCCI GUI or each call of mpcci server if you start the application manually). The other feature mpcci procs will be decremented by the number of MpCCI coupling processes (excluding the MpCCI control process) of the session. The minimum is 1 for mpcci sessions and 2 for mpcci procs , i. e. you can start MpCCI with e. g. one Abaqus process and one FLUENT process.

MpCCI 3.1.0-1

III 19

5 Licensing

III Installation Guide

With 1 mpcci sessions license you cannot start another coupling job as long as your MpCCI job is running. If youd like to run two coupled FSI simulations simultaneously you will need a license with at least 2 mpcci sessions and 4 mpcci procs . If you have several FLUENT processes you will need more mpcci procs accordingly. In addition, there are MpCCI license features for the supported code adapters: if you couple code mycode using the MpCCI adapter for this code, MpCCI will look for a feature mpcci adapter mycode on the license server. This feature must be contained in the license le, but it wont be checked out or decremented. Examples: mpcci_adapter_abaqus mpcci_adapter_ansys mpcci_adapter_fluent mpcci_adapter_starcd The MpCCI morpher is also an extra licensed product and you need a license feature mpcci_morpher Please use the License Request Form Sheet on the SCAI download area (www.scai.fraunhofer.de/mpcci, go to Download , enter your username and password, then go to License Request ). Please ll out the form with all required data and submit. You will receive the required license le soon after via email from Fraunhofer SCAI.

5.2 Installing and Activating a License


Please copy your received license le into the le "<MpCCI home>/license/mpcci.lic". Then please start the FLEXlm license server, i.e. the server daemon and the FHGSCAI vendor daemon on the license server machine with the command mpcci license -start or abbreviated: mpcci lic start

After the daemons were successfully started you can list the available licenses with the command mpcci license -local or abbreviated: mpcci lic loc

If the license server is running with a valid license you will see an output e. g. like this: License server: 47000@aquila Vendor daemon : FHGSCAI v10.8, status "UP"

20 III MpCCI 3.1.0-1

III Installation Guide

5.2 Installing and Activating a License

Feature ---------------------------------------mpcci_sessions mpcci_procs mpcci_adapter_abaqus mpcci_adapter_fluent mpcci_adapter_...... mpcci_adapter_......

Total ----2 10 1 1 1 1

Used ----0 0 0 0 0 0

Free ----2 10 1 1 1 1

5.2.1 Congure a License Manager as UNIX service

On UNIX, edit the appropriate boot script, which may be "/etc/rc.boot", "/etc/rc.local", "/etc/rc2.d/Sxxx "/sbin/rc2.d/Sxxxx", etc. Include commands similar to the following.

<MpCCI_HOME>/bin/mpcci license -start

The <MpCCI home> is the full path of the MpCCI installation. This command will create a log le under the directory "<MpCCI home>/license" and you have to ensure that the process could write in the directory.

5.2.2 Congure a License Manager as Windows service


Execute the "lmtools.exe" application from the MpCCI installation directory: "<MpCCI home>/license/<MpCCI arch>/lmtools.exe" <MpCCI arch> corresponds to the output of the command:

mpcci arch

MpCCI 3.1.0-1

III 21

5 Licensing

III Installation Guide

Select in the Service/License File Conguration using Services. Click the Cong Services tab section.

tab

section

the

option

22 III

MpCCI 3.1.0-1

III Installation Guide

5.2 Installing and Activating a License

Enter a service name e. g. MpCCI license manager or MpCCI FLEXlm. Select the path of the program "lmgrd.exe" with the Browse button: "<MpCCI home>/license/<MpCCI arch>/lmgrd.exe" Select the license le "mpcci.lic" with the Browse button: "<MpCCI home>/license/mpcci.lic" Activate the Start Server at Power Up option. Activate the Use Services option. You can optionally add a log le by providing a le name for the Path to the debug log le option. Click on the Save Service button.

MpCCI 3.1.0-1

III 23

5 Licensing

III Installation Guide

Select in the Start/Stop/Reread tab section the license service. Click on the Start Server button. The license server is now running and congured to start at power up.

5.3 Dening the License Server


We assume that an MpCCI FLEXlm license server is already running. Before you start your MpCCI session you have to know the hostname of the license server and the port where it is listening. The default port number is 47000, which can be changed by the administrator of the license server. The location of the license server is dened via the variable MPCCI LICENSE FILE. MPCCI_LICENSE_FILE=port@licenseserver before starting any MpCCI session. MpCCI has built in two mechanisms to check for the MPCCI LICENSE FILE variable: At rst it checks a FLEXlm resource le located in your <Home> directory: under UNIX and Linux this is "HOME/.flexlmrc" and under Microsoft Windows it is "%USERPROFILE%\.flexlmrc". MpCCI scans the ".flexlmrc" for a line containing MPCCI_LICENSE_FILE=...

24 III

MpCCI 3.1.0-1

III Installation Guide

5.4 Multiple License Servers

Secondly it reads the environment variable MPCCI LICENSE FILE. Supposed your license server name is aquila please set MPCCI LICENSE FILE as follows: Bourne shell ("/bin/sh") users MPCCI_LICENSE_FILE=47000@aquila export MPCCI_LICENSE_FILE Korn shell (ksh) and bash users export MPCCI_LICENSE_FILE=47000@aquila c-shell (csh) and tc-shell (tcsh) users setenv MPCCI_LICENSE_FILE 47000@aquila and under Microsoft Windows set MPCCI_LICENSE_FILE=47000@aquila The values of both variables from the ".flexlmrc" le and the environment variable MPCCI LICENSE FILE are merged.

Recommendations
We recommend to set the MPCCI LICENSE FILE environment variable in your resource le ".flexlmrc" for FLEXlm. Environment variables are volatile, the ".flexlmrc" le is not. Environment variables are sometimes not properly dened if a remote MpCCI command is started via rsh or ssh, the ".flexlmrc" le is always accessible. If you still prefer to use the environment variable MPCCI LICENSE FILE instead of the ".flexlmrc" le: Under UNIX or Linux please store the setting in one of your login scripts (".login", ".profile", ".cshrc", ".bashrc", etc. ). Under Microsoft Windows please make sure that MPCCI LICENSE FILE is a global environment variable for all users.

Under Microsoft Windows you need to be the administrator to dene global system wide variables.

MpCCI 3.1.0-1

III 25

5 Licensing

III Installation Guide

5.4 Multiple License Servers


If you use several redundant FLEXlm license servers you will have several entries of the form port@host one list entry for each license server. In this case the entries must be separated by a : under UNIX and Linux respectively by a ; on Microsoft Windows. This is an example for Microsoft Windows: set MPCCI_LICENSE_FILE=47000@aquila;47000@babbage;47000@zuse;...

5.5 Testing the License Server


After setting your MPCCI LICENSE FILE environment you should check whether licensing works. mpcci license -servers should list the value of MPCCI LICENSE FILE. The command mpcci license -mpcci checks if the license server is running and can be reached from your local machine.

26 III

MpCCI 3.1.0-1

III Installation Guide

6.1 Accessing Remote Hosts

6 Conguring the MpCCI Users Environment


6.1 Accessing Remote Hosts
If all processes of a MpCCI job run on your local machine you may skip the following section. General information on running MpCCI in a network is given in V-3.4 Running MpCCI in a Network . If you intend to distribute the MpCCI job on multiple hosts in a network - the preferred solution - MpCCI needs to execute commands on remote hosts and may copy les to remote hosts. In this case MpCCI uses either the rsh commands ( rsh, rcp ) or the ssh commands ( ssh, scp ). rsh and ssh must be properly congured to avoid any password request when executing commands on remote hosts.

Environment Variable MPCCI RSHTYPE: Tell MpCCI to use either rsh or ssh
To nd out whether to use the rsh command set ( rsh , remsh etc. , and rcp ) or the secure shell commands ( ssh , scp ) MpCCI inspects the optional environment variable MPCCI RSHTYPE. A non-empty value of MPCCI RSHTYPE may either be rsh or ssh. Any other value is invalid and will result in an error. If MPCCI RSHTYPE is not dened or empty rsh is used as the default.

rsh Conguration under UNIX and Linux


You should have an ".rhosts" le - used by rsh and ssh - and additionally may have an ".shosts" le used by ssh only - located in your <Home> directory. Your "<Home>/.rhosts" just lists - one hostname per line - all remote hosts from which you may log on the local host without a password request. You may test a working rsh environment via rsh hostname ls There should be no password request. Please make sure that "<Home>/.rhosts" can be accessed from all hosts relevant for MpCCI.

ssh Conguration
If you prefer to use the ssh commands you need to generate your private RSA-keys to avoid a password request. Please use the command ssh-keygen

MpCCI 3.1.0-1

III 27

6 Conguring the MpCCI Users Environment

III Installation Guide

Please read the OpenSSH documentation on how to distribute private and public keys to all hosts in a network. You may test a working ssh environment via ssh hostname ls There should be no password request. You may further run some tests on your ssh conguration using mpcci ssh [options] For help please enter mpcci help ssh

Testing MpCCI Access to Remote Hosts via rsh and ssh


Even under Microsoft Windows you should create a "<Home>/.rhosts" le. You may then test the remote access to all host listed with mpcci test .rhosts The test tries to connect to all hosts, via rsh and/or ssh, prints a protocol in case of failures and nally writes a new hostlist le containing all successfully tested hosts. To get a full help on mpcci test please enter mpcci help test For each remote host/hostle listed on the command line it performs the following tasks: Test whether the remote hostname can be resolved by the Domain Name Service (DNS). Test whether the remote host is alive and reachable and ping gets a reply. Test possibility of rsh/ssh connections to the remote host. Brief test on the MpCCI installation on the remote host from the local host. Test server-client connection on ports 47001 and so on. Creation of a protocol host-le "mpcci test.hostlist" which can be used as an MpCCI hostle.

28 III

MpCCI 3.1.0-1

III Installation Guide

6.2 Conguring MpCCI via Environment Variables

6.2 Conguring MpCCI via Environment Variables


The behavior of MpCCI can be inuenced through environment variables. If MpCCI does not run properly on your system you may be able to x problems by setting some variables as described in the following. A complete overview of all environment variables used by MpCCI is given in V-2.3 Environment and Environment Variables . Environment Variable MPCCI ARCH The variable MPCCI ARCH holds the architecture token of MpCCI and is usually set by MpCCI automatically since MpCCI is capable to gure out the platform it is running on. Only if this mechanism fails or you denitely want to try running a dierent version of MpCCI, you should set this variable. MPCCI ARCH must always contain a valid architecture token as listed in the Release Notes. Please read V-2.3.1 MPCCI ARCH - Architecture Tokens Environment Variable MPCCI DEBUG If MPCCI DEBUG is set and not false (any value except empty or 0), then detailed logging output is produced to nd out some pitfalls in case of failures. This has the same eect as startint MpCCI with the -debug option. for more information.

MpCCI 3.1.0-1

III 29

7 Testing the MpCCI Installation and Communication

III Installation Guide

7 Testing the MpCCI Installation and Communication


A Simple Test on the Local Machine, Hello World
We assume that the above installation step was successful, that you got an MpCCI license le and already started the license server. The MpCCI distribution contains a hello world like example which you should run in order to test the installation. Please run the example via mpcci test -simple First the MpCCI control process and the MpCCI servers are started. Then - after some delay - code 1 is started and connects itself to the MpCCI server 1. Finally after some delay code 2 is started and connects itself to the other MpCCI server. You should see ve windows: the MpCCI control window, two MpCCI server and two hello world application windows. On Microsoft Windows you will get only three windows because the output of MpCCI control and servers is mixed in a single window. The resulting output of MpCCI-Control ends as follows: [...] CONTROL: CONTROL: CONTROL: CONTROL: CONTROL: CONTROL: CONTROL: CONTROL: CONTROL: CONTROL:

MON message arrived ... # double:1:1: terminate MON message arrived ... # single:2:2: terminate # Received terminate messages from all processes. # Quitting the monitoring loop, and calling CCL_Finalize. Leaving monitor without errors. ================================================================== CCI_Finalize ... okay. I am calling MPI_Finalize ...

The resulting output of MpCCI-Server-001 ends as follows: [...] double:1:0: double:1:0: double:1:0: double:1:0: double:1:0: double:1:0: double:1:0:

=============================================================== Entered CCI_Finalize. Coupled computation finished at 9-1-2009 15:57:10. CCI_Finalize ... okay. =============================================================== I am calling MPI_Finalize ...

30 III

MpCCI 3.1.0-1

III Installation Guide The resulting output of code 1 ends as follows:

7 Testing the MpCCI Installation and Communication

[...] Contacting MpCCI root server "47111@benz.scai.fhg.de" ... Contacting associated MpCCI server "47112@benz" ... Test code DOUBLE finished with success. If the output looks like the above the test was successful. On some platforms the control output ends with the additional line Control process terminating normally.

MpCCI 3.1.0-1

III 31

8 Troubleshooting

III Installation Guide

8 Troubleshooting
8.1 Secure shell in general
Avoid any printout in your login script like ".login", ".profile", ".cshrc", ".bashrc", etc. . This output may confuse the secure shell commands scp and sftp and may lead to strange and confusing error messages.

8.2 OpenSSH under Microsoft Windows


Together with OpenSSH an OpenSSH service daemon is installed. The name of the service is opensshd . If you can not login from a remote host onto the local Microsoft Windows PC you may have to restart the service daemon. For a restart of the opensshd service please enter net stop opensshd net start opensshd : Stop the service : Start the service

in a command shell. You need to have administrative rights to restart a service under Microsoft Windows .

8.3 rsh, rcp and rlogin under Microsoft Windows


By default Microsoft Windows does not have the UNIX rshd or rlogind services installed. There are additional packages available from Microsoft which include the rshd service. This is the so called Software for Unix Application package, SFU3.5 for Windows XP and the SUA package for Windows Vista (Windows Vista Enterprise only). If you have this package installed and the rshd service is properly installed and running you may skip the following section. MpCCI comes with its own rshd and rlogind services for Windows. This package includes both, the services and the rsh and rcp commands. Although this software is part of MpCCI, is not necessarily bound to MpCCI. Therefore the service is - like the OpenSSH- a separate installation under Microsoft Windows. After a successful installation of the MpCCI-RSH program (see 2.6 MpCCI-RSH for Microsoft Windows ) under e. g. "C:\Program Files\MpCCI-RSH " you need to

32 III

MpCCI 3.1.0-1

III Installation Guide

8.3 rsh, rcp and rlogin under Microsoft Windows

Install and start the rshd and optional rlogind services ( 8.3 Installing the MpCCI rshd service processes ) Prepare you personal remote hosts le and rsh environment ( 8.3 Preparing the .rhosts le and the rsh environment )

Installing the MpCCI rshd service processes


If not already done during the installation of the MpCCI-RSH package you need to install the services in Microsoft Windows. Change into the installation directory of the MpCCI rsh installation, e. g. "C:\Program Files\MpCCI-RSH\bin". Then type rshd -install rlogind -install Now both services should be installed and started. The services are automatically restarted after a reboot of your computer. You may stop and remove the services later on by either using the Microsoft Windows services panel or you simply type rshd -remove rlogind -remove You can start/stop the services by either using the Microsoft Windows services panel or you simply type rshd rshd rlogind rlogind -stop -start -stop -start or or or or net net net net stop start stop start mpcci_rshd mpcci_rshd mpcci_rlogind mpcci_rlogind .

You need to have administrative rights to start or stop a service under Microsoft Windows

Preparing the .rhosts le and the rsh environment


To give a remote user access to your local computer at rst you need to create a "%USERPROFILE%\.rhosts" le in which the trusted remote hosts and users are listed. This le may be a copy of your UNIX ".rhosts" le.

MpCCI 3.1.0-1

III 33

8 Troubleshooting This le must be located in your "%USERPROFILE%" directory.

III Installation Guide

If you are a Windows domain account user please make sure that your "%USERPROFILE%" directory is not removed after you log of the Windows computer. Otherwise the rshd service is not capable to scan the required les before it creates a logon session for you. The contents of the ".rhosts" le is a list of hostnames and user login names, one host per line. host1 user1 user2 user3 ... # additional users for host1 host1 myname friend host2 myself Empty lines are ignored. Unlike with UNIX rshd at least one user login name per host is required. All host names must be fully qualied names (hostname.netname). IP4 names in dot notation are ignored. For security reasons - e. g. a trojan horse may append new hosts and users to your ".rhosts" le - the rshd and rlogind services do never scan the ".rhosts" le directly but instead use an alternative keys le "%USERPROFILE%\.rsh\rhosts.keys". This le is created - with special access right assigned - from the ".rhosts" le by the command rsh -makekeys or rsh -k The -k option will not check the hostname from the ".rhosts". If you have some trouble to connect to your local machine because of a DNS name resolution problem this option is recommended to be used. If you add a new host in the ".rhosts" le you should create the "rhosts.keys" again. Any modication of the "rhosts.keys" invalidates this le for use with rshd. Do not modify the access rights of "%USERPROFILE%\.rsh\rhosts.keys" You should now be able to execute a remote command, e. g. rsh hostname dir rsh hostname mpcci env You may get further help for the rsh command with

34 III

MpCCI 3.1.0-1

III Installation Guide

8.4 MPICH under Microsoft Windows

rsh -help rsh /?

Remote shell and the Microsoft Windows rewall


The rshd and rlogind services accept incoming connection requests on the TCP ports 513 and 514. The rsh command may ask the rshd to open an additional TCP socket on any unused port in the range 1023, 1022, ...514 and the rshd may then connect to the rsh command on any of these port. During the installation the rshd, rlogind, rsh and rcp programs have been added to the Microsoft Windows rewall rules to accept incoming and outgoing connection. The listed ports above must not be blocked by the Windows rewall since the applications themself have been added to the rewall rules.

8.4 MPICH under Microsoft Windows


MPICH starts processes on remote Microsoft Windows systems. Therefore you need to create an MPICH account with a valid Microsoft Windows account name and a valid login password. The MPICH account may/should be your personal account. However you could use an alternative account. You may e. g. create a new user named mpcci . However, it must be a valid account and you need to know the valid password for this account. Beware: Under Microsoft Windows an account name may dier from the login name! Under Microsoft Windows your personal account name - not your login name - is stored in the environment variable USERNAME. If your account is a domain account you need to specify the domain name plus the account name in the format userdomain\account . Under Microsoft Windows the name of your user domain is stored in the environment variable USERDOMAIN. Please enter set username set userdomain to nd out your user domain and your personal account name. Then please 1. Open a command shell. 2. Change the current directory to the MPICH bin directory: cd <MPICH HOME>\mpd\bin

MpCCI 3.1.0-1

III 35

8 Troubleshooting 3. Execute the command mpiregister.exe 4. Enter your Windows account name USERDOMAIN\ACCOUNTNAME . 5. Enter your Microsoft Windows password for this account. 6. Accept this account to be persistent.

III Installation Guide

Beware: An empty password is not allowed, so you can never run MPICH with an empty password! Whenever you change the password of the MPICH account you will need to mpiregister again .

To run MpCCI under Microsoft Windows the MPICH service must be installed. The name of the service is mpich mpd . It may happen sometimes that an account check fails or the mpich mpd rejects to create MPICH processes. You may then have to restart the mpich mpd service. Please enter net stop mpich_mpd net start mpich_mpd in a command shell. You need to have administrative rights to restart a service under Microsoft Windows . : Stop the service : Start the service

36 III

MpCCI 3.1.0-1

III Installation Guide

9 Installing Perl

9 Installing Perl
UNIX and Linux
If you need to install or upgrade Perl under UNIX or Linux please either download the source code of Perl 5.8.8 from www.perl.com/download.csp and compile it on your local machine or use a binary distribution. A binary distribution for all avors of UNIX and Linux platforms can be downloaded from www.perl.com/CPAN/ports/index.html all platforms www.hp.com/go/perl HP-UX port The installation is straightforward for a UNIX system administrator.

ActivePerl for Microsoft Windows


ActivePerl is the best available Microsoft Windows port of Perl. A 64 bit beta version for Windows 64 and Windows Vista 64 bit is available. Under Windows 64 please use the 64 bit version of Perl. Although the 32 bit Perl version works ne. and MpCCI is able to detect the true Windows version used in fact a 32 bit environment is prepared and you may not have the full 64 bit functionality available We recommend to use the ActivePerl 5.8.8. Versions before 5.8.8 had some problems under Microsoft Windows with signals, fork emulation, the backtick operator and whitespace in lename when executing external commands. Please do not use ActivePerl 5.10. This version comes without the TK modules required for the MpCCI. project manager The latest version is ActivePerl 5.8.8.822. You may follow the link www.activestate.com/Products/ActivePerl. Please download the binary ActivePerl distribution from aspn.activestate.com/ASPN/Downloads/ActivePerl. We recommend to use the Microsoft Windows MSI installer version of ActivePerl since during the installation the MSI appends the Perl binaries directory to your PATH environment and properly modies or sets the .pl le association in the HKEY CLASSES ROOT of the Microsoft Windows registry. After downloading the distribution le ("ActivePerl-5.8.x.msi"), please execute the ActivePerl installation program and follow the instructions. The installation is a typical Microsoft Windows MSI installation and is straightforward. Please make sure that the .pl lename extension is properly associated with the newest Perl version installed. You may validate this by typing

MpCCI 3.1.0-1

III 37

9 Installing Perl

III Installation Guide

assoc .pl You should see an association pattern like perl and use this token as the argument for the ftype command ftype perl You should now see a line like "D:\program files\perl\bin\perl.exe" "%1" %* and type in the fully qualied pathname to get the version of Perl: "D:\program files\perl\bin\perl.exe" -version

38 III

MpCCI 3.1.0-1

III Installation Guide

10 Installing Java

10 Installing Java
If you do not have a working Java or Java JRE installed or your current Java version is GNU Java or not up-to-date ( 2.4 The Java Runtime Environment ) you have two choices: You may download a multi-platform Java runtime environment as part of the MpCCI distribution. You may download the Java JRE from the world wide web and install it on your local computer.

Java as part of MpCCI: Multi-platform


In this case you should select the Include JRE checkbox while downloading the multi-platform MpCCI. MpCCI JRE is not really installed on your local computer. The JRE is just a portion of software within the MpCCI home directory. The Java JRE needs not to be congured for a specic platform. There are no conicts between the MpCCI JRE and existing Java installations on your local machine. MpCCI locates any existing JRE installation at runtime, whether installed locally, within MpCCI or on a le server as part of MpCCI.

Java as part of MpCCI: Microsoft Windows with MSI


If you need to install JRE under Microsoft Windows and you use the MpCCI MSI version we recommend to download and install Java together with MpCCI. After starting the Microsoft Windows installer for MpCCI please select the Include JRE checkbox. Having got the Java distribution, execute the installation program and follow the instructions. The Microsoft Windows installation is straightforward.

Java web download and installation


The JRE for many platforms is available from Sun Microsystems at java.sun.com/j2se/1.5.0/download.jsp. For some platforms, e. g. IBM or HP, you will have to look at the vendor specic sites. The installation is straightforward for a UNIX system administrator.

MpCCI 3.1.0-1

III 39

MpCCI 3.1.0

MpCCI

IV Getting Started

MpCCI 3.1.0-1 Documentation Part IV Getting Started PDF version January 20, 2009

MpCCI is a registered trademark of Fraunhofer SCAI www.scai.fraunhofer.de/mpcci

Fraunhofer Institute
Algorithms and Scientic Computing Fraunhofer Institute for Algorithms and Scientic Computing SCAI Schloss Birlinghoven, 53754 Sankt Augustin, Germany Abaqus and SIMULIA are trademarks or registered trademarks of Dassault Syst`mes e ANSYS is a registered trademark of Ansys, Inc. FLUENT is a registered trademark of Fluent Inc. FLUX is a registered trademark of Cedrat of Grenoble, France ICEPAK is a registered trademark of Fluent Inc. MSC.Marc is a registered trademark of MSC.Software Corporation PERMAS is a registered trademark of Intes GmbH STAR-CD is a registered trademark of CD adapco Group RadTherm is a registered trademark of ThermoAnalytics Inc. FLEXlm is a registered trademark of Macrovision Perl has a copyright by Larry Wall and others ActivePerl has a Community License Copyright of Active State Corp. OpenSSH has a copyright by Tatu Ylonen, Espoo, Finland Java is a registered trademark of Sun Microsystems, Inc. MPICH-1 and MPICH-2 has a copyright by University of Chicago and Mississippi State University Linux is a registered trademark of Linus Torvalds UNIX is a registered trademark of The Open Group Windows, Windows XP and Windows Vista are registered trademarks of Microsoft Corp.

IV Getting Started

Contents

IV Getting Started Contents


1 1.1 1.2 1.3 2 2.1 2.2 Multi-Physics Computation with MpCCI Multi-Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solution of Coupled Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Coupling with MpCCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting up a Coupled Simulation A Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 2.2.2 2.3 2.4 2.5 CFD Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FE Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4 5 6 8 8 8 9 10 10 11 13 14 15 15 16 18 19 20 20 23 24 24 25

Starting the MpCCI GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step Choosing Codes and Model Files . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step Denition of Coupling Regions and Quantities . . . . . . . . . . . . . . . . 2.5.1 2.5.2 2.5.3 Dene Coupling Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Select the Components for each Interconnected Code . . . . . . . . . . . . . . . . . . Specify the Quantities which will be Exchanged . . . . . . . . . . . . . . . . . . . . .

2.6 2.7

Edit Step Further Coupling Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step Starting Servers and Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7.1 2.7.2 2.7.3 2.7.4 Conguring the Initial Exchange Mode . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Option Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting the Coupled Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interrupting the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3 3.1 3.2

Checking the Results The MpCCI Visualizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Post-Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI 3.1.0-1

IV

1 Multi-Physics Computation with MpCCI

IV Getting Started

1 Multi-Physics Computation with MpCCI


1.1 Multi-Physics
The purpose of MpCCI is to perform multi-physics simulations. The systems under consideration are known as coupled systems. A coupled system consists of two or more distinct systems. Each system is governed by a characteristic set of dierential equations, but both systems share some variables and cannot be solved separately (see also Zienkiewicz and Taylor [2000] for a more precise denition).

domain A f(a,b,c,d) = 0 and g(c,d,e,f) = 0

domain B

f(a,b,c,d) = 0

g(c,d,e,f) = 0

coupling region Figure 1: Coupled system: Two domains and a coupling region. Both systems share the variables c and d in the coupling region

Figure 1 shows two coupled systems. In the coupling region, both systems share some variables and the governing equations of both systems must be solved. Depending on the dimension of the coupling region, surface coupling and volume coupling are distinguished. The shared variables (c and d in Figure 1) are called coupling quantities. Typical multi-physics simulations are: Fluid-Structure Interaction (FSI): First system: Fluid ow (Navier-Stokes equations) Second system: Solid mechanics (equilibrium) Quantities: Pressure (1 2), deformation(2 1) Thermomechanical coupling First system: Solid mechanics (equilibrium) Second system: Heat conduction (Fouriers law) Quantities: Temperature (2 1), deformation (1 2) Electrothermal coupling

IV

MpCCI 3.1.0-1

IV Getting Started

1.2 Solution of Coupled Problems

First system: Electrical conduction (Maxwells equations) Second system: Heat conduction (Fouriers law) Quantities: Temperature/electric conductivity (2 1), power loss/Joule heat (1 2)

1.2 Solution of Coupled Problems


To nd a solution for a coupled problem, all governing equations, which can be combined in a large system, must be solved. The solution in this way is called strong coupling. However, solving a system with strong coupling is often dicult as dierent approaches are necessary to solve the sub-problems. An alternative approach is through weak coupling. Here each problem is solved separately and some variables are exchanged and inserted into the equations of the other problem. This procedure usually yields a less exact solution compared to strong coupling. The advantages of the weak coupling are that the sub-problems can be solved faster than the complete system and that specialized solvers can be used for each. code A code B

time step data

wait for data

time step wait for data data time step data wait for data

Figure 2: Staggered algorithm for solution of a coupled problem.

The staggered method is sketched in Figure 2, which is one of the weak coupling approaches of MpCCI: Code A computes one step, sends data to code B, which then computes one step and sends data back to code A and so on. In addition to the staggered approach, MpCCI supports parallel execution of both codes. The selection of the coupling algorithm is described in 2.7 Go Step Starting Servers and Codes . An important issue is the data exchange. The quantities must be transferred from one code to the other. This process can be divided into two parts: Association: Each point and/or element of the components of a coupling region is linked to a partner in

MpCCI 3.1.0-1

IV

1 Multi-Physics Computation with MpCCI

IV Getting Started

the other system. The process of nding partners is also called neighborhood search, see V-3.2 Data Exchange . Interpolation: The quantities must be transferred to the associated partner on the other mesh. In this process, the dierent mesh geometries, data distributions and the conservation of uxes must be considered. MpCCI fully supports the data exchange between non-conforming meshes, i. e. the meshes of each subsystem can be dened to optimize the solution of the subsystem.

1.3 Code Coupling with MpCCI


Running a co-simulation with MpCCI requires the following steps: Preparation of Model Files. Before starting a co-simulation, each domain must be modeled separately, i. e. a model le must be created for each simulation code. The models must contain a denition of the coupling regions. The preparation of a model le depends on the simulation codes, a detailed description is given in the corresponding sections of the Codes Manual. Denition of the Coupling Process. Simulation codes and corresponding model les must be selected. The coupled regions, quantities and a coupling algorithm must be selected, further coupling options can be given. This step is completely supported by the MpCCI GUI. Running the Co-simulation. After starting the MpCCI server, both coupled codes are started. Each code computes its part of the problem while MpCCI controls the quantity exchange. Post-Processing. After the co-simulation, the results can be analyzed with the post-processing tools of each simulation code, with the MpCCI Visualizer or with general-purpose post-processing tools. The application of MpCCI requires a good knowledge of the employed simulation codes. Therefore, it is recommended to use those codes for a co-simulation the user has already some experience with. The data exchange between two simulation codes requires a code adapter, which constitutes a code plug-in for data transfer. Therefore only codes which are supported by MpCCI can be used. It is also possible to develop special code adapters, more details are given in the Programmers Guide. An overview of the complete co-simulation process is given in Figure 3.

IV

MpCCI 3.1.0-1

IV Getting Started

1.3 Code Coupling with MpCCI

Preparation of Model Files Codes Coupling Regions Quantities Options

model le code A scan user input MpCCI GUI scan

model le code B

Denition of Coupling Process

read Running the Co-simulation code A adapter

start

start

start MpCCI Server

read code B adapter

MpCCI Server data Control Process

Post-Processing Results Code A tracele Results Code B Post-Processing B

Post-Processing A

MpCCI Visualizer

Figure 3: Co-simulation with MpCCI: Overview of the simulation process

MpCCI 3.1.0-1

IV

2 Setting up a Coupled Simulation

IV Getting Started

2 Setting up a Coupled Simulation


2.1 A Simple Example

ap ow

Figure 1: A simple coupled system Let us look at a simple example to clarify the approach, which was described in the preceding chapter. Figure 1 shows a model of a valve which consists of a exible ap which can be open or closed depending on the direction of the ow. The purpose of the simulation is to investigate the behavior of the valve depending on inlet and outlet pressure. The computation of the pressure distribution and the ow rates is achieved using Computational Fluid Dynamics (CFD), whereas the deformation of the ap can be computed applying numerical structural mechanics via a Finite Element (FE) code. Each domain, has a signicant inuence on the other, thus the problems cannot be solved separately. The CFD simulation requires the deformation of the ap as a boundary condition, whereas the FE simulation requires the uid pressure as external load. Thus during a co-simulation, these quantities must be exchanged as shown in Figure 2. pressure ow simulation CFD-Code deformation Figure 2: Exchange of quantities in the example FSI simulation. simulation of ap deformation FE-Code

2.2 Model Preparation


Before starting the coupled simulation, the models must be prepared in each code. In our example, this requires a model of the ow region and a model of the ap structure.

IV

MpCCI 3.1.0-1

IV Getting Started Valve FE CFD MpCCI Airfoil FE CFD MpCCI Figure 3: Organization of the directories

2.2 Model Preparation

Both models are created in the undeformed condition, i. e. the ap is straight. The computation of such a problem requires a CFD-code which can handle moving/deformable meshes. It is recommended that you keep your FE and CFD model les in separate directories (see Figure 3) because of the following reasons: Clear storage and maintenance of simulation data. Ensuring that the codes do not overwrite les of other codes, when identical le names are used. Simplication of the porting of the analysis when running the simulation on dierent platforms.

2.2.1 CFD Model


Coupling Region wall ap surface wall

Fluid Domain

inlet wall wall

outlet

wall

Figure 4: Fluid domain and CFD mesh

To model the uid domain, dene the geometry in the CFD pre-processor and create a mesh. Figure 4 shows a possible mesh for the uid domain. (Please note that the displayed mesh is rather coarse and would probably not yield good results).

MpCCI 3.1.0-1

IV

2 Setting up a Coupled Simulation

IV Getting Started

All boundary conditions must be dened as well. They comprise the ap surface, walls, inlet and outlet in Figure 4. Also for the coupling region boundary conditions may be set - this depends on the CFD code applied, please check the Codes Manual for details. It is recommended to run the uid problem on its own before starting a coupled simulation to be sure that the model setup is correct. In the present example the coupling region could be dened as a rigid wall for this purpose. If the model is not appropriate for computations with the CFD code alone, it is most likely that a co-simulation will either not run.

2.2.2 FE Model
xed nodes

outside

Figure 5: Finite Element model of the ap

Compared to the CFD model which covers the uid domain, the FE model covers the ap itself. Figure 5 shows a mesh of the ap with quadrilateral elements. The element sizes do not need to correspond to those of the uid domain in any way as MpCCI can handle non-conforming meshes. The ap is connected to the top wall, i. e. the top nodes of the mesh must be xed. The surface of the ap must be dened as a boundary to which the pressure load can be applied in the co-simulation. Although the system will not show any deformation without an external load, it is recommended to check the validity of the mesh and boundary conditions (i. e. the xed nodes here) by running the FE problem alone and/or by performing a problem check if it is available in the FE code. To obtain a deformation you can replace the uid forces by a similar load.

2.3 Starting the MpCCI GUI


The MpCCI GUI is started by executing the command mpcci gui from a shell console. The MpCCI GUI guides you through the steps to interconnect the FE and CFD models and to run the coupled simulation.

10 IV

MpCCI 3.1.0-1

IV Getting Started

2.4 Models Step Choosing Codes and Model Files

2.4 Models Step Choosing Codes and Model Files


In the Models Step, the following steps should be accomplished: Select the analysis codes to couple. Specify their model les. Set some code specic parameters if desired. Scan the model les to determine the potential coupling regions.

Figure 6: Models Step for CFD-code

For each code, Code 1 and Code 2 (Figure 6), a eld for selecting and conguring the analysis code is provided in the MpCCI GUI. For the CFD-Code: Select the desired CFD-Code from the pull-down menu providing the available codes. After your selection the parameters and settings of the picked solver are shown underneath (see Figure 6). 1. Select the CFD model le by clicking on the Browse button in order to choose the le via the le browser.

MpCCI 3.1.0-1

IV

11

2 Setting up a Coupled Simulation

IV Getting Started

2. You may also congure some additional parameters like the CFD version or release. 3. Scan the model le by clicking on the Start Scanner button.

Figure 7: Models Step for FE-code For the FE-Code: Select the desired FE-Code from the list provided by the pull-down menu. After your selection the corresponding parameters and settings are shown underneath (see Figure 7). 1. Select the FE model le via the le browser by clicking on the Browse button. 2. Select the unit system. 3. If the unit system is set to variable an additional parameter will be shown where you can select the grid length unit. 4. In addition you may change the settings for the FE release or the scan method. 5. Scan the model le by clicking on the Start Scanner button. For each scanned model le the status is assigned to the corresponding analysis code: if the extraction of the interface regions was successful.

12 IV

MpCCI 3.1.0-1

IV Getting Started

2.5 Coupling Step Denition of Coupling Regions and Quantities

if the scanner encountered problems during the scan which may depend on the parameters set for the analysis code. By clicking on the status button, you get the information that has been extracted from the model le. If the scanning has failed the error message from the scanner is displayed in a pop-up window. After performing a successful scan of all model les you may continue with the next step of the coupled simulation setup by clicking on the Next> button.

2.5 Coupling Step Denition of Coupling Regions and Quantities


In the Coupling Step the following steps need to be done: Dene the coupling regions. Select the components for each interconnected code. Specify the quantities which will be exchanged. The components are automatically sorted by their element type. There are basically two types of components: Global Variables These components are data structures that are not related to the CFD or FEM grids. They contain global quantities like time or time step size. These components can be found under the Global (0D) element type label. Element Components These components comprise collections of elements. They contain model parts and the related grid based quantities, e. g. nodal positions, heat values or forces. To build up the interconnection, elements should be gathered that are part of the coupling region. A collection of 1D elements will be found under the Line (1D) label, a collection of 2D elements under the Face (2D) label, and a collection of 3D elements under the Volume (3D) label. To navigate between the dierent element types you have to click on the corresponding tab: Global (0D), Line (1D), Face (2D) or Volume (3D). Inactive element types are grayed out (see Figure 8). In our example only the Face (2D) label is activated and already selected. For each element type the MpCCI GUI window is divided into three elds: Regions with a list of the created coupling regions. Components with the lists of code components which may be selected into the coupled components lists, which dene the coupling region. Quantities with a list of available quantities which may be selected and congured to be transferred from one application to the other on the selected coupling region.

MpCCI 3.1.0-1

IV

13

2 Setting up a Coupled Simulation

IV Getting Started

Figure 8: Coupling Step

2.5.1 Dene Coupling Regions


In the eld Regions there is already the default region Face 1 dened. To change its name use Rename from the menu which pops up when you click with the right mouse button onto the region name. To add further coupling regions use the Add button at the top of the regions list (Figure 9).

Figure 9: Regions with context menu

14 IV MpCCI 3.1.0-1

IV Getting Started

2.6 Edit Step Further Coupling Options

2.5.2 Select the Components for each Interconnected Code


In the Components part for each code a list with available components for that particular code is shown.

Figure 10: Coupled components selection

According to the valve example with the exible ap this will imply: For CFD-code select the component ap-surface by double clicking or using drag & drop (see Figure 10). For FE-code select the component outside in the same way as mentioned above.

2.5.3 Specify the Quantities which will be Exchanged


In the quantities list, select the quantities to be transferred by clicking on the checkbox near the name of the quantity (Figure 11. In MpCCI the names of the quantities are standardized. In our example we want to transfer pressure and deformation. In MpCCI the pressure is handled by the quantity RelWallForce and the deformation by NPosition which stands for nodal position. For further information on the meaning of quantities see the Quantity Reference in the Appendix and V-3.1.1 Physical Domains . For our example select and congure the following quantities: RelWallForce for exchanging the pressure (see Figure 11). Sender is CFD-code. Its pressure unit is not editable because the unit system for the CFD-code is xed to the SI unit system. On the other hand you may select the appropriate unit for the FE-code because of the variable unit system setting in the model step (see Figure 7). NPosition for exchanging the deformation (see Figure 12). Sender is FE-code. The unit for the deformation may be set as described above. For further information have a look at V-4.4 Coupling Step . The denition of the coupling interface is completed, please click on the Next> button to continue.

MpCCI 3.1.0-1

IV

15

2 Setting up a Coupled Simulation

IV Getting Started

Figure 11: Pressure conguration

Figure 12: Deformation conguration

2.6 Edit Step Further Coupling Options


In the Edit Step you may modify some MpCCI control parameters like

16 IV MpCCI 3.1.0-1

IV Getting Started

2.6 Edit Step Further Coupling Options

parameters for algorithms, e. g. search algorithms or mesh quality checks, switches controlling the output level for debugging or information about the coupling algorithm. An overview of all settings is given in V-4.5 Edit Step .

Figure 13: Edit Step The MpCCI GUI provides default values for all settings which can be modied. The Edit Step window displays a tree of parameters on the left. On the right side the corresponding parameters are shown in a table as depicted in Figure 13. This table provides information such as the parameter name displayed with an orange background, the editable parameter value displayed with a yellow background, and a parameter description. To select a parameter click on the parameter name in the parameters tree. That followed edit the value by clicking the cell with the parameter and select or type in the desired value for this parameter.

MpCCI 3.1.0-1

IV

17

2 Setting up a Coupled Simulation

IV Getting Started

For most cases the default values are appropriate, but for our example you may edit the name of the tracele (Control TraceFile Name) which is the input le for the MpCCI Visualizer. Additionally you may edit the output level (Control OutputLevel Global) which tells MpCCI how much output will be written during the simulation process. Now click on the Next> button to proceed to the start-up window for the coupled simulation.

2.7 Go Step Starting Servers and Codes

Figure 14: Go step

In the Go Step each application including the MpCCI coupling server is shown in its own frame (see Figure 14). Before starting the coupled simulation you have to congure the start-up of the applications. For the MpCCI coupling server you usually may retain the default values. For each analysis code you have to congure the initial exchange mode and set some option parameters if necessary.

18 IV

MpCCI 3.1.0-1

IV Getting Started

2.7 Go Step Starting Servers and Codes

2.7.1 Conguring the Initial Exchange Mode


In our coupled valve problem we consider that the pressure will initiate the deformation of the ap. Therefore the CFD-code will be the initiator and the FE-code in our example will request the pressure solution before starting its computation. After both codes have performed the initial data exchange they run the analysis computation until a coupled target time is reached. At this target time both analysis codes will exchange their solution quantities. For the CFD-code, set the Initial quantities transfer mode to send as in Figure 15.

Figure 15: CFD-code settings

For the FE-code, set the Initial quantities transfer mode to receive (see Figure 16).

MpCCI 3.1.0-1

IV

19

2 Setting up a Coupled Simulation

IV Getting Started

Figure 16: FE-code settings

With this Initial quantities transfer conguration for the CFD- and FE-code, the coupled simulation will use a parallel coupling algorithm (see Figure 17).

2.7.2 Setting Option Parameters


For the CFD-code select the Run parallel option. Now the parameters for running the CFD-code in parallel are added to the window as shown in Figure 15. Set the number of processes to be applied e. g. to 4. If no hosts are specied the CFD-code will run in parallel on the local machine. For the FE-code no more options need to be set.

2.7.3 Starting the Coupled Simulation


Before starting a coupled simulation you have to establish a project by using the action Save As from the File menu. This is due to the fact that MpCCI needs the project le to generate its input le and to get information about the settings which were dened in the MpCCI GUI. Server and each application have their own Start button. But only the Start button from the MpCCI server is enabled because the server has to be launched in advance. After the server has been started its Start button will be replaced by a running symbol, all settings will be locked and the Start buttons for the next applications will be enabled one after the other. For our valve example the start-up procedure will be:

20 IV

MpCCI 3.1.0-1

IV Getting Started

2.7 Go Step Starting Servers and Codes

1. Click on Start to launch the coupling server. Now the server waits to get response from all client codes. 2. The Start button of the next application (CFD-code) is enabled. Now click on Start to launch the CFD analysis code. 3. After that the last application (FE-code) has to be launched by a click on its Start button. Now the client codes are started and the coupling server starts the initialization phase as follows: 1. Initial handshaking: the CFD-code and the FE-code contact the server. [MpCCI SETUP] Reading general setup data from file "/home/COUPLED/.cciclientrc" .. [MpCCI SETUP] Contacting leading cciserver on host nemo, port 47111 ... [MpCCI SETUP] Got a connection to the leading mpcci server ... [MpCCI SETUP] Got the answer "SOCKET 47112 nemo" [MpCCI SETUP] "SLEEPTIME 0.200000 LOGFILE mpccirun.clientlog.1" ==> CLIENT with socket connection to remote host nemo, port 47112 2. Exchange of the interface topology: The coupling server requests the interface topology from each client. The clients send their interface topology. cfd:1.0: Exchanging partitions with local code ... cfd:1.0: cfd:1.0: Exchanging partitions with remote codes ... fe:2.0: Exchanging partitions with local code ... fe:2.0: fe:2.0: Exchanging partitions with remote codes ... 3. MpCCI coupling server performs neighborhood searches and computes the mapping between CFDcode and FE-code meshes. cfd:1.0: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cfd:1.0: NEIGHBORHOOD COMPUTATION cfd:1.0: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cfd:1.0: cfd:1:0: Im calculating neighborhood between mesh 1 of the local code cfd:1:0: and mesh 1 of remote code 2 ... fe:2:0: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fe:2:0: NEIGHBORHOOD COMPUTATION fe:2:0: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fe:2:0:

MpCCI 3.1.0-1

IV

21

2 Setting up a Coupled Simulation

IV Getting Started

fe:2:0: Im calculating neighborhood between mesh 1 of the local code fe:2:0: and mesh 1 of remote code 1 ...

In our example the parallel coupling algorithm is used with send (CFD) and receive (FE) as initial exchange mode (see Figure 17 bottom). The CFD-code is represented by code B and the FE-code by code A. Before starting the computation the CFD-code sends the surface forces RelWallForce to the FE-code (1). Then both codes compute in parallel their solution quantities pressure and deformation until the coupled target time is reached (2). Now the solution quantities are exchanged (3). Possible coupling algorithms are described in detail in V-3.3 Coupling Algorithms . code A receive 1 code B exchange 4 2 6

7 8

serial coupling

code A exchange 1 code B exchange

parallel coupling

code A receive 1 code B send

parallel coupling

4 physical time t

Figure 17: Initial exchange and resulting coupling algorithms for two codes with exchange before solution

22 IV

MpCCI 3.1.0-1

IV Getting Started

2.7 Go Step Starting Servers and Codes

When an application exits normally, a window displays information collected from the application output. Generally there are two types of windows: One for information and another one for errors.

2.7.4 Interrupting the Computation


While the applications are running, the Kill and Stop buttons at the bottom of the window are enabled and provide following functionalities: Kill to terminate all applications by sending a kill signal. Stop to terminate all applications by sending a stop signal. The stop call may not immediately take eect, because it depends on the implementation of the stop procedure in the simulation code. To modify parameter settings you have to terminate the applications by pressing the Kill button. Otherwise the editing of parameter values is disabled.

MpCCI 3.1.0-1

IV

23

3 Checking the Results

IV Getting Started

3 Checking the Results


3.1 The MpCCI Visualizer
The MpCCI Visualizer is suitable for a quick check whether the coupling process was successful. The coupling region, orphaned nodes and exchanged quantities can be checked to ensure that the specied coupling has really occurred. Here only a short introduction is presented, a concise description of the MpCCI Visualizer is given in V-6 MpCCI Visualizer . During the coupling process, an additional control process can be started, which writes a tracele, i. e. a collection of the exchanged data (see Figure 3 and 2.7 Go Step Starting Servers and Codes ). To start a control process and obtain a tracele, the checkbox Start additional control process must be selected in the Go Step. The default name of the tracele is "tracefile.ccv", it can be changed in the Edit Step of the MpCCI GUI. After a simulation the MpCCI Visualizer can be started by selecting ToolsVisualizer from the MpCCI menu or by entering the command mpcci vis . Traceles can even be opened with the MpCCI Visualizer before the completion of a computation.

Figure 1: Control window (left) and viewer window (right) of the MpCCI Visualizer

The visualizer starts with the control window, which is depicted in Figure 1 on the left. To open a tracele, choose FileOpen. After selecting a le, the viewer window pops up, which displays the coupling region

24 IV

MpCCI 3.1.0-1

IV Getting Started

3.2 Post-Processing

(Figure 1 on the right). In the control window the data to display can be selected including the exchanged quantities. In Figure 1 the quantity NPosition is selected and displayed in the viewer window. Both the quantities which are sent, i. e. before the interpolation, and the quantities which are received are displayed. As sent and received data are normally dened at the same locations, both parts can be separated with the arrow buttons in the viewer window. Transient analyses consist of several steps, the step number can be selected in the control window. The MpCCI Visualizer can not replace a post-processing tool, as the tracele only obtains information from MpCCI, which solely covers the coupling region. Information on other regions of the analysis is not available.

3.2 Post-Processing
During a coupled simulation both codes should write their results to appropriate les. The visualization of these results can be carried through with built-in tools of the simulation codes. Unfortunately the built-in post-processing tools solely allow the visualization of one part of the problem. In our example this means, that you can display the uid properties with one tool and the structural properties with the other tool. There is general post-processing software, which can read output data from dierent standardized formats and combine results from dierent les. Describing these tools is however beyond the scope of this manual.

MpCCI 3.1.0-1

IV

25

MpCCI 3.1.0

MpCCI

V User Manual

MpCCI 3.1.0-1 Documentation Part V User Manual PDF version January 20, 2009

MpCCI is a registered trademark of Fraunhofer SCAI www.scai.fraunhofer.de/mpcci

Fraunhofer Institute
Algorithms and Scientic Computing Fraunhofer Institute for Algorithms and Scientic Computing SCAI Schloss Birlinghoven, 53754 Sankt Augustin, Germany Abaqus and SIMULIA are trademarks or registered trademarks of Dassault Syst`mes e ANSYS is a registered trademark of Ansys, Inc. FLUENT is a registered trademark of Fluent Inc. FLUX is a registered trademark of Cedrat of Grenoble, France ICEPAK is a registered trademark of Fluent Inc. MSC.Marc is a registered trademark of MSC.Software Corporation PERMAS is a registered trademark of Intes GmbH STAR-CD is a registered trademark of CD adapco Group RadTherm is a registered trademark of ThermoAnalytics Inc. FLEXlm is a registered trademark of Macrovision Perl has a copyright by Larry Wall and others ActivePerl has a Community License Copyright of Active State Corp. OpenSSH has a copyright by Tatu Ylonen, Espoo, Finland Java is a registered trademark of Sun Microsystems, Inc. MPICH-1 and MPICH-2 has a copyright by University of Chicago and Mississippi State University Linux is a registered trademark of Linus Torvalds UNIX is a registered trademark of The Open Group Windows, Windows XP and Windows Vista are registered trademarks of Microsoft Corp.

V User Manual

Contents

V User Manual Contents


1 1.1 2 2.1 2.2 2.3 Introduction Basic Structure of MpCCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The MpCCI Software Package Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The MpCCI Home Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Environment and Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 2.3.2 2.3.3 2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.5 2.6 2.7 MPCCI ARCH - Architecture Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . MPCCI DEBUG - for Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPCCI INITIAL EXCHANGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MpCCI Project Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MpCCI Server Input Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tracele . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 8 10 10 11 12 13 14 15 16 16 16 16 16 17 18 20 20 20 20 20 21 21 21 22 24 25 26 27 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI Project and Output Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

The MpCCI Resource Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Temporary Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Third Party Software Used by MpCCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.7.1 2.7.2 2.7.3 2.7.4 Perl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remote Shell and Remote Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3 3.1

Code Coupling Multi-Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 3.1.2 3.2 3.2.1 3.2.2 3.2.3 Physical Domains Coupling Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pre-Contact Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Minimal Distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intersection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Data Exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI 3.1.0-1

Contents 3.2.4 3.2.5 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.4 3.4.1 3.4.2 3.4.3 3.4.4 3.5 3.5.1 3.5.2 4 4.1

V User Manual Orphaned Nodes and Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Flux and Field Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Course of the Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stationary Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transient Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exchange of Time Step Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Subcycling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Restarting a Coupled Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Client-Server Structure of MpCCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hostlist les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remote Shell and Remote Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupled Analysis in Batch Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bounding Box Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mesh Quality Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 29 30 30 31 31 36 37 38 39 39 41 42 42 57 57 57 58 58 58 59 59 60 61 62 63 63 63 63 64 64

Coupling Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Running MpCCI in a Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Mesh Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Graphical User Interface Starting and Exiting MpCCI GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 4.1.2 4.2 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.3 4.3.1 Starting MpCCI GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exiting MpCCI GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . File Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Batch Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . License Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tools Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preferences Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Codes Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Help Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI GUI Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI 3.1.0-1

V User Manual 4.3.2 4.4 4.4.1 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.5 4.5.1 4.5.2 4.6 4.7 4.6.1 4.7.1 4.7.2 5 5.1 5.2 5.3

Contents Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Generate Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Options Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quantity properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quantity Sender . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Predened Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conguring the MpCCI Coupling Server . . . . . . . . . . . . . . . . . . . . . . . . . File Browser Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to mount a new le system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 64 65 65 65 66 66 69 71 71 74 76 76 80 80 81 84 84 86 88 89 90 93 94 95 96 97 98 99

Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Remote File Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Command Line Interface Using the Command Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of All Subcommands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starting MpCCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.4 5.4.1 5.4.2 5.4.3 5.4.4 mpcci gui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mpcci morpher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mpcci observe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mpcci pm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mpcci vis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mpcci xterm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mpcci arch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mpcci doc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Information and Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

mpcci info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 mpcci env . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

MpCCI 3.1.0-1

Contents 5.4.5 5.4.6 5.5 5.5.1 5.5.2 5.5.3 5.5.4 5.5.5 5.5.6 5.6 5.6.1 5.6.2 5.6.3 5.6.4 5.6.5 5.6.6 5.6.7 5.6.8 5.6.9

V User Manual mpcci home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 mpcci where . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 mpcci license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 mpcci list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 mpcci lmutil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 mpcci ssh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 mpcci test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 mpcci update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 mpcci backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 mpcci batch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 mpcci batch LSF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 mpcci batch PBS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 mpcci batch N1GE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 mpcci batch LoadLeveler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 mpcci batch GLOBUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 mpcci clean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 mpcci kill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

Installation and Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Job Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

5.6.10 mpcci ps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 5.6.11 mpcci ptoi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 5.6.12 mpcci server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 5.6.13 mpcci top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 6 6.1 MpCCI Visualizer 6.1.1 6.1.2 6.1.3 6.2 6.2.1 6.2.2 6.3 136

Using the MpCCI Visualizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Data Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Supported Platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Starting the Visualizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Control Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Viewer Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

MpCCI Visualizer for .ccv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

MpCCI Visualizer for VTFx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

MpCCI 3.1.0-1

V User Manual 7 8 MpCCI Grid Morpher MpCCI Project Manager

Contents 145 146

MpCCI 3.1.0-1

1 Introduction

V User Manual

1 Introduction
This user manual shall give an overview of the basic structures and features of MpCCI. All code-specic issues are discusses in the chapters of the Codes Manual.

1.1 Basic Structure of MpCCI


MpCCI is a software environment which enables the exchange of data between the meshes of two simulation codes in a multi-physics simulation. The architecture of this coupling process is shown in Figure 1. MpCCI enables a direct communication between the coupled codes by providing adapters for each code. These code-adapters make use of already existing application programming interfaces (APIs) of the simulation tools. This technique allows an easy installation of MpCCI at the end users site without changing the standard installation of the simulation codes. Since the meshes belonging to dierent simulation codes are not compatible in general, MpCCI performs an interpolation. In case of parallel codes MpCCI keeps track on the distribution of the domains onto dierent processes. MpCCI allows the exchange of nearly any kind of data between the coupled codes; e. g. energy and momentum sources, material properties, mesh denitions, or global quantities. The details of the data exchange are hidden behind the concise interface of MpCCI. The MpCCI environment consists of several components: MpCCI code-adapters allow to adapt MpCCI to commercial codes through their standard code APIs without any changes in the source of the simulation code. The MpCCI GUI provides a comfortable way to dene the coupling setup and to start the simulation - independent of the codes involved in the coupled application, it is described in 4 Graphical User Interface The MpCCI coupling server is the heart of the MpCCI system. Environment handling, communication between the codes, neighborhood computation, and interpolation are part of this kernel.

MpCCI 3.1.0-1

V User Manual

1.1 Basic Structure of MpCCI

Figure 1: MpCCI architecture

MpCCI 3.1.0-1

2 The MpCCI Software Package

V User Manual

2 The MpCCI Software Package


2.1 Introduction
MpCCI is not a single executable, but a complex software package, which consists of the following parts: Coupling server and clients. The heart of MpCCI, which is responsible for the code coupling process, see 3 Code Coupling . MpCCI Visualizer. The MpCCI visualizer is a tool for checking the coupling process. Meshes and transferred quantities can be displayed. See 6 MpCCI Visualizer for more information. Collection of small tools. A variety of small tools is included in the MpCCI software package. These are useful for obtaining information on the computing environment, installation and licensing issues, and job control. A description of these tools is given in 5 Command Line Interface . MpCCI Grid Morpher. In some coupled analyses the coupling surface is moving during the simulation. If one of the coupled codes does not provide a morphing tool itself, the MpCCI Grid Morpher can be used, see 7 MpCCI Grid Morpher . MpCCI Project Manager. The project manager, which is described in 8 MpCCI Project Manager , is useful to organize your coupling projects. It lists all project in your HOME-directory and gives easy access to basic MpCCI tasks. These parts of MpCCI can basically be accessed in two ways: Through the graphical user interface, MpCCI GUI, which oers a convenient way to dene a coupled simulation, starting and controlling jobs. Most of the MpCCI tools can be started directly from the MpCCI GUI. An introduction to using the MpCCI GUI can be found in Getting Started. A concise description of all MpCCI GUI features is given in 4 Graphical User Interface . All parts of MpCCI can be run directly from the command line (i. e. by typing commands in a shell in UNIX/Linux or the DOS shell in Windows). Besides starting the main parts of MpCCI, a collection of small tools is oered. These tools can be used to gather important information, deal with licensing issues and to control the coupling process. All available commands are described in 5 Command Line Interface .

10 V

MpCCI 3.1.0-1

V User Manual

2.2 The MpCCI Home Directory

2.2 The MpCCI Home Directory


MpCCI resides completely within one directory with subdirectories. This MpCCI home directory is referred to as MPCCI HOME. This directory is created during the installation of MpCCI. For selection of the path, please see the Installation Guide. The only requirement, which must be met to run MpCCI properly is that the MpCCI executable, which is located in "MPCCI HOME/bin" must be included in your PATH environment variable. The MPCCI HOME directory contains a number of subdirectories:
"bin" The MpCCI binaries, which contains the MpCCI main program "mpcci" or "mpcci.exe" and the

MpCCI shell "mpccish" or "mpccish.exe". The MpCCI shell is executed by MpCCI on remote machines.
"codes" contains all code-specic les, in separate subdirectories for each code and one for the MpCCI

server. Each subdirectory includes information for the MpCCI GUI ("gui.xcf"), and some Perl scripts ("*.pm") for scanning of input les, starting and stopping the coupled codes. These are called by MpCCI during the coupling process.
"dist" contains distribution information, which is required for patch updates. "doc" contains the MpCCI documentation, which can be accessed with the mpcci doc command, see

5.4.2 mpcci doc on page 99


"gui" is the base directory of the MpCCI GUI, containing conguration les and the ".jar" archives of

the MpCCI GUI.


"include" contains header les, which are necessary for developing code adapters, see Programmers Guide. "lib" contains libraries, which are necessary for developing code adapters, see Programmers Guide. "license" contains the license manager FLEXlm, which is used by MpCCI. All license les should also be

placed in this directory.


"perlmod" contains various Perl modules, mainly small helper tools. "tutorial" contains the input les needed for trying the examples described in the Tutorial.

Do not edit any of the les in the MPCCI HOME directory unless you know what you do. Improper changing of les may destroy your MpCCI distribution, which makes a new download necessary.

MpCCI 3.1.0-1

11

2 The MpCCI Software Package

V User Manual

2.3 Environment and Environment Variables


MpCCI uses environment variables to transport information between subprocesses and processes created on remote hosts. Most of the environment variables are volatile, some are not. You may display the MpCCI related environment variables with the command mpcci env . MpCCI distinguishes two categories of variables: Control variables are named MPCCI ... and may be dened before starting MpCCI to control the behavior of MpCCI. An overview of these variables is given below. Internal variables begin with an underscore MPCCI ... are volatile environment variables used internally by MpCCI and should not be set by the user. Internal variables which are related to a specic code are also named accordingly, i. e. MPCCI <code name> ... . All internal variables are intended for internal use only and are subject to change without notice. Changing these variables may yield malfunction of MpCCI, they should not be used by any external application. MpCCI Control Variables The MpCCI control variables are: Contains the MpCCI architecture token, which is used to identify the platform MPCCI DEBUG If dened, MpCCI runs in debug mode MPCCI HOSTLIST FILE Path to le which contains a list of possible hosts for parallel runs MPCCI INITIAL EXCHANGE Passed to the code adapter to determine the coupling algorithm MPCCI LICENSE FILE Location of the MpCCI license server MPCCI MODE Selects 32 or 64 Bit mode MPCCI REMOTE HOSTNAME Name of the host seen by a remote system MPCCI RSHTYPE Type of remote shell used by MpCCI MPCCI TMPDIR Path to temporary directory MPCCI ARCH System Variables In addition to the control variables, MpCCI evaluates some system variables: 2.3.1 MPCCI ARCH - Architecture Tokens 2.3.2 MPCCI DEBUG - for Debugging 3.4.1 Client-Server Structure of MpCCI 2.3.3 MPCCI INITIAL EXCHANGE III-5.3 Dening the License Server 3.4 Running MpCCI in a Network 3.4.3 Remote Shell and Remote Copy 2.6 Temporary Files

12 V MpCCI 3.1.0-1

V User Manual

2.3 Environment and Environment Variables

General variables (all OS) JAVA BINDIR JAVA HOME JAVA ROOT These variables are evaluated by JDK HOME MpCCI to nd the Java installation. JRE HOME Please ensure that it is set correctly. PATH The list of directories which is searched for executables. "MPCCI HOME/bin" must be included in the path. Windows variables ALLUSERSPROFILE COMSPEC HOMEDRIVE HOMEPATH

2.7.2 Java

III-2 Before the Installation

location of All Users Prole secondary command interpreter These variables dene the home directory, which is referred to as HOME in this manual.

PROCESSOR ARCHITECTURE The MpCCI architecture token is dePROCESSOR ARCHITEW6432 ned according to the values of these variables USERDOMAIN The domain of the user, needed for 2.7.3 MPI on page 20 MPI. USERPROFILE Used to determine the home direc2.7.4 Remote Shell and Remote tory of a user on a remote machine. Copy on page 20 UNIX/Linux variables HOME

The home directory, which is referred to as HOME in this manual.

2.3.1

MPCCI ARCH-

Architecture Tokens

MpCCI uses architecture tokens to identify a platform. A list of architecture tokens and currently supported platforms is given in the Release Notes. Before the setting of this variable is really required you should get a list of all installed MpCCI platforms. The command mpcci list archs shows all available MpCCI platforms installed on a le server. The variable MPCCI ARCH holds the architecture token of MpCCI and is usually set by MpCCI automatically since MpCCI is capable to gure out the platform it is running on. This variable should never be set by the user. However there may be a situation where this mechanism fails:

MpCCI 3.1.0-1

13

2 The MpCCI Software Package MpCCI is confused to nd out the platform MpCCI selects a wrong architecture MpCCI can not nd the installation for your platform MPCCI ARCH must be set to a valid architecture token. Examples:

V User Manual

You are running HP-UX 11.23 with Itanium II, but only the hpux1122 ia64 is installed and architecture hpux1123 ia64 can not be located: MPCCI ARCH=hpux1122 ia64 solves your problems since 11.22 software can run under 11.23 You are running under AIX 5.3, but only the aix51 power is installed. MpCCI will complain: MPCCI ARCH=aix51 power solves your problems since 5.1 software can run under 5.3. You know you have a glibc 2.2 installed, but MpCCI thinks it is 2.3: MPCCI ARCH=linux x86 glibc22 solves your problem. You have a Linux system on a Itanium processor, however linux ia64 is not installed: MPCCI ARCH=linux x86 solves your problem since Itanium is 32 bit x86 compatible. You have a Linux system on a EM64T processor, however your Linux is not a Scientic Linux: MPCCI ARCH=linux x86 solves your problem since EM64T is 32 bit x86 compatible.

2.3.2

MPCCI DEBUG-

for Debugging

This variable is optional, it needs not be dened. If MPCCI DEBUG is dened and its value is not false (any value except empty or 0), then detailed logging output is produced to nd out some pitfalls in case of failures. Whenever the -debug option appears on the command-line of the mpcci command mpcci arg1 arg2 ... -debug ... argn MPCCI DEBUG will be set to 1.

14 V

MpCCI 3.1.0-1

V User Manual

2.3 Environment and Environment Variables

2.3.3

MPCCI INITIAL EXCHANGE

This variable is required and is only used by the adapter for the application. It is set automatically within the MpCCI GUI before starting an application. If you use the mpcci server ... command to start the server and invoke the applications by hand, please do not forget to set this variable to: MPCCI_INITIAL_EXCHANGE=send MPCCI_INITIAL_EXCHANGE=receive MPCCI_INITIAL_EXCHANGE=exchange MPCCI_INITIAL_EXCHANGE=skip before you start the applications. or or or

MpCCI 3.1.0-1

15

2 The MpCCI Software Package

V User Manual

2.4 MpCCI Project and Output Files 2.4.1 MpCCI Project Files
The MpCCI project les are named "*.csp" and contain all relevant data for a coupled computation in XML format.

2.4.2 MpCCI Server Input Files


The MpCCI server input les are named "*.cci" and generated from the project les before the MpCCI server is started. The contents of the server input les are subject to change without notice. Do not write or modify "*.cci" les on your own!

2.4.3 Log Files


In addition to the log les of the coupled simulation codes, MpCCI writes its own les:
"mpccirun.serverlog.*" For each coupling server, a separate log le is written. The servers are numbered,

all internal calls of the code coupling interface are logged.


"mpccirun.errorlog" If errors appear in any server, the error messages are written to the error log les.

Please keep in mind that errors can appear in any server or client, so the relevant error messages are often found in other log les.
"mpccirun.stdout.*" If you choose the option Create server log les in the Go Step of the MpCCI GUI

(see 4.6 Go Step ) and switch o the option Run server processes inside xterm, the output of the MpCCI server processes will be written to stdout les. They contain the same information which is displayed in the terminal windows. The stdout les contain very useful information for debugging. If you set the OutputLevel in the Edit Step to 3 (see 4.5 Edit Step ), all quantities which are exchanged are written to the stdout les.

2.4.4 Tracele
The tracele "*.ccv" is used for the MpCCI Visualizer, see 6 MpCCI Visualizer .

16 V

MpCCI 3.1.0-1

V User Manual

2.5 The MpCCI Resource Directory

2.5 The MpCCI Resource Directory


For storing permanent les related to your personal account MpCCI uses the subdirectory ".mpcci" within your home directory. If there is no directory "<Home>/.mpcci" MpCCI will create one whenever you start MpCCI. "<Home>/.mpcci" contains the following MpCCI related les:
"mpcci.hosts" a hostle listing possible remote MpCCI hosts "Projects" a list of your MpCCI projects for the MpCCI Project Manager "tmp" The temporary MpCCI directory

You should avoid to delete this directory once it was created and contains les.

MpCCI 3.1.0-1

17

2 The MpCCI Software Package

V User Manual

2.6 Temporary Files


At runtime MpCCI needs to store intermediate information and creates temporary scripts - shell scripts under UNIX or .bat-les under Microsoft Windows- which wraps commands or are copied from the local host to a remote system via the remote copy commands rcp or scp . Some of the temporary les are created in the current working directory (where the MpCCI application runs or where the MpCCI server was started) and are removed after successful use, others are kept for the duration of the MpCCI session. MpCCI maintains a list of these long term temporary les created during a session and tries to remove them at the end. Long living temporary les from the last category are stored per default in the directory "<HOME>/.mpcci/tmp". In some cases it might happen that MpCCI is killed or dies because of a signal or an exception. To eliminate all temporary les in such a case you may either delete the complete "tmp" directory or use the MpCCI command mpcci clean which removes all temporary les. Never remove temporary les as long as a simulation is running. An MpCCI temporary directory will be created whenever you start MpCCI.

Environment Variable MPCCI TMPDIR: Shared HOME and Alternative Directory for Temporary Files
Instead of using the default directory for temporary les you may want to assign a dierent directory to MpCCI as a temporary directory, e. g. "/tmp" or "/var/tmp" under UNIX "C:\WINDOWS\Temp" under Microsoft Windows There are some reasons to redirect the temporary directory: Your home directory may be physically located on a remote system. Then "<Home>/.mpcci/tmp" is also located on this remote le-server. Under UNIX this may be an NFS based directory, which is mounted automatically by the automounter (NFS is the Network File System). Under Microsoft Windows your "<Home> \.mpcci\tmp" may be either on an Microsoft Windows le-server or a UNIX le-server mounted to your Microsoft Windows PC via the Samba tool. In the latter case accessing temporary les in "<Home>/.mpcci/tmp" should be quite fast, but also NFS may sometime lead to out-of-sync delays for a few seconds. This delay may interrupt process communication if the timeout-limit has been dened with a too small value (of less than 10 seconds).

18 V

MpCCI 3.1.0-1

V User Manual

2.6 Temporary Files

If your MpCCI job runs into trouble with timeouts and missing les and if you know about the fact that your home directory is on a remote host and mounted automatically, then it would be better to use a temporary directory on a locally mounted disc. You may specify the pathname of an alternative temporary directory by setting the environment variable MPCCI_TMPDIR=path_to_a_temporary_directory to a valid directory. Note that you need to have write access to that directory before starting MpCCI. If the environment variable MPCCI TMPDIR is not dened before you start MpCCI, then MpCCI uses the default "<Home>/.mpcci/tmp" and sets MPCCI TMPDIR automatically. If the environment variable MPCCI TMPDIR is dened before you start MpCCI, then the value of this variable denes the temporary les directory.

MpCCI 3.1.0-1

19

2 The MpCCI Software Package

V User Manual

2.7 Third Party Software Used by MpCCI 2.7.1 Perl


A large part of the platform-independent functionality of MpCCI is realized with Perl scripts. Perl is available for all platforms supported by MpCCI and already included in Linux distributions. The installation of Perl is described in III-9 Installing Perl . For more information on Perl please visit the Perl website www.perl.org.

2.7.2 Java
The MpCCI GUI is based on Java, which is a trademark of Sun Microsystems. To run the MpCCI GUI a Java virtual machine is required. For more information on Java installation please see III-10 Installing Java .

2.7.3 MPI
MpCCI uses MPI for parallelization. For UNIX and Linux platforms, MPI is already included in the MpCCI distribution, only for Windows a separate installation is required, which is included in the MpCCI download and is installed automatically. See also III-2.7 MPICH for Microsoft Windows . The MPI version used by MpCCI does not conict with native platform MPIs or MPIs used by other simulation codes.

2.7.4 Remote Shell and Remote Copy


MpCCI uses the remote shell rsh or secure shell ssh to start processes on remote computers. For copying les rcp or scp are used. See 3.4 Running MpCCI in a Network for a detailed description of remote computing. On Microsoft Windows systems, no remote shell is included in the operating system, therefore the MpCCIRSH,OpenSSH must be installed for MpCCI, see III-2.6 MpCCI-RSH for Microsoft Windows , III-2.5 OpenSSH for Microsoft Windows .

20 V

MpCCI 3.1.0-1

V User Manual

3.1 Multi-Physics

3 Code Coupling
MpCCI is a tool to perform multi-physics computations by coupling independent simulation codes. A general introduction to this approach is already given in IV-1 Multi-Physics Computation with MpCCI . Each of the coupled codes is independent. The coupling is achieved by exchanging data in the coupling region. This procedure can be split up into two basic issues: How data is transferred and when data is transferred. The rst issue is the topic of 3.2 Data Exchange , possible coupling algorithms, which determine the exchange time, are discussed in 3.3 Coupling Algorithms . This section only gives a short overview of the methods used in MpCCI and explains the options which can be chosen. The description mainly considers a surface coupling, line and volume coupling work analogously.

3.1 Multi-Physics 3.1.1 Physical Domains


A physical domain is usually characterized by a set of unknowns equations which describe certain properties of a material. The simulation code can be classied according to the physical domains, i. e. the problems which they can solve. The domains known by MpCCI are: Domain Solid mechanics Fluid mechanics Acoustics Fluid pipe systems Solid heat transfer Fluid heat transfer Heat radiation Electromagnetism MpCCI Token SolidStructure Fluid SolidAcoustics network SolidThermal FluidThermal Radiation ElectroMagnetism

In MpCCI physical domains are rather chosen to t typical capabilities of simulation codes than to clearly distinguish branches of physics. Solid Mechanics Solid mechanics describes the behavior of solid bodies when exposed to external load. Usually deformation, stresses and strains of structures are computed using the Finite Element Method (FEM), thus structural mechanics codes are often simply known as Finite Element codes, although the method is not limited to solid mechanics. The governing equation for solid mechanics problem are the mechanical equilibrium and Newtons laws of motion. These are completed by material equations which describe the behavior of dierent materials.

MpCCI 3.1.0-1

21

3 Code Coupling Fluid Mechanics

V User Manual

Fluid mechanics deals with the behavior of uids, e. g. ows of liquids or gases. A common term for the numerical simulation of uid mechanics is Computation Fluid Dynamics (CFD), thus uid mechanics codes are known as CFD-codes. The governing equations are the Navier-Stokes equations and the continuum hypothesis. Acoustics Acoustics studies sound eects, i. e. wave propagation in solids and uids. Usually this is coupled with vibration analyses. Physically this is a subbranch of solid or uid mechanics, but the simulation methods are dierent. (The name SolidAcoustics in MpCCI refers to solid mechanics codes which can also compute acoustic problems). Solid Heat Transfer Heat transfer in solids is based on heat conduction. Usually boundary temperatures and heat sources are given and the heat distribution shall be computed. The governing law of heat conduction can usually be solved by solid mechanics codes. Heat transfer via radiation is discussed separately below. Fluid Heat Transfer Heat transfer in uids diers from that in solids as heat is transferred not only by heat conduction but also by convection. Most uid codes can also compute heat transfer. Heat Radiation Heat transfer by radiation is separated from solid and uid heat transfer because specialized simulation codes exist for this issue. They compute the heat distribution caused by electromagnetic radiation (e. g. infrared light), which is emitted by bodies or uids. Electromagnetism Electromagnetism deals with the computation of electric and magnetic elds. This includes the computation of electric currents and resulting forces. The governing equation are Maxwells equations.

3.1.2 Coupling Types


Among the many possible combinations of physical domains, there are some pairs which are often used in multi-physics simulations together with a typical set of quantities which are exchanged. These combinations of domains and quantities are called coupling types in MpCCI. The MpCCI GUI oers some predened coupling types to select, see coupling types will be described in the following. 4.4 Coupling Step . Some typical

22 V

MpCCI 3.1.0-1

V User Manual Fluid-Structure Interaction (FSI)

3.1 Multi-Physics

In an FSI simulation, usually a structure deforms due to forces caused by a uid ow while the deformation changes the uids boundary. The deformation must be transferred to the CFD code, which corresponds to the quantities Nodal displacement (NDisplacement) or Nodal position (NPosition), while forces are sent from CFD to the structural code, e. g. Boundary absolute force vector (WallForce), Boundary relative force vector (RelWallForce) or the Relative pressure (OverPressure). CFD codes usually use a reference pressure, i. e. the atmospheric pressure, which is not considered in structural codes. For a coupled simulation it is therefore recommended to transfer the relative pressure only, i. e. RelWallForce or Overpressure instead of WallForce and AbsPressure which include the reference pressure. Please consult the appropriate section of the Codes Manual for more information on the reference pressure in a specic simulation code. For Fluid-Structure Interaction there are two predened coupling types, Absolute pressure based Fluid-Structure Interaction and Gauge pressure based Fluid-Structure Interaction. In some cases a one-way coupling is sucient, which corresponds to the types One way force mapping and One way pressure mapping. FSI is used in the following tutorials: VII-2 Vortex-Induced Vibration of a Thin-Walled Structure VII-3 Elastic Flap in a Duct VII-6 Pipe Nozzle Thermal Coupling Thermal coupling is applied if heat transfer is to be computed in as system consisting of a structure and a uid. At the boundary, i. e. the surface of the structure, both share the same temperature and thermal energy is exchanged as heat ux. There are two basic combinations of quantities which can be exchanged: Exchange of temperature (Temperature or WallTemp) and the heat ux (WallHeatFlux). The temperature is typically sent by the structural (or radiation) code, while the uid code is sender of the heat ux. This corresponds to the predened coupling type Transient surface heat transfer. Exchange of temperature, lm temperature (FilmTemp) and the heat coecient (WallHTCoe). As above, the wall temperature is sent by the structural code. The uid code sends the lm temperature and wall heat transfer coecient, a combination which can be directly applied as boundary condition by most structural codes. The heat transfer coecient h is computed from the heat ux q and the dierence between the wall temperature Tw and the adjacent uid cell temperature Tc in the adapter of the uid code: q h= Tw Tc The coupling types Steady state surface heat transfer and Steady state radiative heat transfer correspond to this procedure.

MpCCI 3.1.0-1

23

3 Code Coupling

V User Manual

The second approach is recommended because it is more stable. Thermal coupling is used in the tutorial VII-4 Exhaust Manifold . Electrothermal Analysis The resistive loss of electric currents corresponds to a heat source while the temperature inuences the resistivity of conductors. This problem is addressed with an electrothermal analysis, which combines electromagnetism with heat transfer. The quantities which are actually should be exchanged are the electric resistivity and the temperature. However, most heat transfer codes cannot compute the resistivity directly, which is therefore done using user-dened functions. The quantity combination depends on the decision in which code these additional computations are carried through. A special application in this area is electric arc computation. A simple example is shown in tutorial VII-5 Busbar System .

3.2 Data Exchange

data exchange Figure 1: Data exchange between two non-matching grids (distance exaggerated) Data exchange does not mean that values are shared, as would be the case in a monolithic code, but each quantity is determined by one code, which then sends it to the other. In the sending code, the data is dened on a mesh of some kind and shall be transferred to the mesh of the receiving code. These meshes describe the same geometric entity, but typically dier in element size and node location, which is referred to as nonmatching grids, see Figure 1. The exchange procedure can be split up into three steps: Pre-Contact Search Before the actual contact search the elements of the meshes are sorted in a way to speed up the association process.

24 V

MpCCI 3.1.0-1

V User Manual

3.2 Data Exchange

Association For each node or element of one grid, the partners on the other grid must be found. The data will then be exchanged between associated nodes and/or elements. This process is also called neighborhood search. Interpolation The data which shall be transferred must be adapted to the target mesh, while e. g. conserving the sum of forces. There are two basic approaches for association and interpolation, the Minimal Distance algorithm and the Intersection algorithm. Both are discussed in the following sections. All parameters for association and interpolation can be set in the Edit Panel of the MpCCI GUI, see 4.5 Edit Step .

3.2.1 Pre-Contact Search

triangle 2

triangle 1 1.0 a) b) 1.5 c)

Figure 2: Pre-contact search: a) Decomposition of a quadrilateral element into two triangles. b) Bounding boxes of the rst triangle for values 1.0 and 1.5 of BboxExpansion. c) Buckets, to which the triangle is associated

To simplify the contact search, all elements are decomposed into triangles for two-dimensional meshes or tetrahedra for three-dimensional meshes. Based on this decomposition, the same search algorithms can be applied for all element types. The search for elements can be carried through with dierent algorithms, which can be selected in the Edit Panel. The default algorithm is a bucket algorithm, which is the only selection which is recommended, all other algorithms will be removed in future releases. In the pre-contact search, each triangle is surrounded by a bounding box. This bounding box fully contains the triangle and has equal lengths in all space dimensions. The size of the bounding box can be changed by setting the parameter BboxExpansion in the Edit Panel. A value of 1.0 corresponds to the smallest cube containing the triangle. The length of the cube is multiplied with BboxExpansion.

MpCCI 3.1.0-1

25

3 Code Coupling

V User Manual

The space which covers the elements is split up into small squares or cubes, the so-called buckets. Each bucket has a list of triangles, which are close to it. The bounding box of a triangle lies within a number of buckets, as depicted in Figure 2 c). The triangle is added to the lists of all these buckets. The size of the buckets is chosen automatically, but it can also be altered by changing the parameter BucketExpansion. It is recommended to keep it set to 1.0. Setting a minimum bucket size (MinBboxSize) is also not necessary.

3.2.2 Minimal Distance


The minimal distance algorithm is based on point-element relationships, it is therefore also called PE for point-element. Each node of one mesh lies within a bucket of the other meshes. After the pre-contact search, the bucket contains a list of triangles. These triangles belong to elements, which are regarded as candidates for a contact. P dn

dt db = 0 db = 1.0 a) db = 2.0 b)

Figure 3: Selecting an element: a) Barycentric distance db around an element. b) vertical distance dn and in-plane distance dt

From this set of elements, the best element must be selected. This is achieved by nding the best triangle and then selecting the corresponding element. This process is based on the relative position of the triangle and the node P. First, the projection P of the point onto the surface of each triangle is computed, as can be seen in Figure 3 b). Three distances are evaluated to determine the best element. The rst is the barycentric distance of the point P db = |u| + |v| + |w| 1 (1) with the barycentric coordinates u, v and w. The value of db is zero within the element, but as soon as the point lies outside the element, the value increases as depicted in Figure 3 a).

26 V

MpCCI 3.1.0-1

V User Manual

3.2 Data Exchange

The second value is the distance dt of P to the nearest point of the triangle and the third the distance of P to the plane, i. e. the distance between P and P. The nal measure to select an element is = 1 db + 2 d2 d2 t + 3 n , A A (2)

where A is the area of the triangle. The weights 1 , 2 and 3 , which can be set in the Edit Panel, determine which distances are regarded. The element with the smallest value of is selected. If exceeds a certain value, which can be set by the parameter Rejection, the element is not selected, which may mean that no element is found at all, see 3.2.4 Orphaned Nodes and Elements . The interpolation of values is then achieved by evaluating the shape functions of the element to nd the value at the point P, which is then transferred to the other mesh, i. e. the node P. The minimal distance algorithm is not recommended if ux -values are transferred from coarse to ne meshes. In this case you may obtain local peaks of quantities. Please use the Intersection method instead. InsideOnly Option If a point is matched to an element as shown in Figure 3 b), it may receive data from its projection P. This may be a problem if P lies outside of the element, because the value is interpolated using the element shape functions. Even if all nodal values of the element are positive, one may get a negative value outside the element, which is then transferred to the partner code. For certain quantities, e. g. temperatures, negative values are not allowed. If the InsideOnly option is enabled, P receives its data not from P but from the closest point within the element. Do not use InsideOnly to transfer the node coordinates NPosition! Because in this case a node P would not be moved onto the surface (P), but inside the element, which may yield an invalid mesh.

3.2.3 Intersection
As an alternative to the Minimal Distance algorithm, MpCCI oers an algorithm which is based on an element-element association, also referred to as EE for element-element. Instead of searching a partner for a node or point, partners for an element are searched. Again all elements are decomposed into triangles. To nd the partners for one triangle, the bounding box is constructed, this time without additional expansion. The bounding box intersects the bucket space of the other model. If the intersecting buckets contain elements from the pre-contact search they are combined to form a list of contact candidates. All candidate triangles are now projected onto the plane dened by the searching triangle as depicted in Figure 4 a). For each triangle, the area of the common area with the searching triangle is computed and

MpCCI 3.1.0-1

27

3 Code Coupling

V User Manual

a)

b)

Figure 4: Intersection algorithm: a) Projection of triangles, one triangle does not intersect the target triangle (distance exaggerated). b) Intersection areas

for each element a weight wi is dened by wi = Ai Ai


i

where Ai are the intersection areas, the sum of which corresponds to the area of the searching triangle. Note that the sum of all weights is 1. These weights are nally used to interpolate the data, i. e. the value for the target element is a function of the values of the source elements and the corresponding weights. projection direction

projection angle projection distance a) b) area matched by two elements

Figure 5: Intersection algorithm: a) Projection distance and projection angle b) Overlapping matching areas Not all elements are automatically considered to match an element on the other mesh. The projection

28 V

MpCCI 3.1.0-1


(3)

V User Manual

3.2 Data Exchange

distance and projection angle as sketched in Figure 5 a) can be limited by options in the Edit Step. Elements with too large angles or distances remain orphaned. In addition there is a rejection parameter. Elements which share only a very small common area are not considered. See 4.5 Edit Step for how to choose the minimal area fraction for matching elements. For the intersection algorithm, an additional check may be chosen by the parameter PerformTest. If the projection of elements overlap as shown in Figure 5 b), or some areas do not obtain any projection areas, warnings are printed to the log le if PerformTest is activated.

3.2.4 Orphaned Nodes and Elements


A node is called orphaned if it is not associated to an element during the contact search. This also means that this node can neither send nor receive any data from the other mesh. Instead, MpCCI sends the default values, which can be dened for each quantity (see 4.4 Coupling Step ). Besides assigning default values it is possible to extrapolate values from non-orphaned areas. The extrapolated values of the orphans will lie in the range of the lowest and highest values of the bordering non-orphaned areas. In many cases, however, orphaned nodes can yield severe problems, e. g. if nodal displacements are transferred, orphaned nodes are not moved along with the rest of the mesh. This can yield severe distortions, which lead to an abortion of the computation even if extrapolation is turned on. If orphaned nodes are present, they are listed in the output of the coupling servers: FE:1:0: The nodes with the following ids did not find a match (local_number[global_number]): FE:1:0: 8[7] FE:1:0: 90[89] FE:1:0: 92[91] FE:1:0: 277[276] FE:1:0: 278[277] FE:1:0: 279[278] To identify the regions where orphaned nodes appear, it is recommended to use the MpCCI Visualizer, which can display all orphaned nodes in the coupling region, see 6 MpCCI Visualizer . For element-element relations as used in the intersection interpolation, there are also orphaned elements for which no corresponding elements could be found in the other mesh.

3.2.5 Flux and Field Interpolation


The interpolation of quantities requires the distinction of two dierent cases, which can be characterized as ux and eld interpolation.

MpCCI 3.1.0-1

29

3 Code Coupling

V User Manual

In ux interpolation, the value is adapted to the element sizes to preserve the integral. Flux interpolation is e. g. used for forces. In eld interpolation, the values are kept to ensure a conservative transfer. This is used e. g. for are pressures or densities. In MpCCI a third case, ux density, is considered. This is a dierent term for eld values, thus the interpolation is carried through in the same way. The interpolation type is already dened for each quantity, see the quantities list in the Appendix.

3.3 Coupling Algorithms 3.3.1 Course of the Coupling Process


The coupling process consists of three main phases: Initialization The codes initialize their data and MpCCI is initialized. MpCCI establishes a connection between the codes and the association or neighborhood search is carried through. Iteration Each code computes its part of the problem and data is exchanged at certain moments. Finalization The computation is ended by disconnecting the codes and stopping all codes and MpCCI. During the iteration, which also consists of several time steps in a transient problem, the data is exchanged several times. MpCCI cannot control the simulation processes of the coupled codes. Therefore, it is important that whenever one side sends data, the other side should be ready to receive. The data is also not associated with certain time steps or iterations. A consequence of this is also that the possible coupling algorithms are mainly determined by the capabilities of the simulation codes and the corresponding code adapters. The code adapters call send- and/or receivefunctions. These calls can appear at dierent states of the computation: At the beginning of each time step, i. e. before the iteration of the time step. At the end of each time step, i. e. after the iteration. Before or after an iteration step. On direct demand of the user. Most codes only oer exchanges at the beginning or end of a time step, which limits the choice of coupling algorithms. Exchange on direct demand usually is only used in stationary computations. Most simulation codes do not support exchanges during iterations. Please check the Codes Manual for information on the supported exchange times of the codes. MpCCI only supports weak coupling, as strong coupling can only be realized in two ways:

30 V

MpCCI 3.1.0-1

V User Manual

3.3 Coupling Algorithms

The equations of each domain of the coupled systems are combined in one large system of equations, which is solved to obtain the solution. This contradicts the approach of MpCCI, which couples two codes, each of which is highly specialized in its eld. Each system is solved separately, but data is exchanged during each iteration step, i. e. both codes compute one time step (the only one in a stationary computation) at the same time. If one code has nished a step of the iteration, it sends its data to the other code, which uses it in its own iteration. Both iterations are continued until both converge, yielding a state which fullls the equation of both physical domains. The only disadvantage in comparison to weak coupling is that convergence is slower, thus the computations are slower, but yield more precise results. The latter approach is aspired in future versions of MpCCI, which can only be realized if codes support exchanges during iterations. In MpCCI the selection of a coupling algorithm is based on the selection of the initial exchange. There are four choices, which are dened in the Go Step of the MpCCI GUI (see 4.6 Go Step ): exchange, receive, send and skip. The setting of this option denes what happens if the exchange routine is called for the rst time. All further calls of the exchange routing will yield a complete exchange, i. e. sending and receiving of data. It is important to keep in mind, that sending of data is always possible: The data is stored temporarily by MpCCI, i. e. it can be received later by the other code. MpCCI can store several sets of data, which are then send to the other code in the order in which they were sent. If one code is receiving data, it waits until data is available from the other code.

3.3.2 Stationary Problems


For stationary problems, it is assumed that there is exactly one solution of the coupled problem, which shall be found. The coupling algorithm does not have a big inuence on the solution in this case.

3.3.3 Transient Problems


Two general cases can be distinguished: Either both codes send and receive data, or one code only sends while the other receives only. In any case it is important to know whether each code performs the data exchange at the beginning of the time step before the iteration, which we call exchange before solution, or at the end of a time step after the iteration, exchange after solution.

3.3.3.1 Construction of Coupling algorithms


Coupling algorithms can be constructed in a straight-forward way. The three basic steps are shown in Figure 6. It is important to check rst, whether the codes exchange before or after solution. In this example, code A exchanges after the solution, code B before the solution.

MpCCI 3.1.0-1

31

3 Code Coupling Construction elements: time point solution in time step r x initial exchange: receive

V User Manual

normal exchange: always send and receive

Step 1: code A x x

Step 2: x x

code B

code A

Step 3: 1 2

5 x 4 x 6 7 x

Final Scheme: 1 2 4 3

5 8

6 7

code B

r 3

Figure 6: Construction of a coupling algorithm: Code A exchanges after solution, while code B exchanges before solution.

The construction of the algorithm works as follows: 1. Draw time lines for both codes, including boxes which indicate the data exchanges. For code A, the box is at the end of the steps, for code B always at the beginning. The rst box in each code represents the initial transfer, which can be chosen in the MpCCI GUI. We assume, that for A exchange (marked by x) and for B receive (marked by r) were selected. All further exchanges always get an x as data is received and sent in all further steps. 2. Now, the data transfers are constructed, we proceed from the left to the right. Find the rst sending operation in code A, which is found in the rst box (x = send and receive). Thus a transfer line starts here. Now nd the rst receiving operation in code B, which is also the rst box. This is the end of the line, which yields the rst transfer. Now we proceed with the next sending operation, which is found in the second box in code B, which is connected to the rst box of code A. In this way all arrows can be found.

32 V

MpCCI 3.1.0-1

V User Manual

3.3 Coupling Algorithms

3. The only thing missing now is the order of operations. For this we remember: receive always waits for data send never waits (data is buered) exchanges x can be carried through in any order: Send rst or receive rst, as necessary. In our example, this means code A can start the computation (1), as it does not need to wait, while code B receives data, thus it will wait. After code A has nished computing the rst time step, it can send data (2) and then waits to receive data. Now, code B got its data and can start computing (3), then sends data to code A (4), which can then proceed (5), sends data (6) and code B continues (7). In this way we obtain the nal algorithm depicted in Figure 6, which can be identied as a sequential coupling algorithm. Note that not all combinations of the initial transfer yield reasonable coupling algorithms.

3.3.3.2 Standard Case: Bidirectional Transfer


In most coupled simulations, data is transferred between the codes in both directions. The coupling algorithms depend on the order of solution and transfer and the selected initial transfer. There is only a limited number of reasonable settings. Three cases can be regarded: Both codes exchange before iteration. The possible combinations are sketched in Figure 7 a). Both codes exchange after the iteration. The only dierence to the previous case is that no data is transferred immediately before the rst solution step. Otherwise the algorithms remain the same. One example is shown in Figure 7 b). One code exchanges after the iteration, and one before the iteration, which yields a wide variety of algorithms. However, only few can actually be recommended for use. To add further algorithms, one can allow a dummy step in the code with exchange after solution, i. e. the clocks of both codes are not synchronous. One code is always one time step ahead. Possible algorithms are depicted in Figure 8.

MpCCI 3.1.0-1

33

3 Code Coupling

V User Manual

a) Both codes exchange before iteration A: receive 1 B: exchange 3 5 4 8 2 6 7 serial 9 coupling B: receive A: skip 2 4 3 7 1 5 6 8 serial coupling

A: exchange 1 B: exchange

2 3 2

4 5 4 parallel coupling

A: skip

1 2

3 4 3 parallel coupling

B: skip

A: receive 1 B: send

2 3 2

4 5 4 parallel coupling

b) Both codes exchange after iteration A: receive 1 2 B: exchange 1 4 6 5 9 3 7 8 10 serial coupling

Figure 7: Coupling algorithms for dierent combinations of Initial quantities transfer: The dierence between cases a) and b) is only the additional step of both codes before the initial exchange in case b).

34 V

MpCCI 3.1.0-1

V User Manual Standard coupling A: exchange 2 B: exchange 3 1 2 B: receive 3 1 2 B: exchange 3 1 2 B: send 3 1 2 B: receive 3 4 6 7 3 4 5 3 4 5 3 4 3 parallel coupling B: skip 1 not recommended 1 2 3 1 not recommended 1 2 3 3 4 1 3 4 5 5 6 7 5 not recommended 1 2 4 3 8 serial coupling not recommended With dummy step 1 3 2 3

3.3 Coupling Algorithms

5 4 5 6 parallel coupling

A: exchange

A: receive

7 8 6 serial coupling 9 5 4 5 5 4 5 3 2 4 5 6 serial coupling 6 parallel coupling 6 parallel coupling

5 3

A: receive

A: send

Code B skips initial step 1 A: exchange 2 B: skip 1

A: receive

Figure 8: Coupling algorithms for code A with exchange after solution and code B with exchange before solution. The algorithms at the top on the right are obtained if a dummy step is introduced.

MpCCI 3.1.0-1

35

3 Code Coupling

V User Manual

3.3.3.3 Special Case: Unidirectional Transfer


In some coupling applications, only unidirectional transfer is used, i. e. one code only sends data to the other code, which only receives. This reduces the possible coupling algorithms, there is only one basic coupling algorithm which should be used if possible. If A is the sending code and B the receiving code, this algorithm can be described by the algorithm in Figure 9. A: sending code 2 B: receiving code 3 1 4 5 3

Figure 9: Coupling algorithm for unidirectional transfer Depending on the coupling properties of the codes, the user should select the following settings: Exchange before/after solution Initial Exchange 1 A: before, B: before A: skip B: receive 2 A: before, B: after A: skip B: skip with dummy step In case 2, the coupling algo3 A: after, B: before A: send B: receive 4 A: after, B: after A: skip B: receive rithm can only be realized with a dummy step in code B. The best combinations are 3 and 4.

3.3.4 Exchange of Time Step Size


Instead of using a xed coupling time step size, it is also possible to use adaptive time stepping. In this case the time step size is determined by one code and sent to the partner code, which changes its own time step to the received value. MpCCI regards the time step as a global quantity without any special meaning, its name is PhysicalTime (see quantity reference in the Appendix). The exchange of time step sizes may yield unwanted eects: Time Shift: It depends on when exactly each code determines the time step size and sends it to the partner code. It may happen that the partner code uses the time step size of the previous step. This problem cannot always be solved, try to use a dierent coupling algorithm. Convergence Problems: If the time step size is determined by one code it may be simply too large for the partner code. Please choose carefully which code shall determine the size and set reasonable limits. It is strongly recommended to always dene a default time step size in each simulation code, because the value of PhysicalTime may not be dened at the beginning of a simulation! This depends on the initial exchange settings and how exactly each code evaluates the received value. The default value should be the same for both partner codes.

36 V

MpCCI 3.1.0-1

V User Manual

3.3 Coupling Algorithms

3.3.5 Subcycling
The idea of subcycling is the denition of extra iteration steps inside a coupling step, which is schematically depicted in Figure 10. The ability of subcycling depends on the respective applied software. There are limited possibilities to implement subcycling by conguring MpCCI and the employed solvers. The motivation for subcycling may be the implementation of optimal settings for each solver concerning computational costs, stability and accuracy. For a transient simulation one solver could require smaller time steps for an accurate and/or stable solution process. Forcing the other code to apply the rather small time step might yield an inecient process. Furthermore in steady-state calculations for thermal problems, heat propagation in uids is subject to much faster transportation processes than in solid bodies, which will call for subcycling procedures in the uid domain.

ts Code A: a) Code B: t ts Code A: b) Code B: t ts Code A: c) Code B: t Figure 10: Three examples for coupling algorithms with subcycling: a) constant subcycling steps ts and exact coupling steps sizes of both codes, b) not necessarily constant subcycling steps ts and exact coupling step sizes enforced, c) not necessarily constant subcycling steps ts and exact coupling step sizes not enforced

A tutorial where subcycling is applied for a thermal simulation is

VII-4 Exhaust Manifold .

MpCCI 3.1.0-1

37

3 Code Coupling

V User Manual

3.3.6 Restarting a Coupled Simulation


One should distinguish between an actual restart and a complex start. Restart means the simulation is interrupted by killing the simulation or reaching a target time. Then the simulation is restarted seamlessly, i.e. continued as if it had never been interrupted. Complex Start means that the coupled simulation consists of dierent analysis steps, which dier in e.g. boundary conditions, simulation algorithms (transient/steady state). The second step is then based on the results of the rst one. When restarting a coupled simulation, this consists of three parts. Each of the simulation codes must be restarted separately the same way it is done without coupling and MpCCI must be restarted. For MpCCI it can be chosen to either save the neighborhood information into a restart le by setting appropriate options in the Edit step under Restart le. The parameter name denes the name of the le, and Access must be set to write in the rst run, see also 4.5 Edit Step . If the neighborhood information for MpCCI is read from a restart le, the same neighborhood is used as in the rst run, which is recommended. If this is not done, the new neighborhood search is performed on deformed meshes and may yield dierent results in comparison to the rst search, i. e. the restart may not be really seamless. Restarting a coupled simulation is an advanced analysis procedure. It is dicult to choose the initial exchanges such that the time in both codes is still synchronous after a restart. This is also code-dependent, there is information on restarts for some codes in the Codes Manual.

38 V

MpCCI 3.1.0-1

V User Manual

3.4 Running MpCCI in a Network

3.4 Running MpCCI in a Network


The use of MpCCI in a network is almost unlimited. MpCCI can couple couple simulation codes which run on dierent computers with dierent operation systems. It is also possible to run one or both of the simulation codes in parallel and to start the coupled simulation on a cluster using a queuing system.

3.4.1 Client-Server Structure of MpCCI


a) Coupling without parallel execution Simulation code A (client) Simulation code B (client)

MPI Server MPI Control process Server MPI

b) Coupling with parallel execution of simulation codes Simulation code A MpCCI MPI Server Main Process Server Simulation code B Process 1

Subprocess

MPI Server

Process 2

Subprocess

MPI Server

Process 3

Socket-based communication

MPI

MPI-based communication

Figure 11: Client-server structure of MpCCI

MpCCI 3.1.0-1

39

3 Code Coupling

V User Manual

The code coupling of MpCCI is based on a client-server model: The MpCCI processes act as servers while the simulation codes more precisely the code adapters of the simulation codes act as clients. Additionally an optional control process can be started to write a tracele. If codes are coupled without parallel execution, one server is started for communication with each simulation code, see Figure 11 a). If a simulation code is running in parallel, there are two possible ways of communicating: All data which is exchanged with the simulation code is passed via a main process, MpCCI only starts one server for this code. This is depicted in Figure 11 b) on the left. Each subprocess of a simulation code communicates with one MpCCI server, i. e. MpCCI has to start several servers as shown in Figure 11 b) on the right. Distributing MpCCI Servers on Dierent Machines The MpCCI servers use MPI for communication (which is also socket-based). They can be run on dierent machines which use the same endianness. (The endianness is the order in which bytes are stored or transmitted, which depends on the processor.) You can check the architecture by running mpcci arch . If the computers you want to use have the same architecture tokens, they also have the same endianness. The hosts for the MpCCI servers can be chosen in the Go Step of the MpCCI GUI. Select the option Distribute server on remote hosts and enter the names of remote computers (with domain name if necessary) into the eld Optional host host ... to be used. See 4.6 Go Step for details. Distributing Simulation Codes on Dierent Machines The communication between the simulation code clients and MpCCI servers is purely socket-based. If a simulation code shall be started on a remote computer, the input le must be placed there and selected in the remote le browser ( 4.7 Remote File Browser ). If the code shall additionally be started in parallel, please select the appropriate options in the Go Step, as described in the Codes Manual. Port Numbers for Socket Communication For a coupled simulation MpCCI uses a sequence of port numbers for the dierent socket connections. This sequence is dened by the basic port number, which can be selected in the MpCCI GUI ( 4.6.1 Conguring the MpCCI Coupling Server ) or when starting the server with mpcci server ( 5.6.12 mpcci server ). In the example sketched in Figure 11 a) one port is used as basic port and one for each connection to a client: 47111 Basic port 47112 Connection to simulation code A 47113 Connection to simulation code B For the parallel run of Figure 11 b) a total of 5 ports are needed:

40 V

MpCCI 3.1.0-1

V User Manual 47111 47112 47113 47114 47115 Basic port Connection Connection Connection Connection

3.4 Running MpCCI in a Network

to to to to

main process of simulation code A process 1 of simulation code B process 2 of simulation code B process 3 of simulation code B

Once all connections are established, the ports may be re-used, even if a simulation is still running. Only if you want to start several coupled simulations at the same time, you should use dierent sets of ports. If you need to change the ports due to rewall restrictions, please ensure that a sucient number of subsequent ports can be accessed.

3.4.2 Hostlist les


If you run coupled simulation on dierent computers frequently, it is recommended to use a hostlist le, which contains a list of computers. Each line in the list corresponds to one remote machine. There are two possible line formats, the standard format: [user@]hostname [#rsh] [#ssh] [#home:path] [#arch:token]

or extended (".rhost" type) format: hostname [user user user] [#rsh] [#ssh] [#home:path] [#arch:token]

Lines starting with a # are treated as comments. The entries #rsh and #ssh are used to select the network communication method (see 3.4.3 Remote Shell and Remote Copy below), the #home: option is used to specify the path to the home directory (only needed if not standard directory) and the #arch: option can be used to explicitly choose an architecture, see 2.3.1 MPCCI ARCH - Architecture Tokens for details. Thus a hostlist le might look like: fred@jupiter #ssh #home:/u/fred saturn.example.com fred barney #linux_x86 # this line is a comment mars The standard MpCCI hostlist le is "<Home>/.mpcci/mpcci.hosts", which is located in the MpCCI Resource Directory ( 2.5 The MpCCI Resource Directory ). If you want to use a dierent default hostlist le, you can set the environment variable MPCCI HOSTLIST FILE to the path of the le. You may list the contents of the hostlist le with mpcci list -hosts .

MpCCI 3.1.0-1

41

3 Code Coupling

V User Manual

3.4.3 Remote Shell and Remote Copy


To start processes on remote machines and copy les, MpCCI can use either the rsh or the ssh family of commands. The environment variable MPCCI RSHTYPE denes which family of remote commands is used: MPCCI RSHTYPE remote shell le copy rsh rsh or remsh ftp or rcp ssh ssh scp or sftp If MPCCI RSHTYPE is not dened or not set the default is rsh under UNIX and Linux and ssh under Microsoft Windows. It depends on your network conguration which method should be used. Please also read III-6.1 Accessing Remote Hosts for testing the remote access facilities.

3.4.4 Coupled Analysis in Batch Mode 3.4.4.1 General Approach


To start a batch job with MpCCI, i. e. a simulation without graphical interface, a project le "*.csp" must already be present. The following procedure is recommended: 1. Set up a coupled simulation on a computer with graphical interface. Proceed up to the Go Step in the MpCCI GUI and save the project le. If a code has to run in parallel, you have to enable the parallel option as described in the Codes Manual 2. Start the coupled analysis with mpcci -batch <project le> from the MpCCI project directory. The mpcci -batch command will start the simulation and distributes the codes as congured in the project le.

3.4.4.2 Job Scheduler Environment


To run a coupled computation with a job scheduler (queuing system) on a computing cluster MpCCI provides a set of command to submit, status, kill a job to/from a job scheduler. MpCCI supports batch-systems like LSF, PBS, SGE, LoadLeveler, GLOBUS. When preparing the project les, you cannot already know on which nodes of a cluster your processes will be started. MpCCI automatically detects that it is started by a job scheduler and changes the entries in the project les accordingly, i. e. the jobs are spread onto the reserved nodes by MpCCI. MpCCI will create a new project le containing the new associated hosts for each code. This project le name adds the prex "batch " to the original project le name.

42 V

MpCCI 3.1.0-1

V User Manual

3.4 Running MpCCI in a Network

The following procedure is recommended in order to prepare the project le: 1. Start the MpCCI GUI on a computer with graphical interface. 2. Set up the coupled analysis as a local job. This means the model les are selected on the local le system. 3. Proceed up to the Go Step in the MpCCI GUI and save the project le.

To distribute the server on remote hosts (see 4.6.1 Conguring the MpCCI Coupling Server ), you have to enable the option and may let the host list information empty. To congure a code to run in parallel, you have to enable the parallel option as described in the Codes Manual for the code and specify the number of processes. Until this step you have prepared your project le. In case that the computing cluster has a dierent le system than the workstation where you have setup the project le, it is recommend to copy the project directory including all input les for the simulation codes and the MpCCI project le "*.csp" to the compute head node. Usually also the MpCCI servers are run on dierent cluster nodes, thus you should consider the number of required MpCCI server processes when determining the number of necessary nodes for the job resource allocation. The MpCCI GUI may assist you to submit the job in the queue and congure the host allocation for each code if necessary or you can submit the job by using the MpCCI command line. Submit a job with MpCCI GUI To submit the MpCCI job with the MpCCI GUI you have to start the MpCCI GUI on the head node of your cluster. Usually the batch queue commands are available on the compute head node. You have to open your project and select the in the BatchSubmit in the menu (which is enable in the Go Step). A dialog will pop up and you are able to congure the batch options. By clicking on the submit button MpCCI prepares for the current project a script having the project name ("<project name>.[sh|bat]") to be submitted to the batch system. This generated script contains all the options provided by the MpCCI GUI for the selected batch system and the call of mpcci -batch <project le> . Below follows the description of the conguration dialog for each batch system.

MpCCI 3.1.0-1

43

3 Code Coupling Options Details for a LSF system

V User Manual

Figure 12: LSF Options

Job name you can provide a job name for the coupled analysis. This setting represents the option -J of the submit command. Queue name you can provide a queue name to submit the job. This setting represents the option -q of the submit command. Name for the stdout output le you can provide a lename for the stdout collected by the batch system. This setting represents the option -o of the submit command. Name for the stderr output le you can provide a lename for the stderr collected by the batch system. This setting represents the option -e of the submit command.

44 V

MpCCI 3.1.0-1

V User Manual

3.4 Running MpCCI in a Network

Number of host/processor you can provide the number of host/processor to be reserved for the job. This setting represents the option -n of the submit command. Host selection (option -m) you can provide a set of candidate hosts for running the coupled analysis. This setting represents the option -m of the submit command. Resource requirements (option -R) you can provide the resource requirement setting for the coupled analysis. This setting represents the option -R of the submit command. Additional command options you can provide a list of submit options that are not listed here. These options will be passed to the submit command.

MpCCI 3.1.0-1

45

3 Code Coupling Options Details for a PBS system

V User Manual

Figure 13: OpenPBS Options

The options are identical for the PBS, PBSPro, OpenPBS, Torque batch systems. Job name you can provide a job name for the coupled analysis. This setting represents the option -N of the submit command. Queue name you can provide a queue name to submit the job. This setting represents the option -q of the submit command. Name for the stdout output le you can provide a lename for the stdout collected by the batch system. This setting represents the option -o of the submit command.

46 V

MpCCI 3.1.0-1

V User Manual

3.4 Running MpCCI in a Network

Name for the stderr output le you can provide a lename for the stderr collected by the batch system. This setting represents the option -e of the submit command. Join both standard output and standard error select this option to merge the standard output and standard error This setting represents the option -j oe of the submit command. Keep both standard output and standard error select this option to keep both standard output and standard error. This setting represents the option -k oe of the submit command. Denes the resources that are required by the job (option: -l) you can dene a resource requirement for running the coupled analysis. This setting represents the option -l of the submit command. Additional command options you can provide a list of submit options that are not listed here. These options will be passed to the submit command.

MpCCI 3.1.0-1

47

3 Code Coupling Options Details for a SGE system

V User Manual

Figure 14: SGE Options

The options are identical for the SGE, N1GE, SGEEE batch systems. Job name you can provide a job name for the coupled analysis. This setting represents the option -J of the submit command. Queue name you can provide a queue name to submit the job. This setting represents the option -q of the submit command. Name for the stdout output le you can provide a lename for the stdout collected by the batch system. This setting represents the option -o of the submit command.

48 V

MpCCI 3.1.0-1

V User Manual

3.4 Running MpCCI in a Network

Name for the stderr output le you can provide a lename for the stderr collected by the batch system. This setting represents the option -e of the submit command. Change to the working directory of call select this option in order to request the batch system to change to the working directory of the submit call. This setting represents the option -cwd of the submit command. Resource requirements (option -l) you can provide the resource requirement setting for the coupled analysis. This setting represents the option -l of the submit command. Dene the parallel environment option (option: -pe) you can provide the parameter for the parallel environment. This setting represents the option -pe of the submit command. Additional command options you can provide a list of submit options that are not listed here. These options will be passed to the submit command.

MpCCI 3.1.0-1

49

3 Code Coupling Options Details for a LoadLeveler system

V User Manual

Figure 15: LoadLeveler Options

Job name you can provide a job name for the coupled analysis. This setting represents the option job name of the submit command. Job type you can specify the type of the job by selecting the option pvm3, parallel, serial. This setting represents the option job type of the submit command. Name for the stdout output le you can provide a lename for the stdout collected by the batch system. This setting represents the option output of the submit command. Name for the stderr output le you can provide a lename for the stderr collected by the batch system. This setting represents the option error of the submit command.

50 V

MpCCI 3.1.0-1

V User Manual

3.4 Running MpCCI in a Network

Number of nodes [min,max] you can provide the number of nodes to be reserved for the job by specifying an interval[min.max]. This setting represents the option node of the submit command.

MpCCI 3.1.0-1

51

3 Code Coupling Options Details for a GLOBUS system

V User Manual

Figure 16: GLOBUS Options

Hostname to submit the job you can provide the hostname of the GLOBUS factory for job submission. This setting represents the option -F of the submit command. Select the batch system to use you can select the type of scheduler to be used by GLOBUS. This setting represents the option -Ft of the submit command. Name for the stdout output le you can provide a lename for the stdout collected by the batch system. This setting represents the option stdout of the submit command. Name for the stderr output le you can provide a lename for the stderr collected by the batch system. This setting represents the option stderr of the submit command.

52 V

MpCCI 3.1.0-1

V User Manual

3.4 Running MpCCI in a Network

Number of nodes you can provide the number of nodes to be reserved for the job. This setting represents the option count of the submit command. Job type you can provide the type of the job. This setting represents the option jobtype of the submit command. Queue name you can provide the queue name to submit the coupled analysis job. This setting represents the option queue of the submit command. Additional command options you can provide a list of submit options that are not listed here. These options will be passed to the submit command.

MpCCI 3.1.0-1 V

53

3 Code Coupling Submit a job with MpCCI command line The syntax of the command line is the following: MpCCI-batch <BATCH NAME> submit [BATCH-OPTIONS] <project le> with the arguments meaning: <BATCH NAME> represents the name of the batch system e. g. PBS, SGE, etc. [BATCH-OPTIONS] represents a list of the original options of the submit command. <project le> is the project le or a shell script.

V User Manual

If the <project le> is a shell script this will be simply passed to the submit command By using the MpCCI batch command line you have to dene yourself the host allocation for each code. You can pass as [BATCH-OPTIONS] argument the host allocation denition. The variables MPCCI <CODENAME-1> HOSTS="host-a1 host-a2 host-a3..." MPCCI <CODENAME-2> HOSTS="host-b1 host-b2 host-b3 ..." MPCCI SERVER HOSTS="host-c1 host-c2 host-c3 ..." should be given as arguments. (see also 3.4.4.4 Application Specic Code to Host Allocation ). After submitting the job the job id is saved by MpCCI in the directory "<HOME>/.mpcci/batch". You can retrieve the list of submitted with this command: mpcci list jobs which returns the job id with the associated batch system: SGE 1532 PBS 8470 This information can be used to status or kill the job. Here is an example of job submission for SGE: $> mpcci -batch PBS submit -J coupled_test -cwd -pe cre 8 MPCCI_SERVER_HOSTS=/.*/ MPCCI_FEM_HOSTS=/.*/ MPCCI_CFD_HOSTS=/.*/ test.csp and this is the generated script "test.sh" that is given to the submit command: #!/bin/sh #$ -S /bin/sh #$ -v MPCCI_LICENSE_FILE,PATH #$ -cwd

54 V MpCCI 3.1.0-1

V User Manual #$ -N coupled_test #$ -pe cre 8 MPCCI_CFD_HOSTS=/.*/ MPCCI_SERVER_HOSTS=/.*/ MPCCI_FEM_HOSTS=/.*/ export MPCCI_CFD_HOSTS MPCCI_SERVER_HOSTS MPCCI_FEM_HOSTS mpcci batch test.csp Status a job with MpCCI command line Each batch system has a status command: mpcci batch <BATCH NAME> status <JOB ID>

3.4 Running MpCCI in a Network

The job id may be retrieved with the mpcci list jobs . The status command has to be executed on the machine where the job has be submitted. Kill a job with MpCCI command line Each batch system has a kill command: mpcci batch <BATCH NAME> kill <JOB ID> The job id may be retrieved with the mpcci list jobs . The kill command has to be executed on the machine where the job has be submitted.

3.4.4.3 Host management under a Job Scheduler Environment


At startup of a coupled job MpCCI checks if corresponding environment variables LSB MCPU HOSTS PBS NODEFILE PE HOSTFILE LOADL PROCESSOR LIST are dened. MpCCI then uses the listed host names to start MpCCI coupling server and both coupled codes on these hosts.

3.4.4.4 Application Specic Code to Host Allocation


MpCCI allows to specify in more detail the allocation of hosts for specic codes. If environment variables

MpCCI 3.1.0-1

55

3 Code Coupling MPCCI <CODENAME-1> HOSTS = "host-a1 host-a2 host-a3..." MPCCI <CODENAME-2> HOSTS = "host-b1 host-b2 host-b3 ..." MPCCI SERVER HOSTS = "host-c1 host-c2 host-c3 ..."

V User Manual

are set by then the MpCCI startup procedure will allocate the listed hosts for the code represented by the name <CODENAME> or for the server with MPCCI SERVER HOSTS. It is up to the user to dene these environment variables if the MpCCI batch command line is used. Otherwise by submitting the job from MpCCI GUI these environment variables are written in the batch script. Instead of a list of real hostnames a regular Perl-pattern might be used to dene the selection of codespecic hosts extracted from the dened PBS, LSF, SGE or LoadLeveler environment variables: MPCCI <CODENAME-1> HOSTS = /pattern/. <CODENAME-1> must be a word character.

56 V

MpCCI 3.1.0-1

V User Manual

3.5 Mesh Checks

3.5 Mesh Checks


MpCCI oers two sorts of checks for the coupled meshes: Bounding box checks to detect errors in selecting the coupling regions Mesh quality checks to identify misshaped elements which may cause problems for data transfer and simulation.

3.5.1 Bounding Box Checks


The bounding box checks can be selected in the Edit Step of the MpCCI GUI (see 4.5 Edit Step ). For each of the coupled meshes in a coupling region, the bounding box is computed. This box is a rectangular box with sides parallel to the coordinate axes, which contains the whole mesh. The bounding boxes thus represent the total size of the meshes. Three checks are performed if selected: Overlap check. It is checked whether the bounding boxes of the two meshes of a coupling region intersect each other. Scale check. It is check whether the sizes of the bounding boxes of the two meshes are roughly the same. This check is meant to detect errors in unit systems. Coupling region match check. It is checked whether the dimensions of the bounding boxes dier by more than 10% in size and position.

3.5.2 Mesh Quality Checks


The mesh quality checks are performed if the appropriate option is selected in the Edit Step (see 4.5 Edit Step ). There are two kind of checks: Check for doubly dened nodes. It is checked whether all nodes on one partition are distinct from each other. If that is not the case, an error message is given. Check for degenerate elements. The exact check which is performed depends on the element type.

MpCCI 3.1.0-1

57

4 Graphical User Interface

V User Manual

4 Graphical User Interface


4.1 Starting and Exiting MpCCI GUI 4.1.1 Starting MpCCI GUI
When you create a coupled simulation project, the MpCCI GUI generates a set of les containing the denition of the coupled simulation model, e. g. the MpCCI input le and the MpCCI log les. Consequently, before you start the MpCCI GUI, you should move to a directory where you have permission to create les. You execute MpCCI GUI by running the mpcci executable with the gui subcommand and the desired options. Usage: mpcci gui [OPTIONS] [project] [OPTIONS]

Synopsis: mpcci gui is used to launch the MpCCI GUI.

Options: -chwd

<PATH>

Replace the symbolic working directory $(CWD) used inside the projectfile by the absolute pathname specified in the <PATH> argument. This screen. Start the GUI with a new project. Do not check for a license before starting the GUI. This option may be used when no license is available but you would like to prepare a job. Do not ask for ssh assistance if an rsa key file does not exist.

-help -new -nolic

-norsa

To start an MpCCI job in batch mode with a well prepared coupled simulation project use: mpcci -batch <project name> If you start the MpCCI GUI without any options like mpcci gui

58 V

MpCCI 3.1.0-1

V User Manual the following default checks are performed: Check and preparation of your environment.

4.2 MpCCI GUI Menus

A check of your secure shell rsa/dsa key les. If no rsa/dsa key les are found you will be asked to create them. Check for an existing project le in the current directory in order to load that project to the MpCCI GUI. If more than one project le exists no project will be loaded. Check of the license environment. MpCCI GUI tries to check for a license e. g. MPCCI LICENSE FILE and also informs you when your license will soon expire. In order to disable it use the option -nolic . If you do not include the <project name> to the mpcci gui the MpCCI GUI starts at the initial step.

4.1.2 Exiting MpCCI GUI


You can exit the session at any time by selecting FileExit from the main menu bar, by using MpCCI GUI the key shortcut Alt +x or by closing the main window of the MpCCI GUI. If you made any changes to the current coupled simulation project, the MpCCI GUI asks if you want to save the changes before exiting the session. MpCCI GUI then closes the current coupled simulation project le and exits the session.

4.2 MpCCI GUI Menus


Before talking about the menus lets have a look at Figure 1 the title of the MpCCI GUI. The title of the main window of the MpCCI GUI contains the following information: the version of MpCCI you are running, the name of the currently coupled simulation project or noname if no project is specied and the steps of the coupling process with the currently worked on step marked by angle brackets.

Figure 1: MpCCI GUI title and main menus

Below the title we have the MpCCI GUI menus. They are available all the time while MpCCI GUI is running. The main menus, also shown in Figure 2 are:

MpCCI 3.1.0-1

59

4 Graphical User Interface File for creating, opening, saving and exiting a coupled simulation project.

V User Manual

Batch for submitting, querying status and killing a coupled simulation project from a batch queuing system like LSF, PBS, SGE, GLOBUS, etc. . (see also 3.4.4 Coupled Analysis in Batch Mode ) License for managing the MpCCI licenses and displaying detailed license information. Tools for launching various MpCCI commands directly from the MpCCI GUI. Preferences for changing the Look & Feel of the MpCCI GUI. Codes for providing code specic commands. If at most three codes are available the codename menus are directly shown in the menu bar and the Codes menu disappears. Help for requesting help and for getting information about the MpCCI GUI.

Figure 2: File , Batch, License , Tools , Preferences, Codes and Help menus The menu entries are:

4.2.1 File Menu


FileNew Project creates a new project. The MpCCI GUI will be initialized with its default application values and the rst step which is the models step. FileOpen Project opens a project le. A le chooser pops up and you are able to select one of your previously saved projects. The project will be opened at the last step you were. File-Types: Coupled Simulation Project - Files ("*.csp") FileSave Project saves the project. The current project settings are saved under the current project name. This command is available when a project conguration has been opened or if the project already has been saved via FileSave Project As . FileSave Project As saves the project settings under a specied name. The MpCCI GUI displays the Save As dialog box. The active project can be renamed and saved to a new directory. FileExit ends the MpCCI GUI session. MpCCI GUI prompts to save the project with unsaved changes before terminating the application.

60 V

MpCCI 3.1.0-1

V User Manual

4.2 MpCCI GUI Menus

4.2.2 Batch Menu


BatchSubmit submits the current project to the batch queuing system. A conguration dialog pops up and shows the available batch system in a list. By selecting one of the batch system you will be able to congure some options for the job. The conguration dialog is split in three parts (see Figure 3): Application specic host allocation: For each application you are able to provide either a list of hostnames or a regular Perl-pattern. This Pattern will extract automatically the hosts from the batch environment. Batch system selection: You can select a queuing system to use. Specic batch options: You nd a list of option to setup for example the queue, the job name, the output lenames,etc.

Application specic host allocation

Batch system selection Specic batch system options

Figure 3: Batch Submit Conguration Dialog

MpCCI 3.1.0-1

61

4 Graphical User Interface

V User Manual

BatchStatus queries the status of a batch job. You are able to select one of your previously submitted jobs referenced by its job id (see Figure 4).

Figure 4: Batch Status Dialog

BatchKill kills a batch job. You are able to select one of your previously submitted jobs referenced by its job id (see Figure 5).

Figure 5: Batch Kill Dialog

4.2.3 License Menu


LicenseDisplay license servers lists all dened license servers. LicenseDisplay license les lists all local license les dened. LicenseCheck the MpCCI license status displays MpCCI license features and available tokens. LicenseCheck all available licenses displays all license features and available tokens. LicenseMpCCI license expiration date displays the expiration date of the MpCCI license. LicenseStart MpCCI license server starts the FHGSCAI vendor daemon on the local host.

62 V

MpCCI 3.1.0-1

V User Manual

4.3 Models Step

LicenseStop MpCCI license server stops the FHGSCAI vendor daemon running on the local host.

4.2.4 Tools Menu


ToolsPrint environment variables shows a dialog box with the environment used by MpCCI. ToolsDisplay the current process list shows a dialog box with a list of the current processes running on the local system. ToolsDisplay the process list shows the processes running on the local machine. On Windows it runs the taskmgr command and on UNIX systems it runs the top command. ToolsTestMpCCI simple test runs a simple test-case delivered with MpCCI. ToolsVisualizer starts the MpCCI Visualizer.

4.2.5 Preferences Menu


PreferencesLook & Feel allows to change the Look & Feel of the MpCCI GUI. Depending on the underlying Window Manager the available supported Look & Feels can be selected e. g. Metal, CDE/Motif , Windows or Windows Classic

4.2.6 Codes Menu


CodesCodename Provides code specic commands which are dened in the respectively code conguration le (see IX-2.4.2 Codes Menu: <CodesMenuEntries> ).

4.2.7 Help Menu


HelpMpCCI Documentation displays a help window with the MpCCI documentation. HelpAbout displays product information and third party products integrated in the MpCCI GUI.

MpCCI 3.1.0-1

63

4 Graphical User Interface

V User Manual

4.3 Models Step


The MpCCI Models Step is the rst of four steps for setting up a coupled simulation. Its aim is to select the codes involved in the coupling, to choose their corresponding model les and to start the scanner for each code which will extract the components needed to build the coupling regions in the next step, the Coupling Step.

4.3.1 Code Parameters


Additionally some codes may provide some further parameters to be set by the user: e. g. the version or release of the code to run or the unit system to be used for the grid length and quantities. For a description of the code specic parameters have a look at the Codes Manual.

4.3.2 Requirements
In order to proceed with the Coupling Step the following requirements have to be fullled in this Models Step: selection of at least two codes for coupling setting of all required parameters for each code especially the model les successful run of the scanner for each code usage of the same model dimension by the coupled codes All these criteria are checked when clicking on the next button and a dialog with an appropriate message will pop up if the requirements are not fullled. In case of a warning the user may decide to continue with the next step although it is not recommended by MpCCI. If an error occurs the user cant go on before having corrected the complained items.

4.4 Coupling Step


In the MpCCI coupling step you create and congure your coupling regions by 1. Dening coupling regions. 2. Selecting the components for each interconnected code.

64 V

MpCCI 3.1.0-1

V User Manual 3. Specifying the quantities which will be exchanged.

4.4 Coupling Step

These basic steps are described in IV-2.5 Coupling Step Denition of Coupling Regions and Quantities . In addition you may use some more features which are described as follows:

4.4.1 Generate Regions


If you have equally named components between your coupled codes you can automatically generate coupling regions with the equally named components in it. The Generate button at the bottom of the Regions area issues one region for each matching component pair. Now you still have to specify the quantities for each generated region.

4.4.2 Options Part


The Options part below the coupled components list (see Figure 6) provides Synchronized scrolling useful for scrolling large component lists when you are looking for similar named components in both codes. If enabled and you scroll one component list the list with the other code components will be automatically scrolled to the same alphabetical position. Component Name Matching which congures the behavior of the automatic component selection. Automatic component selection means that if you select a component of one code, components of the other code with matching names will be automatically selected, too. Choose None to disable the automatic selection, Similar to automatically select components with similar names (names starting with equal initial letters) and Exact to automatically select components with the exact name of the manually selected component.

Figure 6: Options for choosing coupled components

4.4.3 Quantity properties


In addition to specifying the exchanged quantities you may change some quantity properties in the quantity conguration part of the coupling step (see Figure 7):

MpCCI 3.1.0-1

65

4 Graphical User Interface

V User Manual

Figure 7: Quantity Properties

default value is used by MpCCI when no code specic value is available (see 3.2.4 Orphaned Nodes and Elements ). interpolation type species the type of interpolation MpCCI uses for that quantity. For global quantities the provided interpolation types are min, max, sum and prod. For all other quantities MpCCI provides eld, ux and uxdens (see also 3.2.5 Flux and Field Interpolation ). extrapolate orphans assigns MpCCI to extrapolate values into orphaned regions instead of using the default value (see 3.2.4 Orphaned Nodes and Elements ).

4.4.4 Quantity Sender


Sometimes a quantity can be sent and received by two or more codes. In that case the user has the opportunity to select the sender of the quantity in the Sender part of the quantity conguration as shown in gure Figure 8.

Figure 8: Selection of the Sender for a Quantity

4.4.5 Predened Sets


Furthermore the MpCCI GUI provides some Predened Sets of already precongured quantities at the top of the quantities list (see Figure 9). The predened quantity settings are selectable from a list. To apply a coupling specication you have to select a Coupling Type or a region and click on the Set button. The associated quantities with their sender and receiver codes will be automatically selected. Copy from Region oers the possibility to copy a set of quantity settings from another already dened region of this element type. You may use this option if you have specied the quantities set yourself and want to propagate the conguration to other coupled regions.

66 V

MpCCI 3.1.0-1

V User Manual

4.4 Coupling Step

Figure 9: Coupling Step Options

Select Coupling Type provides dierent coupling types according to the type of the codes you couple. Each provided Coupling Type is characterized by some properties like: the dimension which corresponds to the coupling dimension. the quantities which will be sent by special types of codes. Each code may have assigned more than one type (see IX-2.4 MpCCI GUI Conguration File gui.xcf ). The known code types are: CFD. ElectroMagnetism. FluidPlasma. FluidThermal. InjectionMoulding. Radiation. SolidStructure. SolidThermal. For at least one code type a list of quantities to be sent is associated. Only those coupling types are shown in the list which t to the coupled codes and supported quantities of the coupled simulation setup. This means that each code type in a coupling type has to match at least one coupled code and that all quantities listed for the code type have to be supported as send-quantity by the matching code and as receive-quantity by the other coupled codes. Below the dierent coupling types are listed. Transient electric arc coupling: Method 1 Dimension of coupling region: 3 Code type Quantities to send FluidPlasma ElectrRes3 ElectroMagnetism LorentzForce JouleHeat

MpCCI 3.1.0-1

67

4 Graphical User Interface Transient electric arc coupling: Method 2 Dimension of coupling region: 3 Code type Quantities to send FluidPlasma ElectrRes3 ElectroMagnetism MagneticField CurrentDensity One way force mapping Dimension of coupling region: 2 Code type Quantities to send CFD RelWallForce One way pressure mapping Dimension of coupling region: 2 Code type Quantities to send CFD OverPressure Steady state radiative heat transfer Dimension of coupling region: 2 Code type Quantities to send Radiation WallTemp FluidThermal FilmTemp WallHTCoe Steady state surface heat transfer Dimension of coupling region: 2 Code type Quantities to send SolidThermal WallTemp FluidThermal FilmTemp WallHTCoe Transient MHD Coupling Dimension of coupling region: 3 Code type Quantities to send FluidPlasma ElectrRes3 ElectroMagnetism LorentzForce

V User Manual

68 V

MpCCI 3.1.0-1

V User Manual Transient radiative heat transfer Dimension of coupling region: 2 Code type Quantities to send Radiation WallTemp FluidThermal WallHeatFlux Transient surface heat transfer Dimension of coupling region: 2 Code type SolidThermal Radiation FluidThermal InjectionMoulding Quantities to send WallTemp WallTemp WallHeatFlux WallHeatFlux

4.4 Coupling Step

Absolute pressure based Fluid-Structure Interaction Dimension of coupling region: 2 Code type Quantities to send SolidStructure NPosition CFD WallForce Gauge pressure based Fluid-Structure Interaction Dimension of coupling region: 2 Code type Quantities to send SolidStructure NPosition CFD RelWallForce

4.4.6 Requirements
In the Coupling Step the following requirements have to be fullled: At least one coupling region with at least two components of at least two dierent codes with at least one quantity applied

MpCCI 3.1.0-1

69

4 Graphical User Interface has to be set up.

V User Manual

If one or more of the above mentioned items is missing a click on the next button will cause a dialog popping up with an appropriate message and will inhibit the next step.

70 V

MpCCI 3.1.0-1

V User Manual

4.5 Edit Step

4.5 Edit Step


The options in the Edit Step are the control parameters for MpCCI. They are grouped into control and contact sections.

4.5.1 Control
In this section you may specify some general steering parameters used by MpCCI.

Figure 10: Control Options

Parameter CheckBoundingBox

Description MpCCI will check if the models have the same geometry unit and the same position. This is done by comparing the bounding boxes of the models, see 3.5.1 Bounding Box Checks for details. (Default: on)

MpCCI 3.1.0-1

71

4 Graphical User Interface Parameter Tracele Name Description

V User Manual

Species the name of the MpCCI tracele to be created. If no name or an empty name is specied no tracele will be written. Note: The MpCCI control process is needed for writing a tracele (see 4.6.1 Conguring the MpCCI Coupling Server ). Default: "tracefile.ccv" CloseAfterWriting If the switch is set (default) MpCCI will close the tracele each time after writing data into it. ImplicitCouplingSteps Tells MpCCI whether or not to generate a new coupling step in the tracele during a call of CCI Check convergence . Default: set TraceCommValues If the switch is set (default) in addition to the geometry data, MpCCI will also write communication values into the tracele. TraceMeshValues If the switch is set (default) MpCCI will write communication values of coupling type mesh into the tracele unless the parameter TraceCommValues is switched o. TraceMeshChangeValues If the switch is set (default) MpCCI will write communication values of coupling type mesh change into the tracele unless the parameter TraceCommValues is switched o.

Output level Global

The global output level determines how much output MpCCI writes: 0 no output, 1 message when entering/leaving a subroutine. (default setting) 2 additional input and output arrays (needed for Playback Tool). 3 maximal output.

72 V

MpCCI 3.1.0-1

V User Manual Parameter Mesh quality checkMeshQuality Description

4.5 Edit Step

If the switch is set, MpCCI performs some mesh quality checks during CCI Close setup() and gives a warning if there are badly shaped elements or other inconsistencies of the mesh. The following checks are performed: doubly dened nodes It is checked whether all nodes on one partition are distinct from each other. If that is not the case, an error message is given. degenerate elements For each element it is checked whether its node numbers are distinct from each other. If that isnt the case, a warning is given. By default CheckMeshQuality is turned on. This setting may cause an MpCCI internal problem if the coordinates of the nodes are big. This problem can be avoided by turning the checks o. More details on the checks are given in 3.5.2 Mesh Quality Checks .

Restart le

Name

Access

With the restart le settings the neighborhood relations can be stored in les to be reused and skip the neighborhood search which can be time-consuming. This is described in 3.3.6 Restarting a Coupled Simulation . Name of the restart le(s) keeping the neighborhood relations. If this is xxx e. g. , the restart les will be named xxx.1 , xxx.2 , ... for process 1, 2, ...etc. The default name is "restart.rst". Denes whether the restart les should be ignored, written or read: none ignore restart les (default setting) read read restart les write write restart les

Misc MonitorSleepTime AllowCoreDump

Sets the sleep time for the control process during its monitor loop. The default value is 0.04s. Denes whether or not a core-dump le is written in case of abnormal termination. On default this ag is set.

MpCCI 3.1.0-1

73

4 Graphical User Interface

V User Manual

4.5.2 Contact
In this section you specify the attributes of the grids and dene the contact detection algorithm and matching criterion to use. The algorithms are described in 3.2 Data Exchange .

Figure 11: Contact Options

Parameter SearchAlgorithm

Description Species the contact search algorithm to use: Minimal distance uses the minimal distance algorithm (default). intersection uses a neighborhood search and interpolation based on intersection methods.

74 V

MpCCI 3.1.0-1

V User Manual Parameter Overlap Description Denes the overlap between the codes.

4.5 Edit Step

partial allows that the two coupling regions have only a partial overlap. If this value is set the OrphanedPointsWarning should be switched o. full means that the neighborhood search in MpCCI tries to nd contact for each point and if it is not possible in the rst attempt, MpCCI uses brute force linear search. This is the default value. OrphanedPointsWarning Print warning messages and lists of orphaned nodes into the output les if this switch is set (default). If the overlap is partial this switch should be set o. MpCCI generates pairs of points and elements (non-matching grids) and pairs of points (matching grids) which are located close to each other based on the following settings: Species the search algorithm to use. none No pre-contact search algorithm. This yields brute force linear search for all points. all Pre-contact algorithm that generates all pairs of points and elements. Equivalent to brute force linear search. bucket A bucket search algorithm is used (default). bucket sphquad A bucket search algorithm for a pair of meshes on the sphere consisting of spherical quadrilaterals is used. BboxExpansion MinBboxSize BucketExpansion MinimalDistance Species the size of the bounding box. Default is 1.1 Species the minimal bucket size. Default is 0. Species the size of the bucket. Default is 1.0 Denes the matching criterion for the minimal distance based on local coordinates computation. Elements that not fulll Theta1 db + Theta2 d2 /A + Theta3 d2 /A < Rejection are rejected. t n Weight for the closest barycentric distance db to the element. The default value is 0.0. Weight for the relative in-plane distance dt to the element. The default value is 1.0. Weight for the out-of-plane (normal) distance dn to the element. The default value is 0.0.

PreContactSearch

Algorithm

Theta1 Theta2 Theta3

MpCCI 3.1.0-1

75

4 Graphical User Interface Parameter Rejection InsideOnly

V User Manual Description Denes the rejection criterion. The default value is 0.001 . Disables the shape function extrapolation. Only values from inside an element are transferred. This option avoids negative values when exchanging temperature etc. Default is not set. See 3.2.2 Minimal Distance for details. This should not be used id the quantity NPosition is exchanged.

Intersection PerformTest

denes the matching criteria for the intersection algorithm: If this value is set (which is the default) MpCCI prints warnings if elements fail to match elements on the partner mesh. ScaleResult If this value is set (which is the default) MpCCI scales the size of the overlap for partially intersection border elements to element size. MaxProjectionDistance Denes the maximal projection distance in meters. A negative value means that all distances are accepted. The default value is -1.0 . Note that the projection distance is also limited by the bucket size. MaxProjectionAngle Denes the maximal angle between source and target triangle. The default value is 30.0 . Rejection Denes the rejection criterion for negligible intersection areas. Elements with a smaller intersection area are not considered in the projection. The default value is 0.001 .

4.6 Go Step
In the Go Step you will congure the start-up of the applications. Following is a detailed description of the MpCCI coupling server parameters. The conguration for the analysis codes is described in the appropriate code section of the Codes Manual. How to start, stop and kill the coupled simulation can be found in IV-2.7 Go Step Starting Servers and Codes .

4.6.1 Conguring the MpCCI Coupling Server


For the MpCCI coupling server the following parameters can be congured (see also Figure 12): Filename prex for log les is used as prex to all les generated by MpCCI like "mpccirun.inputfile". Create server log les is used to save all the output from the MpCCI server-processes to les. The log les are named "<Filename prex>.stdout.n" where n is a number from 0 up to the number of server processes - 1. Start additional control process is used to start a process which logs the communication activities of the coupled applications. The logging information is written into the previously mentioned log le with

76 V

MpCCI 3.1.0-1

V User Manual

4.6 Go Step

Figure 12: server settings

number 0. This parameter is also used to start a process which writes the tracele as mentioned in IV-2.6 Edit Step Further Coupling Options and IV-3.1 The MpCCI Visualizer . Create preview tracele only and exit is used to preview the coupled regions for the involving codes. After all codes have started and sent its coupled regions denition to the MpCCI server, a tracele is written and the coupled simulation will terminate. The tracele may be read by the MpCCI Visualizer. Auto force exit jobs on termination tells MpCCI to automatically force an exit of remaining running jobs when one code already exited by itself. Perhaps the remaining jobs are blocked when one job already ended. Usually used in batch mode where the user cant interactively stop or kill running jobs. If this parameter is set the panel expands and shows some more options (see Figure 13): Timeout in seconds species the time to wait between one job is exited and the remaining jobs will

MpCCI 3.1.0-1

77

4 Graphical User Interface

V User Manual

Figure 13: Auto force exit jobs on termination settings

be forced to exit. The default value is 60 seconds. Select 32/64 bit server is used to select the server mode to run on the target platform. 32 bit preferred use the 32 bit server mode if it is supported on this platform. 64 bit preferred use the 64 bit server mode if it is supported on this platform. auto select use automatically the appropriate server mode for the current platform. If both server modes 32/64 bit exist the 64 bit mode will be selected as default. Select server precision is used to dene the computation precision. double use the double precision server. single use the single precision server. auto select use automatically the appropriate server precision for the current platform. If both server precisions single/double exist the double precision server will be selected as default. Using a double precision server will require more memory for the coupling system. Run server processes inside xterm It lets the MpCCI GUI open an xterm window for each MpCCI process on UNIX platforms. On Windows the server will always run inside an xterm window independent of the selection of this option. If this parameter is set the panel expands and shows some more options for conguring the xterm (see Figure 14):

Figure 14: Run server processes inside xterm settings

Auto close xterm at exit automatically closes the xterm when the server exits. If not set the xterm stays open even if the server isnt running anymore and the user can see the messages output by the server.

78 V

MpCCI 3.1.0-1

V User Manual

4.6 Go Step

Select xterm background color provides colors to be used as background for the xterm which sometimes make it easier to nd the right window. Distribute server on remote hosts Congures MpCCI to run in a network. (see Figure 15):

Figure 15: Distribute server on remote hosts settings

Dont run rst server process on the local host is used to start the rst server process on a dierent host than the local host. This rst server process is responsible for listening to the client connection on a specied port. Shared le system (no le copy) means that the underlying le system is a shared le system and le copy isnt necessary. Optional DISPLAY variable sets the DISPLAY variable to redirect the display to the target host. This value must be given as hostname:0.0. Optional local host alias sets a name which is chosen to identify the local host. Optional host host ... to be used provides a list of hosts on which the server processes will be distributed. Optional hostlist le is also used to get a list of hosts on which the server processes will be distributed. Use default hostle use the hostle dened by the MPCCI HOSTLIST FILE environment variable. Preferred remote shell type is used to select the type of the remote shell to start the MpCCI server. rsh (classic rsh) uses the classic remote shell command rsh.

MpCCI 3.1.0-1

79

4 Graphical User Interface ssh (secure shell) uses the secure remote shell command ssh.

V User Manual

Main server port address species the port address on which the MpCCI server listens for the client connection. The default port is in most cases acceptable, modications are only required if rewalls block connections.

4.7 Remote File Browser 4.7.1 File Browser Handling


By clicking on the button Browse the remote le browser opens. After having selected up a le the le

name is displayed in the text eld. If you point the text eld with the mouse pointer a tip appears and indicates the location of the le. This information contains the hostname and the absolute le path. If the eld is empty the tip shows the message no le specied. In the text eld you may enter a le name.

If the name is relative the directory and host of the old le parameter will be taken or if no old le exists the current working directory on the local computer will be taken. Then the le will be located relative to your current working directory. The remote le browser (Figure 16) displays the les of your current directory in the center and on the right it shows a list of dierent le systems mounted to this remote le browser. The current directory is represented by the working directory where the MpCCI GUI is running. After you have selected a rst le for your application the path of this le represent the current directory for your selected code. Each code has its own working directory. The default le system view mounted is your local le system represented by the hostname where the MpCCI GUI is running. If you have more than one le system mounted the current le system is highlighted with a blue background and has the name of the remote machine. The navigation is performed by using the mouse double click. The le selection is performed by doing a double click or a simple click to select it, followed by a click on the Open button.

80 V

MpCCI 3.1.0-1

V User Manual

4.7 Remote File Browser

Figure 16: File Browser

To save a le you have to select the directory by using the mouse and nally enter the le name in the provided text eld followed by a click on the Save button.

4.7.2 How to mount a new le system


On the right side of the remote le browser there are two buttons to Connect and Disconnect a le system. To disconnect a le system from the le browser, select the corresponding le system in the list and click on the Disconnect button. The local le system cannot be disconnected and is represented by the gure Figure 17

Figure 17: Local File System Symbol

MpCCI 3.1.0-1

81

4 Graphical User Interface To mount a new le system: 1. You have to open the connection dialog by clicking on the Connect button. 2. You have to enter the hostname of the remote machine and some user information.

V User Manual

Figure 18: File Browser Connection Dialog

Select your remote machine. At the initialization phase of the MpCCI GUI a list of hosts is searched in the les ".rhosts" and ".shosts" from the user home directory. This list is used to provide some predened hosts to select. You may write the name of the remote machine on the Host text eld. If you type the hostname on the input eld the MpCCI GUI tries to gure out the host name you want from the host list. Otherwise you may directly pick up the machine name to connect to from the combo box. Congure the protocol of the remote connection. You may use ssh service or rsh . Specify the user name. You may modify the user to be used for the connection to the remote machine or let the predened name. After conguring the connection you must click on the OK button to establish the connection. If the connection to the remote host is successfully established, you will see the name of the new remote machine in the list of the le system view and the remote le system. Each remote le system is characterized by the type of the protocol used for the connection. On gure Figure 19 you have the icon for the secure and non secure connection. 3. You have a view on the remote le system and you may navigate to select a le.

82 V

MpCCI 3.1.0-1

V User Manual

4.7 Remote File Browser

Figure 19: Secure Connection Icon (left) and a non secure Connection Icon (right)

MpCCI 3.1.0-1

83

5 Command Line Interface

V User Manual

5 Command Line Interface


5.1 Using the Command Line Interface
MpCCI has an extensive command line interface, which oers a lot of functionality beyond the actual coupling process, including license information, job control etc. To use the command line interface, MpCCI must be installed properly. Especially the PATH environment variable must be set correctly and contain the binary directory "MPCCI HOME/bin", see the Installation Guide for details. To obtain a quick help on the MpCCI commands, it is also possible to enter the command followed by a help key. If you want to get further information e. g. on starting the MpCCI GUI, which is normally done by entering mpcci gui , type mpcci gui -help or mpcci gui ? MpCCI is very exible in interpreting the command line options. In general dashes ( - ) can be omitted and commands or options can be abbreviated as long as the abbreviation is unique. Further, command interpretation is not case sensitive. The following commands are thus all equivalent, and show the expiry date of your license: mpcci mpcci mpcci mpcci license -expire License EXPIRE lic -exp lic e

If less subcommands of options than required are entered, a list of available options is printed. Entering only the command mpcci without further options consequently yields basic information: Version information. Basic usage as described in this section. A list of all available commands. The general description looks like: ************************************************* MpCCI 3.1.0-1, Build (Fri Jan 16 10:57:10 2009)

84 V MpCCI 3.1.0-1

V User Manual (c) 2004-2009 Fraunhofer Institute SCAI Scientific Computing and Algorithms Institute Website: http://www.scai.fraunhofer.de/mpcci Email : mpcci-support *************************************************

5.2 Overview of All Subcommands

Usage: mpcci SUBCMD [OPTIONS] [ARGS] [HELPKEY] ...

Synopsis: mpcci is the root for all MpCCI related commands. You need to specify at least one subcommand (SUBCMD) on the commandline. SUBCMD, OPTIONS (not file name ARGS!) may be typed in lowercase or UPPERCASE letters or may even be abbreviated as long as there is no ambiguity. Since the command and help system is dynamically configured at runtime some SUBCMDS and OPTIONS may not always appear in the list below or may suddenly become ambiguous as they are activated only under certain circumstances (existing file/installation etc.) If you use mpcci in scripts you should never use the abbreviated form of SUBCMD or OPTION. You get online help for most of the SUBCMDS and OPTIONS if the HELPKEY ([-]help, [-/]? ...) appears on the commandline. Please type either "mpcci SUBCMD HELPKEY" "mpcci HELPKEY SUBCMD" or

to get more detailed help on the subcommands.

The list of commands is omitted here, a concise list is given in the following section.

MpCCI 3.1.0-1

85

5 Command Line Interface

V User Manual

5.2 Overview of All Subcommands


In addition to subcommands which are related to the general functions of MpCCI, further code-specic commands are oered, which are described in the corresponding sections of the Codes Manual. The MpCCI commands are discussed in more detail in following sections, which are sorted by the purpose of the commands. To nd a command by its name, the following list shows all MpCCI commands in alphabetical order: Subcommand arch [-n] Short Description Discussed in 5.4.1 mpcci arch on page 98

Print the MpCCI base architecture without a newline or with a newline [-n] at the end and exit. This is dierent from mpcci info arch which prints the used architecture. backup <file ...> Make a backup copy of a list of les. batch <project> Start an MpCCI batch job with project le <project> . clean Remove all les from the temporary MpCCI directory <Home>/.mpcci/tmp . doc View the MpCCI documentation. env Print out the environment used by MpCCI in various formats for further processing. gui Launch the MpCCI GUI. home [-n] Print the MpCCI home directory without a newline or with a newline [-n] at the end and exit. This is in fact a shortcut for mpcci info home . info Print general information about MpCCI. kill Platform independent process kill based on command line pattern matching. license Manage the license server and print license related information. list List information about the MpCCI installation and the supported codes. lmutil Run the FLEXlm lmutil [OPTIONS] command delivered with MpCCI. Avoid running the lmutil command installed by codes other than MpCCI. morpher Launch the MpCCI grid morpher. observe Start the MpCCI le observer. pm Launch the MpCCI project manager.

5.6.1 mpcci backup on page 116 5.6.2 mpcci batch on page 117 5.6.8 mpcci clean on page 124 5.4.2 mpcci doc on page 99 5.4.4 mpcci env on page 102 5.3.1 mpcci gui on page 89 5.4.5 mpcci home on page 104

5.4.3 mpcci info on page 100 5.6.9 mpcci kill on page 125 5.5.1 mpcci license on page 107 5.5.2 mpcci list on page 108 5.5.3 mpcci lmutil on page 109

5.3.2 mpcci morpher on page 90 5.3.3 mpcci observe on page 93 5.3.4 mpcci pm on page 94

86 V MpCCI 3.1.0-1

V User Manual Subcommand ps ptoi server ssh test top update vis where <CMD> xterm Short Description Unix ps -ef compatible ps for all platforms. Convert an MpCCI project le into an MpCCI input le. Start the MpCCI server and control processes. Check/x your ssh installation. Run some install/communication tests. Display process top list / Launch the taskmanager. Update check on the MpCCI installation. Launch the MpCCI visualizer. Find all locations of the executable <CMD> in the PATH. Start a process inside an xterm.

5.2 Overview of All Subcommands Discussed in 5.6.10 mpcci ps on page 127 5.6.11 mpcci ptoi on page 128 5.6.12 mpcci server on page 129 5.5.4 mpcci ssh on page 110 5.5.5 mpcci test on page 111 5.6.13 mpcci top on page 135 5.5.6 mpcci update on page 114 5.3.5 mpcci vis on page 95 5.4.6 mpcci where on page 105 5.3.6 mpcci xterm on page 96

MpCCI 3.1.0-1

87

5 Command Line Interface

V User Manual

5.3 Starting MpCCI


The commands in this section start the dierent parts of MpCCI. Besides the actual coupling engine, MpCCI oers several helper applications. Subcommand Short Description gui morpher observe pm vis xterm Launch the MpCCI GUI. Launch the MpCCI grid morpher. Start the MpCCI le observer. Launch the MpCCI project manager. Launch the MpCCI visualizer. Start a process inside an xterm. Discussed in 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 mpcci mpcci mpcci mpcci mpcci mpcci gui on page 89 morpher on page 90 observe on page 93 pm on page 94 vis on page 95 xterm on page 96

88 V MpCCI 3.1.0-1

V User Manual

5.3 Starting MpCCI

5.3.1

mpcci gui

Usage: mpcci gui [OPTIONS] [project] [OPTIONS]

Synopsis: mpcci gui is used to launch the MpCCI GUI.

Options: -chwd

<PATH>

Replace the symbolic working directory $(CWD) used inside the projectfile by the absolute pathname specified in the <PATH> argument. This screen. Start the GUI with a new project. Do not check for a license before starting the GUI. This option may be used when no license is available but you would like to prepare a job. Do not ask for ssh assistance if an rsa key file does not exist. 4

-help -new -nolic

-norsa

The MpCCI GUI is started with this command, i. e. the MpCCI GUI pops up, which is described in Graphical User Interface .

MpCCI 3.1.0-1

89

5 Command Line Interface

V User Manual

5.3.2

mpcci morpher

Usage: mpcci morpher [LAUNCH-OPTIONS] <model-name> [OPTIONS]

Synopsis: mpcci morpher is used to start an MpCCI grid morpher daemon.

LAUNCH-OPTIONS: -help -lhost:[user@]hostname -lprec:d -lprec:s

This screen. Launch the morpher on the remote host. Use double precision version of the morpher. Use single precision version of the morpher.

Grid morpher daemon 2.0, single precision Build Dec 8 2008, 12:40:25 Copyright (c) 2004-2008, FhG SCAI. License checkout... Your license will expire in 8016 days.

Usage: mpcci_morpher-64s.exe model [OPTIONS] Options: #d=decimal, #f=float, #s=string, #c=char Options to control the deformation of edges -enocheck Skip all edge checks -rlen[gth] #f #f Min/max allowed relative length change of an edge 0.0 < Min length < 1.0 1.0 < Max length < ? -alen[gth] #f #f Min/max allowed absolute edge length Options to control the deformation of faces -fnocheck Skip all face checks -rar[ea] #f #f Min/max allowed relative change of face area 0.0 < Min area < 1.0 1.0 < Max area < ?

90 V MpCCI 3.1.0-1

V User Manual -aar[ea] #f #f -fas[pect] #f -fsk[ew] #f Min/max allowed absolute face area Max. allowed face aspect ratio [1..500] Max. allowed skewness of faces [0.5..0.99]

5.3 Starting MpCCI

Options to control the deformation of cells -cnocheck Skip all cell checks -rvol[ume] #f #f Min/max allowed relative change of cell volume 0.0 < Min volume < 1.0 1.0 < Max volume < ? -avol[ume] #f #f Min/max allowed absolute cell volume -cas[pect] #f Max. allowed cell aspect ratio [1..50] -csk[ew] #f Max. allowed skewness of cells [0.5..0.99] Options to control the handling of boundaries -dbl[ayers] #d Deformed boundary layer level: [0...512] -fbl[ayers] #d Fixed boundary layer level: [0...512] -fixreg[ion] #d Add non default fixed boundary regions #d is the region number -fltreg[ion] #d Add non default floating boundary regions #d is the region number -corner #f Angle to make node floating along boundaries #f [0.0...20.0] is the angle in degree the angle should not be larger than 5.0 deg Options to control the morpher -once #s #s Morph only once: infile.vrt outfile.vrt -steps #d No. of steps for once morphing -damp[ing] #f Level damping factor [0.0...0.5] -diag[onal] Take care for shear in quad faces and hexahedral cells -iter[ations] #d Max. no. of iterations: [0...?] -tol[erance] #f Convergence tolerance: ]0.0...0.3] -mrelax #f Morphing relaxation factor: ]0.0...2.0] -local Avoid a global distribution of deformations -mina[ngle] #f Min. angle allowed in faces and cells #f [5.0...30.0] is the angle in degrees Options to control the smoother -smooth #d No. of smooth sweeps -srelax #f Smoothing relaxation factor: ]0.0...2.0] Auxiliary options

MpCCI 3.1.0-1

91

5 Command Line Interface -port -debug -h[elp] -out[put] #d Port number for socket communications Save a -morph.vrt file after morphing This screen and exit Information output level: [f|v|d|q] f = full, verbose + displacements received v = verbose q = quiet d = default between quiet and verbose List setup and exit Scale vertices read by factor #f Set waiting timeout in seconds, 0=never timeout Do not check the limits of any parameter

V User Manual

#c

-s[etup] -sca[le] #f -wait #d -noparamcheck

92 V

MpCCI 3.1.0-1

V User Manual

5.3 Starting MpCCI

5.3.3

mpcci observe

Usage: mpcci observe [-help] file file file ....

Synopsis: mpcci observe is used to launch the file observer. The file observer waits until the file exists and then displays the tail of the file in a separate xterm. Just try the observer.

MpCCI 3.1.0-1

93

5 Command Line Interface

V User Manual

5.3.4

mpcci pm

Usage: mpcci pm [-help]

Synopsis: mpcci pm is used to launch the project MpCCI manager. Just try the pm.

There are no further options: The MpCCI Project Manager is a tool to keep an overview of the MpCCI projects in your home-directory. It oers possibilities to edit les, create, start and delete projects, etc. . The MpCCI Project Manager is described in 8 MpCCI Project Manager .

94 V

MpCCI 3.1.0-1

V User Manual

5.3 Starting MpCCI

5.3.5

mpcci vis

Usage: mpcci vis [tracefile]

Synopsis: mpcci vis is used to launch the MpCCI tracefile visualiser.

Options: -help

This screen.

The MpCCI Visualizer is suitable for quickly checking whether the coupling process was successful. The coupling region, orphaned nodes and exchanged quantities can be checked to ensure that a coupling has really occurred. A description of the MpCCI Visualizer is given in 6 MpCCI Visualizer .

MpCCI 3.1.0-1

95

5 Command Line Interface

V User Manual

5.3.6

mpcci xterm

Usage: mpcci xterm [[xterm]OPTIONS] -cmd <cmd ...>

Synopsis: mpcci xterm is in fact a wrapper for the standard X11 xterm command which is used to run a command <cmd ...> inside a new window, the xterm. Unlike the X11 xterm [OPTIONS] -e <commandline> the xterm is launched as a background process and the xterm remains opened after the command exited. mpcci xterm is also available under MS Windows. The input stream to the <cmd ...> may be redirected and be read from the file -input <FILE>. In addition, if -log <FILE> is not empty or "-", a copy of the xterm output is logged into the file <FILE>. The command <cmd ...> may contain several arguments, therefore the item -cmd <cmd ...> must be the last one.

Options: (all options not listed below are passed to the xterm command): -cmd <cmd ...> Command to fire up. -display <DISPLAY> Set DISPLAY before. -help This screen. -home <HOME> Set the start directory to <HOME>. -input <FILE> Redirect stdin to <FILE>. -log <FILE> Redirect stdout via |tee <FILE>. -rev Use reverse colors. -title <TITLE> Define the title of the xterm.

96 V

MpCCI 3.1.0-1

V User Manual

5.4 Information and Environment

5.4 Information and Environment


The commands in this section can be used to obtain information about MpCCI and the environment. Subcommand Short Description arch [-n] Print the MpCCI base architecture without a newline or with a newline [-n] at the end and exit. This is dierent from mpcci info arch which prints the used architecture. doc View the MpCCI documentation. env Print out the environment used by MpCCI in various formats for further processing. home [-n] Print the MpCCI home directory without a newline or with a newline [-n] at the end and exit. This is in fact a shortcut for mpcci info home . info Print general information about MpCCI. where <CMD> Find all locations of the executable <CMD> in the PATH. Discussed in 5.4.1 mpcci arch on page 98

5.4.2 mpcci doc on page 99 5.4.4 mpcci env on page 102 5.4.5 mpcci home on page 104

5.4.3 mpcci info on page 100 5.4.6 mpcci where on page 105

MpCCI 3.1.0-1

97

5 Command Line Interface

V User Manual

5.4.1

mpcci arch

mpcci arch is simply a shortcut for mpcci info arch , see also 5.4.3 mpcci info on page 100. mpcci arch prints the MpCCI architecture token of the platform on which it is run. A list of architecture tokens is given in the Release Notes.

98 V

MpCCI 3.1.0-1

V User Manual

5.4 Information and Environment

5.4.2

mpcci doc

This command can be used to view MpCCI documentation, the available documentation can be listed with the option -list . The documentation is located in the "<MpCCI home>/doc" directory and can be accessed directly as well. Currently two kinds of documentation are available:
mpcci doc Flexlm enduser Guide mpcci doc MpCCIdoc

The FLEXlm End Users Guide

The MpCCI documentation.

MpCCI 3.1.0-1

99

5 Command Line Interface

V User Manual

5.4.3

mpcci info

The mpcci info command is used to obtain information on the environment that is used by MpCCI: Usage: mpcci info [-]OPTIONS

Synopsis: mpcci info is used to print single tokens to stdout for the further use in scripts or .bat files...

Options: -arch -arch32 -arch64 -build -help -home -java -javaver -jobid -liba32 -liba64 -make -patches -perl -perlinc -perlver -release -remcp -remsh -rshtype -userid -version

MpCCI basic architecture token. MpCCI 32 bit architecture token. MpCCI 64 bit architecture token. Build date of the installed MpCCI release. This screen. MpCCI home path. Java command used by MpCCI. Java version of the java command. Jobid used by MpCCI. Pathname of the 32 bit libmpcci.a (if available). Pathname of the 64 bit libmpcci.a (if available). Make command used by MpCCI. Patchlevel of the installed MpCCI release. Pathname of the perl command used by MpCCI. @INC list used by Perl. Version of the running Perl. Full MpCCI release token. Pathname of remote copy command used by MpCCI. Pathname of remote shell command used by MpCCI. MpCCI server remote shell type used. Userid used by MpCCI. X.Y version number of the installed MpCCI release.

The options -arch , -arch32 and -arch64 list the architecture token of the machine. This token is used to distinguish between dierent hardware and operating systems. MpCCI has its own tokens for identication, which may dier from those used by the coupled codes. A list of the architecture tokens is given in the Release Notes.

100 V

MpCCI 3.1.0-1

V User Manual

5.4 Information and Environment

Information on the releases and version number of MpCCI are obtained with -build , -release and -version . The option -userid prints the user which is running MpCCI, i. e. your current user name. This can be useful to check user names on remote machines. The job id can be obtained with -jobid , it is composed of the user name and a time-dependent value, thus changes with every call of MpCCI, but is kept during one run. MpCCI uses external software installed on your system. Sometimes several versions are installed, thus it is important to know which was found by MpCCI: Java is needed for the MpCCI GUI (see 4 Graphical User Interface ), the full path to the Java executable is obtained with -java , the version of java which was found is obtained with -javaver . See also III-10 Installing Java . Perl The path to the Perl executable is obtained with -perl , the version with -perlver , and -perlinc lists the @INC of Perl, which is a list of directories, which is searched for Perl modules. See also III-9 Installing Perl . rsh -rsh gives the path to the remote shell rsh. There are two types of remote shells rsh and ssh. The type which is currently used by MpCCI is shown by -rshtype . The remote shell can be changed by setting the MPCCI RSHTYPE to either type. See 2.7.4 Remote Shell and Remote Copy for more information on remote shells. rcp Gives the path to the rcp command, see also 2.7.4 Remote Shell and Remote Copy .

MpCCI 3.1.0-1

101

5 Command Line Interface

V User Manual

5.4.4

mpcci env

mpcci env is a lookup-function for environment variables. Its sole purpose is to print a list of all environment variables, which are relevant for MpCCI. More information on these environment variables is given in 2.3 Environment and Environment Variables . This command is useful for debugging. The list can be formatted in various formats for use in shell scripts. Usage: mpcci env [[-]FORMAT]

Synopsis: The MpCCI environment is set up at runtime and contains all informations about your system required by MpCCI. mpcci env is used to print out the MpCCI environment in various formats for the further processing in shell scripts or in a MS Windows batch file. mpcci env is used internally by MpCCI to fetch information about the MpCCI configurations on remote hosts.

Examples: To save the MpCCI environment in a file which may be sent for support reasons type "mpcci env pretty > mpcci_env.txt"

Supported formats: -bash UNIX bash format -bat MS-DOS .BAT format -csh UNIX csh format -help this screen -java Java properties format -ksh UNIX ksh format -perl Perl expression format -plain plain format -pretty human readable format (default) -sh UNIX sh format -tcsh UNIX tcsh format

102 V

MpCCI 3.1.0-1

V User Manual -xml XML similar format

5.4 Information and Environment

MpCCI 3.1.0-1

103

5 Command Line Interface

V User Manual

5.4.5

mpcci home

Prints the full path of the MpCCI home directory. All les which belong to the MpCCI distribution are located in this directory. With mpcci home the path is given without a trailing newline character, whereas mpcci home -n yields the same path followed by a newline character. The path to the MpCCI home directory is stored in the environment variable MPCCI HOME during a run of MpCCI.

104 V

MpCCI 3.1.0-1

V User Manual

5.4 Information and Environment

5.4.6

mpcci where

Usage: mpcci where [-help] command ...

Synopsis: mpcci where is used to list all commands found by investigating the "PATH" environment variable. This is useful to find out whether MpCCI catches the correct executable file from the "PATH". Sometimes the "PATH" should be reordered to help MpCCI find the command really needed. For some important commands MpCCI has build in alternative methods to find the correct executable. In this case the result of where does not show the executable selected by MpCCI.

Examples: To find the location of the mpcci command please type "mpcci where mpcci"

MpCCI 3.1.0-1

105

5 Command Line Interface

V User Manual

5.5 Installation and Licensing


The commands in this section are needed to check the validity of an installation, also including license information. Subcommand Short Description license list lmutil Manage the license server and print license related information. List information about the MpCCI installation and the supported codes. Run the FLEXlm lmutil [OPTIONS] command delivered with MpCCI. Avoid running the lmutil command installed by codes other than MpCCI. Check/x your ssh installation. Run some install/communication tests. Update check on the MpCCI installation. Discussed in 5.5.1 mpcci license on page 107 5.5.2 mpcci list on page 108 5.5.3 mpcci lmutil on page 109

ssh test update

5.5.4 mpcci ssh on page 110 5.5.5 mpcci test on page 111 5.5.6 mpcci update on page 114

106 V

MpCCI 3.1.0-1

V User Manual

5.5 Installation and Licensing

5.5.1

mpcci license

Usage: mpcci license [-pN] [-tT] [-]OPTION ...

Synopsis: mpcci license is used to manage the MpCCI licenses and to display detailed license information.

Options: -all -avail -clean -expire -files -help -info -local -log -mpcci -pN

-restart -servers -start -stop -sysid -tT

-vars

List all features of all available licenses. Brief display the no. of MpCCI sessions and processes available. Remove all local MpCCI license logfiles. Display the expiration date of the MpCCI license. List all local license files defined. This screen. Print MpCCI related summary. MpCCI feature overview for licenses on the local host. Display the MpCCI related license logfiles. MpCCI feature overview for all hosts in a network. Redefines the port number N used with the FHGSCAI license server. The current port for FHGSCAI is "-p47000". If used this option must be the first on the commandline. Restart the FHGSCAI license server on the local host. List all defined license servers "[port]@host". Start the FHGSCAI license server on the local host. Stop the FHGSCAI license server running on the local host. MpCCI system ID used for generating a license file. Set license request timeout to T seconds. If used this option must be the first/second on the commandline. List the relevant environment variables xxx_LICENSE_FILE.

MpCCI 3.1.0-1

107

5 Command Line Interface

V User Manual

5.5.2

mpcci list

Usage: mpcci list [-]OPTIONS

Synopsis: mpcci list is used to list information about the MpCCI installation.

Options: -archs -batchsystems -codes -help -hosts -jobs

List all installed MpCCI architectures. List all installed batch systems. List installed simulation codes found by MpCCI. This screen. List default hostlist entries. List all submitted batch jobs.

108 V

MpCCI 3.1.0-1

V User Manual

5.5 Installation and Licensing

5.5.3

mpcci lmutil

lmutil - Copyright (c) 1989-2006 Macrovision Europe Ltd. and/or Macrovision Corporatio n. All Rights Reserved. usage: lmutil lmborrow -status lmutil lmborrow -clear lmutil lmborrow {all|vendor} dd-mmm-yyyy:[time] lmutil lmborrow -return [-c licfile] [-d display_name] [-fqdn] feature lmutil lmdiag [-c licfile] [-n] lmutil lmdown [-c licfile] [-q] [-all] [-vendor name] [-force] [-help] lmutil lmhostid [-internet|-user|-display|-n| -hostname|-hostdomain|-string|-long] lmutil lminstall [-i infile] [-o outfile] [-overfmt {2, 3, 4, 5, 5.1, 6, 7.1, 8}] [-odecimal] [-maxlen n] lmutil lmnewlog [-c licfile] vendor new-file, or lmutil lmnewlog [-c licfile] feature new-file lmutil lmpath -status lmutil lmpath -override {all | vendor } path lmutil lmpath -add {all | vendor } path lmutil lmremove [-c licfile] feature user host display lmutil lmremove [-c licfile] -h feature host port handle lmutil lmreread [-c licfile] [-vendor name] [-all] lmutil lmswitchr [-c licfile] vendor new-file, or lmutil lmswitchr [-c licfile] feature new-file lmutil lmstat [-c licfile] [lmstat-args] lmutil lmswitch [-c licfile] vendor new-file, or lmutil lmswitch [-c licfile] feature new-file lmutil lmver flexlm_binary lmutil -help (prints this message) lmutil utility_name -help (display detailed usage information)

MpCCI 3.1.0-1

109

5 Command Line Interface

V User Manual

5.5.4

mpcci ssh

Usage: mpcci ssh [-]OPTIONS

Synopsis: mpcci ssh is used to check/update the secure shell (ssh) installation and settings. Some ssh settings should be done to avoid password requests for each MpCCI process launched on the local or remote hosts when using the secure shell (ssh/scp) set of commands for remote shell and remote file copy. If you prefer to use the classic rsh/rcp set of commands please make sure that in your remote hosts file "<Home>/.rhosts" the local and all the remote hosts used by MpCCI are listed.

Options: -all -env -help -keygen -mode

Run all the checks below. Update the MpCCI environment variables in the ssh login environment file. This screen. Check/generate an ssh key for the local host to avoid password requests. Test the ssh daemon configuration for "StrictModes".

110 V

MpCCI 3.1.0-1

V User Manual

5.5 Installation and Licensing

5.5.5

mpcci test

Usage: mpcci test [OPTIONS] hostname ... hostlist ... hostfile ... [-simple]

Synopsis: mpcci test is used to perform various tests: - MpCCI local and remote installation - Remote host connections - Perl environment - etc. The remote hostnames may be specified in various formats. hostname: [user@]host hostlist: [user@]host[:[user@]host[:...]]... hostfile: filename with hostnames (like .rhosts) For each host ... - test whether the hostname is resolved by the DNS. - test whether the host is alive and reachable. - test possibility of rsh/ssh connections to the remote host. - brief test on MpCCI installation on the remote host from the local host - test server-client connection on ports 47111 ++ - write a protocol hostfile "mpcci.hostlist" which can be used as an MpCCI hostfile.

Examples: Run a simple testcase delivered with the MpCCI installation: on the local host: on various hosts : mpcci test -simple mpcci test testhost mpcci@server.com -simple

Test the MpCCI access and communication with remote systems: mpcci mpcci mpcci mpcci mpcci test test test test test [OPTIONS] [ [user@]host[:[user@]host[:...]]] | hostfile ... ] fred@flintstone.family:wilma@flintstone.family fred@trex.farm bmw@stone-cars.manufactory flintstone.hostlist aquarium whale@waterworld.future:shark@zoo ~/.rhosts ~/.shosts brontosaurus@jurassic-park.vision

MpCCI 3.1.0-1

111

5 Command Line Interface

V User Manual

Options: -connect <port@hostname> INTERNAL USE ONLY: for remote communication test.

-help This screen.

-known Test if each host is already known to ssh.

-listen <port> INTERNAL USE ONLY: for remote communication test.

-modload Load/compile all eventually MpCCI used Perl modules for a validation and exit. This test may help while you are integrating your code into MpCCI or to figure out if some common Perl modules are not installed on your system.

-port <port> Set the client/server communication port no. (default=47111).

-remote <hostname> For cases with VPN connections, IPSEC tunneling, and NAT translation: <hostname> is the name or dotaddress of the local host seen from the remote hosts. Redefine the local

112 V

MpCCI 3.1.0-1

V User Manual hostname if necessary. e.g. -rem 192.168.2.16 or -rem myvpnhost.company.com

5.5 Installation and Licensing

-rsh Test only rsh type connections.

-sharedfs When launching the MpCCI server processes and distributed domain solver applications on multiple hosts certain configuration files need to be accessed from the remote hosts. If there is a common (network) file system and your home directory or the job directory is a shared directory there is no need to distribute any file to the remote hosts.

-simple Run a simple testcase delivered with MpCCI. -simple must be the last option of the commandline.

-ssh Test only ssh type connections.

-wait Wait after each error or warning.

MpCCI 3.1.0-1

113

5 Command Line Interface

V User Manual

5.5.6

mpcci update

Usage: mpcci update [OPTION]

Synopsis: mpcci update is used to check or update the MpCCI installation from the MpCCI web-server. Before you download any file first run a check. If the list of files is large it may be faster to download a complete new version or patchlevel of MpCCI. Please make sure that you have write access rights to your local MpCCI installation directory and to all files before you start the download of new files.

Options: -count

is used to count the number of updated files which might be required by your local MpCCI installation. is used to download the latest updated files. An MpCCI user name is required for the download.

-download

-list

is used to query the MpCCI web-server for a list of updated files which might be required by your local MpCCI installation.

114 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

5.6 Job Control


During a coupled analysis it is often necessary to keep control of the dierent jobs which are started. The commands in this section help with starting, controlling and interrupting calculations. Subcommand Short Description Discussed in 5.6.1 mpcci backup on page 116 5.6.2 mpcci batch on page 117 5.6.8 mpcci clean on page 124 5.6.9 mpcci kill on page 125 5.6.10 mpcci ps on page 127 5.6.11 mpcci ptoi on page 128 5.6.12 mpcci server on page 129 5.6.13 mpcci top on page 135

backup <file ...> Make a backup copy of a list of les. batch <project> Start an MpCCI batch job with project le <project> . clean Remove all les from the temporary MpCCI directory <Home>/.mpcci/tmp . kill Platform independent process kill based on command line pattern matching. ps Unix ps -ef compatible ps for all platforms. ptoi Convert an MpCCI project le into an MpCCI input le. server Start the MpCCI server and control processes. top Display process top list / Launch the taskmanager.

MpCCI 3.1.0-1

115

5 Command Line Interface

V User Manual

5.6.1

mpcci backup

Usage: mpcci backup file [file [file

...]]]

Synopsis: mpcci backup is used to copy one or more files into backup files adding an additional free suffix ".bakNNN". This is a system independent backup copy command.

Examples: mpcci backup path/to/file.ext

=>

path/to/file.ext.bak000

116 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

5.6.2

mpcci batch

In the usage output you can see if a queuing system has been detected by MpCCI. To access the specic queuing system command help, execute MpCCI batch <Batch Name> . Usage: mpcci mpcci mpcci mpcci mpcci mpcci mpcci mpcci mpcci

batch batch batch batch batch batch batch batch batch

[OPTIONS] <projectname> TORQUE ... OPENPBS ... N1GE ... LSF ... PBS ... PBSPRO ... GLOBUS ... LOADLEVELER ...

Synopsis: mpcci mpcci mpcci mpcci mpcci mpcci mpcci mpcci mpcci

batch is used to start an MpCCI job in batch mode. batch TORQUE is used to control a TORQUE batch job. batch OPENPBS is used to control a OPENPBS batch job. batch N1GE is used to control a N1GE batch job. batch LSF is used to control a LSF batch job. batch PBS is used to control a PBS batch job. batch PBSPRO is used to control a PBSPRO batch job. batch GLOBUS is used to control a GLOBUS batch job. batch LOADLEVELER is used to control a LOADLEVELER batch job.

Options: -chwd

<PATH>

Replace the symbolic working directory $(CWD) used inside the projectfile by the absolute pathname specified in the <PATH> argument. This screen. GLOBUS batch system control. LOADLEVELER batch system control. LSF batch system control. N1GE batch system control.

-help globus loadleveler lsf n1ge

MpCCI 3.1.0-1

117

5 Command Line Interface

V User Manual

openpbs pbs pbspro torque See

OPENPBS batch system control. PBS batch system control. PBSPRO batch system control. TORQUE batch system control. for details.

3.4.4 Coupled Analysis in Batch Mode

118 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

5.6.3

mpcci batch LSF

Usage: mpcci batch LSF submit [BATCH-OPTIONS] <projectname> mpcci batch LSF status <jobid> mpcci batch LSF kill <jobid>

Synopsis: mpcci batch LSF is used to manage an MpCCI job running under LSF.

Batch commands: -help kill <jobid>

This screen. Kill a LSF batch job. Display a LSF batch job status. Submit a LSF MpCCI job.

status <jobid> submit [BATCH-OPTIONS] <projectname> See 3.4.4 Coupled Analysis in Batch Mode

for details.

MpCCI 3.1.0-1

119

5 Command Line Interface

V User Manual

5.6.4

mpcci batch PBS

The following PBS family queuing system are also available and supported by MpCCI: PBS OpenPBS PBSPro Torque Usage: mpcci batch PBS submit [BATCH-OPTIONS] <projectname> mpcci batch PBS status <jobid> mpcci batch PBS kill <jobid>

Synopsis: mpcci batch PBS is used to manage an MpCCI job running under PBS.

Batch commands: -help kill <jobid>

This screen. Kill a PBS batch job. Display a PBS batch job status. Submit a PBS MpCCI job.

status <jobid> submit [BATCH-OPTIONS] <projectname> See 3.4.4 Coupled Analysis in Batch Mode

for details.

120 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

5.6.5

mpcci batch N1GE

The following Sun Grid Engine family queuing system are also available and supported by MpCCI: SGE N1GE SGEEE Usage: mpcci batch N1GE submit [BATCH-OPTIONS] <projectname> mpcci batch N1GE status <jobid> mpcci batch N1GE kill <jobid>

Synopsis: mpcci batch N1GE is used to manage an MpCCI job running under N1GE.

Batch commands: -help kill <jobid>

This screen. Kill a N1GE batch job. Display a N1GE batch job status. Submit a N1GE MpCCI job.

status <jobid> submit [BATCH-OPTIONS] <projectname> See 3.4.4 Coupled Analysis in Batch Mode

for details.

MpCCI 3.1.0-1

121

5 Command Line Interface

V User Manual

5.6.6

mpcci batch LoadLeveler

Usage: mpcci batch LOADLEVELER submit [BATCH-OPTIONS] <projectname> mpcci batch LOADLEVELER status <jobid> mpcci batch LOADLEVELER kill <jobid>

Synopsis:

mpcci batch LOADLEVELER is used to manage an MpCCI job running under LOADLEVELE

Batch commands: -help kill <jobid>

This screen. Kill a LOADLEVELER batch job. Display a LOADLEVELER batch job status. Submit a LOADLEVELER MpCCI job.

status <jobid> submit [BATCH-OPTIONS] <projectname> See 3.4.4 Coupled Analysis in Batch Mode

for details.

122 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

5.6.7

mpcci batch GLOBUS

Usage: mpcci batch GLOBUS submit [BATCH-OPTIONS] <projectname> mpcci batch GLOBUS status <jobid> mpcci batch GLOBUS kill <jobid>

Synopsis: mpcci batch GLOBUS is used to manage an MpCCI job running under GLOBUS.

Batch commands: -help kill <jobid>

This screen. Kill a GLOBUS batch job. Display a GLOBUS batch job status. Submit a GLOBUS MpCCI job.

status <jobid> submit [BATCH-OPTIONS] <projectname> See 3.4.4 Coupled Analysis in Batch Mode

for details.

MpCCI 3.1.0-1

123

5 Command Line Interface

V User Manual

5.6.8

mpcci clean

Usage: mpcci clean

Synopsis: mpcci clean is used to remove ALL files from the temporary MpCCI directory which is currently "<Home>/.mpcci/tmp".

Options: -help

This screen.

124 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

5.6.9

mpcci kill

Usage: mpcci kill [OPTIONS] <pattern1> <pattern2> ...

Synopsis: mpcci kill is used to kill processes whose commandline matches a character pattern. The commandline is read via the "ps -ef" command which is also available under Microsoft Windows. The <patterns> are strings of printable characters, e.g. a piece of the name or an option of a running program. If the <pattern> is a decimal number it will be assumed that this number is a true process id (PID) and not a command line pattern. The options -i, -v and -q (see below) are mutually exclusive. The the last option on the commandline overwrites the others. mpcci kill is self protecting in case of pattern matching: You may kill your whole family (childs, brother, sisters, aunts and uncles), but never yourself and your parents and grandparents ... mpcci kill is also used internally by MpCCI to kill a group of MpCCI processes on the local or remote hosts.

Examples: Kill all MpCCI related processes: "mpcci kill mpcci_" Kill process with PID 1234: "mpcci kill 1234"

Options: -f <prefix>

Special definition of process ids. Collects all files with name "<prefix>.<PID>" where <PID> is a number and is interpreted as a process id. The files "<prefix>.<PID>" are deleted afterwards. Typically, they are only indicator files of size 0 which were

MpCCI 3.1.0-1

125

5 Command Line Interface created by touch. Their only purpose is the definition of PIDs via their suffix. -help -i This screen. Interactive confirmation (default): Individually confirm each process found. Quiet kill, no confirmation and no printout. Recursively kill all processes specified via PID or pattern AND all their descendants (children, grandchildren, ...). <SIG> Send signal <SIG> to the processes instead of killing them with signal 9 (KILL). Verbose printout, no confirmation: Print a list of process ids before killing them.

V User Manual

-q -r

-s

-v

126 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

5.6.10

mpcci ps

Usage: mpcci ps [PATTERNS]

Synopsis: mpcci ps is a platform independent Unix style "ps -ef [|grep PATTERN]" mpcci ps is also available under MS Windows!

Examples: List all processes, run ps -ef: "mpcci ps" List all MpCCI related processes: "mpcci ps mpcci" List all processes under your account: "mpcci ps <user name>"

Options: -help

This screen.

MpCCI 3.1.0-1

127

5 Command Line Interface

V User Manual

5.6.11

mpcci ptoi

Usage: mpcci ptoi [OPTIONS] <file> <file> ...

Synopsis: mpcci ptoi is used to convert an MpCCI project file (suffix .csp) into an MpCCI inputfile (suffix .cci). The name of the new MpCCI input file is the same than of the project file plus a .cci suffix. After a successful conversion you may use the created input file to add further options which are not supported by the MpCCI GUI and to launch the MpCCI server with the modified input file.

Options: -help -overwrite

This screen. Allow overwrite of an existing MpCCI inputfile.

128 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

5.6.12

mpcci server

Usage: mpcci server [OPTIONS]

MpCCI-inputfile|projectfile

Synopsis: mpcci server is used to start the MpCCI server and control processes on the local host or as an alternative distributed on multiple hosts in a network.

Options: -32 Prefer to run the 32 bit versions of the server and control processes. This option should be used if the default is 64 bit mode but the processor architecture supports 32 bit executables only. If 32 bit executables are not available this option is silently ignored.

-64 Try to run the 64 bit versions of the server and control processes. This option should be used if the default is 32 bit mode but the 64 bit processor performance is better than 32 bit. If 64 bit executables are not available this option is silently ignored.

-control Start the MpCCI control process in parallel to the servers. The control process gets automatically started with the -preview option used for debugging (see below).

-display <DISPLAY> Redirect the xterm output to the given display <DISPLAY>. Microsoft Windows with local MpCCI/xterm emulation:

MpCCI 3.1.0-1

129

5 Command Line Interface This X11 feature is ignored. A new console window will always pop up on your local machine and the MPICH daemon collects the server output in this single console. The current setting is DISPLAY=localhost:10.0

V User Manual

-double Launch the double precision version of the server.

-help Prints this screen only and exits.

-hostalias <hostname> For cases with VPN connections, IPSEC tunneling and NAT translation. <hostname> is the name or dotaddress of the local host seen from the remote hosts.

-hostfile <hostfile> Distribute the server and control processes on multiple hosts. The <hostfile> contains pairs of hostname and optional username entries hostname [username]

like the .rhosts file used by the remote shell commands rsh or ssh. Hosts specified via the -hostfile option are merged with hosts specified via the -hostlist option.

-hostlist <hostlist> Distribute the server and control processes on multiple hosts. The <hostlist> is just a list of hostnames separated by a : [user@]host1[:[user@]host2][:[user@]host3]....

130 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

Hosts specified via the -hostlist option are merged with hosts specified via the -hostfile option.

-log Log the output of the server and control processe in files named <prefix>.stdout.<processrank> The <prefix> is specified with the option -prefix (see below).

-nocodeid Relevant in the cases where a code has no code id resp. code name. The server ignores the code name (=code idstring) and assumes the codes are started resp. get a connection to the MpCCI server in the same order they appear in the MpCCI inputfile.

-nolocal Relevant under UNIX only, ignored under Microsoft Windows. Even if a list of hosts is specified via the -hostlist or -hostfile options per default the first MpCCI server/control process is started on the local host. With this option the first process is started on the first host from the hostlist, whether local or remote.

-port <N> Specifies an alternative TCP/IP port number <N> for the initial communication between the leading MpCCI server and the clients. The default port no. is 47111.

-prefix <prefix>

MpCCI 3.1.0-1

131

5 Command Line Interface

V User Manual

Specify a different name prefix for MpCCI output files. The output file names are <prefix>.something.<processrank>. The default <prefix> is "mpccirun".

-preview Skips the MpCCI internal neighborhood search after the geometry was send to the server. The server then writes all geometry data into the given tracefile and exits the coupled computation. The tracefile can be used to visualize the meshes in the coupling regions.

-rsh Use the (rsh/rcp) set of commands instead of the secure shell. The current default setting is defined by the environment variable MPCCI_RSHTYPE=rsh

-sharedfs When launching the MpCCI server processes and distributed domain solver applications on multiple hosts specified via the -hostxxxx options certain configuration files need to be accessed from the remote hosts. If there is a common (network) file system and your home directory or the job directory is a shared directory there is no need to distribute any file to the remote hosts with the remote copy command "/usr/bin/rcp". If this options is not specified, MpCCI copies all required files (for MpCCI and for each code) to the remote hosts automatically.

-single Launch the single precision version of the server.

132 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

-ssh Use the secure shell set of commands (ssh,scp) instead of the standard settings (rsh,rcp). The current default setting is defined by the environment variable MPCCI_RSHTYPE=rsh

-tmpdir <dir> Dependend on the platform MpCCI creates small temporary files (shell scripts or .BAT files with few lines only) and logging output. The default -tmpdir is defined by the environment variable MPCCI_TMPDIR=<Home>/.mpcci/tmp and should be located on your local system. With -tmpdir you specify an alternative directory for temporary files.

-xterm All Unix systems: Run the control and all server processes in separate X11 xterms. Microsoft Windows with local MpCCI/xterm emulation: A new console window is opened and the mpich daemon collects the output even from remote systems in the new console window.

-xtermbg <color> Set xterm background color, e.g. "-xtermbg blue".

-xtermfg <color> Set xterm foreground(text) color, e.g. "-xtermfg green".

MpCCI 3.1.0-1

133

5 Command Line Interface

V User Manual

Microsoft Windows with local MpCCI/xterm emulation: This xterm color is only valid for the master process and the MPICH daemon sets the text color automatically.

-xtermopt <opt> Add additional X11 xterm options <opt>, e.g. "-geometry WxH -132". Please use only X11 xterm options valid for the local xterm command. Microsoft Windows with local MpCCI/xterm emulation: All X11 xterm options may also be used since the MpCCI/xterm emulation simply ignores any unsupported option.

134 V

MpCCI 3.1.0-1

V User Manual

5.6 Job Control

5.6.13

mpcci top

Usage: mpcci top

Synopsis: "mpcci top" displays the process list: If it is available the Unix top command is launched in a separate xterm. On Windows systems the taskmanager may be launched if top is not available.

Options: -help

This screen.

MpCCI 3.1.0-1

135

6 MpCCI Visualizer

V User Manual

6 MpCCI Visualizer
The MpCCI Visualizer is suitable for quickly checking whether the coupling process was successful. The coupling region, orphaned nodes and exchanged quantities can be checked to ensure that a coupling has really occurred.

6.1 Using the MpCCI Visualizer 6.1.1 Data Flow


code A adapter quantities MpCCI Server copy of quantities interpolation of quantities code B adapter quantities MpCCI Server copy of quantities

Control Process

tracele

MpCCI Visualizer

Figure 1: Data ow for the MpCCI Visualizer. A copy of the exchanged data is sent to the Control Process, which writes it to the tracele. During the MpCCI coupling process, the data exchange between the coupled codes can be observed. The exchanged data can be collected by an additional control process, who writes the data into a tracele, which can nally be read directly by the MpCCI Visualizer for ".ccv". For the MpCCI Visualizer for ".vtfx" the tracele has to be converted into the VTFx format. The tracele is only written, if the control process is started. This is achieved by selecting the option Start additional control process in the Go Step of the MpCCI GUI. See IV-2.7 Go Step Starting Servers and Codes for a description of the Go Step and Getting Started for a general description of the coupling process. The name of the tracele is set in the Edit Step of the MpCCI GUI. The default name is "tracefile.ccv", which is saved in the same directory as the corresponding project (".csp") le.

136 V

MpCCI 3.1.0-1

V User Manual

6.2 MpCCI Visualizer for .ccv

More and more data is added to the tracele during the coupling process. The le can already be opened before the process is nished to check data during the process. The visualizer can only read data from the tracele, not manipulate of write data.

6.1.2 Supported Platforms


The MpCCI Visualizer is included in the MpCCI downloads. The MpCCI Visualizer for ".ccv" is available for almost all platforms, MpCCI runs on. The MpCCI Visualizer for ".vtfx" is at present only available on Microsoft Windows and Linux platforms. Please see the Release Notes for a list of platforms.

6.1.3 Starting the Visualizer


The MpCCI Visualizer can be started from the command-line with mpcci vis [<tracefile>] where an optional lename can be given as well as from the MpCCI GUI menu by selecting ToolsVisualizer . If no lename is given, the visualizer starts without opening a le. If available the MpCCI Visualizer for ".vtfx" will be chosen. Then a program is automatically called which converts the "file.ccv" into the VTFx format ("file.vtfx"). But if the VTFx viewer isnt available on the currrent platform MpCCI Visualizer for ".ccv" will be chosen. The command mpcci vis -h or mpcci vis -help shows a short help text.

6.2 MpCCI Visualizer for .ccv


After starting the MpCCI Visualizer for ".ccv", the Control Window pops up. If a le is selected, the Viewer Window will be opened as well. The Control Window is for selecting the data to be displayed, whereas the Viewer Window oers controls to change the way in which the data is displayed including scaling and moving the meshes, showing vertices, edges or cells etc.

6.2.1 Control Window


The Control Window is shown in Figure 2. At the top of the window, the name of the tracele is displayed, here "wing.ccv". There are only three menu entries: FileOpen Opens the le dialog window. Select a tracele and press the Open button to read the information from the tracele.

MpCCI 3.1.0-1

137

6 MpCCI Visualizer

V User Manual

Figure 2: Control Window of the MpCCI Visualizer for ".ccv"

FileExit Exits the MpCCI Visualizer. HelpAbout Shows the version information. Below the menu, there are several buttons: Context Not used for standard coupling procedures. Step The time step of the computation. Information of the exchanged Quantities is saved in every time step. Select the step you want to see, the display in the Viewer Window should change accordingly. The number of steps which were found in the tracele is shown at the right, in Figure 2, the coupling steps range from 0 to 8 and step 3 is selected. Button Key < Description

Play backward, i. e. the step is decreased continuously. Space Stop, i. e. the play process is stopped at the current step. 138 V MpCCI 3.1.0-1

V User Manual Button Key > + 8 Description

6.2 MpCCI Visualizer for .ccv

Play forward, i. e. the step is increased continuously. Go to the next step. Go to the previous step. Loop forever, i. e. if the play forward-button is pressed, the loop will not stop at the last step, but the step is decreased again (play back) up to step 0, then the step is increased. . . . The MpCCI Visualizer continues playing until the stop button is pressed. Open/close the Viewer Window.

The list of quantities consists of some entries, which are always present and the quantities which are exchanged in the coupling process. (Strictly speaking, not all entries are really quantities). If an item is not bold, no data is available for that quantity. In Figure 2, the tracele contains no orphaned nodes and three data-sets, mesh change, rotation1/rotation2 and force1/force2. Codes Display the codes in dierent colors. You can then select the codes with the pick buttons, see below. Processes Display the processes of each code in dierent colors. This allows to see the partitions of the codes in parallel applications. Meshes Display the meshes in dierent colors. Partitions Display the partitions in dierent colors. Orphaned Nodes Displays orphaned nodes. Normal nodes have the value 0, whereas orphaned nodes have the value 1. If no orphaned nodes are present, the entry in the quantity list is not bold and the color bar at the bottom of the Viewer Window only covers values very close to zero. Exchanged Quantities Below the standard entries, the entries for the quantities follow. This depends on the quantities selected in the MpCCI GUI, see IV-2.5 Coupling Step Denition of Coupling Regions and Quantities . If dierent quantity names are used by the codes for the same quantity, both names are displayed together, separated by a /. and unpick

6.2.2 Viewer Window


The Viewer Window is shown in Figure 3. The big display shows the selected quantities on the mesh, here an aircraft wing1 . The color bar at the bottom of the window maps the colors to the numerical values of
1 Special

thanks to DLR German Aerospace Center, Institute of Aeroelasticity in Gttingen for providing the aircraft wing o data-set

MpCCI 3.1.0-1

139

6 MpCCI Visualizer

V User Manual

Figure 3: Viewer Window of the MpCCI Visualizer for ".ccv"

the selected quantity. The status bar at the bottom of the Viewer Window shows the displayed quantity at the left, viewing mesh change step 3 in Figure 3 and the sums of the numbers of elements at the right, i. e. both meshes together have 109 264 elements and 54 728 nodes in Figure 3. The menu entries of the Viewer Window are: FileClose Closes the Viewer Window. The window can be reopened with the Window. button in the Control

OptionsRange. . . Opens the range control box. In the range control box, minimum and maximum values for the coloring of the models can be selected. All areas with values beyond the selected limits are colored in blue (beyond minimum) or red (beyond maximum). This menu option is disabled for Codes, Processes, Meshes and Partitions.

140 V

MpCCI 3.1.0-1

V User Manual

6.2 MpCCI Visualizer for .ccv

HelpKeys. . . Opens a help window, which explains the use of keyboard and mouse (also explained below). HelpAbout Shows the MpCCI Visualizer version information. The mouse buttons can be used directly within the display area of the Viewer Window with the following functions: Left mouse button Rotate Rotate the objects by moving the mouse while pressing the left mouse button. Middle mouse button Move Objects move together with the mouse pointer while the middle button is pressed. If you have a wheel mouse, you can also press the wheel to move objects. Wheel rotation has no eect. Right mouse button Resize If you move the mouse upward while keeping the right mouse button pressed, objects will be enlarged. Moving down scales objects down. Double-click Select Double-click any mouse button to select a code, mesh or partition. Same as the button. The actual selection is displayed at the top left of the viewing area.

Surface

Wireframe

Points

Figure 4: Display modes of the MpCCI Visualizer for ".ccv" In the toolbar, a number of buttons are available. The following list describes the functionality of these buttons and corresponding keys. The keys are also marked at the top left corner of the buttons. Toggle options are marked with (on/o), which means the option can be switched o by pressing the button again. In addition to the keys below, the Control Window keys can be used in the Viewer Window as well.

MpCCI 3.1.0-1

141

6 MpCCI Visualizer

V User Manual

Flat shading

Gouraud shading

Centers

Vectors

Figure 5: Data display options of the MpCCI Visualizer for ".ccv"

Button

Key

Description 4): Surface representation. Show the surfaces of the meshes. Wireframe representation. Show only the edges of the meshes. Point representation. Show only the vertices of the mesh.

Display modes (Figure S W P Shading (Figure 5): F G

Flat shading. Colors may change suddenly at element borders. Gouraud shading. Colors are smoothed at element borders.

Data options (Figure 5): Cell centers. Display points at the centers of cells. (on/o) C Vector data. Display vector data as vectors. (on/o) V Continuous data. Display continuous data on vertices, edges or surfaces. D If this option is switched o, the mesh is not drawn. (on/o)

142 V

MpCCI 3.1.0-1

V User Manual

6.2 MpCCI Visualizer for .ccv

Button Key Description Relative motion: The mesh of the second code is moved relatively to that of the rst. +x move. Move in positive x-direction. X + Shift X x move. Move in negative x-direction. +y move. Move in positive y-direction. Y + Shift Y y move. Move in negative y-direction. +z move. Move in positive z-direction. Z + Shift Z z move. Move in negative z-direction. Reset motion. Move meshes to their actual positions. The key is the digit zero, not the letter o! Selection: Pick a code/mesh/partition. This button can be pressed several times: First it is for selecting the code. Pressing again allows you to select the mesh . . . . A selection can also be made by double-clicking any mouse button. unpick. Cancel the last selection, i. e. if a mesh was selected previously, pressing the unpick-button will show both meshes again. Toggle background color: white, gray or black. Reset view. Resizes the meshes to t into the window and redraws the screen.

U Miscellaneous: B R

MpCCI 3.1.0-1

143

6 MpCCI Visualizer

V User Manual

6.3 MpCCI Visualizer for VTFx


At present only an online ducumentation is available for the MpCCI Visualizer for ".vtfx".

144 V

MpCCI 3.1.0-1

V User Manual

7 MpCCI Grid Morpher

7 MpCCI Grid Morpher


Please see 5.3.2 mpcci morpher for more information.

MpCCI 3.1.0-1

145

8 MpCCI Project Manager

V User Manual

8 MpCCI Project Manager

Figure 1: MpCCI Project Manager

The MpCCI Project Manager requires the installation of Perl/Tk, which is not needed for other parts of MpCCI. Perl/Tk is a separate module for Perl, which can be downloaded from www.cpan.org. See also III-9 Installing Perl for information on the installation of Perl

146 V

MpCCI 3.1.0-1

V User Manual

8 MpCCI Project Manager

The MpCCI Project Manager is a tool to keep an overview of the MpCCI projects in your home-directory. It oers possibilities to edit les, create, start and delete projects, etc. . If you start the MpCCI Project Manager with the command mpcci pm the MpCCI Project Manager scans your home-directory for MpCCI les, i. e. "*.csp"-les, the MpCCI project les which contain the denitions of the coupling process (see 2.4.1 MpCCI Project Files ) and "*.cci"les, the MpCCI input les, which are read by the MpCCI server (see 2.4.2 MpCCI Server Input Files ). These les are listed in the main window, which is shown in Figure 1. The list consists of three columns. In the rst, the name of the project le is displayed, the second shows the coupled codes (Figure 1 shows only dummy codes). The location, i. e. the path to the codes, is shown in the last column. Clicking on a le name selects the le. A selected le is highlighted in the main window as "flap.csp" in Figure 1. Double clicking on a le name will open a separate window, which shows the context of the le in text form. The MpCCI Project Manager oers several functions in the button bar on the right hand side of the main window. If you move the mouse pointer over a button, the button function is shown in the status bar at the bottom of the main window. New Start the MpCCI GUI without any project, i. e. start a new project. Setting up a new project is described in Getting Started. Gui Start the MpCCI GUI with the selected project le. Batch Run the selected project in batch mode. This is the same as entering mpcci batch <lename> , see also 5.6 Job Control . This allows to quickly rerun a project without starting the MpCCI GUI. Server Start the MpCCI server process with the selected MpCCI input le. This only starts the server, thus the coupled codes must be started separately. Observe Observe the output les of a running simulation. This feature is currently not available. Edit Edit the selected project le with the editor vi. This only works if vi is available on your computer, which is the case on most UNIX/Linux platforms. Delete Delete the selected project le and remove it from the projects list. This really removes the le from the hard disk, so be careful using this button! Save Store the current project list. The list is saved to the le "HOME/.mpcci/Projects". Rescan Rebuild the project list by scanning the le system. The HOME directory is searched again for project les and the list is updated.

MpCCI 3.1.0-1

147

8 MpCCI Project Manager

V User Manual

Environment Display the MpCCI related environment variables in a separate window. This is the same as entering mpcci env in the shell, see 2.3 Environment and Environment Variables for a description of the environment. Processes Display a list of all processes running on the local machine in a separate window. This is the same as entering mpcci ps in the shell. Exit Exit the Project Manager.

148 V MpCCI 3.1.0-1

MpCCI 3.1.0

MpCCI

VI Codes Manual

MpCCI 3.1.0-1 Documentation Part VI Codes Manual PDF version January 20, 2009

MpCCI is a registered trademark of Fraunhofer SCAI www.scai.fraunhofer.de/mpcci

Fraunhofer Institute
Algorithms and Scientic Computing Fraunhofer Institute for Algorithms and Scientic Computing SCAI Schloss Birlinghoven, 53754 Sankt Augustin, Germany Abaqus and SIMULIA are trademarks or registered trademarks of Dassault Syst`mes e ANSYS is a registered trademark of Ansys, Inc. FLUENT is a registered trademark of Fluent Inc. FLUX is a registered trademark of Cedrat of Grenoble, France ICEPAK is a registered trademark of Fluent Inc. MSC.Marc is a registered trademark of MSC.Software Corporation PERMAS is a registered trademark of Intes GmbH STAR-CD is a registered trademark of CD adapco Group RadTherm is a registered trademark of ThermoAnalytics Inc. FLEXlm is a registered trademark of Macrovision Perl has a copyright by Larry Wall and others ActivePerl has a Community License Copyright of Active State Corp. OpenSSH has a copyright by Tatu Ylonen, Espoo, Finland Java is a registered trademark of Sun Microsystems, Inc. MPICH-1 and MPICH-2 has a copyright by University of Chicago and Mississippi State University Linux is a registered trademark of Linus Torvalds UNIX is a registered trademark of The Open Group Windows, Windows XP and Windows Vista are registered trademarks of Microsoft Corp.

VI Codes Manual

Contents

VI Codes Manual Contents


1 1.1 1.2 2 2.1 Overview Common MpCCI Subcommands for Simulation Codes . . . . . . . . . . . . . . . . . . . . . . Unit Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Abaqus Quick Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 2.1.2 2.1.3 2.1.4 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.3 2.4 2.5 2.6 3 3.1 Supported Coupling Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Platforms and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Post-Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 9 11 12 12 12 12 13 13 14 14 14 15 16 17 19 20 21 21 22 22 23 24 24 24 24 24 25 26 Supported Coupling Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Platforms and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Code-Specic MpCCI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 2.5.1 Prerequisites for a coupled simulation . . . . . . . . . . . . . . . . . . . . . . . . . . Patched Input File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Adapter Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Trouble shooting, open issues and known bugs ANSYS Quick Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 3.1.2 3.1.3 3.1.4

3.2

Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI 3.1.0-1

VI 3

Contents 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3 3.4 4 4.1

VI Codes Manual Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . APDL Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 29 33 34 36 37 38 39 40 40 40 40 40 41 41 41 44 44 45 46 47 48 48 48 48 48 49 49 49 51 51

Code-Specic MpCCI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Adapter Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Flowmaster Quick Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 4.1.2 4.1.3 4.1.4 Supported Coupling Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Platforms and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4.2

Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 4.2.2 4.2.3 4.2.4

4.3 4.4 5 5.1

Code-Specic MpCCI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FLUENT Quick Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 5.1.2 5.1.3 5.1.4 Supported Coupling Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Platforms and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5.2

Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 5.2.2 5.2.3

VI

MpCCI 3.1.0-1

VI Codes Manual 5.2.4 5.2.5 5.3 5.4

Contents 54 56 61 62 62 63 66 66 66 66 66 66 67 67 68 72 72 74 75 76 76 76 78 78 78 78 78 79 80 80 80

Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Code-Specic MpCCI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Adapter Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.1 5.4.2 The MpCCI UDF Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UDF-Hooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6 6.1

FLUX Quick Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 6.1.2 6.1.3 6.1.4 6.2 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.3 6.4 6.5 Supported Coupling Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Platforms and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . pyFlux script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Code-Specic MpCCI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4.1 Prerequisites for a coupled simulation . . . . . . . . . . . . . . . . . . . . . . . . . . Code Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MSC.Marc

7 7.1

Quick Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.1 7.1.2 7.1.3 7.1.4 Supported Coupling Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Platforms and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7.2

Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.1 7.2.2

MpCCI 3.1.0-1

VI 5

Contents 7.2.3 7.2.4 7.2.5 7.2.6 7.3 7.4 Coupling Step

VI Codes Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 82 82 83 84 85 85 86 86 86 86 86 87 88 88 89 89 90 92 94 95 96 97 97 97 97 97 97 98 98 98

Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Post-Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Code-Specic MpCCI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Code Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.1 Prerequisites for a coupled simulation . . . . . . . . . . . . . . . . . . . . . . . . . .

8 8.1

PERMAS Quick Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1 8.1.2 8.1.3 8.1.4 8.2 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.2.6 8.3 8.4 Supported Coupling Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Platforms and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Post-Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Code-Specic MpCCI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Trouble shooting, open issues and known bugs RadTherm

9 9.1

Quick Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1.1 9.1.2 9.1.3 9.1.4 Supported Coupling Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Platforms and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9.2

Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.2.1 9.2.2

VI

MpCCI 3.1.0-1

VI Codes Manual 9.2.3 9.2.4 9.2.5 9.2.6 9.3 10 Coupling Step

Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 99 99

Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Post-Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

Code-Specic MpCCI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 STAR-CD 103

10.1 Quick Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 10.1.1 Supported Coupling Schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 10.1.2 Supported Platforms and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.1.3 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.1.4 Adapter Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.2 Coupling Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.2.1 Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 10.2.2 Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 10.2.3 Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 10.2.4 Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 10.2.5 Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 10.2.6 Post-Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 10.3 Code-Specic MpCCI Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 10.4 Grid Morphing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 10.4.1 MpCCI Grid Morpher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 10.4.2 Restart with MpCCI Grid Morpher . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 10.4.3 pro-STAR Grid Morpher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 10.5 Code Adapter Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 10.5.1 STAR-CD 3.26 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 10.5.2 STAR-CD 4.0x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 . . . . . . . . . . . . . . . . . . . . . . . . . 127 10.5.3 Automatic model preparation for STAR-CD 3.26 and STAR-CD 4.0x . . . . . . . . . 125 10.6 Trouble shooting, open issues and known bugs

MpCCI 3.1.0-1

VI 7

1 Overview

VI Codes Manual

1 Overview
This codes manual contains simulation code-specic information. There is one chapter for each code, which contains basic information on the code itself and what you should know for preparing a model and running a co-simulation. This Code Manual cannot replace the actual manuals of the simulation codes. References to further information in the code manuals are given as necessary. The information given for each code is given in the same structure: Quick Information Basic properties of the simulation code. Coupling Process How to prepare and run a model for co-simulation, including code-specic options in the MpCCI GUI. Code-Specic MpCCI Commands Subcommands mpcci <code name> which are needed to get information on the simulation code and prepare models for co-simulation. A number of subcommands is available for several codes, these are described in 1.1 Common MpCCI Subcommands for Simulation Codes . Code Environment Requirements for installation, licensing and further software needed by the simulation code. Code Adapter Reference Short description of the code adapter.

VI

MpCCI 3.1.0-1

VI Codes Manual

1.1 Common MpCCI Subcommands for Simulation Codes

1.1 Common MpCCI Subcommands for Simulation Codes


mpcci <codename> -releases

The -releases subcommand prints a short list of all available releases of a simulation code.
mpcci <codename> -info

The -info subcommand prints a more detailed list of the available releases of a simulation code and on the corresponding code adapter. The output looks as follows: > mpcci simulationcode info SIMULATIONCODE release "3.1": HOME: "/opt/simulationcode/sim-3.1" EXEC: "/opt/simulationcode/sim-3.1/bin/start-code" ARCH: "linux86" MpCCI adapter release "3.1": ** NOT INSTALLED ** HOME: "/home/fritz/mpcci/codes/SIMULATIONCODE/adapters" PATH: "/home/fritz/mpcci/codes/SIMULATIONCODE/adapters/3.1/linux86" SIMULATIONCODE release "2.99": HOME: "/opt/simulationcode/sim-2.99" EXEC: "/opt/simulationcode/sim-2.99/bin/start-code" ARCH: "linux86" MpCCI adapter release "2.99": HOME: "/home/fritz/mpcci/codes/SIMULATIONCODE/adapters" PATH: "/home/fritz/mpcci/codes/SIMULATIONCODE/adapters/2.99/linux86" Latest SIMULATIONCODE release for MpCCI found: "2.99" Two versions of the code are installed, but a code adapter is only available for version 2.99. Therefore the latest simulation code release which can be used with MpCCI is version 2.99. HOME is the main directory of a code installation or adapter, EXEC the code executable and PATH the path to the code adapter, which does not exist if an adapter is not available. The architecture toke given under ARCH is the codes architecture token.

MpCCI 3.1.0-1

VI 9

1 Overview
mpcci <codename> -align <ARGS>

VI Codes Manual

The mpcci <codename> -align command is used to perform a coordinate transformation. This can be necessary if the coordinate system of the model diers from that of the partner code. The usage is as follows: Usage: mpcci SIMULATIONCODE align

<plane-definition-file>

<input-file>

<outputfile>

Synopsis: mpcci SIMULATIONCODE align is used to align/transform the nodal coordinates in the <input-file> so that they match with the coordinate system used by the coupling partner. The transformed result is written into the <outputfile> - which is identical to the <input-file> except the nodal point coordinates. The homogenious 4x4 transformation matrix resp. the reference coordinate systems used are indirectly defined via two planes. Each plane is defined via three non colinear points p1, p2 and p3. The six points that define the two planes are specified in the <plane-definition-file> which contains 18 floating point values in the following order: # SIMULATIONCODE p1-x p1-y p2-x p2-y p3-x p3-y source plane specified via 3 point coordinates p1-z p2-z p3-z

# Target coupling partner code plane specified via 3 point coordinates p1-x p1-y p1-z p2-x p2-y p2-z p3-x p3-y p3-z The transformation matrix determined transforms the SIMULATIONCODE plane into the "target" plane (rotation and scaling, but without shear) so that: SIMULATIONCODE(p1) -> coupling partner(p1) SIMULATIONCODE(p2) -> coupling partner(p2)

10 VI MpCCI 3.1.0-1

VI Codes Manual SIMULATIONCODE(p3) -> coupling partner(p3)

1.2 Unit Systems

To use mpcci SIMULATIONCODE align please just select three characteristic points in your SIMULATIONCODE model and the corresonding points in the partner model and copy the x-y-z values into the <plane-definition-file> in the above order.
mpcci <codename> -scan <model le>

The -scan starts the scanner for a model le, which writes basic information about the model into the scan le "mpcci <model le>.scan". After creating the le, its content is printed on the screen. If the scan le "mpcci <model le>.scan" exists already, no new scanning process is started, instead only the content is printed.

1.2 Unit Systems


Many simulation codes do not use a given system of units, but do not consider units at all. This has the advantage that users can select any consistent set of units, dene all values in this system and will also receive the values in this system. For coupling a unit-less code with codes which are based on a specic system of units, MpCCI must know which system of units was used to create the model. MpCCI supports the following unit systems, for each system some units are listed. Of course there are more units in each system, please see what is selected in the MpCCI GUI. unit system mass length time forces el. current temperature SI kg m s N A K British lbm ft s lbf A K cgs g cm s dyn Bi K SI-mm-t-s t mm s N A K US-ft-lbf-s slug ft s lbf A K US-in-lbf-s lbf s2 /in in s lbf A K Alternatively, you can also select the option variable, which allows you to select units individually for each quantity. However, for each quantity only a limited set of units is oered! : The British unit system as dened in the MpCCI GUI is not a consistent unit system some of the electromagnetic units are inconsistent! Use at own risk.

MpCCI 3.1.0-1

VI 11

2 Abaqus

VI Codes Manual

2 Abaqus
2.1 Quick Information
Physical Domains Company Name Company Homepage Support SolidStructure, SolidAcoustics, SolidThermal SIMULIA www.simulia.com abaqus.custhelp.com

2.1.1 Supported Coupling Schemes


The coupling schemes supported by Abaqus depend on the version: Abaqus Version Abaqus 6.6 Abaqus 6.7 Abaqus 6.8 Transfer after solution before solution before solution

Abaqus supports subcycling in both versions, unidirectional and bidirectional transfer is possible. For Abaqus 6.7 and Abaqus 6.8 after completing the last increment a nal exchange, which is inverted regarding the initial exchange, is accomplished. Initial Transfer receive send skip exchange Final Transfer send receive -

2.1.2 Supported Platforms and Versions


MpCCI 3.1.0 supports Abaqus 6.7, Abaqus 6.8 and most features of Abaqus 6.6.

12 VI

MpCCI 3.1.0-1

VI Codes Manual supported versions MPCCI ARCH 6.6 6.7-1 6.7-2 6.8-1 6.8-2 aix52 power X X aix53 power X X hpux1123 ia64 X X X X hpux11 parisc X X irix65 mips4 X linux amd64 X linux em64t X linux ia64 X X X X linux x64 X X X X linux x86 X X X X X mswin x86 X X X X X xp64 amd64 X xp64 em64t X xp64 x64 X X X X

2.1 Quick Information

platform aix52 power aix53 power hpux1123 ia64 hpux11 parisc irix65 mips4 linux amd64 linux em64t linux ia64 linux x64 linux x86 mswin x86 xp64 amd64 xp64 em64t xp64 x64

Please see also the System Information section of the Support page at www.simulia.com for details on the platforms supported by Abaqus.

2.1.3 References
Abaqus Version 6.7 and 6.8 Documentation The Abaqus documentation is part of your Abaqus installation. Read especially the section Co-simulation of the Abaqus Analysis Users Manual. Abaqus Fluid-Structure Interaction Users Guide This guide is available via the Abaqus support homepage abaqus.custhelp.com: Log into Abaqus Answers and search for FSI guide. Besides general information, the FSI guide contains several examples of coupled simulations with Abaqus and FLUENT, Abaqus and STAR-CD.

2.1.4 Adapter Description


The code adapter for Abaqus is developed by SIMULIA in cooperation with Fraunhofer SCAI. The adapter is distributed as part of the Abaqus software.

MpCCI 3.1.0-1

VI 13

2 Abaqus

VI Codes Manual

2.2 Coupling Process


Please read also IV-2 Setting up a Coupled Simulation .

2.2.1 Model Preparation


The Abaqus model can be prepared with Abaqus/CAE or as an input le. Please consider the following advice: The model can be dened in any of the consistent systems of units supported by MpCCI (see 1.2 Unit Systems ). The basic unit system must be given in the Models Step of the MpCCI GUI. Units of single quantities can be set in the Coupling Step. Most Abaqus features can be used in co-simulations. Please see the Abaqus documentation or contact the Abaqus support for further information. The Abaqus model must contain a denition of coupling components. This can be either an elementbased surface for surface coupling : Abaqus/CAE: Create a surface using the Surfaces tool. See also 13.7.6 Using sets and surfaces in the Assembly module in the Abaqus/CAE Users Manual. You can also use surfaces dened in the Part module. Input le: A surface is created with *SURFACE, NAME=<surface name>, TYPE=ELEMENT , see section 2.3.3 Dening element-based surfaces of the Abaqus Analysis Users Manual. The surface which serves as coupling component can be selected in the Models Step of the MpCCI GUI. Code coupling is only run in one step of a simulation (for coupling in several steps, please use a restart). The co-simulation step is selected in the Go-Step of the MpCCI GUI. It is recommended to create a complete Abaqus model rst and test it separately without co-simulation. The quantities which will be transferred by the partner code can be simulated by appropriate loads or boundary conditions.

2.2.2 Models Step


In the models step, the following options must be chosen: Please select the Abaqus release Select the Abaqus release you wish to use. Only supported releases installed on your system are listed. The selection latest always refers to the latest supported version (default). The release should match the input le. To select a release on a remote machine, please select the remote input le rst.

14 VI

MpCCI 3.1.0-1

VI Codes Manual

2.2 Coupling Process

Figure 1: Abaqus options in the Models Step

Select scan method This can be set to: Scan for all regions (default) The input le is scanned for possible coupling regions. Scan *CO-SIMULATION option only This setting is only needed for a restart. In this case the input le only contains the denition of the coupling regions in the *CO-SIMULATION section and no ordinary region denitions. Select Abaqus input le Select the Abaqus input le "*.inp". Select unit system Select the unit system which was used in Abaqus. Abaqus has no units built into it, a self-consistent set of units should be used (see chapter 1.2.2 Conventions of the Abaqus Analysis Users Manual for more information). In the Go Step you can select from any unit system listed in 1.2 Unit Systems .

2.2.3 Coupling Step


Abaqus supports the following quantities for coupling: Quantity AbsPressure DeltaTime FilmTemp NDisplacement NPosition Dim. Scalar Scalar Scalar Vector Vector Default Value 0.0 N/m2 1.0 s 300.0 K 0.0 m 0.0 m Integration Type Flux dens. max/. . . Field Field Field Coupling Dimension Face Global Face Face Face Location Element global Element Node Node Send Option Direct Direct Direct Receive Option Direct Direct Direct Direct

MpCCI 3.1.0-1

VI 15

2 Abaqus Quantity OverPressure RelWallForce WallForce WallHeatFlux WallHTCoe WallTemp Dim. Scalar Vector Vector Scalar Scalar Scalar Default Value 0.0 N/m2 0.0 N 0.0 N 0.0 W/m2 0.0 W/m2 K 300.0 K Integration Type Flux dens. Flux Flux Flux dens. Field Field Coupling Dimension Face Face Face Face Face Face Location Element Node Node Element Element Node

VI Codes Manual Send Option Receive Option Direct Direct Direct Direct Direct FieldVar.

Direct

Direct

2.2.4 Go Step

Figure 2: Abaqus options in the Go Step In the Go Step, the following options can be selected: Initial quantities transfer Select one of receive, send, exchange or skip. The meaning of initial exchange is further described in V-3.3 Coupling Algorithms .

16 VI

MpCCI 3.1.0-1

VI Codes Manual

2.2 Coupling Process

Enter a job name This is the name of the Abaqus job, which is also used as base for the Abaqus output les. Additional command line options Additional command line options for Abaqus can be given here, they will directly be used when Abaqus is started. MpCCI use the alternate syntax -option value for the Abaqus command line options. Enter the co-simulation step number The co-simulation step is the step of the Abaqus simulation which is coupled. You can e. g. run some initial computations rst, followed by a coupled step based on the previous results. Constant coupling time step and Coupling time step This button must be checked if the time step size DeltaTime is not selected as a global quantity to be send or received by Abaqus. In this case you must specify the value of the coupling time step size in the eld below. Subcycling Check this button if you want allow Abaqus to subcycle, i. e. use a smaller time step size than the coupling time step size. The basic principle of subcycling is described in V-3.3.5 Subcycling . If you select this option, you can also choose whether Abaqus has to meet the coupling target times in an exact or loose manner by toggling the Enforce exact target times button. Optional old job name for a restart This option is required for a restart computation. It is handed over to Abaqus as oldjob=<name> option. User Subroutine is the name of a FORTRAN le (source or object le), which is handed to Abaqus as user=<le> . See User subroutines: overview of the Abaqus Analysis Users Manual. Double precision for Abaqus/Explicit Use this option to select the precision for Abaqus/Explicit computations. It is ignored for Abaqus/Standard. Run parallel Select this to start a parallel run. A panel with additional options appears, which are further described in 2.2.5.1 Parallel Execution .

2.2.5 Running the Computation


When the Start button is pressed, Abaqus is started with the options given in the Go Step. If the Stop button is pressed, a stop-le is created and Abaqus will stop the next time it checks the presence of a stop le.

2.2.5.1 Parallel Execution


Parallel runs of Abaqus are supported by MpCCI. In the Go Step, a set of additional options can be chosen for a parallel run as shown in Figure 3.

MpCCI 3.1.0-1

VI 17

2 Abaqus

VI Codes Manual

Figure 3: Abaqus options for a parallel run

No. of processors Enter the number of processors to use during the analysis. The corresponding Abaqus command line option is -cpus. No. of parallel domains (Abaqus/Explicit) Enter the number of parallel domains in Abaqus/Explicit. The corresponding Abaqus command line option is -domains. As parallel Abaqus is always run with the command line option -parallel=domain (-parallel=loop is not available for coupled runs), the value for No. of processors must be evenly divisible into the value of No. of parallel domains. Parallelization method Select the parallelization method either mpi or leave blank which results into the Abaqus default.The corresponding Abaqus command line option is -mp mode. Shared le system Check here if the le system is shared for all hosts and no data copy for local scratch disks is necessary. Optional host host... to be used Enter host names for parallel execution of Abaqus. Optional hostlist le Specify a hostle, from which host names are extracted V-3.4.2 Hostlist les .

18 VI

MpCCI 3.1.0-1

VI Codes Manual

2.2 Coupling Process V-3.4.2

Use default hostle A default hostle can be congured by setting MPCCI HOSTLIST FILE Hostlist les . Please read the Abaqus documentation for a detailed explanations of the possible options.

2.2.5.2 Batch Execution


Abaqus is always run as a batch process, therefore no special settings are necessary for batch execution.

2.2.6 Post-Processing
Post-processing for the Abaqus part of the results can be performed as in ordinary computations, e. g. with Abaqus/CAE. The "<job name>.odb" le can be found in the same directory as the input le.

MpCCI 3.1.0-1

VI 19

2 Abaqus

VI Codes Manual

2.3 Code-Specic MpCCI Commands


The MpCCI subcommands available for Abaqus are: Usage: mpcci Abaqus [-]option

Synopsis: mpcci Abaqus is used to get information about Abaqus.

Options: -align

<ARGS>

Do a coordinate transformation on all nodes of an input file based on a plane definition file and align the nodal coordinates for the coupling partner. This screen. List verbose information about all Abaqus releases. List all Abaqus releases which MpCCI can find.

-help -info -releases -scan <input-file>

Run the scanner and create a scanner output file.

For Abaqus no special MpCCI subcommands are needed. Only the standard subcommands are available. The options -align , -info , -releases and -scan are described in 1.1 Common MpCCI Subcommands for Simulation Codes .

20 VI

MpCCI 3.1.0-1

VI Codes Manual

2.4 Code Environment

2.4 Code Environment 2.4.1 Prerequisites for a coupled simulation


To run a co-simulation you need the following: Ordinary Abaqus 6.8, Abaqus 6.7 (or Abaqus 6.6) installation. Enough license tokens. Co-simulation requires one additional enabling token. In the Abaqus environment le "abaqus v6.env", the co-simulation feature must be enabled by setting no cosimulation=OFF .

MpCCI 3.1.0-1

VI 21

2 Abaqus

VI Codes Manual

2.5 Code Adapter Reference 2.5.1 Patched Input File


Before a coupled simulation is started, MpCCI patches the Abaqus input le. For a le "*.inp" selected in the Models Step, a new le "mpcci *.inp" is created containing a new *CO-SIMULATION block. If the original le already contains *CO-SIMULATION keywords, they are removed. The lines inserted by MpCCI may e. g. look as follows: ** ** MpCCI automatically inserted this *CO-SIMULATION keyword. ** Therefore any existing *CO-SIMULATION keyword was removed. ** *CO-SIMULATION, NAME=COSIMULATION_1, PROGRAM=MPCCI, CONTROLS=COSIMULATION_CONTROLS_1 *CO-SIMULATION REGION, TYPE=SURFACE, EXPORT ASSEMBLY_BLOCK-1_WALL, COORD *CO-SIMULATION REGION, TYPE=SURFACE, IMPORT ASSEMBLY_BLOCK-1_WALL, CF *CO-SIMULATION CONTROLS, NAME=COSIMULATION_CONTROLS_1, TIME INCREMENTATION=SUBCYCLE, TIME MARKS=YES, STEP SIZE=EXPORT The settings in this block reect the users choices in the MpCCI GUI: The selected coupling components are listed below the *CO-SIMULATION REGION keywords. Here it is ASSEMBLY BLOCK-1 WALL and the exchanged quantities are COORD = NPosition, sender is Abaqus CF = RelWallForce, sender is partner code The time incrementation scheme is selected in the Go Step of the MpCCI GUI. Behind the *CO-SIMULATION CONTROLS keyword you nd: TIME INCREMENTATION=SUBCYCLE if subcycling was selected or TIME INCREMENTATION=LOCKSTEP , which means Abaqus uses the coupling time step also for the computation of the Abaqus part of the simulation. If SUBCYCLE is selected, the option TIME MARKS determines whether the target times are met in an exact ( YES ) or loose ( NO ) manner. If the time step size is exchanged, you nd either STEP SIZE=EXPORT if Abaqus is the sender or STEP SIZE=IMPORT if Abaqus receives the time step size from the partner code. The *CO-SIMULATION keywords are described in detail in Preparing an Abaqus analysis for co-simulation of the Abaqus Analysis Users Manual.

22 VI

MpCCI 3.1.0-1

VI Codes Manual

2.6 Trouble shooting, open issues and known bugs

2.6 Trouble shooting, open issues and known bugs


Feature: Two-dimensional quadratic elements and modied tetrahedral elements Version: all Problem: When these elements are coupled, MpCCI server will crash with error "Assertion failed(pLocalPointsNeighbData == 0)" Workaround: not available References:

MpCCI 3.1.0-1

VI 23

3 ANSYS

VI Codes Manual

3 ANSYS
3.1 Quick Information
Physical Domains Company Name Company Homepage Support SolidStructure, SolidThermal ANSYS, Inc. www.ansys.com www1.ansys.com/customer

3.1.1 Supported Coupling Schemes


ANSYS is run via an APDL script, therefore all coupling algorithms are possible.

3.1.2 Supported Platforms and Versions


The following versions of ANSYS are supported by MpCCI: platform alpha hp64 hpia64 intel linem64t linia32 linia64 linop64 sgi64 sun64 usIII winx64 MPCCI ARCH osf alpha hpux11 parisc hpux1123 ia64 mswin x86 (sles10|linux) (em64t|x64) linux x86 linux ia64 (sles10|linux) (amd64|x64) irix65 mips4 solaris sparc solaris sparc (xp64|vista) (x64|amd64|em64t) supported versions 90 100 110 X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X

3.1.3 References
The ANSYS installation contains a detailed documentation. We especially refer to: ANSYS APDL Programmers Guide. The ANSYS Parametric Design Language (APDL) is needed to run a co-simulation.

24 VI

MpCCI 3.1.0-1

VI Codes Manual

3.1 Quick Information

3.1.4 Adapter Description


The ANSYS adapter is a shared library which is loaded by ANSYS. The adapter functions must be called from an APDL script.

MpCCI 3.1.0-1

VI 25

3 ANSYS

VI Codes Manual

3.2 Coupling Process


Please read also IV-2 Setting up a Coupled Simulation .

3.2.1 Model Preparation


There are some issues which you should consider while creating an ANSYS model for a co-simulation: Supported element types. Not all ANSYS element types are supported, the supported types are given in Table 1. Dummy surface elements for surface coupling. For surface coupling, additional surface elements must be used for quantity exchange. For instance SHELL63 elements for a uid structure interaction or SHELL57 elements for thermal coupling can be used as dummy elements to receive forces from the partner code. The dummy elements must have the corresponding quantities you want to receive or send. Only these elements take part in the coupling process and must be either be deselected when the solution is performed or dened so weak that they do not inuence the solution in case of uid structure interaction. They can be deselected before solution is executed if only nodal quantities are sent or received, because the data transfer will then put the values to the nodes and the nodes of dummy elements are shared by the real solid model elements. In case of thermal coupling the dummy elements can not be deselected because the quantities wall heat transfer coecient, wall temperature and wall heat ux are only supported as element quantities. Therefore the additional layer of shell elements (SHELL57) have to be a part of the solution. To reduce the inuence on the solution you should give the shell elements the same material properties as the adjacent solid elements and a small thickness. In case of line coupling on area elements in uid structure interaction BEAM3 elements can be used. The attached example cases for 2D and 3D uid structure interaction contains such dummy elements. Such dummy elements are shown in Figure 1 Put elements for coupling in a component. The elements of the coupling region must be grouped into one or more element components using the cm command. Exchange of global quantities. For each global quantity a corresponding scalar parameter must be dened. E. g. for the time step size a parameter named DeltaTime is needed. Please also assign a dummy value to the parameter. This parameter must be set to the correct value in the APDL script if it is received, or the parameter must be evaluated in the APDL script. Global quantities can thus be regarded as simple variables which can be lled with values by ~mpcci, receive or whose values are read by ~mpcci, send . Assign unique material property numbers. Every element of your model must be assigned a unique material property number if you want to send material property values to ANSYS, e. g. the electrical resistivity. In ANSYS you dene such numbers with the mp command. Possible quantities depend on degrees of freedom. Normally the degree of freedom of the elements involved in the coupling process determines which quantities can be transferred. It is laborious to nd

26 VI

MpCCI 3.1.0-1

VI Codes Manual

3.2 Coupling Process

out if all degrees of freedom are actually supported by the ANSYS API. As this API is used for the MpCCI ANSYSadapter, it is not guaranteed that all theoretically supported degrees of freedom are valid. Not carefully tested. Only few of the element type mappings are already validated with certain quantities. The compatibility index in Table 2 shows the validated element-quantity pairs. It is constantly added. Please contact us if you have problems with other combinations or need additional capabilities. Binary database le required. You need to setup your model and store it in a binary database le (db le) because the coupled components will be extracted from this during the MpCCI scanning process. APDL script required. For managing the co-simulation, an APDL script is required. This is described in detail in 3.2.2 APDL Script . ANSYS Element Types BEAM3, BEAM4, BEAM23 PLANE13, PLANE42, PLANE55, HYPER56, SHELL57, SHELL63, PLANE67, VISCO106, SHELL131 SHELL143, SHELL157, PLANE181, PLANE182 PLANE2, PLANE35, PLANE53, HYPER74, PLANE77, PLANE82, VISCO88, SHELL93, SHELL99, VISCO108, PLANE121, SHELL132, PLANE145, PLANE14, SHELL150, PLANE183 SOLID5, SOLID45, SOLID46, HYPER58, SOLID62, SOLID64, SOLID65, SOLID69, SOLID70, HYPER86, SOLID96, SOLID97, VISCO107, SOLID185 SOLID87, VISCO89, SOLID90, SOLID92, SOLID95, SOLID98, SOLID122, SOLID123, SOLID127, SOLID128, SOLID147, SOLID148, SOLID168, SOLID186, SOLID187 SOLID117 Comments MPCCI ELEM LINE MPCCI ELEM TRIANGLE, MPCCI ELEM QUAD

MPCCI ELEM TRIANGLE6, MPCCI ELEM QUAD8 2D Volume coupling MPCCI ELEM TRIANGLE, MPCCI ELEM QUAD MPCCI ELEM PRISM, MPCCI ELEM TETRAHEDRON, MPCCI ELEM HEXAHEDRON, MPCCI ELEM PYRAMID

Tetrahedron and hexahedron solid elements with midpoint nodes can not be handled properly by MpCCI in case of volume coupling. Can only be used if all mid nodes lie on the straight line between the corner nodes and only if element quantities are transferred.

Table 1: Supported ANSYS element types

MpCCI 3.1.0-1

VI 27

3 ANSYS

VI Codes Manual

Quantity

Joule Lorentz Electric Nodal Wall Relative Film Heat Force Resistivity Positions Forces Wall TemperaDensity Density Forces ture + + + + + + + + + + + + + + + + + + + + + + + + +

Element BEAM3 SHELL63 SHELL57 PLANE13 SOLID5 SOLID45 SOLDI69 SOLID97 SOLID117

Wall Wall HeatTemperatransfer ture Coecient

+ + +

Table 2: Quantities supported for dierent ANSYS elements.

Figure 1: ANSYS Flap and Additional SHELL63 elements for coupling

28 VI MpCCI 3.1.0-1

VI Codes Manual

3.2 Coupling Process

3.2.2 APDL Script


In ANSYS, the coupling process is controlled via an APDL script, which calls functions provided by MpCCI.

3.2.2.1 Sample APDL Script


/batch resume, ansys, db ~mpcci, init, 2D fini /solu antype, transient, new trnopt, full /com > > > /com > > > /com > > > ! resume ANSYS database "ansys.db" ! initialize MpCCI for 2D analysis

! new transient analysis ! full Newton-Rhapson

get the initial transfer action defined

/inquire, mpcciaction,ENV,MPCCI_INITIAL_EXCHANGE,1 /com > > > /com > > > /com > > >

initial data transfer

*if, mpcciaction(1), eq, receive, then ~mpcci, receive, wait ! receive data via MpCCI *elseif, mpcciaction(1), eq, send ~mpcci, send, wait ! send data via MpCCI *elseif, mpcciaction(1), eq, exchange ~mpcci, exchange, wait ! exchange data via MpCCI *endif *do, i, 1, steps+1 *if, i, ne, 1, then esel, all $ nsle cmsel, u, TOP cmsel, u, BOTTOM nsle time, PhysicalTime solve ~mpcci, exchange, wait

! ! ! !

first run is dummy make sure to have all of the model deselect the beam elements, only used for transfer of values

! time at the end of this loadstep ! solve this time step ! exchange data via MpCCI

MpCCI 3.1.0-1

VI 29

3 ANSYS *endif *enddo fini ~mpcci, stop /exit, nosa ! finish solution routine ! finalize the co-simulation ! quit ANSYS

VI Codes Manual

MpCCI is initialized by ~mpcci, init, 2D . This means the model is two dimensional. First we retrieve the Initial quantities transfer value set in MpCCI GUI. Depending on the value set the script will automatically execute one of the commands: ~mpcci, receive, wait . ANSYS receives data. ~mpcci, send, wait . ANSYS sends data. ~mpcci, exchange, wait . ANSYS exchanges data. Next the loop for the coupled simulation starts with one dummy run rst. ANSYS sometimes has problems without this dummy run. Afterwards the solution ~mpcci, exchange, wait sends the nodal positions to the partner code. ANSYS will wait until the partner code has received this data. Following it waits for the partner code to nish the solution and receives the results. The loop continues until the nal step is reached. The command ~mpcci, stop is nishing the MpCCI process regularly and ANSYS could be nished. If element table items should be transferred, generate them before the send or exchange command is executed.

3.2.2.2 Available Commands


The command for MpCCI calls within ANSYS is ~mpcci followed by command line options. The following command line options are valid, where * marked values are default values and options in square brackets [] are optional. ~mpcci, ~mpcci, ~mpcci, ~mpcci, ~mpcci, ~mpcci, ~mpcci, ~mpcci, ~mpcci, ~mpcci, WRCPL, filename.cpl STATUS *HELP INIT [, 2D | 3D IPROBE SEND [, *WAIT | RECEIVE [, *WAIT | EXCHANGE [, *WAIT | WAIT STOP

| *AUTO ] NOWAIT ] NOWAIT ] NOWAIT ]

30 VI

MpCCI 3.1.0-1

VI Codes Manual The available commands have the following functionality:


~mpcci, WRCPL, <lename>.cpl

3.2 Coupling Process

Writes a component list le with all dened components and variables into "<lename>.cpl". This le is normally generated and used by the MpCCI GUI, but can also be generated with the wrcpl command option. Then the GUI will use this le for the "<lename>.db" le.
~mpcci, STATUS

Print the actual MpCCI status.


~mpcci, HELP

Print list of available commands.


~mpcci, INIT [, 2D | 3D | *AUTO ]

Initializes the MpCCI process.


~mpcci, IPROBE

Sends an MpCCI IPROBE request to the partner code and get information about the partner code status. If there is data for ANSYS so that a receive transfer could be performed a corresponding message will be given.
~mpcci, SEND [, *WAIT | NOWAIT ]

Performs a SEND transfer action, sending data from ANSYS to the partner code. If WAIT is given, the data transfer will be forced. Using NOWAIT the transfer will only happen if the partner code is just waiting for new data. If not, ANSYS will continue and no data will be transferred.
~mpcci, RECEIVE [, *WAIT | NOWAIT ]

Performs a RECEIVE transfer action, receive data from the partner code. If WAIT is given, the data transfer will be forced. Using NOWAIT the transfer will only happen if the partner code is just having new data. If not, ANSYS will continue and no data will be transferred.
~mpcci, EXCHANGE [, *WAIT | NOWAIT ]

Performs EXCHANGE transfer operation, rst SEND followed by RECEIVE . If WAIT is given, the data transfer will be forced. Using NOWAIT the transfer will only happen if the partner code is waiting for new data and is having new data for ANSYS. If not, ANSYS will continue and no data will be transferred.
~mpcci, WAIT

Performs a MpCCI ISEND call and completes the pending ISEND request.
~mpcci, STOP

Performs a MpCCI FINALIZE and stops the MpCCI process within ANSYS.

MpCCI 3.1.0-1

VI 31

3 ANSYS

VI Codes Manual

3.2.2.3 Data Access


In the GUI-option receive/send method there are two methods: Direct direct read or store of data using UPF (user programmable feature) subroutines ETAB only send possible (no receive of values into ETAB) Here the ETAB option means that a quantity is read out of an element-table (ETAB). It is only valid when sending an element based quantity. If the quantity is a scalar quantity with dim=1 (e. g. Joule heat density), choose a storage index sindex. The user has to generate a element table fullling the naming convention: etab, MPCCI_<sindex>, <item>, <component> For example: To get joule heat density from storage index 0 the APDL command should be: etab, MPCCI_00, jheat (see ANSYS documentation of ETABLE command for details) The user has to ll the ETAB with sensible values before the quantities are sent to the partner application. If the quantity has a dimension >1 (vector quantity) then you have to generate element tables following this naming convention: etab, MPCCI_<sindex>, <item>, <component> etab, MPCCI_<sindex+1>, <item>, <component> etab, MPCCI_<sindex+2>, <item>, <component> For example: to get dene Lorentz force density vector into element tables starting with storage index 5 the APDL command could be: etab, sexp, sexp, sexp, volu, volu MPCCI_05, lfx, volu,,-1 MPCCI_06, lfy, volu,,-1 MPCCI_07, lfz, volu,,-1 ! element volume ! lorentz force density

32 VI

MpCCI 3.1.0-1

VI Codes Manual

3.2 Coupling Process

3.2.3 Models Step

Figure 2: ANSYS options in the Models Step In the models step, the following options must be chosen: Select the ANSYS Release Select the ANSYS release you wish to use. Only supported releases are listed. latest always refers to the latest supported version (default). The release should match the input le. Select ANSYS product to run Choose one of the ANSYS products you have licensed, see also 3.5 Choosing an ANSYS Product in the ANSYS 100 documentation. Name of the ANSYS database le (*) Select the ANSYS database which contains your model denitions. Select unit system ANSYS does not use unit denitions, any self-consistent set of units can be used. In the Go Step you can select from: British the British unit system, i. e. ft, s, lbm/ft3 , etc. . SI the SI unit system, i. e. m, kg, s, N, Pa, etc. . cgs the cgs system, i. e. cm, g, s, dyn, Ba, etc. . variable corresponds to a user-dened system. This requires to set the unit for each quantity separately in the Coupling Step.

MpCCI 3.1.0-1

VI 33

3 ANSYS

VI Codes Manual

The selection of units in the Models panel is only used to determine default values for the units of the quantities. The units are nally selected in the Coupling Step.

3.2.4 Coupling Step


ANSYS supports the following quantities for coupling: Quantity AbsPressure BodyForce CGAngle CGOmega CGPosition CGVelocity ChargeDensity Dim. Default Value Scalar 0.0 N/m2 0.0 N/m3 0.0 0.0 0.0 0.0 0.0 rad rad/s m m/s C/m3 Integration Coupling Location Type Dimension Flux dens. Line, Face, Element Volume Flux dens. Volume Node, Element max/. . . Global global max/. . . Global global max/. . . Global global max/. . . Global global Field Line, Element Volume max/. . . Global global Flux dens. Line, Face, Node, Volume Element max/. . . Global global Field Line, Face, Element Volume Field Line, Face, Element Volume Field Line, Face, Element Volume Field Line, Face, Element Volume Field Line, Face, Element Volume Field Line, Element Volume Flux dens. Line, Element Volume Field Line, Face, Element Volume Field Line, Face, Element Volume Send Option Direct ETAB Direct ETAB APDL APDL APDL APDL Direct APDL Direct APDL Direct Direct Direct Direct Direct Direct Direct Direct Direct Receive Option Direct Direct APDL APDL APDL APDL Direct APDL Direct APDL Direct Direct Direct Direct Direct Direct Direct Direct Direct

Vector Vector Vector Vector Vector Scalar

Current1 Scalar CurrentDensity Vector DeltaTime ElectrCond1 ElectrCond3 ElectrCondX ElectrCondY ElectrCondZ ElectricField ElectricFlux ElectrRes1 ElectrRes3 Scalar Scalar Vector Scalar Scalar Scalar Vector Vector Scalar Vector

0.0 A 0.0 A/m2 1.0 s 0.0 S/m 0.0 S/m 0.0 S/m 0.0 S/m 0.0 S/m 0.0 V/m 0.0 C/m2 0.0 ohm m 0.0 ohm m

34 VI

MpCCI 3.1.0-1

VI Codes Manual Quantity ElectrResX ElectrResY ElectrResZ Enthalpy FilmTemp HeatFlux HeatSource IntFlag IterationNo JouleHeat LorentzForce MagneticField MagneticFlux Dim. Default Value Scalar 0.0 ohm m Scalar Scalar Scalar Scalar Vector Scalar Scalar Scalar Scalar Vector Vector Vector 0.0 ohm m 0.0 ohm m 0.0 W/m3 300.0 K 0.0 W/m2 0.0 W/m3 0 0 0.0 W/m3 0.0 N/m3 0.0 A/m 0.0 T 0.0 m 0.0 m 0.0 N/m2 Integration Coupling Type Dimension Field Line, Face, Volume Field Line, Face, Volume Field Line, Face, Volume Flux dens. Volume Field Flux dens. Flux dens. max/. . . max/. . . Flux dens. Flux dens. Field Flux dens. Field Field Flux dens. max/. . . max/. . . max/. . . Flux max/. . . Field Field Field Face Volume Volume Global Global Volume Volume Line, Volume Line, Face, Volume Line, Face, Volume Line, Face, Volume Line, Face, Volume Global Global Global Face Location Element Element Element Node, Element Element Node, Element Node, Element global global Node, Element Node, Element Element Node, Element Node Node Element

3.2 Coupling Process Send Option Direct Direct Direct Direct Receive Option Direct Direct Direct Direct Direct Direct Direct APDL APDL Direct Direct Direct Direct

Direct ETAB Direct ETAB APDL APDL Direct ETAB Direct ETAB Direct Direct Direct Direct Direct ETAB APDL APDL APDL

NDisplacement Vector NPosition OverPressure PhysicalTime RealFlag RefPressure RelWallForce Residual SpecicHeat Temperature ThermCond1 Vector Scalar

Direct APDL APDL APDL Direct APDL Direct Direct Direct

Scalar 0.0 s Scalar 0.0 Scalar 1.12e5 N/m2 Vector 0.0 N Scalar Scalar Scalar Scalar 0.0 1.0 J/kg K 300.0 K 0.0 W/m K

global global global Node, Element Global global Volume Element Line, Node, Volume Element Line, Face, Element Volume

APDL Direct Direct ETAB Direct

MpCCI 3.1.0-1

VI 35

3 ANSYS Quantity ThermCond3 ThermCondX ThermCondY ThermCondZ TimeStepNo udm00 uds00 Voltage1 WallForce WallHeatFlux WallHTCoe WallTemp Dim. Default Value Vector 0.0 W/m K 0.0 W/m K 0.0 W/m K 0.0 W/m K 0 0.0 0.0 0.0 V 0.0 N Integration Coupling Type Dimension Field Line, Face, Volume Field Line, Face, Volume Field Line, Face, Volume Field Line, Face, Volume max/. . . Global Field Volume Field Volume max/. . . Global Flux Face Face Face Face Location Element Element Element Element global Element Element global Node, Element Element Element Node, Element

VI Codes Manual Send Option Direct Direct Direct Direct APDL ETAB ETAB APDL Receive Option Direct Direct Direct Direct APDL

Scalar Scalar Scalar Scalar Scalar Scalar Scalar Vector Scalar Scalar Scalar

APDL Direct Direct Direct Direct

0.0 W/m2 Flux dens. 0.0 W/m2 K Field 300.0 K Field

Direct Direct

3.2.5 Go Step

Figure 3: ANSYS options in the Go Step

In the Go Step, the following options can be selected:

36 VI MpCCI 3.1.0-1

VI Codes Manual

3.2 Coupling Process

Initial quantities transfer Select one of receive, send or exchange. The meaning of initial exchange is further described in V-3.3 Coupling Algorithms . Select a gui option It is recommended to select -b to start ANSYS in the batch mode. With -g ANSYS is started with a graphical user interface with one of the graphics devices: -d X11 is the standard UNIX device, use -d X11C to activate light-shading on devices with more than 16 colors. -d WIN32 and -d WIN32C are the corresponding devices for Windows. The option -d 3D should be used if you have a 3-D graphics device. Please see 12.3.4 Changing the Number of Contours in the ANSYS 10.0 documentation. Additional command line options You can specify additional ANSYS command line options here, which are described in 3.1 Starting an ANSYS Session from the Command Level of the ANSYS documentation. Select APDL input script Select the le containing the APDL script you created for the analysis (see 3.2.2 APDL Script ).

3.2.6 Running the Computation


When the Start button is pressed, ANSYS is started with the options given in the Go Step. If the Stop button is pressed, a stop-le "*.ABT" is created (see also 3.8 Terminating a Running Job in the ANSYS 10.0 documentation) and ANSYS will stop the next time it checks the presence of a stop le.

MpCCI 3.1.0-1

VI 37

3 ANSYS

VI Codes Manual

3.3 Code-Specic MpCCI Commands


The MpCCI commands which are available for ANSYS are: Usage: mpcci ANSYS [-]option

Synopsis: mpcci ANSYS is used to get information about ANSYS.

Options: -align

<ARGS>

Do a coordinate transformation on all nodes of a .cdb file based on a plane definition file and align the nodal coordinates for the coupling partner. This screen. List verbose information about all ANSYS releases. List all available licensed ANSYS products. List all ANSYS releases which MpCCI can find.

-help -info -products -releases -scan <database file>

Run the scanner and create a scanner output file.

The subcommands -align , -info and -releases are described in 1.1 Common MpCCI Subcommands for Simulation Codes . The subcommand -products lists the available ANSYS products, e. g. those for which licenses are available. The list looks like: > mpcci ansys -products ane3fl ansys emag structds See also 3.5 Choosing an ANSYS Product in the ANSYS 100 documentation.

38 VI

MpCCI 3.1.0-1

VI Codes Manual

3.4 Code Adapter Reference

3.4 Code Adapter Reference


Within the MpCCI distribution the "adapters" directory contains the necessary software to connect the simulation programs to MpCCI depending on your license. The les are located within the subdirectory "<MpCCI home>/codes/ANSYS/adapters". This subdirectory is further divided by several release subdirectories, e. g. "90" and "100". The version directories are further divided by several architectures (e. g. "linia32"). There you nd the library les of the ANSYS adapter (e. g. "libansysmpcci.so"). The connection to MpCCI is established using these shared libraries. The binding to the APDL command mpcci is set in the "ansys ext.tbl" le. To enable coupling capabilities the mpcci command is added to the standard APDL commands. By the command line options you decide which coupling function is called. The basic tasks of the command are to initialize the coupling and to manage the data transfer to MpCCI commands. Ensure that the directory path of your MpCCI-APDL scripts on Windows do not contain any white spaces!

MpCCI 3.1.0-1

VI 39

4 Flowmaster

VI Codes Manual

4 Flowmaster
4.1 Quick Information
Physical Domains Company Name Company Homepage Support Fluid and Thermal System simulation Flowmaster www.flowmaster.com UK-support flowmaster.com US-support flowmaster.com DE-support flowmaster.com FR-support flowmaster.com

4.1.1 Supported Coupling Schemes


MpCCI supports coupling with Flowmaster 7.5.1 and higher. Depending on the Flowmaster analysis type the following scheme is applied: Steady-State Analysis 1. Flowmaster receives the data. 2. Flowmaster analysis is requested. 3. Flowmaster sends the data. Transient 1. Flowmaster exchanges the data (send and receive). 2. Flowmaster analysis is requested.

4.1.2 Supported Platforms and Versions


The following versions of Flowmaster are supported by MpCCI: supported versions platform MPCCI ARCH 7.5 7.6 mswin x86 mswin x86 X X

4.1.3 References
Flowmaster documentation is part of the Flowmaster distribution.

40 VI

MpCCI 3.1.0-1

VI Codes Manual

4.2 Coupling Process

4.1.4 Adapter Description


The Flowmaster adapter is an executable based on the Flowmaster COM interface.

4.2 Coupling Process


You have to create and validate a Flowmaster model.

4.2.1 Model Preparation


Both prescribed ow (inlet/outlet) and pressure boundaries can be incorporated into a MpCCI co-simulation. The boundaries in a CFD model are represented within a Flowmaster network by a combination of ow or pressure sources. Figure 1 and Figure 2 show the components used to represent a prescribed ow boundary and a pressure boundary respectively.

Figure 1: Prescribes ow boundary

Note that the prescribed ow boundary incorporates a pressure source whereas the pressure boundary uses a ow source. Components within Flowmaster network, which are attached to the boundaries, are connected to the nodes in the normal manner. For each boundary component you have to activate the external boundary property of the component. For each ow source component you need to specify a ow value to initialize the ow source. You have to create the fmlink in order to export the information of your network. (see Figure 3) 1. You have to enter the report dialog and choose the MpCCI ASCII le. 2. Select a boundary component.

MpCCI 3.1.0-1

VI 41

4 Flowmaster

VI Codes Manual

Figure 2: Pressure boundary

3. Click on Add in order to ll the list. 4. Mark the selected component and give a name for this component. 5. Repeat step 1 to 4 for all your boundary components. 6. Select the directory to save your le. 7. Enter the name of your network model with the le sux ".fmlink". 8. Click on create .

42 VI

MpCCI 3.1.0-1

VI Codes Manual

4.2 Coupling Process

Figure 3: Export Flowmaster boundaries dialog

MpCCI 3.1.0-1

VI 43

4 Flowmaster

VI Codes Manual

4.2.2 Models Step

Figure 4: Flowmaster options in the Models Step In the models step, the following options must be chosen: Flowmaster release Select the release of Flowmaster you want to use. latest (default) will select the latest version which is installed on your system. Data le Select the Data le of your Flowmaster project. The MpCCI scanner uses the Flowmaster data le to extract model information. This le has the sux ".fmlink".

4.2.3 Coupling Step


The Flowmaster adapter only stores quantities directly (Direct). Flowmaster supports the following quantities for coupling: Quantity BoundaryMassFlow BoundaryMassFlux BoundaryTemp BoundaryTotalPressure BoundaryVelocityMagnitude DeltaTime MassFlowRate MassFluxRate PhysicalTime Temperature Dim. Scalar Scalar Scalar Scalar Scalar Scalar Scalar Scalar Scalar Scalar Default Value 0.0 kg/s 0.0 kg/m2 s 300.0 K 0.0 N/m2 0.0 m/s 1.0 s 0.0 kg/s 0.0 kg/m2 s 0.0 s 300.0 K Integration Type Flux Flux dens. Field Flux dens. Field max/. . . Flux Flux dens. max/. . . Field Coupling Dimension Face Face Face Face Face Global Face Face Global Face Location Element Element Element Element Element global Element Element global Element Send Option Direct Direct Direct Direct Direct Direct Receive Option

Direct

Direct Direct Direct Direct Direct

44 VI

MpCCI 3.1.0-1

VI Codes Manual Quantity TotalPressure VelocityMagnitude Default Value Scalar 0.0 N/m2 Scalar 0.0 m/s Dim. Integration Type Flux dens. Field Coupling Dimension Face Face

4.2 Coupling Process Location Element Element Send Option Receive Option Direct Direct

4.2.4 Go Step

Figure 5: Flowmaster options in the Go Step

Flowmaster oers a number of options in the Go panel, see Figure 5. User Name You have to provide the user name to log in the database. User Password The password to authenticate the database server. Working Project name The full project tree to the current project containing the network. For example, the default root project name is Flowmaster and you have two sub-projects coupling and testcases with the following hierarchy: Flowmaster\coupling\testcases. The project testcases contains some network models which one of them has been chosen for the

MpCCI 3.1.0-1

VI 45

4 Flowmaster

VI Codes Manual

simulation. Then you will have to provide the following working project name: Flowmaster\coupling. Please select the Flowmaster analysis type The analysis type to use for the simulation: Incompressible SS Steady state simulation. SSH Steady state simulation with heat transfer. ST Transient simulation. STH Transient simulation with heat transfer. Compressible CS Steady state simulation. CT Transient simulation. Relaxation factor Represents the weighting factor for controlling the convergence of the coupled simulation. Let rn1 be the value containing a quantity for the prescribed boundary used by Flowmaster for the (n-1)th coupling and let rn be the value of the same quantity calculated at the nth coupling. Then rn = (1 ) rn + rn1 where is the weighting factor. Use maximum number of couplings Activates the maximum number of couplings to do for the simulation. Specify the number of coupling This is the number of coupling that will be done.

4.2.4.1 Running the Computation


By pressing the Start button in the Go Step of the MpCCI GUI, MpCCI starts the Flowmaster application. The output of the Flowmaster simulation is logged in a window and a le "mpcci <model name>.log".

4.2.4.2 Post-Processing
You may use the Flowmaster interface and analyze the results by querying the database or creating a report.

4.3 Code-Specic MpCCI Commands


The MpCCI subcommands available for Flowmaster are:

46 VI

MpCCI 3.1.0-1

VI Codes Manual

4.4 Code Adapter Description

Usage: mpcci Flowmaster [-]option

Synopsis: mpcci Flowmaster is used to get information about Flowmaster.

Options: -help -info -releases -scan <input-file>

This screen. List verbose information about all Flowmaster releases. List all Flowmaster releases which MpCCI can find. Run the scanner and create a scanner output file.

The subcommands -info and -releases are described in 1.1 Common MpCCI Subcommands for Simulation Codes .

4.4 Code Adapter Description


Within the MpCCI distribution the "adapters" directory contains the necessary software to connect the simulation programs to MpCCI. The les are located within the subdirectory "<MpCCI home>/Flowmaster/adapters". This subdirectory is further divided by several release subdirectories, e. g. "7.5". The version directories are further divided by several architectures, e. g. "mswin x86". There you nd the executable of the Flowmaster adapter, e. g. "MpCCILink.exe". The connection to MpCCI is established using this executable and the implementation is based on the Flowmaster COM API. For a prescribed ow boundary, the boundary component (component 3 in Figure 1) sets the pressure of the source provided by MpCCI via Flowmaster adapter. After the network analysis is complete the mass ow is read by the boundary component and returned to Flowmaster adapter.

MpCCI 3.1.0-1

VI 47

5 FLUENT

VI Codes Manual

5 FLUENT
5.1 Quick Information
Physical Domains Company Name Company Homepage Support CFD, Fluid, FluidThermal, FluidPlasma Fluent Inc. is a wholly owned subsidiary of ANSYS, Inc. www.fluent.com Fluent Services Center at www.fluentusers.com

5.1.1 Supported Coupling Schemes


FLUENT supports exchange before and after solution. Unidirectional and bidirectional transfer is possible.

5.1.2 Supported Platforms and Versions


supported versions platform MPCCI ARCH 6.3.26 12.0.7 aix51 aix51 power X aix51 64 aix51 power X X hpux11 hpux11 parisc X hpux11 64 hpux11 parisc X hpux11 ia64 hpux1123 ia64 X irix65 mips4 irix65 mips4 X X irix65 mips4 64 irix65 mips4 lnamd64 (sles10|linux) (amd64|em64t|x64) X X lnia64 linux ia64 X X lnx86 linux x86 X X X X ntx86 mswin x86 ultra solaris sparc X ultra 64 solaris sparc X X win64 (xp64|vista) (x64|amd64|em64t) X X

5.1.3 References
FLUENT 6.3 Fluid-Structure Interaction (FSI) Module Manual This manual describes how to use FLUENT with MpCCI for code coupling. It is available from the FLUENT User Services Center: www.fluentusers.com/fluent6326/doc/doc f2.htm FLUENT 6.3 Documentation is part of the FLUENT distribution.

48 VI

MpCCI 3.1.0-1

VI Codes Manual

5.2 Coupling Process

Abaqus Fluid-Structure Interaction Users Guide This guide is available for registered Abaqus users via the Abaqus support homepage abaqus.custhelp.com: Log into Abaqus Answers and search for FSI guide. The FSI guide contains several examples of coupled simulations with Abaqus and FLUENT.

5.1.4 Adapter Description


MpCCI uses the user-dened function (UDF) interface, which is provided by FLUENT. A set of such functions is included in the MpCCI distribution as a shared library, which must be loaded by FLUENT. The user-dened functions must be called at appropriate stages of the simulation. For this, FLUENT oers a number of so-called function hooks, where these functions must be hooked.

5.2 Coupling Process 5.2.1 Model Preparation


Models can be prepared as usually. The coupling components must be dened as separate surfaces or volumes. Figure 1 shows the list of surfaces dened in a FLUENT model, which then appear in the Coupling Step of the MpCCI GUI. If you exchange a relative pressure (e. g. RelWallForce or Overpressure), you must set the reference pressure to an appropriate value, which usually corresponds to the atmospheric pressure. For more information on relative and absolute pressures see the FSI section in V-3.1.2 Coupling Types . In FLUENT the reference pressure is set in the Reference Values panel, which can be found under ReportReference Values . All further options required for coupling can be set in the MpCCI GUI.

5.2.1.1 Setting UDF-Hooks


The user-dened functions for the MpCCI interface must be hooked to perform initialization of the coupled simulation and data transfer. It is recommended to let MpCCI handle loading and hooking of these functions automatically. Please choose the corresponding options in the Go Step of the MpCCI GUI: Auto install/make libudf for installation of the user-dened library, Auto load libudf to load it, Auto hook functions to hook the library functions, i. e. they will be called at certain stages of the simulation. See 5.2.4 Go Step for a complete description of the Go Step options.

MpCCI 3.1.0-1

VI 49

5 FLUENT

VI Codes Manual

Figure 1: List of surfaces in FLUENT (left) and in the Coupling Step of the MpCCI GUI (right).

In some cases it is preferable not to use these automatic settings. Instead the necessary functions can also be hooked manually. A description of the functions is given in 5.4 Code Adapter Reference . Some functions can also be called while running the computation via the MpCCI Control Panel in the FLUENT GUI, see 5.2.5.1 The MpCCI Control Panel .

5.2.1.2 Using Own UDFs and MpCCI


For FLUENT 6.3.26 the MpCCI functions are no longer stored in the "libudf" directory but in a separate directory "libmpcci". Therefore the MpCCI interface functions do not directly interfere with other interface functions - you can dene and hook functions as if you were not using MpCCI. It is not possible to hook your own user-dened functions at places where MpCCI functions need to be hooked for data transfer. It does not make sense to receive data and set the same values by a user-dened function!

5.2.1.3 Deforming Meshes


In typical FSI problems, deformations are computed by the solid mechanics code and sent to FLUENT, i. e. FLUENT has to move boundaries and deform the mesh. The FLUENT settings to achieve this are made automatically if you select Auto hook functions as well as Auto set MDM zones (MDM stands for Moving and Deforming Meshes) from the Go Step of the MpCCI GUI. This enables mesh motion, however the exact parameters cannot be chosen by MpCCI and should be set when preparing the model or before starting the iteration. To setup the mesh deformation without using the MpCCI GUI, the dynamic mesh option must be en-

50 VI

MpCCI 3.1.0-1

VI Codes Manual

5.2 Coupling Process

abled by selecting DeneDynamic MeshParameters... and selecting Dynamic Mesh in FLUENT. It is recommended to use Smoothing and Remeshing as Mesh Methods. The coupling components must be dened as dynamic mesh zones which is described in Hooks . Currently it is not possible to remesh a coupling component itself during a computation. 5.4.2 UDF-

5.2.2 Models Step

Figure 2: FLUENT options in the Models Step In the models step, the following options must be chosen: FLUENT version Select the FLUENT version from 2d, 2ddp, 3d, 3ddp. The version must match your casele. FLUENT release Select the release of FLUENT you want to use. The version must match your casele. latest (default) will select the latest version which is installed on your system. Run 64 bit version If a 64 bit version is available on your platform, you can select to run it here. This option is ignored on other platforms. casele Select the casele of your FLUENT model.

5.2.3 Coupling Step


The FLUENT adapter only stores some quantities directly (Dir), most quantities are rst written to user-dened memory (UDM).

MpCCI 3.1.0-1

VI 51

5 FLUENT FLUENT supports the following quantities for coupling: Quantity AbsPressure AcstPressure BodyForce BoundaryMassFlux BoundaryStaticPressure BoundaryTemp BoundaryTotalPressure BoundaryVelocityMagnitude CGAngle CGOmega CGPosition CGVelocity ChargeDensity Current1 CurrentDensity DeltaTime Density DynPressure ElectrCond1 ElectrCond3 ElectrCondX ElectrCondY ElectrCondZ ElectricField ElectricFlux ElectrRes1 ElectrRes3 ElectrResX ElectrResY ElectrResZ Enthalpy Default Value Scalar 0.0 N/m2 Scalar Vector Scalar Scalar Scalar Scalar Scalar Vector Vector Vector Vector Scalar Scalar Vector Scalar Scalar Scalar Scalar Vector Scalar Scalar Scalar Vector Vector Scalar Vector Scalar Scalar Scalar Scalar 0.0 0.0 0.0 0.0 300.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 0.0 0.0 N/m2 N/m3 kg/m2 s N/m2 K N/m2 m/s rad rad/s m m/s C/m3 A A/m2 s kg/m3 N/m2 S/m Dim. Integration Coupling Type Dimension Flux dens. Face, Volume Flux dens. Volume Flux dens. Volume Flux dens. Face Flux dens. Face Field Face Flux dens. Face Field Face max/. . . Global max/. . . Global max/. . . Global max/. . . Global Field Volume max/. . . Global Flux dens. Face, Volume max/. . . Global Field Volume Flux dens. Face Field Face, Volume Field Face, Volume Field Volume Field Volume Field Volume Field Volume Flux dens. Field Field Field Field Field Flux dens. Face, Volume Face, Volume Face, Volume Volume Volume Volume Volume

VI Codes Manual

Location Element Element Element Element Element Element Element Element global global global global Element global Element global Element Element Element Element Element Element Element Element Element Element Element Element Element Element Element

Send Option Dir Dir UDM

Receive Option UDM UDM UDM UDM UDM UDM UDM UDM Dir Dir Dir Dir UDM Dir UDM Dir UDM UDM UDM UDM UDM UDM UDM UDM UDM UDM UDM UDM UDM UDM

Dir Dir Dir Dir UDM Dir UDM UDS Dir Dir Dir UDM UDM UDM UDM UDM UDM UDS UDM UDS UDM UDM UDM UDM UDM Dir

0.0 S/m 0.0 0.0 0.0 0.0 S/m S/m S/m V/m

0.0 C/m2 0.0 ohm m 0.0 ohm m 0.0 0.0 0.0 0.0 ohm m ohm m ohm m W/m3

52 VI

MpCCI 3.1.0-1

VI Codes Manual Quantity FilmTemp HeatFlux HeatSource IntFlag IterationNo JouleHeat JouleHeatLin LorentzForce MagneticField MagneticFlux MassFlowRate MassFluxRate NPosition OverPressure PhysicalTime PorePressure RealFlag RefPressure RelWallForce Residual SpecicHeat Temperature ThermCond1 ThermCond3 ThermCondX ThermCondY ThermCondZ TimeStepNo TotalPressure udm00 uds00 Dim. Scalar Vector Scalar Scalar Scalar Scalar Scalar Vector Vector Vector Scalar Scalar Vector Scalar Default Value 300.0 K 0.0 W/m2 0.0 W/m3 0 0 0.0 W/m3 0.0 W/m3 K 0.0 N/m3 0.0 A/m 0.0 T 0.0 kg/s 0.0 kg/m2 s 0.0 m 0.0 N/m2 Integration Type Field Flux dens. Flux dens. max/. . . max/. . . Flux dens. Flux dens. Flux dens. Field Flux dens. Flux Flux dens. Field Flux dens. max/. . . Flux dens. max/. . . max/. . . Flux max/. . . Field Field Field Field Field Field Field max/. . . Flux dens. Field Field Coupling Dimension Face Volume Volume Global Global Volume Volume Volume Volume Face, Volume Face Face Face, Volume Face, Volume Global Volume Global Global Face Global Volume Face, Volume Face, Volume Face, Volume Volume Volume Volume Global Face Face, Volume Face, Volume

5.2 Coupling Process Location Element Element Element global global Element Element Element Element Element Element Element Node Element global Element global global Element global Element Element Element Element Element Element Element global Element Element Element Send Option Dir UDM UDM Dir Dir UDM UDM UDM UDM UDS UDM UDS Dir Dir

Receive Option UDM UDM UDM Dir Dir UDM UDM UDM UDM UDM

Buf Dir Dir Dir Dir Dir Dir Dir Dir Dir Dir Dir Dir Dir Dir Dir Dir UDM UDS UDM Dir UDM Dir Dir UDM Dir UDM UDM UDM UDM UDM UDM UDM Dir UDM UDS

Scalar 0.0 s Scalar 0.0 N/m2 Scalar 0.0 Scalar 1.12e5 N/m2 Vector 0.0 N Scalar 0.0 Scalar 1.0 J/kg K Scalar 300.0 K Scalar Vector Scalar Scalar Scalar Scalar Scalar Scalar Scalar 0.0 W/m K 0.0 W/m K 0.0 0.0 0.0 0 0.0 0.0 0.0 W/m K W/m K W/m K N/m2

MpCCI 3.1.0-1

VI 53

5 FLUENT Quantity Velocity VelocityMagnitude Voltage1 WallForce WallHeatFlux WallHTCoe WallTemp Default Value Vector 0.0 m/s Scalar Scalar Vector Scalar Scalar Scalar 0.0 0.0 0.0 0.0 0.0 300.0 Dim. Integration Coupling Type Dimension Field Face, Volume m/s Field Face V max/. . . Global N Flux Face W/m2 Flux dens. Face W/m2 K Field Face K Field Face

VI Codes Manual Location Element Element global Element Element Element Element Send Option Dir Dir Dir Dir Dir Dir Dir

Receive Option UDM

Dir UDM UDM UDM UDM

5.2.4 Go Step
FLUENT oers a number of options in the Go panel, see Figure 3. Initial quantities transfer Select one of receive, send or exchange to determine the coupling algorithm. The construction of coupling algorithms is further described in V-3.3 Coupling Algorithms . Run in batch mode If this option is selected, FLUENT will not start the graphical user interface, i. e. no user interaction is possible. For batch mode a journal le, which contains the FLUENT commands for analysis execution, is required. See 5.2.5.3 Batch Execution for details. Project name Name of the FLUENT project, which is also used as name for the output les. If no name is given here, the name of the case le is used. Data le For the analysis a data le can be read. Same as loading a data le in the FLUENT GUI. Optional journal les A semicolon-separated list of journal les can be given, which will be read by FLUENT when it is started. A journal le must be given for batch execution. Additional command line options Additional command line options for FLUENT can be given here, they will directly be used when FLUENT is started. Auto install/make libudf Automatically copy the user-dened library which contains the MpCCI interface to the working directory. If this button is not selected, the library must be copied by hand. Therefore it should always be used in a standard analysis. Auto read case data Read the case le which was selected in the Models Step when FLUENT is started. Auto load libudf Load the code adapter library. This options should only be unselected for special purposes. Auto hook functions Hooks the user-dened functions of the MpCCI code adapter library automatically. If not set, the functions must be hooked manually as described in 5.2.1.1 Setting UDF-Hooks .

54 VI

MpCCI 3.1.0-1

VI Codes Manual

5.2 Coupling Process

Figure 3: FLUENT options in the Go Step

Auto set MDM zones Sets the interface zones for the Moving Deforming Mesh automatically. If nodal displacements are transferred from a structural code, this option should be selected to allow deformations of the FLUENT mesh.

Auto set BCs Automatically set the boundary conditions for the coupling regions, which is necessary to enable data transfer on these boundaries.

Run parallel Select this, if you want to run FLUENT in parallel mode. See 5.2.5.2 Parallel Execution .

MpCCI 3.1.0-1

VI 55

5 FLUENT

VI Codes Manual

5.2.5 Running the Computation


Coupled simulations can be run using the FLUENT window. For running a simulation without a graphical interface, see 5.2.5.3 Batch Execution . Before FLUENT is started by pressing the Start button in the Go Step of the MpCCI GUI, MpCCI creates a journal le "mpcci <problem name>.jou", which performs the tasks selected in the MpCCI GUI Go Step. These steps are also reected in FLUENTs output which partially depend on the settings (e. g. quantities, steady state/transient): Load "cosimtools.scm" which contains helper functions needed for a coupled simulation: Loading "/home/user/mpcci/codes/FLUENT/cosimtools.scm" Done. Enable coupling with MpCCI, > (rpsetvar mpcci/on? #t)mpcci/on? Read the case le if Auto read case data is selected, > /file/read-case "example.cas" Reading "example.cas"... Load the MpCCI adapter library "libmpcci" if Auto load libudf is checked, > /define/user-defined/compiled-functions/load libmpcci "/home/user/computations/fluent" Opening library "libmpcci"... Library "libmpcci/lnx86/3d/libudf.so" opened UDF_List_globals UDF_Write_globals (output is followed by a list of all functions) Hook the MpCCI functions if Auto hook functions is set, e. g. > (co-set-udf-hook init "UDF_Initialize::libmpcci") > (co-set-udf-hook adjust "UDF_Adjust::libmpcci") > (register-dynamic-function "exchange-mpcci-quantities" #t #f \%udf-on-demand "UDF_Dynamic_exchange::libmpcci")functions Set dynamic mesh zones if Auto set MDM zones is selected,

56 VI

MpCCI 3.1.0-1

VI Codes Manual

5.2 Coupling Process

> /define/models/dynamic-mesh? yes > /define/dynamic-zones/create 6 motion type: (stationary rigid-body deforming user-defined) user-defined UDF_Grid_position::libmpcci adjacent cell zone name/id [2] cell height (air-remesh) (m) [0] Set boundary conditions if Auto set BCs is enabled, (co-set-zone-profile "wall" "wall-temperature" "UDM00_Profile::libmpcci")Fluent MpCCI_UDMprofile: Set default zero before MpCCI init. Load the MpCCI Control Panel. load "/home/user/mpcci/codes/FLUENT/mpccipanel.scm") Loading "/home/user/mpcci/codes/FLUENT/mpccipanel.scm" Done. If all coupling functions are hooked - either automatically or as described in 5.2.1.1 Setting UDF-Hooks - no special steps need to be carried through to start the simulation: Initialize the solution, this will also trigger MpCCI initialization. Start the iteration, MpCCI data transfer routines will be called automatically.

5.2.5.1 The MpCCI Control Panel


The MpCCI Control Panel (Figure 4) is an extra panel in the FLUENT GUI, which is available if FLUENT is started during a coupled simulation. It allows to perform some coupling actions manually. Select SolveMpCCI Control... from the FLUENT menu to open the panel. Select Use MpCCI to enable coupling with MpCCI. The second box of options hooks or unhooks MpCCI functions. If Initialize MpCCI is checked, the MpCCI initialization will be carried through automatically with FLUENT initialization. If you select the box next to Automated Exchange of Quantities you can decide at which points in the simulation data transfers should take place. Choose one of Before each iteration (recommended for steady-state problems), Before each time step (i. e. exchange before iteration) or After each time step (exchange after iteration). For each selection a specic MpCCI function is hooked. Due to a FLUENT bug, the After each time step option does not work. Please hook the EXECUTE AT END function manually instead: Select DeneUser Dened Function Hooks... to open the UDF Hooks panel, press the Edit... button in the Execute at End row, select UDF At end::libmpcci in the panel, press Add and OK . See also 5.4.2 UDF-Hooks .

MpCCI 3.1.0-1

VI 57

5 FLUENT

VI Codes Manual

Figure 4: MpCCI Control Panel in FLUENT

The further buttons allow to perform coupling tasks on demand. Initialize initialized coupling with MpCCI, Finalize ends the coupling process gracefully, and Abort directly aborts the coupling process. The transfer buttons trigger a transfer of quantities, Send will yield sending of all quantities which were selected in the Coupling Step of the MpCCI GUI. Receive yields receiving all quantities selected to receive and Exchange will yield a complete transfer of all selected quantities. Steady Update Mesh yields an update of the mesh, which makes sense after receiving displacements or node positions.

5.2.5.2 Parallel Execution


For a parallel run of FLUENT (i. e. FLUENT itself uses several parallel processes) additional options can be selected in the Go Step as shown in Figure 5. Please read also chapter 31. Parallel Processing of the FLUENT 6.3 Users Guide. No. of parallel processes Select how many FLUENT processes you wish to start. Interconnector Select the the interconnector type as given in the FLUENT manual, this is passed as

58 VI

MpCCI 3.1.0-1

VI Codes Manual

5.2 Coupling Process

Figure 5: FLUENT options for a parallel run

option -p to FLUENT. Parallel communicator Select the parallel communicator as given in the FLUENT manual, this is passed as option -mpi= to FLUENT. Shared le system (no le copy) Optional host host ... to be used Enter host names for parallel execution of FLUENT. Optional hostlist le Specify a hostle, from which host names are extracted. Use default hostle A default hostle can be congured by setting MPCCI HOSTLIST FILE, see Hostlist les . V-3.4.2

5.2.5.3 Batch Execution


FLUENT can be started without the graphical user interface. This is important if you run a simulation on a remote computer with text access only. For batch mode in a coupled simulation you must check the Run in batch mode button in the Go Step and provide a journal le which must be given under Optional journal les:. As no graphical interface is available in batch mode you should perform all steps needed for the simulation in the journal le. A simple journal le for a transient analysis would contain:

MpCCI 3.1.0-1

VI 59

5 FLUENT

VI Codes Manual

;; Initialize flow and connect to \mpcci /solve initialize initialize-flow ;; Perform unsteady iterations for a specified number of time steps /solve dual-time-iterate 5 20 ;; Exit simulation /exit

If you want to do subcycling (iterations without exchange) the journal le might contain: ;; Define \mpcci functions using cosimtools (define udf-init (co-get-udf-lib-name "UDF_Init_MpCCI" (define udf-exit (co-get-udf-lib-name "UDF_Exit_MpCCI" (define udf-xchg (co-get-udf-lib-name "UDF_Xchg_on_demand" (define udf-recv (co-get-udf-lib-name "UDF_Recv_on_demand" (define udf-send (co-get-udf-lib-name "UDF_Send_on_demand" ;; Define number of iterations without coupling (define IterNum 10) ;; Define number of coupling steps (define CouplingSteps 10) ;; Define autosave of case and data files /file/autosave/case-frequency 10 /file/autosave/data-frequency 10 /file/autosave/overwrite-existing-files yes ;; Initialize flow /solve/initialize initialize ;; Connect to \mpcci (\%udf-on-demand udf-init) ;; Send data (\%udf-on-demand udf-send) ;; Do <CouplingSteps> coupling steps with a data exchange ;; and <IterNum> uncoupled iterations between (do ((i 0 (+ i 1))) ((= i CouplingSteps)) (iterate IterNum) (\%udf-on-demand udf-xchg) ) ;; Write case and data file wcd file ;; Exit simulation /exit yes

)) )) )) )) ))

60 VI

MpCCI 3.1.0-1

VI Codes Manual

5.3 Code-Specic MpCCI Commands

It is required that the MpCCI libudf is loaded and the necessary functions are hooked. This can be achieved by selecting the required Auto-options in the Go Step (select all if in doubt) or including the corresponding commands in the journal le. The commands for loading and functions hooking can be found in the journal le which is written by MpCCI at start-up of a FLUENT simulation, they are also described in 5.2.1.1 Setting UDF-Hooks .

5.3 Code-Specic MpCCI Commands


The MpCCI subcommands available for FLUENT are: Usage: mpcci FLUENT [-]option

Synopsis: Use mpcci FLUENT to get information about FLUENT and to build/install your private adapter ...

Options: -help This screen. -info List verbose information about all FLUENT releases. -libudf <ARGS> Install the FLUENT "libudf/ARCH/VERSION/libudf.so" in your current working directory - where the .cas and .dat files are located - by either just copying the MpCCI libudfs or remaking the libudf from MpCCI and your own sources located in "libudf/src". You do NOT need to have a "libudf/Makefile" and/or "libudf/src/makefile" prepared since the makefiles are generated automatically from your FLUENT installation. ARCH : The FLUENT architecture token (automatically determined by MpCCI) VERSION: The version 2d, 3d_node etc.

MpCCI 3.1.0-1

VI 61

5 FLUENT

VI Codes Manual

Please specify the FLUENT release (e.g. 12.0.7) you would like to use and a list of versions (2d, 3d_node etc.). For more information type "mpcci FLUENT libudf". -releases List all FLUENT releases which MpCCI can find. -scan <casfile> Run the scanner and create a scanner output file.

The subcommands -info and -releases are described in 1.1 Common MpCCI Subcommands for Simulation Codes .
mpcci fluent -libudf <ARGS>

The libudf subcommand installs a version of the MpCCI libudf as described above. Usage: mpcci FLUENT libudf <release#|latest> [-64] version version version ... Examples: mpcci FLUENT libudf mpcci FLUENT libudf

6.3.26 latest

3d 3ddp 2d 2ddp 3ddp 3ddp_host

5.4 Code Adapter Reference 5.4.1 The MpCCI UDF Library


The MpCCI code adapter for FLUENT uses user-dened functions (UDF) and user-dened memory (UDM) to manage the data transfer. The code adapter is distributed as a dynamic library, which is located in "<MpCCI home>/codes/FLUENT/adapters/<FLUENT release>/<platform>/<FLUENT code> ". Before running the analysis, the code adapter must be copied to a subdirectory "libmpcci" of the working directory. This task is performed automatically by MpCCI if the option Auto install/make libudf is selected in the Go Step. Otherwise the command mpcci FLUENT libudf can be used. The working directory is the directory where the case le "*.cas" is located and where FLUENT is executed. The adapter functions must be hooked at dierent places in FLUENT, see A list of all adapter functions is given in Table 2 on page 65. 5.2.1.1 Setting UDF-Hooks .

62 VI

MpCCI 3.1.0-1

VI Codes Manual

5.4 Code Adapter Reference

More information on user-dened functions (UDFs) can be found in the FLUENT UDF Manual which is part of the FLUENT documentation.

5.4.2 UDF-Hooks
The data transfer with MpCCI is realized with user-dened functions (UDF), which are included in the MpCCI distribution. A list of all UDFs of the MpCCI adapter is given in Table 2 on page 65. In some cases it is preferable to set or check the necessary functions hooks manually. Most UDF functions can be hooked using the User-Dened Function Hooks panel, which opens when selecting DeneUser-DenedFunction Hooks... from the FLUENT menu. For a coupled simulation the following steps must be carried through by user-dened functions: MpCCI Initialization is realized in UDF Initialize , which can be hooked in the UDF-hooks panel or by pressing the Initialize button of the MpCCI Control panel. Data exchange for transient problems with dynamic mesh is carried through by UDF Dynamic exchange (exchange before iteration) or by UDF At end (exchange after iteration). For steady state problems UDF Adjust should be used to achieve an exchange for each iteration. UDF Adjust and UDF At end can be hooked over the FLUENT function hook panel, whereas UDF Dynamic exchange can be hooked over the MpCCI Control panel or by the Auto hook functions in MpCCI Go Step. Data storage For some quantities the data is stored in user dened memory (UDM). To distinguish the quantities, a storage index is set for each quantity in the Coupling Step, as shown in Figure 6. If you do not change it, the index is increased automatically. In addition the corresponding UDM... functions must be hooked at appropriate places. There are three types of such quantities: Proles for various boundary conditions like inlet or outlet boundaries use the boundary functions UDM00 Profile to UDM10 Profile to set the received quantities on the boundaries. Hook the function in the Boundary Conditions panel of FLUENT (DeneBoundary Conditions... in the menu). Source terms are also set in the Boundary Conditions panel but not for inlet or outlet surfaces but for uid type boundaries: Check Source Terms in the Fluid window and select the UDM.. Source function for the appropriate source. Material property quantities can be set in the Materials panel (DeneMaterials ). Select user-dened and the appropriate UDM..Property function in the User-Dened Functions panel. In addition to this minimal subset of user-function calls, certain situation require additional functions: Analysis with Deforming Mesh: If the quantities NDisplacement, NPosition or rigid body motions are received by FLUENT, the mesh must be updated by a user-dened function. The appropriate

MpCCI 3.1.0-1

VI 63

5 FLUENT

VI Codes Manual

Figure 6: UDM storage index for quantities received by FLUENT.

functions can be hooked by selecting DeneDynamic MeshZones... from the FLUENT window. Select the coupling components from the list of Zone Names, choose User-Dened as type and select UDF Grid motion::libmpcci for NDisplacement and UDF Grid position::libmpcci if NPosition is received on the selected component. For the rigid body quantities CGAngle, CGOmega, CGPosition or CGVelocity the type Rigid Body must be selected together with UDF Grid position::libmpcci. Restart Analysis: To store global values in the "*.dat" le after the rst analysis and reread it from there in a restart you should hook UDF Read globals and UDF Write globals in the UDF-hooks panel as Read Data and Write Data functions. Exchange of time step size: If the time step size is received by FLUENT it is required to hook a function in the Iterate panel of FLUENT (SolveIterate...). Set the Time Stepping Method to Adaptive and select UDF Deltat::libmpcci as user-dened time step.

64 VI

MpCCI 3.1.0-1

VI Codes Manual

5.4 Code Adapter Reference

UDF Hook INIT EXECUTE AT END EXECUTE AT EXIT ADJUST DELTAT ON DEMAND

RW FILE CG MOTION GRID MOTION

MpCCI Function UDF Initialize UDF At end UDF At exit UDF Adjust UDF Deltat UDF List globals UDF Dynamic exchange UDF Exit MpCCI UDF Abort MpCCI UDF Init MpCCI UDF Send on demand UDF Recv on demand UDF Xchg on demand UDF Read globals UDF Write globals UDF CG motion UDF Grid motion UDF Grid position

PROFILE

UDM00 Profile . . . UDM10 Profile UDM00 Source . . . UDM10 Source UDM00 Property . . . UDM10 Property

Purpose / Description Initialize the connection to MpCCI. MpCCI data transfer. Shutdown the MpCCI connection. MpCCI data transfer. Set the time step size if it is received by FLUENT. List global variables. MpCCI data transfer. Shutdown the MpCCI connection. Abort the MpCCI connection. Initialize the connection to MpCCI. MpCCI data transfer: Send only. MpCCI data transfer: Receive only. MpCCI data transfer. Read global data from "*.dat" le. Write global data into "*.dat" le. Set the rigid body motion if it is received by FLUENT. Move nodal coordinates by the received displacement. This function must be hooked if NDisplacement is received. Set nodal coordinates to the received position. This function must be hooked if NPosition is received. Set boundary prole values stored in UDM 0 - 10.

SOURCE

Set a cell source value stored in UDM 0 - 10.

PROPERTY

Set a cell property value stored in UDM 0 - 10.

Table 2: User-dened functions (UDFs) of the MpCCI FLUENT adapter

MpCCI 3.1.0-1

VI 65

6 FLUX

VI Codes Manual

6 FLUX
6.1 Quick Information
Physical Domains Electromagnetism Thermal Company Name CEDRAT Group Company Homepage www.cedrat.com Support support cedrat.com

6.1.1 Supported Coupling Schemes


MpCCI supports coupling with FLUX 3D. FLUX supports exchange after solution. Unidirectional and bidirectional transfer is possible. A coupled simulation involving a remeshing technology on the solid part of the model is not possible for this FLUX version.

6.1.2 Supported Platforms and Versions


The following versions of FLUX are supported by MpCCI: platform MPCCI ARCH mswin x86 mswin x86 xp64 x64 xp64 x64 supported versions 10.2 X X

6.1.3 References
FLUX Documentation is part of the FLUX distribution.

6.1.4 Adapter Description


The FLUX multi-physics coupling is enable via the USERs SUBROUTINEs for coupling API. MpCCI has been integrated as pyFlux commands. The user has to provide a PyFLUX script in order to start the co-simulation. (see 6.2.5 Go Step and 6.5 Code Adapter Description )

66 VI

MpCCI 3.1.0-1

VI Codes Manual

6.2 Coupling Process

6.2 Coupling Process 6.2.1 Model Preparation


There are some issues which you should consider while creating an FLUX model for a co-simulation: Supported elements types. For volume coupling the region involved in the coupling must be based on rst order elements. For surface coupling the region may be based on rst and second order elements. Multi-point support will be automatically created by the MpCCI-FLUX adapter for the region involved in the coupling. Spatial parameters are used to send or receive the quantity value. There is a constraint by the name in order to used this storage capability. In order to take into account this parameter it is necessary to create a spatial parameter of tabulated type named MPCCI index (see 6.2.2.3 Data storage: ). Thermal coupling. There is a software constraint by the name of the spatial parameter that allows the storage of the temperature. User pyFlux script required. For managing the co-simulation, an pyFlux script is required. This is described in detailed in 6.2.2 pyFlux script . Scenario A scenario for the multi physic session has to be created.

MpCCI 3.1.0-1

VI 67

6 FLUX

VI Codes Manual

6.2.2 pyFlux script


In FLUX, the coupling process is controlled via an pyFlux script, which calls functions provided by MpCCI.

6.2.2.1 Sample pyFlux Script


#! Flux3D 10.2 # Open the scenario SCENARIO_1 for a multi physics session Scenario[SCENARIO_1].openSessionMultiPhysics(projectName=EXAMPLE.FLU) # Activate MpCCI pyFlux commands mpcci = MpCCI() # Initialize MpCCI mpcci.initialize() step=1 while step<=5: # Receive data via MpCCI mpcci.receive(1) # Solve the current step solveCurrentStep() # Send data via MpCCI mpcci.send(1) step = step + 1 # Exit the co-simulation mpcci.exit() # Close the multi physic sesion Scenario[SCENARIO_1].closeSessionMultiPhysics() # Close the current project closeProject() # Exit FLUX exit()

In this sample pyFlux script, the project le has been loaded by using the option from the MpCCI GUI (see 6.2.5 Go Step ). Otherwise you should use this command to open the project: loadProject(EXAMPLE.FLU)

68 VI

MpCCI 3.1.0-1

VI Codes Manual

6.2 Coupling Process 6.2.5 Go

The MpCCI-FLUX adapter has been imported by using the option from the MpCCI GUI (see Step ). Otherwise the corresponding command to import the MpCCI module is: import MpCCI

First we open the multi physic session for the scenario SCENARIO 1. MpCCI is initialized by mpcci.initialize() Next the loop for the coupled simulation starts with a receive command mpcci.receive(1) . FLUX will wait until the partner code has sent the data. Afterwards the solution is computed for the current step. Following it sends the data with mpcci.send(1) . The loop continues until the nal step is reached. The command mpcci.exit() is nishing the MpCCI process regularly and FLUX could be nished.

6.2.2.2 Available Commands


The command for MpCCI calls within FLUX is available from the pyFlux MpCCI module. The following functions are valid: mpcci = MpCCI() mpcci.help() mpcci.initialize() mpcci.send(doWait) mpcci.receive(doWait) mpcci.exchange(doWait) mpcci.exit() The available commands have the following functionality: Function of coupling management: help() Provides the list of available commands. MpCCI() Instantiates the MpCCI module. initialize() This function initializes the connection to MpCCI. exit() This function shutdowns the MpCCI connection.

MpCCI 3.1.0-1

VI 69

6 FLUX Function of data transfer: exchange(doWait)

VI Codes Manual

Executes a MpCCI data transfer and waits for data if the value of doWait is 1. With a value of 0 FLUX will receive the available data from the other code if available, otherwise FLUX continues the computation. send(doWait) Sends data to MpCCI. The value of the doWait do not inuence the data send because sending is always possible, values are buered. receive(doWait) Receives data and waits for data if the value of doWait is 1. With a value of 0 FLUX will receive the available data from the other code if available, otherwise FLUX continues the computation. The Initial quantities transfer value selected in MpCCI GUI will overwrite the rst function of data transfer called from the pyFlux script if they do not match.

6.2.2.3 Data storage:


Varying parameters are considered as a Global quantities. They may be used to send or receive the varying parameter value. For some quantities the data is stored in a spatial parameter (SPATIAL). To distinguish the quantities, a storage index is set for each quantity in the Coupling Step, as shown in Figure 1. If you do not change it, the index is increased automatically. In addition the corresponding MPCCI index spatial parameter must be created and used at the appropriate formula for the boundary.

70 VI

MpCCI 3.1.0-1

VI Codes Manual

6.2 Coupling Process

Figure 1: SPATIAL storage index for quantities received or sent by FLUX.

MpCCI 3.1.0-1

VI 71

6 FLUX

VI Codes Manual

6.2.3 Models Step

Figure 2: FLUX options in the Models Step In the models step, the following options must be chosen: FLUX release Select the release of FLUX you want to use. latest (default) will select the latest version which is installed on your system. problem le Select the problem le of your FLUX project. A FLUX project le is represented by a directory having the model name. The MpCCI scanner uses the FLUX problem le to extract model information. This le is located inside the directory project and has the name "PROBLEM FLU.PFL".

6.2.4 Coupling Step


The FLUX adapter only stores some quantities directly (Direct), other quantities are rst written to user-dened memory (SPATIAL) which refers to the spatial parameter. FLUX supports the following quantities for coupling: Default Value Current1 Scalar 0.0 A CurrentDensity Vector 0.0 A/m2 Quantity Dim. Integration Type max/. . . Flux dens. Coupling Location Dimension Global global Line, Face, Node Volume Global global Line, Face, Node Volume Line, Node Volume Line, Face, Node Volume Send Option Direct Direct Receive Option Direct Direct SPATIAL Direct SPATIAL Direct SPATIAL SPATIAL

DeltaTime ElectrCond1 ElectricField

Scalar Scalar Vector

1.0 s 0.0 S/m 0.0 V/m

max/. . . Field Field

Direct Direct Direct

ElectrRes1

Scalar

0.0 ohm m

Field

Direct

72 VI

MpCCI 3.1.0-1

VI Codes Manual Quantity IntFlag IterationNo JouleHeat Dim. Default Value Scalar 0 Scalar 0 Scalar 0.0 W/m3 Integration Type max/. . . max/. . . Flux dens. Coupling Dimension Global Global Volume Location global global Node

6.2 Coupling Process Send Option Direct Direct Direct Receive Option Direct Direct Direct SPATIAL SPATIAL Direct SPATIAL Direct SPATIAL Direct SPATIAL Direct Direct Direct Direct SPATIAL SPATIAL

JouleHeatLin LorentzForce

Scalar Vector

0.0 W/m3 K Flux dens. 0.0 N/m3 Flux dens.

Volume Volume

Node Node

Direct Direct

MagneticField

Vector

0.0 A/m

Field

Line, Volume

Node

Direct

MagneticFlux

Vector

0.0 T

Flux dens.

Line, Face, Node Volume Global Global Global Line, Volume Line, Face, Volume Global Face, Volume Global global global global Node

Direct

PhysicalTime RealFlag Residual Temperature

Scalar 0.0 s Scalar 0.0 Scalar 0.0 Scalar 300.0 K

max/. . . max/. . . max/. . . Field

Direct Direct Direct Direct

ThermCond1 TimeStepNo udm00 Voltage1

Scalar Scalar Scalar Scalar

0.0 W/m K 0 0.0 0.0 V

Field max/. . . Field max/. . .

Node global Node global

Direct

Direct Direct SPATIAL SPATIAL Direct Direct

This table represents the quantities mapping used by MpCCI.

MpCCI 3.1.0-1

VI 73

6 FLUX MpCCI naming CurrentDensity ElectricCond1 ElectricField ElectricRes1 JouleHeat JouleHeatLin LorentzForce MagneticField MagneticFlux Temperature ThermCond1 FLUX naming JS1 SIGMA E1 1/SIGMA DVOL LOSSES DRHODT*J*J or for Harmonic model 0.5*Real(DRHODT*J*CONJ(J)) DFVL HMAG1 BMAG1 T1 KA

VI Codes Manual

6.2.5 Go Step

Figure 3: FLUX options in the Go Step

74 VI MpCCI 3.1.0-1

VI Codes Manual FLUX oers a number of options in the Go panel, see Figure 3.

6.3 Code-Specic MpCCI Commands

Initial quantities transfer Select one of receive or skip to determine the coupling algorithm. The construction of coupling algorithms is further described in V-3.3 Coupling Algorithms . Memory conguration If this option is selected, you may adjust the numerical, character memory for FLUX solver and the java memory for FLUX GUI. Run in batch mode If this option is checked, the simulation job will run in a batch mode. Select User pyFlux File If this option is selected, MpCCI will load your PyFLUX le and it will be executed at the start of FLUX. Auto read problem le If this option is selected, the FLUX project will be loaded when FLUX starts. Auto load MpCCI lib If this option is selected, the MpCCI-FLUX adapter library will be automatically imported. Select your user pyFlux library directory Select a directory containing your user library. This user library will export your user pyFlux commands into the FLUX environment.

6.2.5.1 Running the Computation


When the Start button is pressed, FLUX is started with the options given in the Go Step. If the Stop button is pressed, a stop-le "STOP" is created and FLUX will stop the next time it checks the presence of a stop le.

6.2.5.2 Troubleshooting
On the FLUX application side the le "Flux3D.log" contains the log of the co-simulation. The log le reect the actions and state of the solver and the MpCCI adapter.

6.2.5.3 Post-Processing
After having solved a coupled simulation the results computed on the FLUX side may be visualized by using the FLUX 3D post-processing tool. You may compute and visualize the coupled quantities exchanged.

6.3 Code-Specic MpCCI Commands


The MpCCI subcommands available for FLUX are:

MpCCI 3.1.0-1

VI 75

6 FLUX

VI Codes Manual

Usage: mpcci FLUX [-]option

Synopsis: mpcci FLUX is used to get information about FLUX.

Options: -help -info -releases -scan <problem file>

This screen. List verbose information about all FLUX releases. List all FLUX releases which MpCCI can find. Run the scanner and create a scanner output file.

The subcommands -info and -releases are described in 1.1 Common MpCCI Subcommands for Simulation Codes .

6.4 Code Environment 6.4.1 Prerequisites for a coupled simulation


To run a co-simulation you need the following Flux FeEx MultiPhys token on the FLUX license server.

6.5 Code Adapter Description


Within the MpCCI distribution the "adapters" directory contains the necessary software to connect the simulation programs to MpCCI depending on your license. The les are located within the subdirectory "<MpCCI home>/FLUX/adapters". This subdirectory is further divided by several release subdirectories, e. g. "10.2". The version directories are further divided by several architectures (e. g. "mswin x86", "xp64 x64"). There you nd the library les of the FLUX adapter (e. g. "fluxmpcci.dll"). The connection to MpCCI is established using these shared libraries. The binding to the pyFlux command is set by using the available user environment fromFLUX. This process is done if FLUX is started by MpCCI. To enable coupling capabilities the mpcci command is added to the standard pyFlux commands. By the command line options you decide which coupling function is called. The basic tasks of the command are

76 VI

MpCCI 3.1.0-1

VI Codes Manual

6.5 Code Adapter Description

to initialize the coupling and to manage the data transfer to MpCCI commands.

MpCCI 3.1.0-1

VI 77

7 MSC.Marc

VI Codes Manual

7 MSC.Marc
7.1 Quick Information
Physical Domains Company Name Company Homepage Support SolidStructure, SolidThermal MSC Software Corporation www.mscsoftware.com www.mscsoftware.com/products/marc support.cfm

7.1.1 Supported Coupling Schemes


MSC.Marc currently uses exchange after solution.

7.1.2 Supported Platforms and Versions


MSC.Marc is supported on the following platforms: platform hpux1123 ia64 irix65 mips4 linux amd64 linux x86 mswin x86 osf alpha sles10 amd64 solaris sparc supported versions 2005r3 2007r1 MPCCI ARCH hpux1123 ia64 X X irix65 mips4 X X linux amd64 X X linux x86 X X mswin x86 X X osf alpha X X sles10 amd64 X X solaris sparc X X

For 64 Bit systems, code coupling is only supported for the 32-bit integer version (i4-version) of MSC.Marc. For more information on supported platforms and compilers see also the MSC.Marc Release Guide.

7.1.3 References
MSC.Marc, Volume A: Theory and User Information by MSC.Software Corporation. This part of the MSC.Marc documentation contains general information on performing a simulation with MSC.Marc. MSC.Marc, Volume D: User Subroutines and Special Routines This part of the MSC.Marc documentation contains information on the user subroutines which are also used by the code adapter. See especially chapter 12. MSC.Marc, Volume C: Program Input for information on the COUPLING REGION option, which is used by MpCCI to dene the coupling region.

78 VI

MpCCI 3.1.0-1

VI Codes Manual

7.1 Quick Information

7.1.4 Adapter Description


The code adapter is provided in an object le. Similar to object les of user-dened functions these les are linked with MSC.Marc before starting the computation. Therefore the appropriate compiler is needed to run a coupled simulation (see 7.4.1 Prerequisites for a coupled simulation ).

MpCCI 3.1.0-1

VI 79

7 MSC.Marc

VI Codes Manual

7.2 Coupling Process


Please read also the corresponding IV-2 Setting up a Coupled Simulation .

7.2.1 Model Preparation


MSC.Marc does not use a xed unit system, so any consistent unit system may be used to dene the MSC.Marc model. The MSC.Marc model can be dened like a normal model. For the coupled analysis, the surfaces which form the coupling region must be dened as user sets: sets of nite element edges or geometric curves, for 2-D surface coupling; sets of nite element faces or geometric surfaces, for 3-D surface coupling; sets of nite elements or contact bodies, for volume-based coupling in any dimension. The sets will then be listed in the Coupling Step of the MpCCI GUI. Coupling is only supported for the new input le format, so the option NEW-STYLE TABLE must be selected in the RUN JOB menu of MSC.Marc Mentat (option tables in the input le). MpCCI has to insert boundary conditions into the input le and only supports the new format. Instead of directly submitting the le from MSC.Marc Mentat, simply write an input le. The analysis is started from the MpCCI GUI. It is recommended to rst start a stand-alone MSC.Marc computation to check if the model is set up correctly. .

7.2.2 Models Step


In the models step the following options must be chosen: Select MSC.Marc version Select the MSC.Marc version you want to use. latest (default) selects the latest version which is installed on your system. Multiple input le DDM job This option is needed for parallel runs of MSC.Marc in which the domain decomposition is done in the GUI and multiple input les have been written. For single le DDM, the button must not be selected. Select MSC.Marc input le Select the MSC.Marc input le for the analysis.

80 VI

MpCCI 3.1.0-1

VI Codes Manual

7.2 Coupling Process

Select unit system Select the unit system which was used to dene the MSC.Marc model. MSC.Marc has no units built into it, a self-consistent set of units should be used. In the Go Step you can select from: British the British unit system, i. e. ft, s, lbm/ft3 , etc. . SI the SI unit system, i. e. m, kg, s, N, Pa, etc. . cgs the cgs system, i. e. cm, g, s, dyn, Ba, etc. . variable corresponds to a user-dened system. This requires to set the unit for each quantity separately in the Coupling Step. The selection of units in the Models panel is only used to determine default values for the units of the quantities. The units are nally selected in the Coupling Step.

7.2.3 Coupling Step


The following quantities are supported: Quantity AbsPressure Dim. Default Value Scalar 0.0 N/m2 Integration Coupling Type Dimension Flux dens. Line, Face, Volume s max/. . . Global K Field Line, Face m Field Line, Face, Volume m Field Line, Face, Volume N/m2 Flux dens. Line, Face, Volume N Flux Line, Face N Flux Line, Face W/m2 Flux dens. Line, Face W/m2 K Field Line, Face K Field Line, Face Location Element global Element Node Node Element Node Node Element Element Node Direct Direct Direct Direct Direct Direct Direct Direct Direct Send Option Receive Option Direct Direct Direct

DeltaTime Scalar 1.0 FilmTemp Scalar 300.0 NDisplacement Vector 0.0 NPosition OverPressure RelWallForce WallForce WallHeatFlux WallHTCoe WallTemp Vector Scalar 0.0 0.0

Vector 0.0 Vector 0.0 Scalar 0.0 Scalar 0.0 Scalar 300.0

If the time step size is received by MSC.Marc, the option AUTO STEP must be selected in MSC.Marc Mentat to enable time step adaptation in MSC.Marc.

MpCCI 3.1.0-1

VI 81

7 MSC.Marc

VI Codes Manual

7.2.4 Go Step
In the Go Step the following options can be chosen: Initial quantities transfer Enter a job name Optional restart le If you want to restart a previous computation, select the restart le here. Optional post le If you want to restart a previous computation from a post le, select it here. Optional view factor le Select a view factor le. User Subroutine Select a le which the user subroutines. Additional command line options If you need any further command line options for starting MSC.Marc, enter them here. See also Volume C, Appendix B of the MSC.Marc manual. Do not set command line options which are already set by the MpCCI GUI (e. g. -jid for the job name). Run parallel Select this option for a parallel run. See 7.2.5.1 Parallel Execution below.

7.2.5 Running the Computation


Instead of directly submitting the le from MSC.Marc Mentat, simply write an input le. The analysis is started from the MpCCI GUI.

7.2.5.1 Parallel Execution


There is no limitation regarding parallel execution of MSC.Marc in a coupled simulation. Both, automatic domain decomposition and manual decomposition are supported. The coupling region information is automatically passed to all subprocesses. If you use multiple input les, the option Multiple input le DDM job must be selected in the Models Step. If Run parallel is selected in the Go Step of the MpCCI GUI, the following options can be selected for a parallel run of MSC.Marc: No. of parallel domains Enter the number of parallel domains here. The number must correspond to the number of domain input les if multiple input les are used. Shared le system (no le copy) If you work on a shared le system, ... Optional host host ... to be used Enter a list of host names for a simulation distributed on dierent computers.

82 VI

MpCCI 3.1.0-1

VI Codes Manual Optional hostlist le Use default hostle

7.2 Coupling Process

7.2.6 Post-Processing
Pressures or forces received by MSC.Marc in a coupled simulation can be visualized in MSC.Marc Mentat: Select External Force in the post-processing menu.

MpCCI 3.1.0-1

VI 83

7 MSC.Marc

VI Codes Manual

7.3 Code-Specic MpCCI Commands


The MpCCI subcommands available for MSC.Marc are: Usage: mpcci MSC.Marc [-]option

Synopsis: mpcci MSC.Marc is used to get information about MSC.Marc.

Options: -align

<ARGS>

Do a coordinate transformation on all nodes of a .dat file based on a plane definition file and align the nodal coordinates for the coupling partner. This screen. List verbose information about all MSC.Marc releases. List all MSC.Marc releases which MpCCI can find.

-help -info -releases

The subcommands -align , -info and -releases are described in 1.1 Common MpCCI Subcommands for Simulation Codes .

84 VI

MpCCI 3.1.0-1

VI Codes Manual

7.4 Code Environment

7.4 Code Environment 7.4.1 Prerequisites for a coupled simulation


As the MpCCI code adapter is based on user-dened methods which must be linked statically to the MSC.Marc executable, the proper compiler is required for coupled simulations. The path to the compiler must be given in an appropriate shell variable, e. g. INTEL for the Intel compiler. MpCCI will complain if the variable is not set correctly. It is recommended to rst try to run an example which uses user subroutines to check whether the compiler is installed correctly. For more information on compiler requirements see the list of supported platforms in the MSC.Marc release guide, chapter 6.

MpCCI 3.1.0-1

VI 85

8 PERMAS

VI Codes Manual

8 PERMAS
8.1 Quick Information
Physical Domains Company Name Company Homepage Support Tutorials SolidStructure, SolidAcoustics, SolidThermal, Optimization INTES, Ingenieurgesellschaft fr technische Software mbH u www.intes.de www.intes.de/support/ VII-4 Exhaust Manifold

8.1.1 Supported Coupling Schemes


PERMAS supports exchange before and after solution. Unidirectional and bidirectional transfer is possible.

8.1.2 Supported Platforms and Versions


platform aix51 power hpux1123 ia64 hpux11 parisc linux em64t linux x86 xp64 x64 MPCCI ARCH aix51 power hpux1123 ia64 hpux11 parisc linux em64t linux x86 xp64 x64 supported versions 11 12 X X X X X X X

8.1.3 References
The PERMAS documentation is part of the PERMAS distribution, which can be invoked after the PERMAS installation by the command permasdoc . Installation Installation of PERMAS. Release Release notes and bug xes. User Manuals Users Reference Manual, Example Manual and Programmers Manual. Interfaces Manuals for interfaces with MEDINA, IDEAS, CATIA, PATRAN. PERMAS with MpCCI Manual describing the necessary steps for an interconnection with MpCCI.

86 VI

MpCCI 3.1.0-1

VI Codes Manual

8.1 Quick Information

8.1.4 Adapter Description


The code adapter for PERMAS is developed by INTES in cooperation with Fraunhofer SCAI. The adapter is distributed as part of the PERMAS software.

MpCCI 3.1.0-1

VI 87

8 PERMAS

VI Codes Manual

8.2 Coupling Process


Please read also IV-2 Setting up a Coupled Simulation .

8.2.1 Model Preparation


The PERMAS model can be prepared with several pre-processing tools (e. g. MEDINA, CATIA, IDEAS). Please consider the following approach for model preparation: Dene the coupling surfaces in the pre-processor or in PERMAS. The naming rule for coupling surfaces is CCI <sid> , where CCI indicates a MpCCI surface and <sid> is the surface identier of the CCI surface Make your PERMAS denitions in the pre-processor, in the input le "<project>.uci" and if needed in "<project>.dat". Create dummy loads of zero magnitude in PERMAS which are replaced by received data during coupled simulation: Received Quantity Dummy Load FilmTemp,WallHTCoe $DISLOAD TEMPFILM WallHeatFlux $DISLOAD SURFHS / SURFHSS OverPressure $DISLOAD SURF3D RelWallForce, WallForce $CONLOAD Examples: $LOADING name = NLV $DISLOAD TEMPFILM LPAT = 1 NODES=ALL DOFTYPE = TEMP PRP 101 0.000000 PRP 102 0.000000 $END LOADING $LOADING NAME = LOADVAR 1 $CONLOAD LPAT = 1 RSYS = 0 DOFTYPE = DISP 704343 0.0 704344 0.0 $END LOADING $LOADING NAME = LOADVAR 2 $DISLOAD SURF3D LPAT = 2 IDS = ELGEO DOFTYPE = DISP 13943 3: 1.000000E-05 1.000000E-05 1.000000E-05 $END LOADING

88 VI

MpCCI 3.1.0-1

VI Codes Manual

8.2 Coupling Process

8.2.2 Models Step

Figure 1: PERMAS options in the Models Step In the Models Step, the following options must be chosen (Figure 1): PERMAS release Select the release of PERMAS you want to use, latest (default) will select the latest version which is installed on your system. model le Select the PERMAS project le "*.uci" or "*.dat". unit system select the unit system which was used in PERMAS. PERMAS has no built in units. A selfconsistent set of units should be used (see chapter 1.5.7 System of Units of the PERMAS Users Reference Manual for more information). In the Models Step you can select from: British the British unit system, i. e. ft, s, lbm/ft3 , etc. . SI the SI unit system, i. e. m, kg, s, N, Pa, etc. . cgs the cgs system, i. e. cm, g, s, dyn, Ba, etc. . variable corresponds to a user-dened system. This requires to set the unit for each quantity separately in the Coupling Step.

8.2.3 Coupling Step


In PERMAS the exchanged quantities are directly read or written. PERMAS supports the following quantities for coupling: Quantity Film2Temp Default Value Biscalar 300.0 K Dim. Integration Coupling Type Dimension Field Face Location Node Send Option Direct Receive Option Direct

MpCCI 3.1.0-1

VI 89

8 PERMAS Quantity Dim. Default Value 300.0 K 0.0 m Integration Type Field Field Flux Flux dens. Field Field Flux Flux dens. Field Field Coupling Dimension Face Face, Volume Face Face Face Face Face Face Face Face Location Node Node Node Node Node Node Node Node Node Node

VI Codes Manual Send Option Direct Receive Option Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct

FilmTemp Scalar NDisplacement Vector RelWallForce Wall2HeatFlux Wall2HTCoe Wall2Temp WallForce WallHeatFlux WallHTCoe WallTemp

Vector 0.0 N Biscalar 0.0 W/m2 Biscalar 0.0 W/m2 K Biscalar 300.0 K Vector 0.0 N Scalar 0.0 W/m2 Scalar 0.0 W/m2 K Scalar 300.0 K

Direct

8.2.4 Go Step

Figure 2: PERMAS options in the Go Step PERMAS oers a number of options in the Go Step, see Figure 2. Run parallel Run PERMAS in parallel mode, see 8.2.5.1 Parallel Execution .

Core memory size in MB Explicit denition of the memory size for PERMAS (see chapter 1.4 The PERMAS execution of the PERMAS Users Reference Manual for more information). Congure coupling algorithm Congure parameters for coupling algorithm, see 8.2.4.1 Congure Coupling Algorithm .

8.2.4.1 Congure Coupling Algorithm


Select the coupling algorithm The choice of the coupling algorithm, the initial transfer of the partner code and in case of a Gauss-Seidel procedure the numeration of the codes dened by its positions in the MpCCI GUI will dene the coupling procedure. Possible coupling schemes are depicted in Figure 4 and Figure 5. If a possible algorithm is advisable, might depend on the particular problem description.

90 VI

MpCCI 3.1.0-1

VI Codes Manual

8.2 Coupling Process

Figure 3: PERMAS Options for the coupling algorithm

Jacobi PERMAS will send and receive data before each solution step (Figure 4). Gauss-Seidel Before the solution run starts, PERMAS sends and receives data from/to all codes with a code id which is lower than its own code id and receives data from codes with a code id which is higher than its own code id. After the solution run PERMAS sends data to all codes with a higher code id (Figure 5). No. of exchange iterations Total number of exchange iterations of PERMAS. Use additional printout steps Additional printout of the result data (e. g. "*.bof") after each coupling step. Data in "*.bof" is accumulated. Use several meshes with one part Activate this button, when the coupling region has several faces. Residual limit for convergence test Dene the residual limit for the convergence test of the complete coupled simulation run. Relaxation factor Specify a relaxation factor which will be applied to the dened iterations.

MpCCI 3.1.0-1

VI 91

8 PERMAS 4 1 CFD (receive) 3 5 2 2 1 CFD (send) 2 2 Permas 1 CFD (exchange) 2 3 2 CFD (skip) 1 3 3 4 5 4 parallel coupling parallel 5 coupling 1 3 4 4 6 4 3 parallel coupling 8 7 9 serial coupling

VI Codes Manual

Permas

Permas

Permas

Possible algorithm Inadvisable algorithm

Figure 4: Coupling algorithm Jacobi for PERMAS with a CFD code, code id has no inuence

8.2.5 Running the Computation


When the Start button is pressed, PERMAS is started with the options given in the Go Step. If the Stop button is pressed, a stop-le is created and PERMAS will stop the next time it checks the presence of a stop le.

8.2.5.1 Parallel Execution


If the Run parallel check button is activated the following options are available (Figure 6): No. of parallel processes Select the number of parallel PERMAS processes to be launched.

92 VI

MpCCI 3.1.0-1

VI Codes Manual a) code idP ermas < code idCF D Permas not running CFD (receive) Permas 1 CFD (send) 2 2 1 CFD (exchange) 3 4 3 2 CFD (skip) 1 4 6 5 5 7 8 7 CFD (skip) 8 seriel coupling Permas 2 2 3 2 3 4 6 CFD (exchange) 9 seriel coupling Permas 1 2 1 4 CFD (send) 5 parallel coupling Permas 1 1 2 2 3 Permas

8.2 Coupling Process a) code idP ermas > code idCF D CFD (receive) 1 3 4 2 3 3 4 4 5 parallel coupling 4 3 4 5 4 parallel coupling 2 5 7 8 4 5 parallel coupling 6 9 seriel coupling

Permas

Permas

Possible algorithm Inadvisable algorithm Figure 5: Coupling algorithm Gauss-Seidel for PERMAS with a CFD code, code id is dened by the position of PERMAS in the MpCCI GUI

Select parallel mode Dene if the simulation is run on a shared or distributed le system.

8.2.5.2 Batch Execution


PERMAS always runs as a batch process. Therefore no special settings are necessary for batch execution.

MpCCI 3.1.0-1 VI 93

8 PERMAS

VI Codes Manual

Figure 6: PERMAS options for a parallel run

8.2.6 Post-Processing
Post-processing of PERMAS results can be performed e. g. with MEDINA. The results "<job name>.bof" or any other result le supported by PERMAS are stored in the same directory as the input le.

94 VI MpCCI 3.1.0-1

VI Codes Manual

8.3 Code-Specic MpCCI Commands

8.3 Code-Specic MpCCI Commands


The MpCCI subcommands available for PERMAS are: Usage: mpcci PERMAS [-]option

Synopsis: mpcci PERMAS is used to get information about PERMAS.

Options: -help -info -releases -scan <UCI or data file>

This screen. List verbose information about all PERMAS releases. List all PERMAS releases which MpCCI can find. Run the scanner and create a scanner output file.

The subcommands -info and -releases are described in 1.1 Common MpCCI Subcommands for Simulation Codes .

MpCCI 3.1.0-1

VI 95

8 PERMAS

VI Codes Manual

8.4 Trouble shooting, open issues and known bugs


Feature: Fluid-Structure-Interaction Version: 11,12 Problem: Coupling OverPressure results in unphysical behavior Workaround: Use WallForce or RelWallForce References:

96 VI MpCCI 3.1.0-1

VI Codes Manual

9.2 Coupling Process

9 RadTherm
9.1 Quick Information
Physical Domains Company Name Company Homepage Support Radiation ThermoAnalytics www.thermoanalytics.com support thermoanalytics.com

9.1.1 Supported Coupling Schemes


RadTherm may only receive data before a solution and send data after a solution. RadTherm supports the following Coupling Type V-4.4 Coupling Step : Steady state radiative heat transfer Transient radiative heat transfer

9.1.2 Supported Platforms and Versions


The following versions of RadTherm are supported by MpCCI: platform ia64 lnx9 mswin x86 sun x86 64 supported versions 9.0.1 9.1.0 MPCCI ARCH linux ia64 X linux x86 X X mswin x86 X X X solaris sparc (sles10|linux) (amd64|em64t|x64) X X

9.1.3 References
RadTherm Documentation is part of the RadTherm distribution.

9.1.4 Adapter Description


The code adapter for RadTherm is based on a shared library "libradthermmpcci.so|sl|dll" which is loaded by RadTherm and it includes the necessary interface functions.

MpCCI 3.1.0-1

VI 97

9 RadTherm

VI Codes Manual

9.2 Coupling Process 9.2.1 Model Preparation


Models can be prepared as usually. The coupling components must be dened as separate parts.

9.2.2 Models Step

Figure 1: RadTherm options in the Models Step In the models step, the following options must be chosen: RadTherm program family Select the RadTherm program family from muses, musespro, radtherm, radthermir, radthermrt. RadTherm release Select the release of RadTherm you want to use. latest (default) will select the latest version which is installed on your system. .tdf le Select the "*.tdf" le of your RadTherm model.

9.2.3 Coupling Step


The RadTherm adapter only stores quantities directly (Direct). RadTherm supports the following quantities for coupling: Quantity DeltaTime FilmTemp IterationNo PhysicalTime Residual TimeStepNo WallHeatFlux Dim. Scalar Scalar Scalar Scalar Scalar Scalar Scalar Default Value 1.0 s 300.0 K 0 0.0 s 0.0 0 0.0 W/m2 Integration Type max/. . . Field max/. . . max/. . . max/. . . max/. . . Flux dens. Coupling Dimension Global Face Global Global Global Global Face Location global Element global global global global Element Send Option Direct Direct Direct Direct Direct Direct Receive Option Direct

98 VI

MpCCI 3.1.0-1

VI Codes Manual Quantity WallHTCoe WallTemp Dim. Default Value Scalar 0.0 W/m2 K Scalar 300.0 K Integration Type Field Field Coupling Dimension Face Face Location Element Element

9.2 Coupling Process Send Option Direct Receive Option Direct

9.2.4 Go Step

Figure 2: RadTherm Go Step.

In the Go Step the following options can be chosen: Run in batch mode If you want to run RadTherm in batch mode,select the option. No. of parallel processes Specify the number of processes for a parallel run. Execution below. See 9.2.5.2 Parallel

9.2.5 Running the Computation


To run the RadTherm computation you have to go in the section Analyse and click on the Run button.

9.2.5.1 Hooks Functions


Before starting the RadTherm computation the model has to be correctly setup to use the MpCCI Adapter by using the RadTherm GUI. You have to select the Analyse Params section in the RadTherm GUI in order to access the hooks functions setup Figure 3. By clicking on the button HookFunctions... the setup windows will appear. You have to setup these functions for the following available RadTherm hooks: Solution Start Select the routine radthermmpcci::TaiMpCCI solution start(). This is the function to initialize RadTherm with MpCCI.

MpCCI 3.1.0-1

VI 99

9 RadTherm

VI Codes Manual

Figure 3: RadTherm Hooks Functions Setup.

Time Step Start Select the routine radthermmpcci::TaiMpCCI timestep start(). This is the function to receive data before a new solution computation. This function has only to be hooked for transient simulation. Iteration Start Select the routine radthermmpcci::TaiMpCCI iteration start(). This is the function to receive data before a new solution computation. This function has only to be hooked for steady state simulation. IterationEnd Select the routine radthermmpcci::TaiMpCCI iteration end(). This is the function to send data after a solution computation. This function has only to be hooked for steady state simulation. Time Step End Select the routine radthermmpcci::TaiMpCCI timestep end(). This is the function to receive data after a solution computation. This function has only to be hooked for transient simulation. Solution End Select the routine radthermmpcci::TaiMpCCI solution end(). This is the function to terminate the coupled simulation.

100 VI

MpCCI 3.1.0-1

VI Codes Manual This setting has to be saved in the RadTherm model.

9.2 Coupling Process

RadTherm saves the library information in the model. You may encounter some problems if you change your RadTherm platform computation. You will have to re-setup the hooks functions and delete correctly the old reference to the library.

9.2.5.2 Parallel Execution


There are two possibilities to run RadTherm in parallel: In batch mode By activating the batch mode you are able to specify the number of parallel processes to use. To run a RadTherm job in batch the the function hooks has to be already set in the model. In RadTherm GUI Before starting RadTherm computation you have to specify the number of processors to use in the EditPreferencesApplication Figure 4.

Figure 4: Number of processors setting in RadTherm GUI.

MpCCI 3.1.0-1

VI 101

9 RadTherm

VI Codes Manual

9.2.6 Post-Processing
After having solved a coupled simulation the results computed on the RadTherm side may be visualized by using the RadTherm post-processing tool.

9.3 Code-Specic MpCCI Commands


The MpCCI subcommands available for RadTherm are: Usage: mpcci RadTherm [-]option

Synopsis: mpcci RadTherm is used to get information about RadTherm.

Options: -help -info -releases -scan <tdf file>

This screen. List verbose information about all RadTherm releases. List all RadTherm releases which MpCCI can find. Run the scanner and create a scanner output file.

102 VI

MpCCI 3.1.0-1

VI Codes Manual

10.1 Quick Information

10 STAR-CD
10.1 Quick Information
Physical Domains Company Name Company Homepage Support Tutorials CFD, Fluid, FluidThermal CD-adapco www.cd-adapco.com www.cd-adapco.com/support/index.html VII-4 Exhaust Manifold VII-3 Elastic Flap in a Duct VII-5 Busbar System

The STAR-CD adapters for STAR-CD 3.26 and STAR-CD 4.0x are based on dierent philosophies. For STAR-CD 3.26 the standard user coding is required. Templates for some of the user subroutines are part of the adapter for STAR-CD 3.26. With STAR-CD 4.0x the STAR-CD plugin concept is used. Open issues and known bugs are documented in 10.6 Trouble shooting, open issues and known bugs

10.1.1 Supported Coupling Schemes


STAR-CD supports exchange before solution.The initial transfer settings determine the coupling algorithm V-3.3 Coupling Algorithms . Unidirectional and bidirectional transfer is possible. STAR-CD 3.26 A modication of the transfer procedure is possible by modifying "posdat.f" and for node movements in "newxyz.f" (see also 10.5.3 Automatic model preparation for STAR-CD 3.26 and STAR-CD 4.0x ). STAR-CD 4.0x In the plugin version of the adapter at the end of a simulation run a nal transfer will be accomplished which is inverted to the initial exchange setting. Initial Transfer receive send skip exchange Final Transfer send receive -

In a simulation where the solution algorithm was set to transient SIMPLE or PISO, after the last iteration step another transfer of data is carried out. Unfortunately at this last exchange received node movements are not accounted for in STAR-CD. This might be important for a restart as the partner code might start from a dierent state of nodal positions.

MpCCI 3.1.0-1

VI 103

10 STAR-CD

VI Codes Manual

10.1.2 Supported Platforms and Versions


The list of supported platforms and versions is given in Table 1.

10.1.3 References
STAR-CD Documentation is part of the STAR-CD distribution (e. g. STAR-CD User Guide).

10.1.4 Adapter Description


The code adapter is a DSO (Dynamic Shared Object) library. STAR-CD 3.26 For STAR-CD 3.26 the library "libstarcdmpcci-<precision>.a" is linked as part of the user subroutine library "libstarusr.so" in the ule directory. Data transfer is accomplished over the "posdat.f" user subroutine. Several other user subroutines are used to handle data management in the adapter (see 10.5 Code Adapter Reference ). STAR-CD 4.0x For STAR-CD 4.0x the MpCCI plugin library "libstarcdmpcci.so" of the desired precision is retrieved from MpCCI installation and dynamically loaded by STAR-CD at runtime and all data transfer and management is carried out over plug-in routines.

10.2 Coupling Process


Please read also IV-2 Setting up a Coupled Simulation .

10.2.1 Model Preparation


The STAR-CD model can be prepared with pro-STAR. Please consider the following approach for model preparation: The STAR-CD solver internally operates only in SI units. The geometrical dimensions should best be dened in meters. However, it is possible to scale the mesh dimensions by a scaling factor during the preparation of the geometry les (".geom"). The STAR-CD model must contain a denition of the coupling domains and boundary regions (e. g. couple-wall). Boundary faces of coupled boundaries may not lie on trimmed cells. Those boundary

104 VI

MpCCI 3.1.0-1

VI Codes Manual

10.2 Coupling Process

faces must be removed from coupling region. Polyhedral grids must be triangulated on the boundary surface using pro-STAR command TRISURF (Figure 1). When receiving wall temperature the particular boundarys Wall Heat option must be set to Fixed, receiving heat ux requires option Flux. To enable a coupled simulation with an unprepared model several modications of the model are required. For popular coupling types ( V-3.1.2 Coupling Types ) the modications can be carried out by MpCCI automatically. For special congurations one might be obliged to accomplish manual rework, which is described in 10.5 Code Adapter Reference . Restarting a STAR-CD case will work as usual by denition in pro-STAR (see command RDATA ). In the MpCCI Go Step the restart options of the problem le may be overwritten by selecting option Restart prepared case ( 10.2.4 Go Step ), which will invoke STAR-CD with option -restart. This option will cause a Standard Restart.

Figure 1: Triangulation of the boundaries of a polyhedral mesh with command TRISURF

It is recommended to create a complete STAR-CD model rst and test it separately without cosimulation. The quantities, which will be later on transferred by the partner code, can be simulated by appropriate loads or boundary conditions if desired.

MpCCI 3.1.0-1

VI 105

platform aix64 5.1-pwr3-xlf 7.1-dso aix64 5.2-pwr3-xlf90 9.1-dso hpux64 11.00-pa8000-f90-dso hpux64 11.22-itanium2-f90-dso irix64 6.5-mips4-f77 7.3-dso linux64 2.4-absoft 9.0a-gcc 4.1.1-glibc 2.2.5-dso linux64 2.4-absoft 9.0a-glibc 2.2.5-dso linux64 2.4-itanium-efc 7.1-glibc 2.2.4-dso linux64 2.4-itanium-ifort 9.0-gcc 4.1.1-glibc 2.2.4-dso linux64 2.4-pgf90 5.2-glibc 2.2.5-dso linux64 2.4-pgf90 6.2-gcc 4.1.1-glibc 2.2.5-dso linux 2.4-absoft 8.2ap1-glibc 2.2.2-dso linux 2.4-absoft 9.0a-gcc 4.1.1-glibc 2.2.2-dso osf1 5.1-f77 5.4.1-dso sunos64 5.10-ultra3-f90 8.2-dso sunos64 5.8-ultra3-f90 7.0-dso

106 VI
supported versions MPCCI ARCH 3.26 4.04.006 4.06.007 4.08.006 aix51 power X aix5(1|2) power X X X hpux11 parisc X hpux1123 ia64 X irix65 mips4 X (sles10|linux) (amd64|em64t|x64) X X X (sles10|linux) (amd64|em64t|x64) X linux ia64 X linux ia64 X X X (sles10|linux) (amd64|em64t|x64) X (sles10|linux) (amd64|em64t|x64) X X X linux x86 X linux x86 X X X osf alpha X solaris sparc X X X solaris sparc X

10 STAR-CD

MpCCI 3.1.0-1

VI Codes Manual

VI Codes Manual

10.2 Coupling Process

10.2.2 Models Step

Figure 2: STAR-CD options in the Models Step In the Models Step, the following options must be selected: (Figure 2): STAR-CD release Select the release of STAR-CD you would like to use, latest (default) will select the latest installed STAR-CD version for which an MpCCI adapter is also installed. Please make sure that the model le was not created with a STAR-CD version newer than the STAR-CD version used with MpCCI. Name of the Star-CD modelle Select the model le (".mdl") of your STAR-CD model.

10.2.3 Coupling Step


In STAR-CD, the exchange of all quantities is handled by user subroutines or plug-ins, which depends on STAR-CD Version (STAR-CD 3.26, STAR-CD 4.0x). Transfer data is read and written directly or over user scalars (see STAR-CD documentation Additional Scalars). The scalar array is solely used for storing the received or to be sent data. STAR-CD oers scalar arrays and the user needs to decide on which scalar array the data will be stored. The array index is dened in the Quantities section of the corresponding quantity to be exchanged as depicted in Figure 3. The storage index is automatically increased in the MpCCI GUI whenever new quantities are added. However, the user is responsible to choose a free storage index if some scalar arrays are already reserved for settings going beyond MpCCI (e. g. multi-component models). STAR-CD supports the following quantities for coupling: Quantity AbsPressure Dim. Scalar Default Value 0.0 N/m2 Integration Coupling Type Dimension Flux dens. Face, Volume Location Element Send Option Direct Receive Option SCALAR

MpCCI 3.1.0-1

VI 107

10 STAR-CD Quantity AcstPressure BodyForce BoundaryMassFlux BoundaryTemp BoundaryTotalPressure CGAngle CGOmega CGPosition CGVelocity ChargeDensity Current1 CurrentDensity DeltaTime Density DynPressure ElectrCond1 ElectrCond3 ElectrCondX ElectrCondY ElectrCondZ ElectricFlux ElectrRes1 ElectrRes3 ElectrResX ElectrResY ElectrResZ Enthalpy FilmTemp HeatFlux HeatSource IntFlag IterationNo JouleHeat LorentzForce Dim. Scalar Vector Scalar Scalar Scalar Vector Vector Vector Vector Scalar Scalar Vector Scalar Scalar Scalar Scalar Vector Scalar Scalar Scalar Vector Scalar Vector Scalar Scalar Scalar Scalar Scalar Vector Scalar Scalar Scalar Scalar Vector Default Value 0.0 N/m2 0.0 N/m3 0.0 kg/m2 s 300.0 K 0.0 N/m2 0.0 rad 0.0 rad/s 0.0 m 0.0 m/s 0.0 C/m3 0.0 A 0.0 A/m2 1.0 1.0 0.0 0.0 s kg/m3 N/m2 S/m Integration Type Flux dens. Flux dens. Flux dens. Field Flux dens. max/. . . max/. . . max/. . . max/. . . Field max/. . . Flux dens. max/. . . Field Flux dens. Field Field Field Field Field Flux dens. Field Field Field Field Field Flux dens. Field Flux dens. Flux dens. max/. . . max/. . . Flux dens. Flux dens. Coupling Dimension Volume Volume Face Face Face Global Global Global Global Volume Global Face, Volume Global Volume Face Face, Volume Face, Volume Volume Volume Volume Face, Volume Face, Volume Face, Volume Volume Volume Volume Volume Face Volume Volume Global Global Volume Volume Location Element Element Element Element Element global global global global Element global Element global Element Element Element Element Element Element Element Element Element Element Element Element Element Element Element Element Element global global Element Element

VI Codes Manual Send Option Direct SCALAR Receive Option SCALAR SCALAR SCALAR SCALAR SCALAR Direct Direct Direct Direct Direct Direct Direct Direct SCALAR SCALAR Direct Direct SCALAR SCALAR Direct Direct Direct SCALAR Direct SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR

0.0 S/m 0.0 0.0 0.0 0.0 S/m S/m S/m C/m2

0.0 ohm m 0.0 ohm m 0.0 0.0 0.0 0.0 300.0 0.0 0.0 0 0 0.0 0.0 ohm m ohm m ohm m W/m3 K W/m2 W/m3

SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR Direct Direct Direct SCALAR Direct Direct SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR Direct Direct SCALAR SCALAR

W/m3 N/m3

108 VI

MpCCI 3.1.0-1

VI Codes Manual Quantity MagneticFlux MassFlowRate MassFluxRate NDisplacement NPosition OverPressure PhysicalTime PorePressure RealFlag RefPressure RelWallForce Residual SpecicHeat Temperature ThermCond1 ThermCond3 ThermCondX ThermCondY ThermCondZ TimeStepNo TotalPressure Velocity Voltage1 Wall2Temp WallForce WallHeatFlux WallHTCoe WallTemp Dim. Vector Scalar Scalar Vector Vector Scalar Scalar Scalar Scalar Scalar Vector Scalar Scalar Scalar Scalar Vector Scalar Scalar Scalar Scalar Scalar Vector Scalar Biscalar Vector Scalar Scalar Scalar Default Value 0.0 T 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.12e5 0.0 0.0 1.0 300.0 0.0 0.0 0.0 0.0 0.0 0 0.0 0.0 0.0 300.0 0.0 0.0 0.0 300.0 Integration Coupling Type Dimension Flux dens. Face, Volume kg/s Flux Face kg/m2 s Flux dens. Face m Field Face, Volume m Field Face, Volume N/m2 Flux dens. Face, Volume s max/. . . Global N/m2 Flux dens. Volume max/. . . Global N/m2 max/. . . Global N Flux Face max/. . . Global J/kg K Field Volume K Field Volume W/m K Field Face, Volume W/m K Field Face, Volume W/m K Field Volume W/m K Field Volume W/m K Field Volume max/. . . Global N/m2 Flux dens. Face m/s Field Face, Volume V max/. . . Global K Field Face N Flux Face W/m2 Flux dens. Face W/m2 K Field Face K Field Face

10.2 Coupling Process Location Element Element Element Node Node Element global Element global global Element global Element Element Element Element Element Element Element global Element Element global Element Element Element Element Element Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Direct Send Receive Option Option SCALAR SCALAR Direct Direct Buered Buered SCALAR Direct SCALAR Direct Direct SCALAR Direct SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR SCALAR Direct SCALAR Direct SCALAR SCALAR SCALAR SCALAR SCALAR

10.2.4 Go Step
STAR-CD oers a number of options in the Go Step, see Figure 4.

MpCCI 3.1.0-1

VI 109

10 STAR-CD

VI Codes Manual

Figure 3: Coupling Step: Specication of the storage index for additional scalar arrays in STAR-CD

Initial quantities transfer In STAR-CD the rst exchange is invoked prior to the rst iteration step (e. g. a time step in a transient simulation). The rst exchange conguration of STAR-CD and the partner code determines the coupling algorithm. Select one of receive, send, exchange or skip to congure this rst exchange. The meaning of the options are further described in V-3.3 Coupling Algorithms . Please enter the startup procedure Dene what startup procedure is desired: Prepare case and start MpCCI modies your model le ("<casename>.mdl") and generates all STAR-CD input les (e. g. "<casename>.prob"). A geometry le "<casename>.geom" is written if nonexistent. For STAR-CD 3.26 several necessary user subroutines will be placed in the ule directory if not existent and these user subroutines will be hooked into the STAR-CD model. For STAR-CD 4.0x necessary hooks are activated and if Use MpCCI plug-ins (Star V4 only) is selected the plugin is activated in the STAR-CD model le. Start prepared case MpCCI assumes that all input les (e. g. "casename.prob") for the simulation run with the necessary modications (hooked user subroutines etc. ) are already existent. Modications could have been accomplished by MpCCI through Prepare case and start or manually in pro-STAR. Restart prepared case This will lead to the same assumption as for Start prepared case, but will also start the STAR-CD simulation with the option -restart, which will overwrite restart settings

110 VI

MpCCI 3.1.0-1

VI Codes Manual

10.2 Coupling Process

Figure 4: STAR-CD options in the Go Step

in problem le to launch a Standard Restart. An Initial Field Restart must be congured over pro-STAR (see command RDATA ). A detailed description of the preparation procedure for advanced users is given in 10.5 Code Adapter Reference . Backup model le In the start-up procedure, depending on the settings above, the model le ("<casename>.mdl") might be modied by MpCCI. Pushing this button will create a backup of your model le. Use the MpCCI plugin library (Star V4 only) Enabling this button will cause MpCCI to use the plug-in library in STAR-CD. It can only be used with STAR-CD 4.04 or a higher version. For an activation of the plug-in in the STAR-CD model the option Prepare case and start must be selected. See 10.5.3 Automatic model preparation for STAR-CD 3.26 and STAR-CD 4.0x for a manual activation of the plugin in pro-STAR. Use a data lter subroutine (Star V4 only) A user subroutine "starmpcci filterdata(level)" must be placed in the ule directory. The subroutine has an integer value argument level, which is 0 before a transfer and 1 after a transfer. In this subroutine the quantities can be manipulated at level 0 before they are sent and restored at level 1 after they were sent to the partner code. It can only be used with STAR-CD 4.04 or higher.

MpCCI 3.1.0-1

VI 111

10 STAR-CD

VI Codes Manual

Rebuild shared library If this option is selected, STAR-CD will rebuild the DSO library (DSO - dynamic shared objects) with the user subroutines in "<starcdworkdir>/ufile/". An alternative procedure would be to rebuild those libraries with mpcci starcd -dsomake before the simulation is started ( 10.3 Code-Specic MpCCI Commands and 10.5 Code Adapter Reference ). Overwrite ule sources MpCCI will copy the necessary ule sources ("posdat.f", "newxyz.f", "dtstep.f", etc. ) needed for STAR-CD 3.26 from the MpCCI directory to ule directory. Existing sources are automatically copied into backup les. Additional activation of Rebuild shared library is necessary. This procedure corresponds to calling mpcci starcd -ufile prior to the simulation run ( 10.3 Code-Specic MpCCI Commands and 10.5 Code Adapter Reference ). Double precision mode Use this option to select the double precision mode for STAR-CD computations. Additional command line options It is possible to invoke STAR-CD with additional command line options (Star Run Options). Please refer to the STAR-CD User Guide for possible options. Steady state: No. of iterations without coupling For a steady state simulation (e. g. thermal simulation) it might be necessary to let STAR-CD do subcycling in order to reach a stable solution. After each coupling step STAR-CD will carry out the specied number of iterations before the next coupling step is accomplished. Run parallel Run STAR-CD in parallel mode, see 10.2.5.1 Parallel Execution

Use grid morpher Activate the MpCCI grid morpher to adapt the mesh to moved or deformed boundaries which are caused e. g. by structural deformations. Depending on the degree of deformation, deactivation of the grid morpher will probably result in corrupted grids. The morpher is described in detail in 10.4.1 MpCCI Grid Morpher . Alternatively the pro-STAR grid morpher might be applied 10.4.3 pro-STAR Grid Morpher .

10.2.5 Running the Computation


When the Start button is pressed, STAR-CD is started with the options given in the Go Step. If the Stop button is pressed, a stop-le is created and STAR-CD will stop the next time it checks the presence of a stop le.

10.2.5.1 Parallel Execution


If the Run parallel check button is activated the following options are raised (Figure 5): No. of parallel processes Select the number of parallel STAR-CD processes to be launched. Parallel MPI communicator Select the MPI implementation. Further details may be taken from the STAR-CD User Guide under star run options.

112 VI

MpCCI 3.1.0-1

VI Codes Manual

10.2 Coupling Process

Figure 5: STAR-CD options for a parallel run

Shared le system Check here if the le system is shared for all hosts and no data copy for local scratch disks is necessary (see STAR-CD User Guide Star Run Options -distribute). Optional host host... to be used Enter host names for parallel execution of STAR-CD. Optional hostlist le Specify a hostle, from which host names are extracted. Use default hostle A default hostle can be congured by setting MPCCI HOSTLIST FILE Hostlist les . V-3.4.2

In case that a hostlist and a hostle are dened, MpCCI adds up the hosts and passes as much hosts as dened processes to STAR-CD. The order of the host denitions in the MpCCI GUI denes the priority of the employed hosts (1-hostlist, 2-hostle 3-default hostle).

10.2.5.2 Batch Execution


STAR-CD is always run as a batch process, therefore no special settings are necessary for batch execution.

10.2.6 Post-Processing
Post-processing for the STAR-CD part of the results can be performed as in ordinary computations, e. g. with pro-STAR. The results "<job name>.pst/ccmp" or "<job name>.pstt/ccmt" le can be found in the same directory as the input le.

MpCCI 3.1.0-1

VI 113

10 STAR-CD

VI Codes Manual

To visualize the data from user scalar you should select the data type Cell & Wall/Bound (Smooth) option in pro-STAR.

114 VI

MpCCI 3.1.0-1

VI Codes Manual

10.3 Code-Specic MpCCI Commands

10.3 Code-Specic MpCCI Commands


The MpCCI subcommands available for STAR-CD are: Usage: mpcci StarCD [-]option

Synopsis: Use mpcci StarCD to get information about StarCD, to build/install your private PNP DSO adapter and more... Most of the required steps are automatically done within the MpCCI GUI. The commandline version may be helpful in case of problems and for debugging.

Options: -dsomake

[-dp] [release] Install the StarCD PNP DSO library for MpCCI in your local "ufile" directory. If you have your own sources the new PNP DSO will contain both, MpCCI and your own code. If you wish to modify the sources then please first copy the MpCCI versions of POSDAT and NEWXYZ using the option -ufile. [-dp] is for linking DOUBLE PRECISION code.

-gmdmake

<case> Make an MpCCI grid morpher data file from a StarCD case file.

-help This screen. -info List verbose information about all StarCD releases. -magic [case] Print the magic tokens of the MpCCI grid morpher data file

MpCCI 3.1.0-1

VI 115

10 STAR-CD <case>.gmd or all gmd files in the current directory. -probcheck [case] Print the MpCCI relevant switches from the problem file <case>.prob or all problem files in the current directory. -releases List all StarCD releases which MpCCI can find. -scan <case> Run the scanner and create a scanner output file. [release] Copy the MpCCI versions of POSDAT and NEWXYZ into your local "ufile" directory and do some checks. Existing sources are automatically copied into backup files before. You may then edit the sources, add your own code to POSDAT and NEWXYZ and make the PNP DSO (see -dsomake).

VI Codes Manual

-ufile

The subcommands -info and -releases are described in 1.1 Common MpCCI Subcommands for Simulation Codes .

10.4 Grid Morphing


The grid morpher will smooth a grid based on the displacements of some boundary or interior vertices. A moving or morphing grid capability is always required with uid-structure interactions. The user has the choice between the MpCCI Grid Morpher ( 10.4.1 MpCCI Grid Morpher ) and the pro-STAR Grid Morpher ( 10.4.3 pro-STAR Grid Morpher ). Restarting a previously morphed analysis with MpCCI Grid Morpher is described in 10.4.2 Restart with MpCCI Grid Morpher

10.4.1 MpCCI Grid Morpher


The morpher controls the results of the morphing step, it may control the length of the edges, the shape and size of faces and also checks the quality of cells. There are options available to limit the compression and elongation of edges. The morpher allows vertices to oat along semi-planar boundaries, e.g. symmetry planes. The following options (Figure 6) may be adjusted, whereas the default values are in many cases appropriate.

116 VI

MpCCI 3.1.0-1

VI Codes Manual

10.4 Grid Morphing

Optional morpher hostname Enter an optional hostname for a remote execution of the MpCCI Grid Morpher. Morpher port no. species the port address on which the MpCCI Grid Morpher listens for the client connection. The default port is in most cases acceptable, modications are only required if rewalls block connections or multiple morphers are running in parallel on the same host. Optional morphing script Invoke a shell script where all the options described below are specied. In the case where no script is dened, a script with the current options is stored in the working directory of the STAR-CD model. The shell script le will be named "mpcci morpher <model name>.sh". Please select the output level Activate output level of the MpCCI Grid Morpher. quiet no output default medium level output verbose high level output full highest level output (verbose and received node displacements) Check edges Activate to invoke quality checks for edges during morpher run. Check faces Activate to invoke quality checks for faces during morpher run. Check cells Activate to invoke quality checks for cells during morpher run. List of cell type ids (Integers or ALL) Enter the cell table number of the uid domains where the grid morpher should be applied. If you want to involve all uid domains please enter ALL. Min. relative edge length change Enter a lower limit for the ratio of the edge length, calculated by the morpher, to the edge length of the input grid provided to the morpher. A modied value might be interesting if the morpher generates too small edge lengths. Max. relative edge length change Enter an upper limit for the ratio of the edge length, calculated by the morpher, to the edge length of the input grid provided to the morpher. This might be desired if the morpher generates too large edge lengths. Min. change of face area Enter a lower limit for the ratio of the face area, calculated by the morpher, to the face area of the input grid provided to the morpher. This might be desired if the morpher generates too small face areas. Max. change of face area Enter an upper limit for the ratio of the face area, calculated by the morpher, to the face area of the input grid provided to the morpher. This might be desired if the morpher generates too small face areas. Max. face aspect ratio Enter an upper limit for the cells aspect ratio. For triangular faces the aspect ratio is build by the height to the corresponding maximum edge length.

MpCCI 3.1.0-1

VI 117

10 STAR-CD

VI Codes Manual

Min. angle allowed in faces and cells Enter a lower limit for angles in faces and cells to prevent distortion. Fixed nodes on xed boundaries Enter the amount of cell levels to be xed seen from boundaries with xed nodes. Fixed nodes on deformed boundaries Enter the amount of cell levels to be xed seen from boundaries with displaced nodes. The specied number of node levels will be moved with the boundary in a rigid manner. Optional list of oating boundary regions Enter the boundary region numbers corresponding to the STAR-CD model, where a sliding of vertices is permitted. By default oating is permitted only on symmetry and cyclic boundaries. Vertices on inlet, outlet and wall regions are xed by default. Optional list of xed boundary regions Enter the boundary region numbers corresponding to the STARCD model, where a oating of vertices is explicitly not permitted (e. g. in the case where you might want to x vertices on a symmetry plane). Factor for level based damping Include a level based damping (default value is recommended). Morphing relaxation factor Enter a relaxation factor for solving the equation system. Larger values will speed up convergence. In case of instability it might be helpful to reduce the value. Max. no. of iterations Number of iterations for solving the equation system. Convergence tolerance The convergence tolerance is the ratio of the maximum node displacement at the beginning of the morphing iteration to the node displacement of the current morphing iteration step. The iterative process for solving the equation system will stop, when the convergence tolerance is reached. Smoothing steps Specify the amount of laplacian smoothing steps. Smoothing should be handled with care. The morpher process may be monitored within an additional output terminal and a morpher log le in the STAR-CD working directory ("mpcci morpher <model name>.log").

10.4.2 Restart with MpCCI Grid Morpher


There are two ways to carry out a restart with previously morphed data: Take the original model le and read the physical quantities including moved grid coordinates from restart le ("<casename>.pst/<casename>.ccmp"). The MpCCI Grid Morpher reads the grid coordinates from original model le and then receives the restart coordinates in one step. For large displacements the morpher might collapse.

118 VI

MpCCI 3.1.0-1

VI Codes Manual

10.4 Grid Morphing

For a restart run one can build up a new model le with the already moved coordinates: 1. Start pro-STAR 2. Resume original model "<case org>.mdl" 3. Read previous result "<case org>.ccmp/.pst" which contains moved coordinates 4. Get the moved coordinates with GETV COOR , pro-STAR will conrm VERTEX COORDINATES STORED 5. Dene restart from "<case org>.ccmp/.pst" 6. Write problem le "<case restart>.prob" 7. Write geom le "<case restart>.geom" 8. Save model as "<case restart>.mdl", conrm **WARNING - THE COORDINATES CURRENTLY STORED WERE READ FROM POST DATA. IF YOU CONTINUE YOU WILL OVERWRITE YOUR ORIGINAL GEOMETRY. CONTINUE (N/Y)? with Y 9. You have now stored a model with moved coordinates which can be retrieved by the morpher. Use <case restart> for further simulation. Be careful not overwrite your original model.

10.4.3 pro-STAR Grid Morpher


The pro-STAR Grid Morpher is available since STAR-CD 4.04 and supplied and supported by CD-adapco. There is a pro-STAR Grid Morpher documentation in the STAR-CD supplementary notes. Further documentation can be retrieved in pro-STAR help regarding the command pro-STAR morp . The pro-STAR Grid Morpher is applied by calling pro-STAR in batch mode during the simulation. The nodal deformations are received through MpCCI Code Adapter and handed over to pro-STAR. In order to use the pro-STAR grid Morpher the following steps must be accomplished. As the procedure might change in future it is advisable to contact CD-adapco for recent denitions. 1. Open model le "<casename>.mdl" in pro-STAR. 2. Add the following lines to the extended data block: BEGIN MOVINGMESH IGNORE_LAHEAD_REQUESTS NXYZ_BEFORE NO_NXYZ_AFTER MOVE_ALL_PROCS END MOVINGMESH

MpCCI 3.1.0-1

VI 119

10 STAR-CD 3. Create a le "morph.cgrd" containing the line: IFILE starmorph.MAC 4. Create an event le "<casename>.evn" in pro-STAR: MEMO MAXEVE 10 MEMO WRITE MVGR ON EVENT PROSTAR EVFI INITIAL <casename>.evn EVSTEP 1 TIME 0.0 EGRID READ morph.cgrd EVSAVE 1

VI Codes Manual

5. Provide a macro "starmorph.MAC" which is executed by pro-STAR. The following commands are exemplary: !scale of boundary point length scale of influence (m) *set scl1 0.0 *set scl2 0.01 *set scl3 0.1 ! !-set increment frequency for updating reference mesh !- incrm = 0 reference grid is always initial grid !- incrm = 1 reference grid is always previous step !- incrm = n reference grid is updated every nth step *set incrm 10 ! !copy the moved and all other vertices coordinates into !vertex register 1 vreg copy,, 0,1 ! ! write out the reference grid at beginning *if time eq 0. vwrit PROSTAR_VERT1.vrt,,,,bloc *else ! read in the reference grid during run vread PROSTAR_VERT1.vrt,,,,bloc *endif ! !reset the morpher morp clear !

120 VI

MpCCI 3.1.0-1

VI Codes Manual !grab the vertices on the fsi interface !(here e.g. boundary region 5) bset news rlist 5 vset news bset ! !If morphing in 2d in xy-plane is desired morp dime xy ! !limit number of control points on the fsi surface !(here e.g. to 200) morp tout 200 ! !set the control points on the fsi surface for morphing morp vreg 1,vset,,, scl1 ! !fix the vertices on boundary planes !( here e.g. region 1 morp gpla regi 1,, scl2 ! !allow sliding on boundary planes !(here e.g. region 2) morp gsym regi 2,, scl3 ! !grab the vertices on other boundaries to fix vertices !(here e.g. region 8,9 and 10) bset news rlist 8,9,10 vset news bset !maybe thin out to get less control points on other boundaries !(here e.g. to 100) morp tout 100 ! !set control points of other boundaries for morphing morp vreg 1,vset,,, scl2 ! !excute the morpher morp exec ! !update the reference grid at requested increments bset news rlist 5 vset news bset vreg copy vset 1 0 !

10.4 Grid Morphing

MpCCI 3.1.0-1

VI 121

10 STAR-CD *if incrm gt 0 *calc modu,,mod,ITER,,incrm *if modu eq 0 vwrit PROSTAR_VERT1.vrt,,,,bloc *endif *endif 6. Activate necessary hooks as described in and STAR-CD 4.0x .

VI Codes Manual

10.5.3 Automatic model preparation for STAR-CD 3.26

7. Use option Start prepared case in Go Step of MpCCI GUI. When post-processing the results in pro-STAR carry out the following commands: 1. Connect to event le EVFI,CONN,<casename>.evn 2. Load result le TRLO,<casename>.ccmt,MVGRID,, , C

122 VI

MpCCI 3.1.0-1

VI Codes Manual

10.4 Grid Morphing

Figure 6: STAR-CD Options for MpCCI grid morpher

MpCCI 3.1.0-1

VI 123

10 STAR-CD

VI Codes Manual

10.5 Code Adapter Reference


The MpCCI code adapter for STAR-CD 3.26 and STAR-CD 4.0x is handled by dierent procedures. Whereas for STAR-CD 3.26 the data transfer and management is accomplished by user subroutines in the ule directory, transfer is handled by STAR-CD 4.0x over plug-ins, which do not require user subroutines. As a result of the plug-in library, it is not necessary to compile user subroutines at runtime, unless the user has own user subroutines in the ule directory. The necessary libraries or plug-ins can be found in "<MpCCI home>/codes/StarCD/adapters/<StarCDrelease>/"

10.5.1 STAR-CD 3.26


The adapter involves user subroutines and user-dened scalar memory to manage the data transfer. The required user subroutines are located in the "ufile" subdirectory of the MpCCI installation. Additionally in this subdirectory subroutine examples for further coupling types "tut <subroutine name> " are supplied. The necessity of certain user subroutines for a coupled simulation is summarized in Table 3. Before the simulation run the user subroutines including the code adapter calls must be copied manually or automatically by MpCCI from "<MpCCI home>/codes/StarCD/adapters/<StarCDrelease>/ufile" to the subdirectory "ufile" of the STAR-CD working directory. The procedure could be carried out manually by using MpCCI commands (see also 10.3 Code-Specic MpCCI Commands ) mpcci starcd -ufile [release] Copy sources to ule directory. mpcci starcd -dsomake [release] Create DSO library. or automatically by MpCCI if the option Rebuild shared libraries is selected in the Go Panel. If there are no changes of the platform or of the user subroutines, there is no need to rebuild the STAR-CD DSO library.

10.5.2 STAR-CD 4.0x


In comparison to the adapter of STAR-CD 3.26 the data transfer and management is now handled over plug-ins, which are implemented in the STAR-CD solver and no user subroutines are needed anymore. The activation of the plug-ins are invoked either in pro-STAR (Table 3) or automatically by MpCCI, when the button Use MpCCI plug-ins for V4 and Prepare case and start is activated (Figure 4). STAR-CD will verify the adequate (platform, precision) plug-in library "libstarcdmpcci.so" in the MpCCI installation. As the data transfer is handled over the plug-in, "posdat.f" and the activation of a user dened posdat in pro-STAR is not needed anymore. Nevertheless STAR-CD must know which other plug-ins for data management are needed. Therefore like in STAR-CD 3.26 user dened subroutines must be activated automatically or manually (e.g. user bcdefw, see 10.5.3 Automatic model preparation for STAR-CD 3.26 and STAR-CD 4.0x ). If the MpCCI plug-in and a user subroutine is activated in the model (e.g. bcdefw), STAR-CD will rst call the plug-in bcdefw which is included in the plug-in library and afterward call, if existing, the user bcdefw in the ule directory.

124 VI

MpCCI 3.1.0-1

VI Codes Manual

10.5 Code Adapter Reference

10.5.3 Automatic model preparation for STAR-CD 3.26 and STAR-CD 4.0x
MpCCI has a limited ability to analyze the input in the MpCCI GUI and then decide what modications have to be done to enable the model for a coupled simulation. This will be carried out when starting the simulation in the Go Step ( 10.2.4 Go Step ) when option Prepare case and start is selected. One the other hand a user can do the model preparations. The commands which have to be carried out in pro-STAR are depicted in Table 3. In Table 3 the variables stand for: <name> = arbitrary name, <region id> =boundary region id in STAR-CD of the coupled surface, <case> = STAR-CD casename, <scid> = scalar index for data storage, <ctype> = cell table number to apply source terms, dened in the Coupling Step, $ = settings which are present in the original model, n x $ = depending on solver settings pro-STAR will prompt for your present settings (e. g. Roughness options).

MpCCI 3.1.0-1

VI 125

10 STAR-CD

VI Codes Manual

Feature Data transfer Data transfer MpCCI Morpher pro-STAR Morpher Receiving time step STAR-CD parallel

STAR-CD assignment user posdat (only 3.26)

pro-STAR command PRFIELD,$,$,$,USER

Quantity example all

activate plug- PLUGIN,mpcci,ON in (only 4.0x) user newxyz MVGRID,ON,$ EDATA,NEW,1 $ KEEP VERTDAT (only 3.26) MVGRID,ON,EVENT,PROSTAR see 10.4.3 pro-STAR Grid Morpher DELTIME,USER SWITCH,110,ON SC,<scid>,DEFINE,PASSIVE,UNDEF,1 <name> SC,<scid>,OFF POWA,CW<scid>,Y RDEF,<region id>,WALL,USER n x $ RDEF,<region id>,INLET,USER n x $ RSOURCE,MASS,CTAB,<ctype>,USER RSOURCE,MOME,CTAB,<ctype>,USER RSOURCE,ENTH,CTAB,<ctype>,USER

all

NPosition

event handling user dtstep switch 110

NPosition

DeltaTime

Receive/send scalar array scalar post Receive/send user bcdefw Face(2D) Receive/send user bcde Face(2D) Receive/send user uinj Volume(3D) Receive/send user sourmom Volume(3D) Receive/send user sourent Volume(3D)

WallTemp

WallTemp

AbsPressure

Density BodyForce JouleHeat

Table 3: Denitions in pro-STAR to enable the model for a coupled simulation

126 VI

MpCCI 3.1.0-1

VI Codes Manual

10.6 Trouble shooting, open issues and known bugs

10.6 Trouble shooting, open issues and known bugs


Feature: Volume Coupling Version: 3.26, 4.04 Problem: User scalars can not be retrieved from STAR-CD result le. In a restart run STAR-CD retrieves zeros for the rst iteration. Workaround: Possible workaround for uids is to hook the user subroutine "scalfn.f" inserting PHI=SCALAR(<scid>). There is no workaround for coupled solid volumes. References: VII-5 Busbar System Feature: Receiving time step from partner code Version: 3.26 Problem: Time step is set before reception. First time step is missing. Workaround: Dene a constant or variable time step in STAR-CD model which is retrieved by MpCCI or set the time step in "dtstep.f" DTSTP=<dt> before call of STARMPCCI DTSTEP. References: V-3.3.4 Exchange of Time Step Size , VII-3 Elastic Flap in a Duct Feature: Receiving time step from partner code Version: 4.04 Problem: Initial transfer is set to skip or send. Time step is unknown and not retrieved from model le. Workaround: Change your coupling algorithm to have an initial reception of time step. V-3.3.4 Exchange of Time Step Size , VII-3 Elastic Flap in a Duct Feature: Polyhedral Meshes Version: 4.04 Problem: Coupled faces must be triangulated. Workaround: Use the command TRISURF in pro-STAR.

MpCCI 3.1.0-1

VI 127

10 STAR-CD

VI Codes Manual

Feature: Face Coupling Version: 3.26, 4.04 Problem: Boundary face on trimmed cells are not accepted in MpCCI. Workaround: Remove boundary face on trimmed cells from coupling region. Feature: Transfer after last iteration Version: 4.04 Problem: In STAR-CD with transient SIMPLE and PISO algorithm a transfer is called after last iteration. Nodal displacements or moved nodal positions are received but they are not accounted for anymore in STAR-CD. Workaround: no workaround available yet. Feature: Receiving Wall Temperature Version: 3.26, 4.04 Problem: In STAR-CD receiving WallTemp is congured in MpCCI GUI, but temperature seems not to be accounted for in the solution. Solution: Check the boundary settings for the coupled wall in pro-STAR. Wall Heat must be set to Fixed. Feature: Polyhedral Meshes Version: 4.04 Problem: Cells smoothed with MpCCI morpher might collapse. Workaround: No workaround available. Further development is in progress. Feature: Restarting a previously morphed (MpCCI morpher) simulation by reading moved geometry from result le (.pst/.ccmp). Version: 3.26, 4.04 Problem: At beginning of restart the morpher reads initial geometry which is not moved 10.4.2 Restart with MpCCI Grid Morpher . The morphing algorithm might collapse. Workaround: Increase iteration number ans/or tolerance or build a new model le with moved grid for restart as described in 10.4.2 Restart with MpCCI Grid Morpher .

128 VI

MpCCI 3.1.0-1

VI Codes Manual

10.6 Trouble shooting, open issues and known bugs

Feature: Receiving nodal positions/displacements in STAR-CD Version: 4.04 Problem: MpCCI Grid Morpher is not activated, STAR-CD does not get nodal displacements. The plugin for receiving nodal positions/displacements is not called in STAR-CD Workaround: Add lines to Extended Data Block in pro-STAR: BEGIN MOVINGMESH NXYZ BEFORE NO NXYZ AFTER MOVE ALL PROCS END MOVINGMESH Feature: Restart with deformed Coupling Regions Version: 3.26, 4.04 Problem: At the end of the previous run the coupling regions to not match due to time dierence. There are orphaned nodes when restarting. Solution: Doing a neighborhood search in MpCCI fails due to mesh dierences. Use MpCCI restart les as described in V-3.3.6 Restarting a Coupled Simulation . Feature: Face coupling Version: 3.26 Problem: The coupling regions are incomplete with orphaned nodes Solution: Delete doubly dened boundaries for coupling region. Feature: Parallel run on remote host Version: 4.04, 4.06, 4.08 Problem: STAR-CD exits with error message: PNP: ***ERROR*** The required "mpcci" plug-in is not available in the STAR installation. PNP: ==\> Please check that the plug-in has been installed properly. Solution: The hosts congured for parallel run of STAR-CD do not include the host where MpCCI starts STAR-CD. Either include the host on which MpCCI starts STAR-CD in hostlist or provide the environment variable STARPLUGIN MPCCI=<MpCCI home>/codes/StarCD to all hosts intended for parallel run.

MpCCI 3.1.0-1

VI 129

MpCCI 3.1.0

MpCCI

VII Tutorial

MpCCI 3.1.0-1 Documentation Part VII Tutorial PDF version January 20, 2009

MpCCI is a registered trademark of Fraunhofer SCAI www.scai.fraunhofer.de/mpcci

Fraunhofer Institute
Algorithms and Scientic Computing Fraunhofer Institute for Algorithms and Scientic Computing SCAI Schloss Birlinghoven, 53754 Sankt Augustin, Germany Abaqus and SIMULIA are trademarks or registered trademarks of Dassault Syst`mes e ANSYS is a registered trademark of Ansys, Inc. FLUENT is a registered trademark of Fluent Inc. FLUX is a registered trademark of Cedrat of Grenoble, France ICEPAK is a registered trademark of Fluent Inc. MSC.Marc is a registered trademark of MSC.Software Corporation PERMAS is a registered trademark of Intes GmbH STAR-CD is a registered trademark of CD adapco Group RadTherm is a registered trademark of ThermoAnalytics Inc. FLEXlm is a registered trademark of Macrovision Perl has a copyright by Larry Wall and others ActivePerl has a Community License Copyright of Active State Corp. OpenSSH has a copyright by Tatu Ylonen, Espoo, Finland Java is a registered trademark of Sun Microsystems, Inc. MPICH-1 and MPICH-2 has a copyright by University of Chicago and Mississippi State University Linux is a registered trademark of Linus Torvalds UNIX is a registered trademark of The Open Group Windows, Windows XP and Windows Vista are registered trademarks of Microsoft Corp.

VII Tutorial

Contents

VII Tutorial Contents


1 2 2.1 2.2 Introduction Vortex-Induced Vibration of a Thin-Walled Structure Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 2.2.2 2.3 2.4 2.5 2.6 2.7 2.8 3 3.1 3.2 Fluid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 8 8 9 9 9 10 13 14 14 17 17 20 20 20 21 22 23 25 28 29 33 33 35 35

Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discussion of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Elastic Flap in a Duct Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 3.2.2 Solid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fluid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.3 3.4 3.5 3.6 3.7

Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.7.1 3.7.2 Starting the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . End of the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3.8

Discussion of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI 3.1.0-1

VII 3

Contents 4 4.1 4.2 Exhaust Manifold

VII Tutorial 37 37 38 38 39 40 41 42 43 44 47 51 52 54 54 55 55 56 57 60 64 65 68 69 70 70 70 71 73 73 75

Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 4.2.2 4.2.3 4.2.4 Solid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fluid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Uncoupled Flow Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Prepare Models for Coupled Simulation . . . . . . . . . . . . . . . . . . . . . . . . .

4.3 4.4 4.5 4.6 4.7 4.8 5 5.1 5.2

Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Post-processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Busbar System Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 5.2.2 Fluid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Electromagnetic Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5.3 5.4 5.5 5.6 5.7 5.8 6 6.1 6.2

Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discussion of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pipe Nozzle Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.1 6.2.2 Fluid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6.3 6.4

Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

VII

MpCCI 3.1.0-1

VII Tutorial 6.5 6.6 6.7 6.8 7 7.1 7.2

Contents 76 76 78 79 80 80 81 81 81 83 84 86 86 90 90 92 92 96 96 96 97 99

Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Discussion of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cube in a Duct Heater Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.1 7.2.2 Radiation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fluid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7.3 7.4 7.5 7.6 7.7

Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.7.1 7.7.2 Starting the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . End of the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7.8 8 8.1 8.2

Discussion of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y-Junction Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.1 8.2.2 Network Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fluid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8.3 8.4 8.5 8.6 8.7 8.8

Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 8.7.1 Starting the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Discussion of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

MpCCI 3.1.0-1

VII 5

1 Introduction

VII Tutorial

1 Introduction
The tutorial is a collection of examples. The les needed to run these examples are included in the MpCCI distribution in the directory "<MpCCI home>/tutorial". All analysis steps are explained in detail. Please keep in mind that the descriptions are written to demonstrate the usage of MpCCI, they are not very useful if you want to learn how to use the simulation codes. Overview of Tutorials 2 Vortex-Induced Vibration of a Thin-Walled Structure Physical domains: Codes: Quantities: Analysis type: Special topics: Physical domains: Codes: Quantities: Analysis type: Special topics: Physical domains: Codes: Quantities: Analysis type: Special topics: 5 Busbar System Physical domains: Codes: Quantities: Analysis type: 6 Pipe Nozzle Physical domains: Codes: Quantities: Analysis type: Special topics: Fluid-Structure Interaction Abaqus, FLUENT RelWallForce Steady-state unidirectional exchange Axisymmetry, dierent unit systems Electrothermal Analysis ANSYS, FLUX, FLUENT, STAR-CD JouleHeat, Temperature Steady-state ow eld calculation and magnetic calculation in frequency domain Fluid-Structure Interaction Abaqus, ANSYS, FLUENT, MSC.Marc NPosition, RelWallForce Transient with pre-computed ow eld Dierent unit systems Fluid-Structure Interaction Abaqus, ANSYS, FLUENT, MSC.Marc, STAR-CD DeltaTime, NPosition, OverPressure Transient Exchange of time step size, grid morphing Thermal Coupling Fluid-Solid Abaqus, PERMAS, FLUENT, STAR-CD WallTemp, FilmTemp, WallHTCoe Steady-state with pre-computed ow eld Subcycling of uid solver

3 Elastic Flap in a Duct

4 Exhaust Manifold

VII

MpCCI 3.1.0-1

VII Tutorial 7 Cube in a Duct Heater Physical domains: Codes: Quantities: Analysis type: 8 Y-Junction Physical domains: Codes: Quantities: Analysis type: Thermal Coupling Fluid RadTherm, FLUENT, STAR-CD FilmTemp,WallHTCoe,WallTemp Steady-state radiative heat transfer

1 Introduction

Fluid Mechanics and Fluid Pipe System Flowmaster FLUENT, STAR-CD BoundaryMassFlux,BoundaryTotalPressure,MassFlowRate, TotalPressure Steady-state

MpCCI 3.1.0-1 VII 7

2 Vortex-Induced Vibration of a Thin-Walled Structure

VII Tutorial

2 Vortex-Induced Vibration of a Thin-Walled Structure


2.1 Problem Description
wall vy = 0 velocity inlet vx = 31.5 cm/s y pressure outlet p = 0 rigid square 1 0.06 1 4 uid wall vy = 0 exible structure x 6

14

Figure 1: Vortex-induced vibration: Geometry and boundary conditions, ow eld around the deformed structure. The dimensions are given in cm.

Topics of this Tutorial Fluid-Structure Interaction (FSI) Models with dierent unit systems: The solid model uses cgs units, the uid model SI units. 2D-model Simulation Codes Fluid Mechanics: FLUENT 6.3.26 Solid Mechanics: Abaqus 6.7 / ANSYS 110 / MSC.Marc 2005r3 Description The example is taken from an article by Walhorn et al. [2002] and is originally based on a computation by Wall [1999]. The computation consists of two parts. First, only the ow eld is computed until a Von Krmn vortex a a street develops behind the square. The rst step is computed without coupling, the exible structure

VII

MpCCI 3.1.0-1

VII Tutorial

2.2 Model Preparation

remains rigid. After this initial calculation, a coupled analysis is carried through, the structure is now exible. This yields vibration of the structure with increasing amplitude.

2.2 Model Preparation


The simulation couples a solid mechanics model with a uid mechanics model. The les which you need for the simulation are included in the MpCCI distribution. Create a new directory and copy the particular subdirectories from "<MpCCI home>/tutorial/VortexVibration" which correspond to the simulation codes you want to use.

2.2.1 Fluid Model


The uid domain comprises the whole rectangular area in Figure 1 except for the rigid square and the exible structure. The uid has a constant density of = 1.18 103 FLUENT The mesh was generated with Gambit, around the exible structure, the elements are smaller than those at the outer boundaries. The surface of the exible structure is dened as a separate boundary named exible-struct. ...
g cm3

and a viscosity = 1.82 104

g cm s

2.2.2 Solid Model


The solid part corresponds to a rectangle: coupling region xed end 0.06 cm, 6 elements 4 cm, 128 elements The material is linear elastic with density ratio = 0.35. = 2.0 g/cm3 , elastic modulus E = 2.0 106
g cm s2

and Poissons

The mesh consists of 128 6 linear 4-node plane-strain elements. All nodes at the left end are xed, i. e. they cannot move in x and y-direction. The whole surface except for the xed end is dened as an element set, which can be selected as coupling component. All solid models are created using the cgs unit system, i. e. the units given above. The solid model receives forces from the uid model, which are computed with an out-of-plane thickness t = 1 m. Therefore the solid models must have the same thickness t = 100 cm.

MpCCI 3.1.0-1

VII 9

2 Vortex-Induced Vibration of a Thin-Walled Structure Abaqus In Abaqus, CPE4 elements are used. ANSYS

VII Tutorial

In ANSYS, element PLANE42 is used, the coupling surface is covered with BEAM3 elements, which are deselected for the solution. ANSYS does not provide the possibility to use a plane strain model with a given thickness. Therefore a plane stress model is used instead, which yields a softer structure. MSC.Marc In MSC.Marc element type 11 is used, i. e. plane-strain full integration quadrilateral elements. ...

2.3 Models Step

Start the MpCCI GUI by running the command mpcci gui . In the rst step, the Models Step, the input les of the coupled codes are dened and scanned. FLUENT

Select FLUENT as the rst code to couple. The model is two-dimensional, thus select the FLUENT version 2d. The FLUENT release should be 6.3.26 or higher. Select the input le "FLUENT/plate.cas" and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly.

10 VII

MpCCI 3.1.0-1

VII Tutorial Abaqus

2.3 Models Step

Select Abaqus as the second code to couple. Select any Abaqus 6.7 release. Choose the input le "Abaqus/plate.inp". The Abaqus model was created using the cgs unit system, i. e. the values given in Figure 1 were directly entered in Abaqus/CAE and the geometry was created in cm. It is important to select cgs in the Models Step to ensure that dimensions and quantities are transferred correctly. Please press the Start Scanner button and a green check mark should appear at the top as shown on the left.

ANSYS Select ANSYS as the second code to couple and ANSYS 110. You can select any ANSYS product which can be used for structural analysis, e. g. ansys. Choose the database le "ANSYS/plate.db". The ANSYS model was created using the cgs unit system, i. e. the values given in Figure 1 were directly entered in ANSYS and the geometry was created in cm. It is important to select cgs in the Models Step to ensure that dimensions and quantities are transferred correctly. Please press the Start Scanner button and a green check mark should appear at the top as shown on the left.

MpCCI 3.1.0-1

VII 11

2 Vortex-Induced Vibration of a Thin-Walled Structure MSC.Marc

VII Tutorial

Select MSC.Marc as the second code to couple. Choose the input le "MSC.Marc/plate.dat". The MSC.Marc model was created using the cgs unit system, i. e. the values given in Figure 1 were directly entered in MSC.Marc Mentat and the geometry was created in cm. It is important to select cgs in the Models Step to ensure that dimensions and quantities are transferred correctly. Please press the Start Scanner button and a green check mark should appear at the top as shown on the left.

12 VII

MpCCI 3.1.0-1

VII Tutorial

2.4 Coupling Step

2.4 Coupling Step


Press the Next > button at the bottom of the Models Step to get to the Coupling Step.

2 2

In this example the coupling region corresponds to the surface of the exible structure. MpCCI treats this region as a Face because it represents a 2D structure. 1. Select the Face 2D tab. 2. Select the coupling components by dragging them into the Coupled boxes. FLUENT Select the coupling component exible-struct. Abaqus Select ASSEMBLY OUTSIDE. ANSYS Select OUTSIDE.

MpCCI 3.1.0-1

VII 13

2 Vortex-Induced Vibration of a Thin-Walled Structure MSC.Marc Select outside. ... 3. Select the quantities NPosition and RelWallForce. Proceed to the Edit Step by pressing Next > .

VII Tutorial

2.5 Edit Step


No changes are required in the Edit Step, proceed to the Go Step by pressing Next > .

2.6 Go Step

code panel see below

code panel see below In the server panel, no changes are necessary. The code panels are described for each code.

14 VII

MpCCI 3.1.0-1

VII Tutorial FLUENT

2.6 Go Step

Set the Initial quantities transfer to exchange, choose the data le "FLUENT/plate-2160.dat" and keep the default settings for all other options.

MpCCI 3.1.0-1

VII 15

2 Vortex-Induced Vibration of a Thin-Walled Structure Abaqus

VII Tutorial

Set Initial quantities transfer to receive. Select Constant coupling time step to use a constant time step. Set the coupling time step to 0.001, which equals the time step size in the Abaqus input le. Deactivate Subcycling.

ANSYS

Set Initial quantities transfer to receive. Keep -b as gui option to start ANSYS in batch mode. Additional command line options are not required. Select the APDL input script "runplate.ans" by pressing the Browse button.

16 VII

MpCCI 3.1.0-1

VII Tutorial MSC.Marc

2.8 Discussion of Results

Set Initial quantities transfer to receive. No further options need to be set.

2.7 Running the Computation


Save the MpCCI project le with name "plate.csp" over the MpCCI GUI menu FileSave Project As . Press the three Start buttons in the Go Step and the simulation codes should start. Some codes require additional actions: FLUENT The computation needs not to be initialized as a ow eld is loaded from "FLUENT/plate-2160.dat". Select SolveIterate... to open the Iterate panel. Set the Number of Time Steps to 10000 and press Iterate to start the simulation. During the simulation, FLUENT will display the residual, the resulting moment of the forces on the coupling surface and the pressure distribution in the uid domain. You can also see the deformation of the exible structure in the pressure distribution window.

2.8 Discussion of Results


The vortex street yields pressure changes at the surface of the exible structure, a typical pressure distribution is shown in Figure 2. The resulting forces accelerate the structure and cause a vibration with

MpCCI 3.1.0-1

VII 17

2 Vortex-Induced Vibration of a Thin-Walled Structure

VII Tutorial

Figure 2: Vortex-induced vibration: Part of the ow eld in FLUENT with velocity vectors and pressure distribution (red=high pressure, blue=low pressure). FLUENT-Abaqus FLUENT-ANSYS FLUENT-MSC.Marc

0.6

vertical tip deection [cm]

0.4 0.2 0 0.2 0.4 0.6

time [s]
1 2 3 4 5 6 7 8 9 10

Figure 3: Vortex-induced vibration: Vertical deection of the tip.

18 VII MpCCI 3.1.0-1

VII Tutorial increasing amplitude.

2.8 Discussion of Results

However, as the structural models are not perfectly identical the Abaqus model is a little stier than the MSC.Marc model. The ANSYS model is much weaker as the other two, because the ANSYS model is based on a plane stress assumption while the others use plane strain. Therefore the natural frequencies of the models dier, which yields dierent responses as shown in Figure 3.

MpCCI 3.1.0-1

VII 19

3 Elastic Flap in a Duct

VII Tutorial

3 Elastic Flap in a Duct


3.1 Problem Description
32

0.25 pressure outlet p = 0

0.0

inlet v = 8 m/s

15 elastic ap H=0.048 W=0.048 T=0.002

duct (no slip walls)

Figure 1: Elastic ap: Geometry [m] and boundary conditions

Topics of this Tutorial Fluid-Structure Interaction (FSI) Coupling of time step (sent by solid mechanics code) Usage of the MpCCI grid morpher for STAR-CD 3D-model Simulation Codes Solid Mechanics: Abaqus 6.6 or 6.7, ANSYS 110, MSC.Marc 2005r3 Fluid Mechanics: FLUENT 6.3.26 , STAR-CD 3.26 or 4.0x

3.2 Model Preparation


The simulation couples a solid mechanics model with a uid mechanics model. The les which you need for the simulation are included in the MpCCI distribution. Create a new directory and copy the subdirectories from "<MpCCI home>/tutorial/ElasticFlap" which correspond to the simulation codes you want to use.

20 VII

MpCCI 3.1.0-1

0.06

0.052

0.134

VII Tutorial

3.2 Model Preparation

3.2.1 Solid Model


The solid part corresponds to a rectangle (Figure 3):

control point

Figure 2: Elastic ap: Mesh of the structural domain

The material is linear elastic with density ratio = 0.49.

= 1000 kg/m3 , elastic modulus E = 1.0 108 Pa and Poissons

The mesh consists of 20 20 2 brick elements with 20 nodes each. All nodes at the top are xed, i. e. they cannot move in any direction. The solid mechanics code shall determine the time step size t. Initially it is set to t = 0.25 ms, the automatic size adaptation is limited by 0.1 ms t 2 ms. A control-point/node is selected in each solid model for evaluation of the results, see Results . Abaqus C3D20R elements are used. The whole surface except for the xed end is dened as an element set, which can be selected as coupling component. ANSYS The standard 20-node brick element type SOLID95 - 3D 20-Node Structural Solid is used. In ANSYS, no automatic time stepping scheme can be used for a coupled simulation. Instead only two dierent time step sizes are used for the computation. In the APDL script the step size is set by: 3.8 Discussion of

MpCCI 3.1.0-1

VII 21

3 Elastic Flap in a Duct

VII Tutorial

*if, i, le, 400, then ! compute physical time from step time, (i-1)*0.00025 ! small step for t <= 0.1 *else time, (i-401)*0.001 + 0.1 ! larger step for t>0.1 I. e. a time step of t = 0.00025 s is used up to t = 0.1 s, after that a time step size of t = 0.001 s is used. The time step size is sent to the CFD code. MSC.Marc The fully integrated 20-node brick elements 21 are used. ...

3.2.2 Fluid Model


The uid domain comprises the whole rectangular area in Figure 3 except for the exible elastic ap structure.

Figure 3: Elastic ap: Partial mesh of the uid domain

FLUENT The mesh was generated with Gambit and consists of tetrahedral elements. The surface of the exible structure is dened as a separate boundary named couple-ap.

22 VII

MpCCI 3.1.0-1

VII Tutorial STAR-CD

3.3 Models Step

The mesh corresponds to the mesh which is used in FLUENT. The boundary regions in the middle are subdivided, because they will later be addressed by the MpCCI grid morpher as sliding boundaries. ...

3.3 Models Step

Start the MpCCI GUI by running the command mpcci gui . In the rst step, the Models Step, the input les of the coupled codes are dened and scanned. Abaqus

Select Abaqus as the rst code to couple. Select any Abaqus 6.6 or Abaqus 6.7 release or higher. Choose the input le "Abaqus/elastic flap.inp" and the SI unit system (which is the standard). Please press the Start Scanner button and a green check mark should appear at the top as shown on the left.

MpCCI 3.1.0-1

VII 23

3 Elastic Flap in a Duct ANSYS

VII Tutorial

Select ANSYS as the rst code to couple. Select the release 110. You can select any ANSYS product which can be used for structural analysis, e. g. ansys. Choose the input "ANSYS/elastic flap.db" le

The SI unit system is used here (which is the standard). Please press the Start Scanner button and a green check mark should appear at the top as shown on the left. MSC.Marc

Select MSC.Marc as the rst code to couple. Select release 2005r3 or higher. Choose the input le "MSC.MARC/elastic flap job1.dat" and the SI unit system (which is the standard). Please press the Start Scanner button and a green check mark should appear at the top as shown on the left.

24 VII

MpCCI 3.1.0-1

VII Tutorial FLUENT

3.4 Coupling Step

Select FLUENT as the second code to couple. The model is three-dimensional, thus select the FLUENT version 3d. The FLUENT release should be set to 6.3.26 or higher. Select the input "FLUENT/elastic flap.cas" and the Start Scanner button. le press

Finally a green check mark should appear, as shown at the left, which means everything is set up correctly. STAR-CD

Select STAR-CD as the second code to couple. The STAR-CD release should be set to 3.26, 4.04 or higher. Select "STARCD/elastic flap.mdl" as input le and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly.

...

3.4 Coupling Step


Press the Next > button at the bottom of the Models Step to get to the Coupling Step. In this example the time steps of the two solvers are coupled, whereas the CSM-code (CSM = Computational Structural Mechanics) will send the time step to the CFD-code (CFD = Computational Fluid Dynamics). Select Gobal (0D) tab, and then congure the corresponding coupling components as depicted in Figure 4

MpCCI 3.1.0-1

VII 25

3 Elastic Flap in a Duct

VII Tutorial

Figure 4: Elastic ap: Coupling of global variable time step, CSM-Code corresponds to Abaqus or ANSYS and CFD-Code corresponds to FLUENT or STAR-CD

and described in the following. Abaqus Double-click or drag down the coupling component Time-Step-Size. The component will appear in the coupled eld of the solver. Select Abaqus as Sender for DeltaTime in the right column. ANSYS Double-click or drag down the coupling component DELTATIME. The component will appear in the coupled eld of the solver. Select ANSYS as sender. MSC.Marc Double-click or drag down the coupling component Time-Step-Size. The component will appear in the coupled eld of the solver. Select MSC.Marc as sender.

26 VII

MpCCI 3.1.0-1

VII Tutorial FLUENT

3.4 Coupling Step

Double-click or drag down the coupling component Time-Step-Size. The component will appear in the coupled eld of the solver. STAR-CD Double-click or drag down the coupling component Time-Step-Size. The component will appear in the coupled eld of the solver. ... In this example the coupling region corresponds to the surface of the exible structure. MpCCI treats this region as a Face because it represents a 2D structure.

2 3 2

Figure 5: Elastic ap: Coupling of NPosition and OverPressure, CSM-Code corresponds to Abaqus or MSC.Marc and CFD-Code corresponds to FLUENT or STAR-CD

Select Face (2D) tab, and then congure the corresponding coupling components as depicted in Figure 5 and described in the following.

MpCCI 3.1.0-1

VII 27

3 Elastic Flap in a Duct Abaqus

VII Tutorial

Double-click or drag down the coupling component ASSEMBLY WALL WALL-SURFACE, which characterizes the surface of the ap. The component will appear in the coupled eld of the solver. ANSYS Double-click or drag down the coupling component WALLSURFACE, which characterizes the surface of the ap. The component will appear in the coupled eld of the solver. MSC.Marc Double-click or drag down the coupling component wallsurface, which characterizes the surface of the ap. The component will appear in the coupled eld of the solver. FLUENT Double-click or drag down the coupling component couple-ap, which characterizes the surface of the ap. The component will appear in the coupled eld of the solver. STAR-CD Double-click or drag down the coupling component couple-ap, which characterizes the surface of the ap. The component will appear in the coupled eld of the solver. ... In the quantities eld activate the NPosition and OverPressure check buttons. By clicking on the quantity name a conguration area for this quantity is opened on the right side. Choose the CSM-code as sender of NPosition and the CFD-code (FLUENT or STAR-CD) as sender of OverPressure. OverPressure corresponds the relative pressure ( V-3.1.2 Coupling Types ) and will not account for frictional forces, which are included in the relative wall forces (RelWallForce). Except for selecting the coupling regions, no further settings are required, proceed to the Edit Step by pressing Next > .

3.5 Edit Step

No changes are required in the Edit Step, proceed to the Go Step by pressing Next > .

28 VII

MpCCI 3.1.0-1

VII Tutorial

3.6 Go Step

3.6 Go Step

code panel see below

code panel see below In the server panel, no changes are necessary. The code panels are described for each code.

MpCCI 3.1.0-1

VII 29

3 Elastic Flap in a Duct Abaqus

VII Tutorial

Set Initial quantities transfer to receive. All other options should not be changed. It is important to deselect the option Constant coupling time step (which is the default) because the time step size is exible: It is determined by Abaqus and sent to the CFD code.

ANSYS

Set Initial quantities transfer to receive. Keep the gui option set to -b. Select the APDL "runflap.ans". input script

30 VII

MpCCI 3.1.0-1

VII Tutorial MSC.Marc

3.6 Go Step

Set Initial quantities transfer to receive. All other options should not be changed.

MpCCI 3.1.0-1

VII 31

3 Elastic Flap in a Duct FLUENT

VII Tutorial

Set the exchange.

Initial quantities transfer

to

Keep the default settings for all other options.

STAR-CD Set the exchange.

Initial quantities transfer

to

To prepare the model for a coupled simulation select as start-up procedure Prepare case and start. STAR-CD 3.26: To obtain all necessary user subroutines check button for Rebuild shared library. Deactivate Use the MpCCI plugin library (Star V4 only). Deactivate Use a data lter subroutine (Star V4 only). STAR-CD 4.0x: Activate Use the MpCCI plugin library (Star V4 only). Deactivate Use a data lter subroutine (Star V4 only).

32 VII

MpCCI 3.1.0-1

VII Tutorial

3.7 Running the Computation

Select the option Use grid morpher?. Further options for the grid morpher will become visible. Enter 2 in the entry for List of cell type ids to activate the morpher only for the uid part around the ap of cell type 2. Enter the boundary regions with number 14, 15, and 16 in the entry of Optional list of oating boundary regions to allow nodes to slide on boundary regions close to the ap. Refer to VI-10.4 Grid Morphing for more information on the MpCCI grid morpher options. The numbers for cell types and boundary regions correspond to the numbering in the STAR-CD model le.

...

3.7 Running the Computation 3.7.1 Starting the Simulation


Save the MpCCI project le with name "elastic flap.csp" over the MpCCI GUI menu FileSave Project As . Press the three Start buttons in the Go Step and the simulation codes should start. Some codes require additional actions:

MpCCI 3.1.0-1

VII 33

3 Elastic Flap in a Duct FLUENT

VII Tutorial

Initialize the ow eld by selecting SolveInitializeInitialize to open the initialization panel. And press the button Init . Select SolveIterate... to open the Iterate panel. As FLUENT receives the time step size from the solid mechanics code, the Time Stepping Method must be set to Adaptive. If you select this option, the panel is extended by the new part Adaptive Time Step Parameters at the right. Please select UDF Deltat::libmpcci as User-Dened Time Step at the bottom. This user-dened function receives the time step sizes from MpCCI. When the simulation is started, FLUENT needs an initial time step, which will be retrieved from the the FLUENT entry eld Time Step Size(s). The initial time step of 0.00025 matches the initial time step of the CSM-code to keep the codes simultaneous in time ( V-3.3.4 Exchange of Time Step Size ). As the further time step sizes are variable, you should select a large Number of Time Steps, e. g. 1000 which exceeds the number of time steps of the solid mechanics code. Finally press Iterate to start the simulation. During the simulation, FLUENT will display the residuals and a section through the ap, where you can see its deformation.

34 VII

MpCCI 3.1.0-1

VII Tutorial STAR-CD 3.26

3.8 Discussion of Results

If time step is received, STAR-CD requires like FLUENT an initial time step. This is always necessary even if the partner code is adjusted to send or exchange. This is due to the fact that the user subroutine to retrieve the received time step, namely "dtstep.f", is called in advance of the exchange procedure in "posdat.f". MpCCI has a built-in procedure to retrieve the initial time step from "exhaust manifold.mdl" and insert it into the user subroutine "dtstep.f". After the rst reception of the partners code time step, the initial time step will be overwritten. In this tutorial the initial time step is set to 0.00025 as a constant time step in "exhaust manifold.mdl", which equals the initial time step of the CSM-code ( V-3.3.4 Exchange of Time Step Size ). STAR-CD 4.0x The MpCCI plug-in to receive data is called prior to the time step setting. Therefore the initial time step is already received from Abaqus if the initial transfer is set to receive or exchange like in this tutorial. ...

3.7.2 End of the Simulation


The CSM codes determine the time step size. Therefore only they have the information when to nish the simulation. In this case it is almost impossible to obtain a clean exit of both codes. Abaqus simply stops the simulation and exits once it has reached the end time, which causes the CFD code to show an error message as the connection is lost. ANSYS simply stops the simulation and exits, which causes the CFD code to show an error message as the connection is lost. MSC.Marc nally sends a time step size of zero seconds, which causes errors in the CFD codes. Please stop both codes at this point and do neglect the result of the nal time step. If the simulation has reached the end time of t = 0.2 s you can kill the remaining codes with the Kill button. All of the codes used in this example still write complete result les, therefore no data loss should be expected and it is possible to obtain the results described below.

3.8 Discussion of Results


To compare the results of the dierent simulations, a control point was selected in the solid mechanics codes, see Figure 2. To display the motion of this point in x-direction similar to Figure 6 proceed as follows:

MpCCI 3.1.0-1

VII 35

3 Elastic Flap in a Duct Abaqus

VII Tutorial

Open the output database "abaqus run.odb" in Abaqus/CAE to plot the displacement of the control point: Select ResultHistory Output from the menu bar to open the History Output panel. Select U1 at Node 1 in NSET CONTROL-NODE and press Plot to plot the displacement in x-direction. ANSYS Start ANSYS and select TimeHist PostPro, open the le "file.rst". In the Time History Variables panel, press the + button and select Nodal Solution DOF Solution X-Component of displacement and select node 366. Press the Graph Data button to plot the graph. MSC.Marc In MSC.Marc Mentat select RESULTS and open the "mpcci elastic flap job1.t16" le. Switch to HISTORY PLOT , press SET NODES and select the set control-node. Press COLLECT DATA and collect data from step 0 to 1000 with increment size 1 (MSC.Marc Mentat will stop at last step). Go to NODES/VARIABLES and press ADD VARIABLE . Select Time and Displacement X to plot the curve. Finally press FIT to t the plot limits, otherwise the curve is displayed very small. ... 0 x-displacement of control point [m] -0.002 -0.004 -0.006 -0.008 -0.01 ABAQUS - FLUENT ANSYS - FLUENT MSC.Marc - FLUENT

0.05

0.1 time [s]

0.15

0.2

Figure 6: Elastic ap: Displacement of the control point for Abaqus, ANSYS and MSC.Marc coupled with FLUENT.

36 VII MpCCI 3.1.0-1

VII Tutorial

4.1 Problem Description

4 Exhaust Manifold
4.1 Problem Description
0.22 pressure-outlet p = 0 pipe inside: uid domain outside: , TF ilm for free convection A

0.012

A-A

0.010

Figure 1: Manifold: Geometry [m] and boundary conditions

Topics of this Tutorial Thermal coupling uid and solid Steady state Incompressible uid Fluid solver iterations without coupling Fluid solver subcycling 3D-model

MpCCI 3.1.0-1

inlets v = 6 m/s T = 600K

VII 37

4 Exhaust Manifold Simulation Codes Solid Mechanics: Abaqus 6.7, PERMAS 11 Fluid Mechanics: STAR-CD 3.26, 4.04 or higher, FLUENT 6.3.26

VII Tutorial

4.2 Model Preparation


The simulation couples a solid mechanics model with a uid mechanics model. The les which you need for the simulation are included in the MpCCI distribution. Create a new directory "ExhaustManifold" and copy the subdirectories from "<MpCCI home>/tutorial/ExhaustManifold" which correspond to the simulation codes you want to use.

4.2.1 Solid Model


The solid part of the manifold has the following properties (Figure 2):

Figure 2: Manifold: Mesh of the solid domain

The mesh consists of 15244 8-node brick elements.

38 VII MpCCI 3.1.0-1

VII Tutorial
W mK

4.2 Model Preparation

Conductivity

55.0

Film temperature (outside) 300.0 K Heat coecient (outside) 50.0


W m2 K

Table 1: Manifold: Boundary conditions for solid model

Abaqus In Abaqus DC3D8 elements are used. PERMAS In PERMAS HEXE8 solid elements and CONA4 convection elements are used. ...

4.2.2 Fluid Model


The uid domain comprises the inner part of the pipe (Figure 3).

Figure 3: Manifold: Mesh of the uid domain

MpCCI 3.1.0-1

VII 39

4 Exhaust Manifold
kg m3 kg ms

VII Tutorial

Density Viscosity Conductivity Specic heat Inlet Velocity Temperature Turbulent Intensity Turbulent Length

1.225

1.7894E 05 0.0242
W mK J kgK

1006.43 6.0 m s 600.0 K 0.03 0.003 m

Outlet Relative pressure 0 Pa Turbulent Intensity 0.03 Turbulent Length 0.003 m Table 2: Manifold: Boundary conditions for uid model

The uid mesh consists of 102236 hexahedral elements. FLUENT A standard k model with enhanced wall treatment is applied. STAR-CD A low-Reynolds k model with hybrid wall is applied. ...

4.2.3 Uncoupled Flow Simulation


Prior to a coupled simulation, it is advisable to carry out an uncoupled ow simulation with simplied boundary conditions. The temperature of the later coupled interface of uid and solid is set to constant 600 K. FLUENT Start FLUENT and read the case le "FLUENT/exhaust manifold.cas". Carry out a ow simulation with 200 iterations and save the result in "FLUENT/exhaust manifold.dat".

40 VII

MpCCI 3.1.0-1

VII Tutorial STAR-CD

4.3 Models Step

Start STAR-CD and read the model le "STARCD/exhaust manifold.mdl". Carry out a ow simulation with 200 iterations. The result is saved in "STARCD/exhaust manifold.pst/.ccmp" depending on the STAR-CD version. ...

4.2.4 Prepare Models for Coupled Simulation


After the uncoupled simulations have been completed, the input les need modications to accomplish the coupled simulation using the uncoupled results for a restart. FLUENT No modications have to be done, as we later carry out a GUI based coupled simulation. STAR-CD 1. Start pro-STAR and resume the model le "exhaust manifold.mdl". 2. In the STAR GUIde go to Analysis Preparation/RunningSet Run Time Controls. Set Number of iterations to 100. 3. Change to Analysis Preparation/RunningAnalysis (Re)Start. Set Restart File Option to Standard Restart for STAR-CD 3.26 or Initial Field Restart with options Restart (New Boundary Values) and Continue for STAR-CD 4.0x. 4. Choose the uncoupled result le "exhaust manifold.pst" or "exhaust manifold.ccmp" as Restart File, depending on the STAR-CD version. 5. Save the model "exhaust manifold.mdl" and exit pro-STAR. 6. (Only STAR-CD 3.26) Create a subdirectory "STARCD/ufile" by renaming the provided ule directory "ufile 326". 7. (Only STAR-CD 3.26) Check if the user subroutine "bcdefw.f" is located in "STARCD/ufile". Otherwise copy subroutine "bcdefw.f" from "<MpCCI home>/tutorial/ExhaustManifold/STARCD/ufile 326". The routine "bcdefw.f" is needed for retrieving the received wall temperature from the scalar array for STAR-CD 3.26. All other subroutines which are needed for a coupled simulation will be copied automatically by MpCCI. For STAR-CD 4.0x the data transfer and management is handled via plug-ins and no user subroutines are needed for a coupled simulation. ...

MpCCI 3.1.0-1

VII 41

4 Exhaust Manifold

VII Tutorial

4.3 Models Step

Start the MpCCI GUI by running the command mpcci gui in the directory "ExhaustManifold". In the rst step, the Models Step, the input les of the coupled codes are dened and scanned. Abaqus

Select Abaqus as the rst code to couple. Select any Abaqus 6.7 release. Choose the input le "Abaqus/exhaust manifold.inp" and the SI unit system (which is default). Please press the Start Scanner button and a green check mark should appear at the top as shown on the left.

PERMAS

Select PERMAS as the rst code to couple. Select any PERMAS 11 release. Choose the input le "PERMAS/exhaust manifold.dat" and the SI unit system (which is default). Please press the Start Scanner button and a green check mark should appear at the top as shown on the left.

42 VII

MpCCI 3.1.0-1

VII Tutorial FLUENT

4.4 Coupling Step

Select FLUENT as the second code to couple. The model is three-dimensional, thus select the FLUENT version 3d. The FLUENT release should be 6.3.26 or higher. Select the input le "FLUENT/exhaust manifold.cas" and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly.

STAR-CD Select STAR-CD as the second code to couple. All models in STAR-CD are three-dimensional. The STAR-CD release should be 3.26, 4.04 or higher. Select the input le "STARCD/exhaust manifold.mdl" and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly.

...

4.4 Coupling Step


Press the Next > button at the bottom of the Models Step to get to the Coupling Step. In this example the coupling region corresponds to the inner surface of the pipe. MpCCI treats this region as a Face because it represents a 2D structure. Select Face (2D) tab, and then congure the corresponding coupling components as depicted in Figure 4, using exemplary PERMAS and STAR-CD, and as described in the following.

MpCCI 3.1.0-1

VII 43

4 Exhaust Manifold

VII Tutorial

Abaqus Double-click or drag down the coupling component ASSEMBLY MANIFOLD INNER SURFACE, which characterizes the inner surface of the pipe. The component will appear in the coupled eld of the solver. PERMAS Double-click or drag down the coupling component CCI 1, which characterizes the inner surface of the pipe. The component will appear in the coupled eld of the solver. FLUENT Double-click or drag down the coupling component wall, which characterizes the inner surface of the pipe. The component will appear in the coupled eld of the solver. STAR-CD Double-click or drag down the coupling component wall, which characterizes the inner surface of the pipe. The component will appear in the coupled eld of the solver. ... In the quantities eld choose as coupling type steady state surface heat transfer and activate the quantities by pressing Set as marked red in Figure 4. The quantities FilmTemp,, WallHTCoe and WallTemp are activated. MpCCI will set the sender of the corresponding quantities. No further settings are required, proceed to the Edit Step by pressing Next > .

4.5 Edit Step


Select TraceFile and replace "tracefile.ccv" by "exhaust manifold.ccv" as depicted in Figure 5. Proceed to the Go Step by pressing Next > .

44 VII

MpCCI 3.1.0-1

VII Tutorial

4.5 Edit Step

Figure 4: Manifold: Coupling of FilmTemp, WallHTCoe and WallTemp, here as an example for PERMAS and STAR-CD

MpCCI 3.1.0-1

VII 45

4 Exhaust Manifold

VII Tutorial

Figure 5: Manifold: Rename tracele written by MpCCI during simulation

46 VII MpCCI 3.1.0-1

VII Tutorial

4.6 Go Step

4.6 Go Step

In the Go Step the MpCCI server and the coupled codes for the start-up are congured. The choice of start-up options depends on the selected codes to couple. First start by conguring the server settings: MpCCI server

Accept default options as depicted. The MpCCI server will write the tracele which was dened in the Edit Step by activating Start additional control process. All output les of the server will have the prex "mpccirun".

MpCCI 3.1.0-1

VII 47

4 Exhaust Manifold Abaqus

VII Tutorial

Deactivate Subcycling as there is no subcycling of Abaqus included. MpCCI will run the simulation not on the original model, but rather will use a copy with the prex abaqus run. When starting the simulation Abaqus will receive data from the CFD code and accomplish a steady state heat transfer analysis. After the analysis data is exchanged with the partner code and another analysis is started.

PERMAS

Activate Congure coupling algorithm Select Gauss-Seidel as coupling algorithm. The choice of Gauss-Seidel and the Initial quantities transfer of the partner code will determine the coupling scheme as depicted in Figure 5 (part VI) of VI-8 PERMAS . Set No. of exchange iterations to 10.

48 VII

MpCCI 3.1.0-1

VII Tutorial FLUENT

4.6 Go Step

Set Initial quantities transfer to send. Deactivate Auto hook functions Deactivate Auto set MDM zones. The option Auto set BCs will hook the UDM for the coupling boundary wall. Activating Auto read case data will automatically cause FLUENT to read the case and data le of the uncoupled simulation.

MpCCI 3.1.0-1

VII 49

4 Exhaust Manifold STAR-CD 3.26 Set the Initial quantities transfer to send.

VII Tutorial

As startup procedure select Prepare case and start to accomplish the necessary modications in the STAR-CD model for a coupled simulation. The activated option Rebuild shared library will cause a compilation of the user subroutines, which are copied to the ule directory by MpCCI. Disable Use the MpCCI plugin library (Star V4 only) to deactivate MpCCI plug-in, which is not available for STAR-CD 3.26. Disable Use a data lter subroutine (Star V4 only) which is not available for STAR-CD 3.26. As MpCCI will build an new model le, save the original model le by pushing the Backup model le button. Set Steady state: No. of iterations without coupling to 10. Between exchanges of the data, STAR-CD will carry out ten iteration steps (subcycling). Make sure, that you have already copied "bcdefw.f" to the ule directory in step Models for Coupled Simulation 4.2.4 Prepare.

50 VII

MpCCI 3.1.0-1

VII Tutorial

4.7 Running the Computation STAR-CD 4.0x Set the Initial quantities transfer to send. As startup procedure select Prepare case and start to accomplish the necessary modications in the STAR-CD model for a coupled simulation. Enable Use the MpCCI plugin library (Star V4 only) to activate MpCCI plug-in in STAR-CD for data transfer. Disable Use a data lter subroutine (Star V4 only) as no subroutine "starmpcci filterdata(level)" will be provided in the ule directory. Deactivate option Rebuild shared library as no user subroutines for data transfer are needed (plug-in version). As MpCCI will build an new model le, save the original model le by pushing the Backup model le button. Set Steady state: No. of iterations without coupling to 10. Between exchanges of the data, STAR-CD will carry out ten iteration steps (subcycling). ...

4.7 Running the Computation


Save the MpCCI project le with name "exhaust manifold.csp" via the MpCCI GUI menu FileSave Project As . Press the three Start buttons in the Go Step and the simulation codes should start. Some codes require additional actions: FLUENT 1. Open the MpCCI panel over SolveMpCCI Controls... . 2. Press Initialize to start initial handshaking. 3. Press Send to send data to partner code. 4. Open SolveIterate and start ten iterations. As we have not auto-hooked functions for coupling FLUENT will iterate without sending or receiving any data. The functions On Demand... on the MpCCI panel will hook the necessary functions for an exchange.

MpCCI 3.1.0-1 VII 51

4 Exhaust Manifold 5. Press Exchange to send data to partner code. 6. Accomplish another ten iterations. 7. Repeat step 5. and 6. until you have reached ten exchanges

VII Tutorial

In order to survey the convergence of the simulation, FLUENT will display the residual and the integral total surface heat ux on the coupling surface. To avoid a repeated manual execution of the iterative process, a journal script might be recorded and executed. STAR-CD In order to survey the convergence of the simulation, STAR-CD will write the integral total surface heat ux through the coupling surface on "exhaust manifold.erd". STAR-CD will run for 100 iterations. ...

4.8 Post-processing
Use the following les for the evaluation of the results. MpCCI MpCCI tracele "exhaust manifold.ccv", which can be opened by command mpcci vis exhaust manifold.ccv , with which one can trace the exchange process of the coupled surface. Abaqus Abaqus result le "exhaust manifold.odb" and temperatures for node set nodes evaluate on "exhaust manifold.dat". MEDINA MEDINA result le "exhaust manifold.bof" and temperatures for node set nodes evaluate on "exhaust manifold.post". FLUENT FLUENT result le "exhaust manifold.dat". STAR-CD STAR-CD result le "exhaust manifold.pst" or "exhaust manifold.ccmp". ...

52 VII MpCCI 3.1.0-1

VII Tutorial

4.8 Post-processing

Figure 6: Manifold: Temperature distribution on coupled surface

MpCCI 3.1.0-1

VII 53

5 Busbar System

VII Tutorial

5 Busbar System
5.1 Problem Description
busbar 0.25

0.0762

y z

0.0127 x

0.102

Figure 1: Busbar: Geometry [m].

Topics of this Tutorial Magneto-Thermal 3D-model Volume coupling Several coupling regions Fluid solver iterations without coupling

Simulation Codes Fluid Mechanics: FLUENT 6.3.26 / STAR-CD 4.04 or higher Electromagnetism: FLUX 10.2 / ANSYS 100 / ANSYS 110

54 VII

MpCCI 3.1.0-1

VII Tutorial Description

5.2 Model Preparation

The example is taken from an article by Lyttle et al. [2006]. The task is to solve the electrothermal coupled problem of a busbar system carrying a three-phase current where the current leads to power losses due to the nite resistivity of the conductor. The busbars are made of copper, the RMS current level is 1600 A at a frequency of 60 Hz. Because of the power losses the conductor is heated up as well as the surrounding air leading to free convection around the busbars. To model the convection process the Boussinesq approximation for the density of air is used. A linear rise of resistivity dependent on the temperature of the conductor is also modeled. The electromagnetic calculation of power-losses is considering: eddy currents, skin eect, proximity eect, temperature dependent rise of resistivity. The thermal calculation is considering: heat conduction (uid and solid), heat convection (including buoyancy eects), laminar ow.

5.2 Model Preparation


The simulation couples a electromagnetic model with a uid model. The les you need for the simulation are included in the MpCCI distribution. Create a new directory and copy the subdirectories from "<MpCCI home>/tutorial/Busbar" corresponding to the simulation codes you want to use.

5.2.1 Fluid Model


Both the STAR-CD and FLUENT models are based on the same grid with boundary conditions as similar as possible. On the front and back side of the uid cabinet the conductors enter the uid domain. Here are adiabatic wall boundary conditions set. On the left and right side of the cabinet a wall boundary condition with xed temperature of 293.15 K is dened. On the bottom and top of the cabinet air can enter and leave the domain on pressure boundary conditions. FLUENT No modications have to be done, as we later carry out a GUI based coupled simulation.

MpCCI 3.1.0-1

VII 55

5 Busbar System STAR-CD

VII Tutorial

No modications have to be done, as in STAR-CD 4.04 and higher MpCCI is treated as plug-in and no user subroutines are needed. ...

5.2.2 Electromagnetic Model


A busbar conductor corresponds to three rectangles each with a dimension of 12.7 mm76.2 mm250 mm. The magnetic property of copper is linear isotropic with a relative permeability of 1. The temperature dependent electrical resistivity is calculated in this way: (T ) =
0 (1

+ (T Tref ))

At reference temperature Tref = 300 K the value of resistivity is 0 = 1.7241 108 m. The temperature coecient is = 0.004 K1 . The calculation of the current ow and magnetic eld is done in frequency domain. FLUX All necessary model information is prepared, no further action is needed. An electric circuit is dened to set the current loads for the nite element solution. Beside the model le an pyFlux script le "busbar.py" is used to run the co-simulation. For coupling these commands are used additionally to the pyFlux commands controlling the solver: mpcci.initialize():Initialize the connection to MpCCI. mpcci.receive(1): Receive data from the partner code and wait until the data exchange is done. mpcci.send(1): Send data to the partner code. mpcci.exit(): Exit MpCCI. ANSYS The "ANSYS/busbar.db" contains all nite element information. Beside the model le an ANSYS input le "ANSYS/startjob.ans" is used to dene all boundary conditions, loads and to control the coupling process. At the front and backside of the conductors the voltage degree of freedom will be coupled and on one side for every conductor the voltage degree of freedom is set to 0. At the front side of the conductors a nodal load amps is dened separately for every conductor with real and imaginary part depending on the phasing. The elements are grouped into element components named phase-a, phase-b and phase-c to make it possible for the MpCCI ANSYS adapter to detect the elements. For coupling these commands are used: ~mpcci, init, 3D:Initialize the connection to MpCCI.

56 VII

MpCCI 3.1.0-1

VII Tutorial

5.3 Models Step

~mpcci, send, wait: Send data to the partner code and wait until the data exchange is done.

~mpcci, receive, wait: Receive data from the partner code and wait until the data exchange is done.

Furthermore after the frequency domain solution, the eective power loss density is provided via ANSYS command powerh which generates an element table named plossd. This element table is just copied to an element table named mpcci 00 using this command: smult, mpcci 00, plossd,, 1 . Because the MpCCI adapter can read out of element tables with fullling the naming convention mpcci <index> . The <index> has to be set in the MpCCI GUI. ...

5.3 Models Step


Start the MpCCI GUI by running the command mpcci gui in the directory "Busbar". FLUX

Select FLUX as the rst code to couple and FLUX release 10.2. Select the input le "FLUX/BUSBAR.FLU/PROBLEM FLU.PFL" and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly.

MpCCI 3.1.0-1

VII 57

5 Busbar System ANSYS

VII Tutorial

Select ANSYS as the rst code to couple and ANSYS release 100 or 110. You can select any ANSYS product which can be used for electromagnetic analysis, e. g. emag. Choose the database le "ANSYS/busbar.db". Please press the Start Scanner button and a green check mark should appear at the top as shown on the left.

FLUENT

Select FLUENT as the second code to couple. The model is three-dimensional, thus select the FLUENT version 3ddp. The FLUENT release should be 6.3.26. Select the input le "FLUENT/busbar.cas" and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly.

58 VII

MpCCI 3.1.0-1

VII Tutorial STAR-CD

5.3 Models Step

Select STAR-CD as the second code to couple. The STAR-CD release should be 4.04 or higher. Select the input le "STARCD/busbar.mdl" and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly.

MpCCI 3.1.0-1

VII 59

5 Busbar System

VII Tutorial

5.4 Coupling Step

Press the Next > button at the bottom of the Models Step to get to the Coupling Step.

In this example the coupling region corresponds to the solid conductors. MpCCI treats this region as a Volume because it represents a 3D structure. There are 3 conductors to couple and for each conductor from the EMAG and CFD code a couple region will be created. This will increase the performance of the neighborhood search. Overview of the components to couple for each code:

60 VII MpCCI 3.1.0-1

VII Tutorial FLUX PHASE-A, PHASE-B, PHASE-C. ANSYS phase-a,phase-b,phase-c. FLUENT phase a-solid,phase b-solid, phase c-solid. STAR-CD phase-a,phase-b,phase-c. ... 1. Select the Volume 3D tab.

5.4 Coupling Step

2. Select the coupling components for the rst coupling region Volume 1 by double-clicking them or dragging them into the Coupled boxes. FLUX Select the coupling component PHASE-A. ANSYS Select the coupling component phase-a. FLUENT Select the coupling component phase a-solid. STAR-CD Select the coupling component phase-a. ... 3. Select the quantity JouleHeat and the EMAG Code as sender. Select the quantity Temperature and the CFD Code as sender. FLUX For the quantity Temperature: Select the receive method Direct. ANSYS For the quantity JouleHeat:

MpCCI 3.1.0-1

VII 61

5 Busbar System Select the location elem.

VII Tutorial

Select the method ETAB.

Select the index 0.

For the quantity Temperature:

Select the location node.

STAR-CD

For the quantity JouleHeat:

Select index 1

...

4. A rst coupled region Volume 1 has been created.

62 VII

MpCCI 3.1.0-1

VII Tutorial

5.4 Coupling Step

1 3

1. For the next coupled region click on the Add button in the Regions part. This will insert a new region Volume 2 to couple. 2. Select the coupling components by double-clicking them or dragging them into the Coupled boxes. FLUX Select the coupling component PHASE-B. ANSYS Select the coupling component phase-b. FLUENT Select the coupling component phase b-solid.

MpCCI 3.1.0-1

VII 63

5 Busbar System STAR-CD

VII Tutorial

Select the coupling component phase-b.

...

3. The same quantities setting as made for Volume 1 will be used. Therefor use Copy from region from the Predened Sets and click on the Set button to apply the setting from the selected Volume 1.

4. Repeat the step 1 to 3 for the last conductor.

Proceed to the Edit Step by pressing Next > .

5.5 Edit Step

No changes are required in the Edit Step.

64 VII

MpCCI 3.1.0-1

VII Tutorial

5.6 Go Step

5.6 Go Step

code panel code panel see below see below


In the server panel, no changes are necessary. The code panels are described for each code below.

MpCCI 3.1.0-1

VII 65

5 Busbar System FLUX

VII Tutorial

1. Set Initial quantities transfer to receive. 2. Select the Memory conguration and increase the Numerical memory MB to 1600. 3. Select the User pyFlux script "busbar.py" by pressing the Browse button. The "busbar.py" le is located under the same root directory as the "BUSBAR.FLU" model le. 4. Activate the Auto read problem le option which is the default. 5. Activate the Auto load MpCCI lib option which is the default.

ANSYS

1. Set Initial quantities transfer to receive. 2. Keep -b as gui option to start ANSYS in batch mode. Additional command line options are not required. 3. Select the "startjob.ans" Browse button. APDL input script by pressing the

66 VII

MpCCI 3.1.0-1

VII Tutorial FLUENT

5.6 Go Step

1. Set the exchange.

Initial quantities transfer

to

2. Select the Optional journal Files "busbar.jou" by pressing the Browse button. 3. Deselect the Auto hook functions. 4. Deselect the Auto set MDM zones.

MpCCI 3.1.0-1

VII 67

5 Busbar System STAR-CD 1. Set the exchange. Initial quantities transfer to

VII Tutorial

2. As startup procedure select Prepare case and start to accomplish the necessary modications in the STAR-CD model for a coupled simulation. 3. Activate Use the MpCCI plugin library (Star V4 only) to enable the MpCCI plug-in. Deactivate Use a data lter subroutine (Star V4 only). 4. As MpCCI will build a new model le, save the original model le by pushing the Backup model le button. 5. Activate subcycling for STAR-CD by dening 20 iterations without coupling.

5.7 Running the Computation


Press the Start button of the server and save the project as "busbar.csp". Now start the codes by pressing their Start buttons and the simulation codes should start. Some codes require additional actions: FLUX The FLUX reads the pyFlux script le "busbar.py" and starts the computation. ANSYS ANSYS reads the APDL script le "startjob.ans" and starts the computation. FLUENT FLUENT reads the journal le "busbar.jou" and automatically starts the computation by calling the function MpCCI-solve nbExchange nbIterations respectively with the values ten and twenty. The coupling scheme used for FLUENT is: a data exchange before each solving cycle. nbIterations iterations for a solving cycle.

68 VII

MpCCI 3.1.0-1

VII Tutorial STAR-CD

5.8 Discussion of Results

The STAR-CD job will be prepared and started. The data transfer is handled by the MpCCI plug-in calls in STAR-CD.

5.8 Discussion of Results


In this busbar simulation it is seen that the coupling takes ten steps to reach a maximum temperature. Exemplarily the temperature distribution in the middle plane of the cabinet from the FLUENT solution is given in the next picture.

Figure 2: FLUENT results: temperature distribution [ K]

MpCCI 3.1.0-1

VII 69

6 Pipe Nozzle

VII Tutorial

6 Pipe Nozzle
6.1 Problem Description

Topics of this Tutorial Fluid-Structure Interaction (FSI) Axisymmetric model Steady state one-way force mapping Use of UDF-functions in FLUENT Models with dierent unit systems. Simulation Codes Fluid Mechanics: FLUENT 6.3.26 Solid Mechanics: Abaqus 6.6 or 6.7

6.2 Model Preparation


The model is axisymmetric, thus only a section of the model is created and meshed. The axis of revolution is dierent for dierent simulation codes. MpCCI uses the vertical y-axis. For simulation codes which use dierent axes, the data is converted in the code adapter. The solid material is a simple linear elastic material with elastic modulus E = 2000 MPa and = 0.3. The uid is modeled as ideal gas with properties of air. The uid is streaming into the nozzle at the pressure inlet as shown in Figure 1. During the simulation the pressure is slowly increased with a user-dened function up to a value of pi = 1 MPa.

70 VII

MpCCI 3.1.0-1

VII Tutorial outlet, p = p0 outlet, p = p0

6.2 Model Preparation

1 mm 4 mm

outlet, p = p0

0.5 mm solid 135 r=0.5 mm 1 mm axis of revolution 10 mm 25mm uid

The simulation is a steady state simulation, the surface forces are only transferred once from the uid model to the solid model, where they are applied as boundary conditions to compute the stress distribution.

6.2.1 Fluid Model

inlet, p = pi

5 mm

Figure 1: Pipe Nozzle: Section sketch of the axisymmetric model.

FLUENT Fluent uses the horizontal x-axis as axis of revolution, thus the model is created as shown in Figure 1. A user-dened function is used to slowly increase the inlet pressure in order to ensure convergence of the FLUENT solver. Before starting the computation, the "libudf" library for FLUENT must be built:

MpCCI 3.1.0-1

VII 71

6 Pipe Nozzle

VII Tutorial Change to the "FLUENT" directory, start uent 2d and read the casele "nozzle.cas". FLUENT will print open udf library: an error message No such file or directory , which indicates that the UDF library is still missing. The error message should not appear if the library was built and is present in the corresponding "libudf" directory. Select DeneUser-DenedFunctionsCompiled... to open the Compiled UDFs panel shown on the left. Press the left Add... button and select the le "inpressure.c". Press Build to compile the "libudf" library. Finally exit the panel with Load to load the library. Quit FLUENT, you do not need to save changes. ...

72 VII MpCCI 3.1.0-1

VII Tutorial

6.3 Models Step

6.2.2 Solid Model

Abaqus

r=0.5 mm

1 mm 135 axis of revolution

0.5 mm outlet, p = p0 outlet, p = p0 ... Abaqus uses the vertical y-axis as axis of revolution in axisymmetric models. Therefore the geometry must be ipped by swapping x- and y-coordinates, which yields the conguration shown on the left. Only one iteration step is carried through.

10 mm

inlet, p = pi

5 mm 1 mm 4 mm

6.3 Models Step

Before starting the coupled simulation, ensure that you have built the udf library for FLUENT as described above. Start the MpCCI GUI by entering the command mpcci gui . In the rst step, the Models Step, the input les of the coupled codes are dened and scanned.

MpCCI 3.1.0-1

VII 73

6 Pipe Nozzle FLUENT Select FLUENT as the rst code to couple. The model is axisymmetric, i. e. a 2d model. Select the FLUENT version 2d. The FLUENT release should be set to 6.3.26 or higher. Select the input le "FLUENT/nozzle.cas" and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly. Abaqus Select Abaqus as the second code to couple. Select any Abaqus 6.6 or Abaqus 6.7 release. Choose the input le "Abaqus/nozzle.inp". Set the unit system to SI-mm-t-s, because the Abaqus model was created using these units. Please press the Start Scanner button and a green check mark should appear at the top as shown on the left. Press Next > to proceed.

VII Tutorial

74 VII

MpCCI 3.1.0-1

VII Tutorial

6.5 Edit Step

6.4 Coupling Step

In the Coupling Step, select the Face (2D) tab. FLUENT Select the coupling component pipesurface by dragging it to the list of Coupled components. Abaqus Select the coupling component ASSEMBLY NOZZLE-1 OUTSIDE. ... Choose the quantity RelWallForce with FLUENT as sender. Press Next > to proceed.

MpCCI 3.1.0-1

VII 75

6 Pipe Nozzle

VII Tutorial

6.5 Edit Step

No changes are required in the Edit Step, proceed to the Go Step by pressing Next > .

6.6 Go Step

In the server panel, no changes are necessary. The code panels are described for each code below.

76 VII

MpCCI 3.1.0-1

VII Tutorial FLUENT

6.6 Go Step

Set the Initial quantities transfer to send. Deselect Auto hook functions. This is necessary to keep FLUENT from sending data in each iteration.

MpCCI 3.1.0-1

VII 77

6 Pipe Nozzle Abaqus

VII Tutorial

Set Initial quantities transfer to receive. All other options need not be changed.

6.7 Running the Computation


Start the MpCCI server by pressing the left Start button and save the project as "nozzle.csp". Then start FLUENT and Abaqus by pressing the other Start buttons. In the FLUENT window, select SolveInitializeInitialize... and press the Init button to initialize the FLUENT solution. Then close the initialization panel by pressing Close . Open the FLUENT Iterate panel by selecting SolveIterate.... Set the number of iterations to 120 and press the Iterate button. You should see a plot of the FLUENT results during the iterations. Close the Iterate panel and open the MpCCI panel which you nd under SolveMpCCI Control.... In the MpCCI panel, press the Initialize button in the middle of the panel, which will start the neighborhood search in both codes you should notice according output in the code windows. To send the surface forces from FLUENT to the partner code, press the Send button once. The partner code will now compute the stresses and quit. Close any appearing message windows. Press the Finalize button in the MpCCI panel of FLUENT, which disconnects FLUENT from MpCCI and exit FLUENT. Quit MpCCI, the simulation is nished. Have a look at the stress results in the structural code and compare them to those shown below.

78 VII

MpCCI 3.1.0-1

VII Tutorial

6.8 Discussion of Results

6.8 Discussion of Results

The stress distribution in the Abaqus model is shown on the left. To verify the results, the Abaqus model was alternatively loaded with the inlet pressure at the interior surface, while no load was applied at the outside surface. This yielded almost identical results to the coupled simulation.

MpCCI 3.1.0-1

VII 79

7 Cube in a Duct Heater

VII Tutorial

7 Cube in a Duct Heater


7.1 Problem Description
0.3 duct inlet u=0.5 m/s 0.1

0.1

HeaterT=673K Cube H=0.02 W=0.02 T=0.02

Figure 1: Duct Heater: Geometry [m] and boundary conditions section view

Topics of this Tutorial Radiative Heat Transfer Steady State Forced convection 3D-model

Simulation Codes Radiation: RadTherm 9.0.1 or higher Fluid Mechanics: FLUENT 6.3.26, STAR-CD 3.26 or 4.0x

Description The example case presented in this tutorial describes the forced convection. For this purpose a cube is inserted in an rectangular duct, which is heated up by a heater at the bottom of the duct. Additionally the cube is cooled by air passing through the rectangular duct.

80 VII

MpCCI 3.1.0-1

VII Tutorial

7.2 Model Preparation

7.2 Model Preparation


The simulation couples a radiation model with a uid mechanics model. The les which you need for the simulation are included in the MpCCI distribution. Create a new directory "DuctHeater" and copy the subdirectories from "<MpCCI home>/tutorial/DuctHeater" which correspond to the simulation codes you want to use.

7.2.1 Radiation Model


RadTherm All values at standards settings use temperature calculated except for the heater. The heater is set on a constant surface temperature identical (T=673K) to the CFD settings. The maximum iterations is set to 499. ...

7.2.2 Fluid Model


The uid domain comprises the inner part of the duct heater (Table 1.) The setting used for uid model are in the following Table 2 FLUENT A standard k model with enhanced wall treatment is applied. STAR-CD A k high Reynolds turbulence models is applied. 1. Start pro-STAR and resume the model le "star model.mdl". 2. In the STAR GUIde go to Analysis Preparation/RunningSet Run Time Controls. Set Number of iterations to 500. 3. Save the model "star model.mdl" and exit pro-STAR. STAR-CD 3.26 1. Create a subdirectory "STARCD/ufile" by renaming the provided ule directory "ufile 326". 2. Check if the user subroutine "bcdefw.f" is located in "STARCD/ufile". Otherwise copy subroutine "bcdefw.f" from "<MpCCI home>/tutorial/DuctHeater/STARCD/ufile 326".

MpCCI 3.1.0-1

VII 81

7 Cube in a Duct Heater


kg m3 W mK

VII Tutorial

Density Conductivity Specic heat Inlet Velocity Temperature Turbulent Intensity Turbulent Length Outlet Cube wall heat Temperature Duct wall heat Temperature Heater wall heat Temperature

1.205

0.0237 1006

J kgK

0.5 m s 293.0 K 0.1 0.02 m standard setting xed 293.0 K xed 293.0 K xed 673.0 K

Table 1: Duct Heater: Boundary conditions for uid model

Time Domain Gravity Thermal option All settings

Steady state
m 9.81 s2

Buoyancy for AIR On Table 2: Duct Heater: Parameter setting for uid model

The routine "bcdefw.f" is needed for retrieving the received wall temperature from the scalar array for STAR-CD 3.26. All other subroutines which are needed for a coupled simulation will be copied automatically by MpCCI.

82 VII MpCCI 3.1.0-1

VII Tutorial STAR-CD 4.0x

7.3 Models Step

For STAR-CD 4.0x the data transfer and management is handled via plug-ins and no user subroutines are needed for a coupled simulation. ...

7.3 Models Step

Start the MpCCI GUI by running the command mpcci gui . In the rst step, the Models Step, the input les of the coupled codes are dened and scanned. RadTherm

Select RadTherm as the rst code to couple. Select RadTherm9.0.1 release or higher. Choose the input "Radtherm/radtherm model.tdf". le

Please press the Start Scanner button and a green check mark should appear at the top as shown on the left.

MpCCI 3.1.0-1

VII 83

7 Cube in a Duct Heater FLUENT

VII Tutorial

Select FLUENT as the second code to couple. The FLUENT release should be set to 6.3.26. The FLUENT version should be set to 3ddp. Select "FLUENT/fluent model.mdl" as input le and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly.

STAR-CD

Select STAR-CD as the second code to couple. The STAR-CD release should be set to 3.26 or higher. Select "STARCD/star model.mdl" as input le and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly.

7.4 Coupling Step


Press the Next > button at the bottom of the Models Step to get to the Coupling Step. In this example the coupling region corresponds to the surface of the duct and rectangle. MpCCI treats this region as a Face because it represents a 2D structure. Select Face (2D) tab, and then congure the corresponding coupling components as depicted in Figure 2 and described in the following.

84 VII

MpCCI 3.1.0-1

VII Tutorial

7.4 Coupling Step

Figure 2: Duct Heater: Coupling of FilmTemp, WallHTCoe and WallTemp

RadTherm

Double-click or drag down the coupling component duct leftside, duct topside, duct rightside, duct bottom cube backside, cube leftside, cube rightside cube topside, cube bottomside, cube frontside which characterizes the surface of the duct and the rectangle. The component will appear in the coupled eld of the solver. FLUENT

Double-click or drag down the coupling component duct leftside, duct topside, duct rightside, duct bottom cube backside, cube leftside, cube rightside cube topside, cube bottomside, cube frontside which characterizes the surface of the duct and the rectangle. The component will appear in the coupled eld of the solver. STAR-CD

Double-click or drag down the coupling component duct leftside, duct topside, duct rightside, duct bottom cube backside, cube leftside, cube rightside cube topside, cube bottomside, cube frontside which characterizes the surface of the duct and the rectangle. The component will appear in the coupled eld of the solver. ...

MpCCI 3.1.0-1

VII 85

7 Cube in a Duct Heater

VII Tutorial

In the quantities eld choose as coupling type steady state radiative heat transfer and activate the quantities by pressing Set as marked red in Figure 2. The quantities FilmTemp,, WallHTCoe and WallTemp are activated. MpCCI will set the sender of the corresponding quantities. No further settings are required, proceed to the Edit Step by pressing Next > .

7.5 Edit Step


No changes are required in the Edit Step, proceed to the Go Step by pressing Next > .

7.6 Go Step

In the server panel, no changes are necessary. The code panels are described for each code.

86 VII

MpCCI 3.1.0-1

VII Tutorial RadTherm

7.6 Go Step

The Initial quantities transfer is set to receive. All other options should not be changed.

MpCCI 3.1.0-1 VII 87

7 Cube in a Duct Heater FLUENT

VII Tutorial

Set the Initial quantities transfer to send. Use the default settings.

88 VII

MpCCI 3.1.0-1

VII Tutorial STAR-CD 3.26 Set the Initial quantities transfer to send.

7.6 Go Step

As startup procedure select Prepare case and start to accomplish the necessary modications in the STAR-CD model for a coupled simulation. The activated option Rebuild shared library will cause a compilation of the user subroutines, which are copied to the ule directory by MpCCI. Disable Use MpCCI plugin for V4 to deactivate MpCCI plug-in, which is not available for STARCD 3.26. As MpCCI will build an new model le, save the original model le by pushing the Backup model le button. Enable the Double precision mode. Make sure, that you have already copied "bcdefw.f" to the ule directory in step Preparation 7.2 Model.

MpCCI 3.1.0-1

VII 89

7 Cube in a Duct Heater STAR-CD 4.0x

VII Tutorial

Set the Initial quantities transfer to skip. As startup procedure select Prepare case and start to accomplish the necessary modications in the STAR-CD model for a coupled simulation. Enable Use MpCCI plugin for V4 to activate MpCCI plug-in in STAR-CD for data transfer. Deactivate option Rebuild shared library as no user subroutines for data transfer are needed (plug-in version). As MpCCI will build an new model le, save the original model le by pushing the Backup model le button. Enable the Double precision mode.

...

7.7 Running the Computation 7.7.1 Starting the Simulation


Save the MpCCI project le with name "duct heater.csp" over the MpCCI GUI menu FileSave Project As . Press the three Start buttons in the Go Step and the simulation codes should start. Some codes require additional actions: RadTherm Before starting the RadTherm computation the model has to be correctly setup to use the MpCCI Adapter by using the RadTherm GUI.( VI-9.2.5.1 Hooks Functions ) You have to select the Analyse Params section in the RadTherm GUI in order to access the hooks functions setup Figure 3 (part VI). By clicking on the button HookFunctions... the setup windows will appear. You have to setup these functions for the following available RadTherm hooks: Solution Start Select the routine radthermmpcci::TaiMpCCI solution start(). Iteration Start Select the routine radthermmpcci::TaiMpCCI iteration start().

90 VII

MpCCI 3.1.0-1

VII Tutorial

7.7 Running the Computation

Figure 3: RadTherm Hooks Functions Setup.

IterationEnd Select the routine radthermmpcci::TaiMpCCI iteration end(). Solution End Select the routine radthermmpcci::TaiMpCCI solution end(). After having hooked the functions press the OK button to exit the dialog. You may check that the number of iterations is correctly set to 499. Then you may click on the Run button to start the computation. RadTherm will ask to save the model. The related hook information is saved and depends on your local MpCCI installation. FLUENT The FLUENT Graphical interface is started. 1. Open SolveInitializeInitialize and press the button init . 2. Open SolveIterate and start 500 iterations. During the simulation, FLUENT will display the residuals. At the end of the simulation, save the data le by selecting Filewritedata.

MpCCI 3.1.0-1

VII 91

7 Cube in a Duct Heater STAR-CD The STAR-CD calculation is started in batch mode. ...

VII Tutorial

7.7.2 End of the Simulation


RadTherm After performing 499 iterations RadTherm will ask to do some additional iterations. At this step you may accept the solution and the thermal computation is terminated. You may save the results for a later post-processing and exit the RadTherm GUI to close the coupled simulation. ...

7.8 Discussion of Results


RadTherm Temperature results may be visualized in RadTherm GUI. (Figure 4) FLUENT FLUENT result le "fluent model.dat" may be post processed by FLUENT. STAR-CD STAR-CD result le "star model.pst" or "star model.ccmp" may be post processed with pro-STAR. ... By using the MpCCI Visualizer you may visualize the coupled values from the "tracefile.ccv". You may open the tools from the MpCCI GUI Tools Visualizer . This will open automatically the "tracefile.ccv" le.

92 VII

MpCCI 3.1.0-1

VII Tutorial

7.8 Discussion of Results

Figure 4: Duct Heater: Temperature section plot

MpCCI 3.1.0-1

VII 93

7 Cube in a Duct Heater

VII Tutorial

Figure 5: Duct Heater: FLUENT wall temperature contour plot

94 VII MpCCI 3.1.0-1

VII Tutorial

7.8 Discussion of Results

Figure 6: Duct Heater: FLUENT total temperature contour plot

MpCCI 3.1.0-1

VII 95

8 Y-Junction

VII Tutorial

8 Y-Junction
8.1 Problem Description
Downstream Pressure 1.5e+05 Pa

Upstream Pressure 4e+05 Pa

Co-simulation interface Outlet area 3.12 cm2

Co-simulation interface Inlet area: 4 cm2 Co-simulation interface Downstream Pressure 1.2e+05 Pa Outlet area 3.12 cm2 Figure 1: Y-Junction: Fluid geometry and network boundaries

Topics of this Tutorial 1D network model 3D-model Steady State Simulation Codes Network: Flowmaster 7.5.1,Flowmaster 7.6.0 Fluid Mechanics: FLUENT 6.3.26, STAR-CD 4.04 or higher

8.2 Model Preparation


The simulation couples a network model with a uid mechanics model. The les which you need for the simulation are included in the MpCCI distribution. Create a new directory "Y-Junction" and copy the

96 VII

MpCCI 3.1.0-1

VII Tutorial

8.2 Model Preparation

subdirectories from "<MpCCI home>/tutorial/Y-Junction" which correspond to the simulation codes you want to use.

8.2.1 Network Model


Flowmaster The Flowmaster model (Figure 2) is composed of three networks. Each network will prescribe a ow (inlet/outlet) or pressure boundaries to the uid model. The boundaries in a uid model are represented within a Flowmaster network by a source.

Figure 2: Y-Junction: Flowmaster network

1. Start Flowmaster then you need to log on the Flowmaster database. 2. Unpack the appropriate "Y Junction.FMpck" pack le from the "<MpCCI home>/tutorial/Y-Junction/Flowmaster " folder. Unpack the le directly under the root of your project tree. 3. Each source boundary has to activate its External Model Boundary property. For the following boundary IDs 13, 15, 26 you have to follow these instructions:

MpCCI 3.1.0-1

VII 97

8 Y-Junction a) Select the boundary component.

VII Tutorial

b) Edit the boundary with the Edit mouse menu context.

c) Select in the property list the External Model Boundary item.

d) Click on the Sub Form... button.

e) Change the property Boundary Active value to Yes.

f) Click on the button Return .

4. Run a standalone incompressible steady state (SS) Flowmaster analysis to completion.

5. The next step is to export the network boundary for the co-simulation.

In the Network Views select the Data tab option. Click on the icon button that Generate a network data or analysis results report. Select the MpCCI Link File report type and click on the button OK .

98 VII

MpCCI 3.1.0-1

VII Tutorial

8.2 Model Preparation From the list of Active Boundary Components, select each item and click on the button Add > . All active boundary components are in the Selected Boundaries. Select a boundary and provide a description by lling the text eld Add/Edit Boundary Description. For the boundary 13, enter the name mass-in. For the boundary 15, enter the name pout1. For the boundary 26, enter the name pout2. Click on the button ... to select an output directory. (e. g. "<MpCCI home>/tutorial/Y-Junction/Flowmaster In the File Name eld provide the name "Y Junction.fmlink". Click on the button [Create ASCII File... The le has been created, the dialog can be closed. Exit the Flowmaster graphical interface.

Do not renumber any Network used for co-simulation as component IDs are used to identify boundaries in MpCCI link le.

8.2.2 Fluid Model


The uid model is a 3D model using the following settings: Turbulence model: k-epsilon RNG Time: Steady State Fluid: water Initial velocity 2 m.s 1

MpCCI 3.1.0-1

VII 99

8 Y-Junction

VII Tutorial

Figure 3: Y-Junction: mesh

100 VII

MpCCI 3.1.0-1

VII Tutorial

8.3 Models Step

8.3 Models Step

Start the MpCCI GUI by running the command mpcci gui . In the rst step, the Models Step, the input les of the coupled codes are dened and scanned. Flowmaster Select Flowmaster as the rst code to couple. Select Flowmaster 7.5 release or higher. Choose the input "Flowmaster/Y Junction.fmlink". le

Please press the Start Scanner button and a green check mark should appear at the top as shown on the left. FLUENT Select FLUENT as the second code to couple. The FLUENT release should be set to 6.3.26. Select "FLUENT/Y-junction.cas.gz" as input le and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly.

MpCCI 3.1.0-1

VII 101

8 Y-Junction STAR-CD

VII Tutorial

Select STAR-CD as the second code to couple. The STAR-CD release should be set to 4.04 or higher. Select "StarCD/Y-junction.mdl" as input le and press the Start Scanner button. Finally a green check mark should appear, as shown at the left, which means everything is set up correctly. ... Click on the button Next > to continue the co-simulation setup. A warning window will appear and complains about the model dimensions. You can continue by clicking on Continue .

102 VII

MpCCI 3.1.0-1

VII Tutorial

8.4 Coupling Step

8.4 Coupling Step


In this example the coupling region corresponds to the surface of the inlet and outlets boundaries.

Figure 4: Y-Junction: Coupling of BoundaryMassFlux, BoundaryTotalPressure, MassFlowRate, TotalPressure Select Face (2D) tab, and then congure the corresponding coupling components as depicted in Figure 4. 1. Select the Face 2D tab. 2. Select the coupling components for the rst coupling region Face 1 by double-clicking them or dragging them into the Coupled boxes. Flowmaster Select the coupling component mass-in. FLUENT Select the coupling component mass-in. STAR-CD Select the coupling component mass-in. ...

MpCCI 3.1.0-1

VII 103

8 Y-Junction 3. Select the quantity BoundaryMassFlux and the network Code is the sender. Select the quantity TotalPressure and the CFD Code is the sender. FLUENT FLUENT receives the quantity BoundaryMassFlux at the UDM index 0. STAR-CD STAR-CD receives the quantity BoundaryMassFlux at the SCALAR index 1. ... A rst coupled region Face 1 has been created.

VII Tutorial

1. For the next coupled region click on the Add button in the Regions part. This will insert a new region Face 2 to couple. 2. Select the coupling components by double-clicking them or dragging them into the Coupled boxes. Flowmaster Select the coupling component p-out1. FLUENT Select the coupling component p-out1. STAR-CD Select the coupling component p-out1. ... 3. Select the quantity BoundaryTotalPressure and the network Code is the sender. Select the quantity MassFlowRate and the CFD Code is the sender. FLUENT FLUENT receives the quantity BoundaryTotalPressure at the UDM index 1. STAR-CD STAR-CD receives the quantity BoundaryTotalPressure at the SCALAR index 2. ... Repeat the step 1 to 3 for the component p-out2 in the region Face 3. No further settings are required, proceed to the Edit Step by pressing Next > .

104 VII

MpCCI 3.1.0-1

VII Tutorial

8.5 Edit Step

8.5 Edit Step

Figure 5: Y-Junction: MpCCI Edit Step

Deselect the CheckBoundingBox option. Select the MinimalDistance option from the tree and put for the Theta2 value zero. The MpCCI server is now congured for the 1D-3D co-simulation. Proceed to the Go Step by pressing Next > .

MpCCI 3.1.0-1

VII 105

8 Y-Junction

VII Tutorial

8.6 Go Step

In the server panel, no changes are necessary. The code panels are described for each code.

106 VII

MpCCI 3.1.0-1

VII Tutorial Flowmaster

8.6 Go Step

The Initial quantities transfer is set to receive. Enter the User Name to log in the database. In this tutorial it was Admin. Change the name of the Working Project Name corresponding to the root of your project list view in Flowmaster if necessary. Please select the analysis type to SS from the list. Let other settings as default.

MpCCI 3.1.0-1 VII 107

8 Y-Junction FLUENT

VII Tutorial

Set the Initial quantities transfer to exchange. Select an Optional journal les "Steady.jou" with the browse button. This le is located under "<MpCCI home>/tutorial/Y-Junction/FLUENT" Deactivate the Auto hook functions. Deactivate the Auto set MDM zones.

108 VII

MpCCI 3.1.0-1

VII Tutorial STAR-CD

8.7 Running the Computation

Set the Initial quantities transfer to exchange. As startup procedure select Prepare case and start to accomplish the necessary modications in the STAR-CD model for a coupled simulation. Enable Use MpCCI plugin for V4 to activate MpCCI plug-in in STAR-CD for data transfer. Deactivate option Rebuild shared library as no user subroutines for data transfer are needed (plug-in version). Set Steady state: No. of iterations without coupling to 20. As MpCCI will build an new model le, save the original model le by pushing the Backup model le button. ...

8.7 Running the Computation 8.7.1 Starting the Simulation


Save the MpCCI project le with name "y junction.csp" over the MpCCI GUI menu FileSave Project As . Press the three Start buttons in the Go Step and the simulation codes should start. Some codes require additional actions: Flowmaster The Flowmaster calculation is started in batch mode. FLUENT The FLUENT GUI is started and the calculation starts automatically. The FLUENT journal le "Steady.jou" denes the following procedures: ;; initialize flow /solve/initialize initialize-flow

MpCCI 3.1.0-1

VII 109

8 Y-Junction

VII Tutorial

;; initialize MpCCI (%udf-on-demand udf-init) ;; start iterations (MpCCI-solve 50 20) ;; Exit mpcci (%udf-on-demand udf-exit)

FLUENT will perform 1000 iterations with 20 iterations without coupling. STAR-CD The STAR-CD calculation is started in batch mode. STAR-CD will perform 1000 iterations with 20 iterations without coupling. ...

8.8 Discussion of Results


Flowmaster You can open the Flowmaster GUI and open the Y Junction project. You can select some last results and plot a chart of the pressure or mass ow for one boundary component for example. FLUENT After FLUENT nished the 1000 iterations, you could save the data and post process the results with FLUENT. STAR-CD STAR-CD result le "Y-junction.ccmp" may be post processed with pro-STAR. In order to visualize the quantity value stored in the user scalar you have to select in pro-STAR the data type Cell & Wall/Bound (Smotth). ... On the uid model we expect that the pressure at the inlet and outlet is closed to the prescribed pressure values imposed by the network model. At the inlet boundary mass-in a pressure of 4 bar was prescribed on the network model and on the uid a total pressure value around 2.3 bar is expected. At the outlet boundary p-out1 and p-out2 a total pressure value of 1.5 bar respectively 1.2 bar is expected. By using the MpCCI Visualizer you may visualize the coupled values from the "tracefile.ccv". You may open the tools from the MpCCI GUI Tools Visualizer . This will open automatically the "tracefile.ccv"

110 VII

MpCCI 3.1.0-1

VII Tutorial le.

8.8 Discussion of Results

Figure 6: Y-Junction: Fluent Residuals plot

MpCCI 3.1.0-1

VII 111

8 Y-Junction

VII Tutorial

Figure 7: Y-Junction: Fluent Total Pressure plot

112 VII

MpCCI 3.1.0-1

VII Tutorial

8.8 Discussion of Results

Figure 8: Y-Junction: Fluent Velocity vector section plot

MpCCI 3.1.0-1

VII 113

MpCCI 3.1.0

MpCCI

VIII Programmers Guide

MpCCI 3.1.0-1 Documentation Part VIII Programmers Guide PDF version January 20, 2009

MpCCI is a registered trademark of Fraunhofer SCAI www.scai.fraunhofer.de/mpcci

Fraunhofer Institute
Algorithms and Scientic Computing Fraunhofer Institute for Algorithms and Scientic Computing SCAI Schloss Birlinghoven, 53754 Sankt Augustin, Germany Abaqus and SIMULIA are trademarks or registered trademarks of Dassault Syst`mes e ANSYS is a registered trademark of Ansys, Inc. FLUENT is a registered trademark of Fluent Inc. FLUX is a registered trademark of Cedrat of Grenoble, France ICEPAK is a registered trademark of Fluent Inc. MSC.Marc is a registered trademark of MSC.Software Corporation PERMAS is a registered trademark of Intes GmbH STAR-CD is a registered trademark of CD adapco Group RadTherm is a registered trademark of ThermoAnalytics Inc. FLEXlm is a registered trademark of Macrovision Perl has a copyright by Larry Wall and others ActivePerl has a Community License Copyright of Active State Corp. OpenSSH has a copyright by Tatu Ylonen, Espoo, Finland Java is a registered trademark of Sun Microsystems, Inc. MPICH-1 and MPICH-2 has a copyright by University of Chicago and Mississippi State University Linux is a registered trademark of Linus Torvalds UNIX is a registered trademark of The Open Group Windows, Windows XP and Windows Vista are registered trademarks of Microsoft Corp.

VIII Programmers Guide

Contents

VIII Programmers Guide Contents


1 2 2.1 Introduction Code API Code Integration and Simulation Code Requirements . . . . . . . . . . . . . . . . . . . . . . 2.1.1 2.1.2 2.2 2.2.1 2.2.2 2.2.3 2.3 2.4 Data Exchange and Data Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MpCCI Interface for Code Integration . . . . . . . . . . . . . . . . . . . . . . . . . . A Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Step-by-Step Procedure for Code Integration . . . . . . . . . . . . . . . . . . . . . . Code Coupling with the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 7 8 8 9 11 11 14 25 28 29 29 29 30 31 32 33 35 36 42 43 43 43 45 45 45 46 47 48

Code Integration with the MpCCI API Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Code Conguration Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MpCCI GUI Conguration File gui.xcf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 Code Information: <CodeInfo> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Codes Menu: <CodesMenuEntries> . . . . . . . . . . . . . . . . . . . . . . . . . . . Models Step: <ModelsMenuEntries> . . . . . . . . . . . . . . . . . . . . . . . . . . . Component Types: <ComponentTypeDimensions> . . . . . . . . . . . . . . . . . . . List of quantities: <SupportedQuantities> . . . . . . . . . . . . . . . . . . . . . . . Go Step: <GoMenuEntries> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Environments for Scanner, Starter, Stopper and Killer . . . . . . . . . . . . . . . . . General MpCCI GUI Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Testing gui.xcf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Information from gui.xcf in Scripts . . . . . . . . . . . . . . . . . . . . . . . . Scanner.pm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Starter.pm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stopper.pm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Info.pm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Subcmd.pm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Testing the Perl Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2.5

Perl Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7

2.6

MpCCI Coupling Manager Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI 3.1.0-1

VIII

Contents 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 3 3.1

VIII Programmers Guide Denition of Output Functions: MpCCI Message init . . . . . . . . . . . . . . . . . Initialization: MpCCI Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Get Initial Exchange Mode: MpCCI Get init actions . . . . . . . . . . . . . . . . . Data Exchange: MpCCI Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . End of Coupled Simulation: MpCCI Exit . . . . . . . . . . . . . . . . . . . . . . . . . Denition of Nodes: MpCCI Def nodes . . . . . . . . . . . . . . . . . . . . . . . . . . Denition of Elements: MpCCI Def elems . . . . . . . . . . . . . . . . . . . . . . . . Description Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Methods Called before/after some Action . . . . . . . . . . . . . . . . . . . . . . . . Mesh Denitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quantities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Loop Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 50 52 53 54 55 56 58 60 61 62 63 64 64 65 66 68 68 68 68 69 70 70 72 74 74 75 75

MpCCI Driver Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Data Structures and Predened Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI SDK Code Coupling Library The MpCCI SDK Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 Communication levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling quantities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Synchronization concepts and data transfer . . . . . . . . . . . . . . . . . . . . . . . Coupling Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Neighborhood Search and Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . The MpCCI SDK coupling server scheme . . . . . . . . . . . . . . . . . . . . . . . . . Naming Conventions and Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . MpCCI SDK Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Initialization and Coupling Denition . . . . . . . . . . . . . . . . . . . . . . . . . .

MpCCI SDK Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Coupling Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 Remeshing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

VIII

MpCCI 3.1.0-1

VIII Programmers Guide 3.2.7 3.2.8 3.2.9 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9

Contents

Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Miscellaneous functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Overview of the MpCCI SDK functions . . . . . . . . . . . . . . . . . . . . . . . . . . 146 Structure of the Input File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Code block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Quantities block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Control block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Contact block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Switches block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Jobs block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Parameters block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Coupling block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

MpCCI Input File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

3.3.10 Additional block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 3.3.11 Include Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 3.4 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 3.4.1 3.4.2 3.4.3 3.4.4 Start-up and Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Coupling Denition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Coupled Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

MpCCI 3.1.0-1

VIII

1 Introduction

VIII Programmers Guide

1 Introduction
This Programmers Guide addresses to engineers who have developed their own simulation code and plan to use it within the MpCCI coupling environment. The current MpCCI version allows two levels of interfacing own codes with the coupling environment: the MpCCI SDK is a lower level subroutine interface and the MpCCI Adapter level used since MpCCI 3.0 for commercial codes. The MpCCI SDK interface level provides various basic functions to dene coupling regions, control communication between the coupled codes and to handle other MpCCI parameters. The usage of MpCCI SDK is very similar to the usage of the MPI Message Passing Interface - there is no xed protocol when to communicate which data with which other components. This MPI-like exibility allows the implementation of very dierent coupling algorithms. On the other hand there is no guarantee that the MpCCI SDK integration of a code A has a compatible communication protocol as that of any other code B. A detailed description of MpCCI SDK can be found on 3 MpCCI SDK Code Coupling Library . To avoid such protocol incompatibilities between dierent code integrations MpCCI 3.0 has introduced the concept of code adapters. These adapters have internal mechanisms to control the current coupling state and actions of each integrated code. These Coupling Control Managers guarantee a consistent behavior and communication protocol for all adapted codes. Chapter 2 Code API describes the integration of new simulation codes using a code adapter. The current MpCCI 3.1 allows both levels of integration. However, it should be noted that for reasons of compatibility the MpCCI Adapter Level should be preferred. In midterm the MpCCI SDK interface will be regarded as a pure internal MpCCI and thus might be subject to larger changes.

VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2 Code API

2 Code API
This section describes how to establish MpCCI support for your code, i. e. the code can then be coupled with all other codes, which are already supported by MpCCI. This section is organized as follows: General description of code integration. Read this to get an idea how code integration works. 2.1 Code Integration and Simulation Code Requirements Description of the MpCCI API Kit, which contains template les and an example. A step-by-step procedure for code integration is given here. 2.2 Code Integration with the MpCCI API Kit Reference for MpCCI GUI integration. 2.3 Code Conguration Directory 2.4 MpCCI GUI Conguration File gui.xcf 2.5 Perl Scripts Reference for the code adapter. 2.6 MpCCI Coupling Manager Functions 2.7 MpCCI Driver Functions 2.8 Data Structures and Predened Macros

Before starting the integration of a new code, you should contact the MpCCI support, mpcci scai.fraunhofer.de, to obtain: The MpCCI API Kit, a set of template les and an example. A license for an adapter to your code.

MpCCI 3.1.0-1 VIII

2 Code API

VIII Programmers Guide

2.1 Code Integration and Simulation Code Requirements


In order to understand code integration, you should be aware of the general procedure of a coupled simulation with MpCCI, which is described in IV-1.3 Code Coupling with MpCCI .

2.1.1 Data Exchange and Data Access


Start MpCCI Init time / iteration step Simulation Code MpCCI Transfer Solver MpCCI Transfer MpCCI Exit End Figure 1: Calls of adapter library routines from the simulation code. The call of MpCCI Transfer can be inserted before or after the solver. For the coupling process, the analysis code must be able to send and receive data based on the mesh of a coupling component. This requires access to the following data of a simulation code: Mesh information MpCCI handles exchanges of data between non-matching grids, thus it needs to know the grids on both sides. Therefore, the mesh data of the coupling component must be transferred to MpCCI. This includes Number of nodes, number of elements, type of oating point values Nodes: ID, coordinates, Elements: ID, type, nodes. Physical values to be exchanged During the coupling process, data is exchanged, which must be transferred to MpCCI or received from MpCCI. This requires local Reading access to values of data to be transferred, Allocation of memory for receiving data, exchange exit coupling process exchange MpCCI initialization

VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.1 Code Integration and Simulation Code Requirements

Method to put received data on local mesh. The data is sent or received by driver functions, which must be implemented as part of the code adapter. In addition coupling manager functions of the adapter library must be called at certain stages of the simulation as depicted in Figure 1. MpCCI provides a C-Interface, which can be used from C, C++ and FORTRAN codes. In addition to this actual adapter, a number of les can be provided to allow MpCCI to manage the coupled simulation and integrate the code into the MpCCI GUI.

2.1.2 MpCCI Interface for Code Integration


Simulation code GUI run integration control

GUI

code adapter

data Server

Figure 2: The two basic parts needed for code integration: GUI integration and code adapter Two basic things are necessary for coupling a simulation code with MpCCI, see also Figure 2. GUI integration. The integration into the MpCCI GUI is realized with a set of conguration les which describe the properties and capabilities of a code, how to scan input les and start the code. An overview of these les is given in 2.3 Code Conguration Directory . Code adapter. The code adapter is needed to handle the data exchange. The adapter is a plug-in into the simulation code, which can be realized in dierent ways: It can be included directly into the code or be based on user functions which are provided by the code. MpCCI provides a basic C-interface for the development of code adapters. The structure of the code adapter is sketched in Figure 3. Its main parts are: Driver functions which perform the basic data exchange with the code. It is the passive part of the adapter, as the driver functions are called by the adapter library. The Coupling Manager is a set of functions for the communication between the code adapter and the MpCCI server. It is part of the MpCCI software package. The functions are dened in the header le "mpcci.h", the object les in "libmpcci*.a" must be linked with the simulation

MpCCI 3.1.0-1

VIII

2 Code API

VIII Programmers Guide

code. The coupling manager functions call the provided driver functions. The exact procedure is sketched exemplarily for MpCCI Init in Figure 18.

Simulation Code

Code Adapter Driver functions ... MpCCI Driver defineGrid MpCCI Driver getFaceNodeValues MpCCI Driver putFaceNodeValues ... calls Code Coupling Manager data

Data

data

Solver

calls

MpCCI Init MpCCI Transfer MpCCI Exit ... "mpcci.h" "libmpcci*.a" "libmpcci*.so"

data

network

MpCCI Server

Figure 3: Code adapter structure: The code adapter is a plug-in of the analysis code, which consists of two parts: Driver functions and Coupling Manager

10 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.2 Code Integration with the MpCCI API Kit

2.2 Code Integration with the MpCCI API Kit


The MpCCI API Kit contains templates as well as a simple example to demonstrate the integration of a simulation code into MpCCI. The MpCCI API Kit contains the following les: Directory "adapter" "configuration" "example/configuration" "example/C/src" "example/C/src-nompcci" "example/FORTRAN/src" "example/FORTRAN/src-nompcci" "example/test" "example/test-nompcci" Description Templates for code adapter Templates for conguration directory Conguration Directory les for the example Source code of the example in C Source code of the example without code adapter in C Source code of the example in FORTRAN Source code of the example without code adapter in FORTRAN Files for testing the example Files for testing the example without code adapter

2.2.1 A Simple Example


As a simple example, the simplied simulation of an elastic foundation is included in the MpCCI API Kit. The original source code is included in the directory "example/C/src-nompcci", a FORTRAN version can be found in "example/FORTRAN/src-nompcci". The code can be used for two- and three-dimensional computations. The functionality is implemented in "main.c" ("main.f"), data structures are dened in "data.h" and "data.c" ("data.f") together with a simple le input routine. The code is kept simple and thus does not contain any input le checks etc. . Only two element types are supported: Line elements with two nodes and quadrilateral elements with four nodes. For each element an example input le is included in "example/test-nompcci". The structure modeled in "2dexample.fnd" is depicted in Figure 4 on the left, its content is: EF bed1 2 1 -0.5 NODES 3 0 0 0 1 1 0 2 2 0 ELEMENTS 2 0 0 1 1 1 2 The acronym EF in the rst line starts the denition of an elastic foundation (one le could contain more than one!). Its name is bed1, with space dimension 2 and springs in direction 1, i. e. the y-direction.

MpCCI 3.1.0-1

VIII

11

2 Code API pressure 6 y 0 0 x 0 x 1 1 2 y z 3 0 1 2 4 1

VIII Programmers Guide

7 3 5

Figure 4: Examples for the simple foundation code.

The spring constant of all springs is -0.5. The minus sign is added because is is loaded from top, i. e. a positive pressure should result in a motion in negative y-direction. Running foundation with this input le yields: > ../bin/foundation-nompcci 2dexample.fnd Foundation - computation Reading file >>2dexample.fnd<<... foundation >bed1< dim=2 direction=1 stiffness=-0.5 nodes... 0 : 0 0 1 : 1 0 2 : 2 0 elements... 0 : 0 1 1 : 1 2 allocating memory... read 1 foundations. Step 0 of 3 Please enter pressure: 1.0 results for node 0: node 1: node 2: foundation bed1: force= 0.5 force= 1 force= 0.5

displacement= displacement= displacement=

-1 -2 -1

12 VIII

MpCCI 3.1.0-1

VIII Programmers Guide Step 1 of 3 Please enter pressure: 2 results for node 0: node 1: node 2: foundation bed1: force= 1 force= 2 force= 1

2.2 Code Integration with the MpCCI API Kit

displacement= displacement= displacement=

-2 -4 -2

In each step, the user is asked for a pressure value which is then applied and the resulting forces and displacements are printed to stdout. The number of steps can also be given as a second command line argument after the input le name, three steps are made if nothing is specied. Please have a look at the les of the original code in "src-nompcci". The header le "data.h" contains the denition of the data structure FOUNDATION and of a list of such structures fndlist which is lled by the values from the input le. In "main.c" ("main.f") all actual computations are contained, a number of functions is called from main , which controls what is done. The example was created on a Linux 32 Bit machine but should also run on other Linux systems. The C version was compiled using the GNU compiler gcc , the FORTRAN version was tested with GNU, Absoft 9.0, Intel 9.1 and PGI 6.1 compilers, see the "Makefile". For combining C and FORTRAN sources, as it is done in the FORTRAN example, the naming conventions depend on the compiler. In the sources of the example an underscore is added to the C function names and lowercase names are used. Please consult the documentation of your compiler to nd how to combine C and FORTRAN sources.

MpCCI 3.1.0-1

VIII

13

2 Code API

VIII Programmers Guide

2.2.2 Step-by-Step Procedure for Code Integration


The creation of a code adapter can be performed on a step-by-step basis: Step 1: Preparations. Step 2: Create the conguration directory. Step 3: Test the conguration. Step 4: Create the code adapter. Step 5: Test the code adapter. For each step, the corresponding changes in the example are mentioned as well. To understand the changes you can compare (di) the les with the original versions: original new "configuration/*" "example/configuration/*" "example/C/src-nompcci/data.h" "example/C/src-nompcci/data.c" "example/C/src-nompcci/main.c" "example/C/src-nompcci/Makefile" "adapter/adapter.h" "adapter/adapter.c" "example/C/src/data.h" "example/C/src/data.c" "example/C/src/main.c" "example/C/src/Makefile" "example/C/src/adapter.h" "example/C/src/adapter.c"

All changes are commented and marked with CHANGED: . (For FORTRAN see the corresponding les in "example/FORTRAN".)

14 VIII

MpCCI 3.1.0-1

VIII Programmers Guide STEP 1: Preparations.

2.2 Code Integration with the MpCCI API Kit

Understand the basic concepts of MpCCI. If you have no experience with MpCCI, it is recommended to run some of the Tutorial examples rst. Try to understand the way MpCCI works by reading V-3 Code Coupling . Decide which quantities shall be exchanged. Just select a basic set of quantities, more can be added later. It is sucient to select one quantity for receiving and one for sending. A complete list of quantities is given in the Appendix. Identify possible coupling components. Decide whether data is exchanged on surfaces or volume and how they can be found in model les. The example foundation code computes displacements due to an external pressure. Thus the following quantities will be exchanged: foundation code (elements) OverPressure partner code foundation code (nodes) NPosition partner code

MpCCI 3.1.0-1

VIII

15

2 Code API STEP 2: Create the conguration directory.

VIII Programmers Guide

Copy les from MpCCI API Kit The conguration directories for simulation codes are all located in the subdirectory "<MpCCI home>/codes" of the MpCCI home directory, which you can nd with the command mpcci home . In the "codes" directory, there is one conguration directory for each code. You should already nd some of commercial simulation codes there. Create a directory with the name of your code there and copy all template les from the MpCCI API Kit, subdirectory "configuration", to your new code conguration directory.
"gui.xcf" Change options to your needs, a detailed description is given in

2.4 MpCCI GUI Conguration

File gui.xcf .

For the foundation example, the codename is set to foundation. The foundation code does not use any units, so as default we select SI. The code type is set to SolidStructure , as deformations of solid structures are computed. A list of available types is given in V-3.1.1 Physical Domains . In the section <ModelsMenuEntries> , only 1.0 is added as version, the le extension is set to .fnd and the unit selection menus are kept as no xed set of units is used in the code. The <ComponentTypeDimensions> are a list of names for the coupling components. We actually only need Face, but add names Global , Line , Face and Volume . From the supported quantities, OverPressure and NPosition are kept, the locations are set appropriately and send and receive options are set to Direct as all data will be directly written to and read from the codes data structures. Both quantities can be exchanged on faces. In the 2D case, a line also represents a face! As an additional Go-Menu entry, a selection of the number of steps is added. This will later be passed as a command line argument to the code. The Scanner only needs to know the model le, the Starter also gets the number of steps, the stopper gets the model le name. Perl scripts: "Info.pm", "Scanner.pm", "Starter.pm", "Stopper.pm", "Subcmd.pm" The Perl scripts are needed to get information at run time and interact with your code. See Perl Scripts for a detailed description, each template le is commented. 2.5

Most important are "Scanner.pm" to scan the input le and "Starter.pm" to start the code. It is recommended to also use "Info.pm" to gather basic information and "Stopper.pm" to trigger a graceful exit of your code. The MpCCI API Kit contains an additional "external Scanner.pm" if you do not want to use Perl to scan the model le, but e. g. the le reader of your simulation code.

16 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.2 Code Integration with the MpCCI API Kit

In the information module "Info.pm" for foundation, the only thing which is really done is to nd the executable in the path and return the requested information. The Scanner.pm scans the model le "*.fnd" for coupling component denitions, in our case these are all elastic foundations which are dened. These start with the keyword EF which is followed by the name. The input le is simply searched for lines containing this information, which is then returned to the calling MpCCI function. The "Starter.pm" obtains the model le name and the number of steps from the MpCCI GUI, creates an argument list @argv with the corresponding command line arguments and starts foundation.

MpCCI 3.1.0-1

VIII

17

2 Code API STEP 3: Test the conguration.

VIII Programmers Guide

Testing the Perl scripts. Before testing the GUI integration, you should ensure that the Perl scripts work. Start with the scanner, a test-script "test Scanner.pl" is included in the "configuration" directory. To run a test, you must provide the environment variables, which are needed by the scanner. For this please edit "test Scanner.pl" and change the assignments. To select a model le, e. g. provide $ENV{_MPCCI_MODEL_FILE} = /home/fred/adapter-test/example.input;

If all necessary variables are set, you can simply run "test Scanner.pl". The results of the scanning process are saved in a scan le "mpcci <original lestem>.scan", i. e. for the above example the le would be named "/home/fred/adapter-test/mpcci example.scan". All information your scanner found should be contained in this le. The model info is listed rst, followed by the list of components. Please check if all information is present. Test the starter using "test Starter.pl" in the same way. The starter should not do more than start your code with the appropriate command line options. You can also test the stopper with "test Stopper.pl". Testing "gui.xcf" For testing "gui.xcf" you need to have a license for a code adapter, which you usually receive together with the MpCCI API Kit. For testing, you must prepare a simple input le and one for the partner code and proceed as follows. 1. Go to the testing directory and start the MpCCI GUI with mpcci gui . If you get an error message right after starting the MpCCI GUI, there is a syntax error in your "gui.xcf". Make sure, that the le is a proper XML-le. 2. Your newly added code should now appear in the list of codes on the left side. If you cannot nd your new code, ensure that you have created a new subdirectory in "<MpCCI home>/codes" with the correct name. 3. Click on your code, and you should see what you dened as elements of the model step. If some elements are missing or wrong, check the <ModelsMenuEntries> section. 4. Fill in the required values in the form, and press the Start Scanner . The scanner should start, otherwise you will receive an error message. If the scanner nished, click on the box which appears and check the return values of the scanner. 5. Select and scan the partner code and proceed to the Coupling Step. Here, you should be able to select the quantities as dened in "gui.xcf". If you cannot select anything there are no quantities which are supported on the same geometric entity by both codes. If some quantities are missing check the <SupportedQuantities> block. Remember that only quantities will be shown, which are also supported by the partner code!

18 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.2 Code Integration with the MpCCI API Kit

6. Finally, proceed to the Go step and check the buttons in the panel of your code. If entries are wrong check the <GoMenuEntries> section of "gui.xcf". 7. You can also start your code it should simply run as usually. However, no coupling will occur as no code adapter is present. For foundation the testing scripts "test Scanner.pl" and "test Starter.pl" were changed: The scanner only needs the model le, the starter model le and number of steps for testing.

MpCCI 3.1.0-1

VIII

19

2 Code API STEP 4: Create the code adapter.

VIII Programmers Guide

The adapter template les are located in the subdirectory "adapter". Add "adapter.h" and "adapter.c" to your source code. Change the denition of the list of driver functions MpCCIDriverFunctions in "adapter.c" to t your needs: Add name of your code and select which data exchange functions you need. Usually the block with functions called before/after some actions can be left empty. Look if the interface functions are also useful for your code and make appropriate changes. In most cases they should already be OK. Adjust the driver functions. All driver functions which are declared in MpCCIDriverFunctions must be dened. See 2.7 MpCCI Driver Functions for a description. Change "adapter.h" to t "adapter.c" Insert the calls of the interface functions at appropriate places in your code as described in Code Integration and Simulation Code Requirements . 2.1

Add "adapter.c", the MpCCI include directory "<MpCCI home>/include" and the MpCCI client library for your platform to your "Makefile". If your code is compiled and linked, you can proceed with testing the adapter. For foundation the most important changes are (please see source code les for details): Driver Functions Only a small set of driver functions, MpCCI Driver updateComponents , MpCCI Driver defineGrid , MpCCI Driver getFaceNodeValues and MpCCI Driver putFaceElemValues are used, all other functions were set to NULL in the MpCCIDriverFunctions structure. Additional helper functions Additional helper functions are required: getSurfaceID to identify coupling components by their names and for adapterOutput and error for data output. In the C version they are included in "adapter.c" in the FORTRAN version they are located in "helpers.f". Data exchange In the C version the data access is directly written into the driver functions MpCCI Driver getFaceNodeValues and MpCCI Driver putFaceElemValues . The FORTRAN version uses additional subroutines in "helpers.f": getInfo to obtain basic information, getMesh to obtain mesh information and getNPosition and putPressure for data exchange. The FORTRAN helper functions are called from the C routines in "adapter.c". Makeles The Makele must be changed to include "mpcci.h" and the MpCCI library. For FORTRAN, additionally a C compiler is required to compile "adapter.c" which can be linked directly with the FORTRAN objects.

20 VIII

MpCCI 3.1.0-1

VIII Programmers Guide STEP 5: Test the code adapter.

2.2 Code Integration with the MpCCI API Kit

Please ensure rst that the les in the conguration directory are correct (Step 3). So we can assume now, that you already have set up a sample problem. Install the license for your code - either on a license server or on your local machine, see III-5 Licensing for details. You can check the license status with mpcci license mpcci or from the MpCCI GUI in LicenseCheck the MpCCI license status. Open your project ("*.csp") in the MpCCI GUI. In the coupling step, set the output level to 3 to obtain maximum output. In the Go step, select Run server processes inside xterm. Start the MpCCI server and both simulation codes by pressing the Start buttons in the Go step. One window for each code server (and the control process if enabled) and for both codes should pop up. Check the output of your code and the corresponding MpCCI server. The output of the servers should help you to nd any errors in the code adapter functions. For the foundation code, the codes output (in the yellow window) should look as follows: Starting: foundation elasticwall.fnd 2 1> mpcci_elasticwall.log 2>&1 Waiting for logfile "mpcci_elasticwall.log".... This means MpCCI is waiting for the codes output. This message should be followed by the usual output of the code, here: Foundation - computation Reading file >>elasticwall.fnd<<... foundation >elasticwall< dim=3 direction=2 nodes...

stiffness=-5

and so on. Further below you should nd the call of MpCCI Init , with Initializing the coupling process! Partner job#1("FLUENT") is code "FLUENT". followed by the list of coupled regions

MpCCI 3.1.0-1

VIII

21

2 Code API

VIII Programmers Guide

Coupled regions for code "foundation" Component #0: "elasticwall" Dimension(2), MeshId(1), PartId(1), Nodes(9), Cells/Elements(4) 2 Quantities. Recv: 1012, 1D, loc(Elem), type(Field), sm(Direct/0), mean(BC/Value), name(OverPressure) Send: 3041, 3D, loc(Node), type(Field), sm(Direct/0), mean(Grid/coord), name(NPosition) For each exchange you should see an output like ### MpCCI_Transfer: starting a new transfer. ### newActions(wait=1): >PUTCQ>ISEND>RECV>WAIT>GETCQ entered get_values... finished get_values... MpCCI_ISend_recv() called 1 times: ITER: 0 sec. SEND: 0 sec. RECV: 1 sec. XCHG: 1 sec. WAIT: 1 sec. entered put_values... finished put_values... Remember that for the rst exchange the value of Initial quantities transfer is used, thus depending on your choice the output get values or put values may not appear. The output in the server window is much more detailed (because the output level is set to 3). It starts with the DEBUG OUTPUT OF THE INPUT FILE DATA which is a summary of the settings in the MpCCI GUI. This is followed by the actual server output, starting with foundation:2: Entered CCI_Init. which is followed by many more CCI ... calls. Important is the section foundation:2:0: Entered CCI_Def_nodes. foundation:2:0: IN meshId = 1 foundation:2:0: IN partId = 1 foundation:2:0: IN globalDim = 3 foundation:2:0: IN nNodes = 9 foundation:2:0: IN nNodeIds = 9

22 VIII

MpCCI 3.1.0-1

VIII Programmers Guide foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: foundation:2:0: IN coordsDataType = CCI_DOUBLE USER DEFINED NODE IDS ARE: ARRAY(1:9) INDEX VALUE 10 21 32 43 54 65 76 87 98 COORDINATES OF THE NODES ARE: ARRAY(1:3,1:9) J-INDEX I-INDEX -> 10.000000e+00 25.000000e-01 31.000000e+00 40.000000e+00 55.000000e-01 61.000000e+00 70.000000e+00 85.000000e-01 91.000000e+00

2.2 Code Integration with the MpCCI API Kit

0.000000e+00 0.000000e+00 0.000000e+00 5.000000e-01 5.000000e-01 5.000000e-01 1.000000e+00 1.000000e+00 1.000000e+00

0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00

which reects the node coordinates. Check whether they correspond to the coordinates given in the input le! This is followed by a block starting with foundation:2:0: Entered CCI_Def_elems. with the element denitions. Next follows the neighborhood computation, which lists the neighborhood information (see also V-3 Code Coupling ), starting with foundation:2:0: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foundation:2:0: NEIGHBORHOOD COMPUTATION foundation:2:0: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Each exchange of quantities is reected by a number of entries, foundation:2:0: Entered CCI Recv ,

MpCCI 3.1.0-1 VIII

23

2 Code API

VIII Programmers Guide

foundation:2:0: Entered CCI Get elems. and foundation:2:0: Entered CCI Put nodes. foundation:2:0: Entered CCI Isend. All values which are send or received are listed. Please check if the quantities are transferred correctly.

24 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.2 Code Integration with the MpCCI API Kit

2.2.3 Code Coupling with the Example


For testing the code adapter for the example code, a set of sample problems is provided in "example/test" for coupling foundation with some commercial codes. FLUENT

top

cube with edge length 1

6 z 3 y 0 x 0 2 4

7 3 5

bottom 1 1 2

Figure 5: FLUENT foundation sample problem. A cube lled with an ideal gas is coupled with an elastic foundation which deforms due to the gas pressure.

The sample problem is sketched in Figure 5. Both input les are given, "foundation/elasticwall.fnd" for foundation and for FLUENT "FLUENT/cube.cas". To run the sample problem do the following: Go to the "example/test" directory and start the MpCCI GUI. Select foundation as the rst code (you should rst nish creating the conguration and code adapter for the foundation code, see 2.2.2 Step-by-Step Procedure for Code Integration ) and "foundation/elasticwall.fnd" as model le. Keep the unit system set to SI. Start the Scanner for foundation, if you click on the green check mark, you should get # MpCCI relevant information: # Model dimensions : 3D

MpCCI 3.1.0-1

VIII

25

2 Code API # # # # # # Coordinate system Solution type Load cases Unit system Precision elasticwall : : : : : Cartesian Static ? ? Double precision (64 bit)

VIII Programmers Guide

Face

Select FLUENT as the second code, the FLUENT version 3d, and the latest FLUENT release. Finally choose "FLUENT/cube.cas" as model le. Start the Scanner for FLUENT. Proceed to the Coupling Step only the Face (2D)-card should be enabled. Select elasticwall and bottom as coupling components and NPosition and OverPressure as quantities. Proceed to the Edit step and set OutputLevelGlobal to 3. Proceed to the Go step. Select Run server processes inside xterm for the server. For foundation select receive for the initial transfer and 3 as number of steps. For FLUENT select exchange as initial transfer and do not change further options. Save the project and start the processes. Three server windows should pop up, for foundations, FLUENT and the control process. A yellow window with the output of the foundation code should pop up and the FLUENT graphical interface. In the FLUENT window select SolveInitialize Initialize and press the Init to initialize the FLUENT solution. Select SolveIterate and set the Number of Time Steps to 2. and press Iterate . Now, FLUENT should perform 2 iterations while foundation nishes its computation. The FLUENT result is depicted in Figure 6. You should clearly recognize the deformation of the bottom where the elastic foundation is coupled.

26 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.2 Code Integration with the MpCCI API Kit

Figure 6: FLUENT mesh and result of the cube example.

MpCCI 3.1.0-1

VIII

27

2 Code API

VIII Programmers Guide

2.3 Code Conguration Directory


The les which are required to integrate the code into MpCCI must located in a specic directory, as already described in 2.2 Code Integration with the MpCCI API Kit . The directory "<MpCCI home>/codes" has one subdirectory for each code which is supported by MpCCI. At least six les, which always have the same le names, should be inside any code subdirectory:
"gui.xcf" This le contains all denitions which are required to t the code into the MpCCI GUI, which

includes code name and version information, extension of input les, additional options for the Model-, Go- menus, and a list of supported quantities. 2.4 MpCCI GUI Conguration File gui.xcf
"Scanner.pm" This Perl script is started to scan the input le of the simulation code for information which

is needed for the coupling process, mainly to identify possible coupling components. 2.5.2 Scanner.pm
"Starter.pm" The starter script starts the simulation code with appropriate command line options, which

can be selected in the MpCCI GUI. 2.5.3 Starter.pm


"Stopper.pm" The stopper script is called if the code shall be stopped, i. e. if the stop in the MpCCI GUI

is clicked. 2.5.4 Stopper.pm


"Info.pm" should collect application specic information like code release.

2.5.5 Info.pm
"Subcmd.pm" can be used to dene MpCCI code specic subcommands.

2.5.6 Subcmd.pm

28 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.4 MpCCI GUI Conguration File gui.xcf

2.4 MpCCI GUI Conguration File "gui.xcf"


The le "gui.xcf" is an XML-le, which contains denitions for the MpCCI GUI. Entries for the Model and Go step and for the Codes menu in the menu bar can be dened, and the selected options can be passed on to the scanner, starter, stopper and killer scripts. It consists of several sections, which are discussed in the following.

2.4.1 Code Information:

<CodeInfo>

The code information block contains the basic information of a code: Units Unit system used by the code Type Type of code - needed to determine possible coupling types SelfCoupler Indicator if a code can be coupled with itself (default is false) The type of the code can be one or several of the code types CFD, ElectroMagnetism, FluidPlasma, FluidThermal, InjectionMoulding, Radiation, SolidStructure, SolidThermal . Usually one code can support dierent analysis types, these can be given separated by spaces, e. g. "CFD FluidThermal" .

2.4.2 Codes Menu:

<CodesMenuEntries>

For each code commands can be dened which are provided in the menu bar beneath the codename item. If more than three codes are oered the code menus are collected under the Codes item in the menu bar.

Figure 7: Codes Menus for two (Code A and Code B) and more than three Codes Each provided command is dened as a menu element <Release type="menu" text="Releases" tooltip="Display all installed releases located by MpCCI." command="mpcci Codename releases" /> the tag Release is used to identify the selected value later. Its name can be arbitrary but should not begin with a number and it should not contain special characters.

MpCCI 3.1.0-1

VIII

29

2 Code API the type is "menu". the provided text is displayed as the menu entry. the tooltip is shown as tooltip for the menu entry. the command will be passed to the local system to be executed.

VIII Programmers Guide

The result of the executed command is shown in a dialog box.

2.4.3 Models Step:

<ModelsMenuEntries>

For each code additional options can be added to the Models step in the MpCCI GUI. The information given here is only partly evaluated by the MpCCI GUI itself. Most options are for use in the scanner or starter to hand it over to the simulation code. The denitions in the "gui.xcf" actually completely determine the appearance in the MpCCI GUI. The template le from the MpCCI API Kit contains already two examples. An overview of all possible elements is given in 2.4.8 General MpCCI GUI Elements . The rst element in the example is an enumeration element <Version type="enum" default="1.0" description="Please select the version:"> <enum value="1.0" /> <enum value="1.1" /> <enum value="latest" /> </Version> The tag Version is used to identify the selected value later. Its name can be arbitrary but should not begin with a number and it should not contain special characters. The second element is a le selector, which is usually part of every Model step entry: <ModelFile type="filename" required="true" default="" description="Please select the model file:"> <filename suffix=".mod" /> </ModelFile> Further <filename> lines can be added to allow a selection of dierent suxes. An example of a conguration is shown in Figure 8.

30 VIII

MpCCI 3.1.0-1

VIII Programmers Guide <ModelsMenuEntries> <Version type="enum" default="latest" description="Version:"> <enum value="0.9" /> <enum value="0.999" /> <enum value="latest" /> </Version> <ModelFile type="filename" required="true" default="" description="Model file:" > <filename suffix=".suf" /> <filename suffix=".newsuf" /> </ModelFile> <Units type="enum" default="SI" description="Unit system:" > <enum value="British" /> <enum value="SI" /> <enum value="variable" /> </Units> </ModelsMenuEntries>

2.4 MpCCI GUI Conguration File gui.xcf

Figure 8: Example of <ModelMenuEntries> denition in "gui.xcf" and resulting Model step buttons.

2.4.4 Component Types:

<ComponentTypeDimensions>

Here, you specify the dimension for component types. The components and their types are returned by the scanner in the scanner output le. Because the types for the components dier from code to code each type name used in the scanner output le has to be associated with a dimension. These dimensions correspond with the labels of the element collections in the MpCCI GUI Coupling Step. 0 1 2 3 means means means means the the the the component component component component is a data structure and its elements are 0D global values. comprises 1D line elements. comprises 2D face elements. comprises 3D volume elements.

For each component type add a line in the <ComponentTypeDimensions> block. <ComponentTypeDimensions> <Typename type="int" default="0 | 1 | 2 | 3" /> </ComponentTypeDimensions>

MpCCI 3.1.0-1

VIII

31

2 Code API

VIII Programmers Guide

The tag Typename has to be replaced by the type name used in the scanner output le. The type is int and default should be set to the associated dimension: 0, 1, 2 or 3.

2.4.5 List of quantities:

<SupportedQuantities>

Before the actual list of quantities, the storage options are dened in the element <StorageOptions> . You need not change the denition given in the template. More denitions are only useful, if your code supports dierent storage locations of the quantities and the user should select them in the MpCCI GUI. The tag <SupportedQuantities> contains a list of all quantities which are supported by the simulation code. The template which you unpacked in your code subdirectory contains a complete list of all quantities, which can be handled by MpCCI. For a description of the quantities see also the quantities list in the Appendix. So please remove or comment all quantities your code does not support. The remaining lines must be tted to the simulation code. Each line has four attributes, e. g. : <Temperature type="quantity" loc="node elem" so="Direct" ro="Direct"/>

The type is "quantity". The attribute loc which denes the location of the quantity can be "node", "elem" or "global" or a combination of these e. g. "node elem", which means it can be of either type. "node" Nodal quantity, i. e. the values are dened for each node. "elem" Element quantity, i. e. the values are dened per element, also for quantities dened at special points of the element, e. g. at integration points. "global" Global quantity, which is not related to nodes or elements, e. g. a time step size. The attributes so and ro which stand for send option and receive option can be set to any of the storage methods dened in <StorageOptions> or combinations like "Direct Usrmem". Usually so and ro are either set to the empty value "", which means no receiving or sending of this quantity is possible, or to "Direct", which means the values are read and written directly to the nodes or elements in the simulation code. The predened storage methods are also listed in the description of the code API macros in 2.8 Data Structures and Predened Macros . Now the quantities must be assigned to the element types Global , Line , Face and Volume which are the labels of the element collections in the MpCCI GUI Coupling Step. Finally a quantity denition block should look like <Quantities> <DeltaTime <WallForce <NPosition

type="quantity" type="quantity" type="quantity"

loc="global" loc="elem " loc="node"

so="Direct" so="Direct" so=""

ro="Direct" /> ro="" /> ro="Direct" />

32 VIII

MpCCI 3.1.0-1

VIII Programmers Guide </Quantities> <!-- Quantities supported as global values--> <Global type="string" default="DeltaTime" /> <!-- Quantities supported for 1D coupling --> <Line type="string" default="" />

2.4 MpCCI GUI Conguration File gui.xcf

<!-- Quantities supported for 2D coupling --> <Face type="string" default="WallForce NPosition" /> <!-- Quantities supported for 3D coupling --> <Volume type="string" default="" /> which means that the simulation code can exchange three dierent quantities. The time step size is a global quantity and can be sent or received, wall forces are dened at elements and can only be sent, while the node positions can only be received. The wall forces and node positions can only be exchanged on 2D surfaces.

2.4.6 Go Step:

<GoMenuEntries>

Similar to the denitions for the Models step, the appearance of the go step can be dened in "gui.xcf". Additional Conguration for Parallel Code A minimum set of denitions have to be provided in order to describe the parallel conguration of the code. This is the set of denitions to insert in <GoMenuEntries>: <ParallelRun type="panel" <NumProcs type="int" default="false" description="Run parallel"> default="1" min="1" max="512" description="No. of parallel processes" /> <SharedFS type="bool" default="false" description="Shared file system (no file copy)" /> <HostList type="hostlist" default="" description="Optional host host ... to be used" /> <HostFile type="filename" default="" description="Optional hostlist file" > <filename suffix=".hosts" /> <filename suffix=".hostlist" /> <filename suffix=".hostfile" /> </HostFile> <DefaultHosts type="bool" default="false" description="Use default hostfile" />

MpCCI 3.1.0-1

VIII

33

2 Code API </ParallelRun>

VIII Programmers Guide

The parallel conguration is encapsulated in a panel element. The following information may be congured: The number of parallel processes. Specify if it is a shared le system. Specify a host list. Additionally you have to add some environments in the <Starter> . <_MPCCI_<code name>_PARA_RUN <_MPCCI_<code name>_PARA_NPROCS <_MPCCI_<code name>_PARA_SHAREDFS <_MPCCI_<code name>_PARA_HOSTLIST <_MPCCI_<code name>_PARA_HOSTFILE <_MPCCI_<code name>_PARA_DEFHOSTS type="string" default="%(GoMenuEntries.ParallelRun)" /> type="string" default="%(GoMenuEntries.ParallelRun.NumProcs)"/> type="string" default="%(GoMenuEntries.ParallelRun.SharedFS)"/> type="string" default="%(GoMenuEntries.ParallelRun.HostList)"/> type="string" default="%(GoMenuEntries.ParallelRun.HostFile)"/> type="string" default="%(GoMenuEntries.ParallelRun.DefaultHosts)"/>

This information will be evaluated by the function code start prepare . my ($numProcs,$sharedFS,@hostList) = code_start_prepare($codeName, $numProcsRequested, $nameDefaultHost, $nameFirstHost, $compressHostList, $printHostList, $checkHostList, $copyClientrc # # # # # # # # required optional optional optional optional optional optional optional);

This is a helper function which has to be called in your "Starter.pm" script. This will assist the preparation of the parallel run. The function will create a list of hosts where we re up the processes and return the number of processes and the hostlist. You may post process the return values to parameter the start of your code.

34 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.4 MpCCI GUI Conguration File gui.xcf

2.4.7 Environments for Scanner, Starter, Stopper and Killer


The last sections of "gui.xcf" dene which information is passed to the Perl scripts which are called by the MpCCI GUI. Values are transferred in form of environment variables, which are dened in "gui.xcf". Each of the elements <Scanner> , <Starter> , <Stopper> and <Killer> contains one sub-element <Environment> in which the variables are set to values which are dened in other sections of "gui.xcf". There are two classes of values: Required values must be set. These are scripts variable content Scanner, Starter, Stopper, Killer MPCCI MODEL FILE The name of the model le. Starter MPCCI INITIAL EXCHANGE Value for initial exchange (see V-3.3 Coupling Algorithms ). Optional values can be added as necessary. All variables should follow the name convention and start with MPCCI <code name> to avoid conicts with other variables. All variables must be of type "string" . A short denition of the environment of the starter script for the code example could look as follows: <Starter> <Environment> <MPCCI_INITIAL_EXCHANGE <_MPCCI_MODEL_FILE <_MPCCI_EXAMPLE_VERSION <_MPCCI_EXAMPLE_MODE </Environment> </Starter>

type="string" default="%(GoMenuEntries.InitialExchange)" /> type="string" default="%(ModelsMenuEntries.ModelFile)" /> type="string" default="%(ModelsMenuEntries.Version)" /> type="string" default="%(GoMenuEntries.batchMode)" />

References Often in "gui.xcf" values which were dened in another section of "gui.xcf" or other references shall be handed over to a script, which is e. g. called by a command button. The following references are possible: %(<element>.<subelement>) value of an element specied within this conguration le e. g. %(ModelsMenuEntries.ModelFile) . %(mpcciserver:<element>.<subelement>) the same as before but the element will be taken from the MpCCI server conguration le. %(#codename) references the instance name of the code which is also used in the MpCCI GUI to specify the code. $(<environment variable name>) value of the specied environment variable on the local machine.

MpCCI 3.1.0-1

VIII

35

2 Code API

VIII Programmers Guide

2.4.8 General MpCCI GUI Elements


There is a choice of MpCCI GUI elements, which can be used in "gui.xcf" within <ModelsMenuEntries> or <GoMenuEntries> . For each element applies: Identifier is a unique identier for that element. type denes the type for the special element. description is always used as title for the respective element. The tag Identier used in the following examples has to be replaced by a unique name which can be arbitrary but should not begin with a number and it should not contain special characters. Text Field <Identifier type="string" default="opt1 opt2" description="Additional Code_B options"/>

default is the default value of the text.

Figure 9: Text Field representation

File Selector <Identifier type="filename" default="" description="Data file (optional)"> <filename value=".suffix1"/> <filename value=".suffix2"/> </Identifier>

default should be left empty. value is one accepted and selectable le sux in addition to the predened selectable "All Files" option.

Figure 10: File Selector representation

36 VIII

MpCCI 3.1.0-1

VIII Programmers Guide Enumeration There are three ways for getting the enumeration values: List them in a value list.

2.4 MpCCI GUI Conguration File gui.xcf

Specify a local le as source which holds the values line by line. Specify a command which will be executed at runtime by selecting a value and which will provide the values line by line to standard output. Value list: <Identifier type="enum" default="SI" description="Select unit system"> <enum value="British"/> <enum value="cgs"/> <enum value="variable"/> </Identifier> default is the default and will be added as enum value if it doesnt exist in the value list. value is one possible value of the value list.

Figure 11: Enumeration representation

Source le: <Identifier type="enum" default="typeA" description="Title" source="fileWithEnumValues"/> default is the default and will be added as enum value if it doesnt exist in the value list. source is the name of the le which holds the value list. The le will be looked for in the current user directory and in the user home directory. Each line in the source le corresponds to an enum value in the value list. Command:

MpCCI 3.1.0-1

VIII

37

2 Code API

VIII Programmers Guide

<Identifier type="enum" default="latest" description="Title" command="command with arguments and %(reference)" hostref="%(ModelsMenuEntries.ModelFile)"/> default is the default and will be added as enum value if it doesnt exist in the value list. command is the command which will be executed to get the value list. References as described in 2.4.7 are allowed to be used. hostref is an optional specication of the host on which the command shall be executed. Therefore the referenced object has to be a le. The host of this le will be used to execute the command. If no hostref is specied the command is executed on the local host. Range Value There are two types of range values. You may create a range value of integer value, in that case you have to use the type int. oating value, in that case you have to use the type oat. <Identifier type="int" default="1" min="1" max="512" description="No. of parallel processes"/> <Identifier type="float" default="0.01" min="1e-10" max="1e10" description="Coupling time step"/>

default is the initial default value. min denes the lower limit. max denes the upper limit. The min and max options are optional. If one of them lacks the minimum respectively maximum value of the system will be taken. If neither min or max is given the value is set to the default value and may not be changed.

Figure 12: Range value representation for int and oat types

38 VIII

MpCCI 3.1.0-1

VIII Programmers Guide Checkbox

2.4 MpCCI GUI Conguration File gui.xcf

<Identifier type="bool" default="true" description="Start additional control process"/> default must be initialized with true or false.

Figure 13: Checkbox representation

Command A command is an element which executes a dened command. It is represented by a button which has to be click to execute the command. <Identifier type="command" default="cmd arg1 %(GoMenueEntries.Jobname)" description="define some user files" hostref="%(ModelsMenuEntries.ModelFile)" addComponentEnvironment="true"/> default is the command to be executed with its arguments. References to other elements are allowed and will be resolved. hostref is an optional specication of the host on which the command shall be executed. Therefore the referenced object has to be a le. The host of this le will be used to execute the command. If no hostref is specied the command is executed on the local host. addComponentEnvironment is an optional specication whether the environment with the components and quantities (as used for the starter) shall be set or not. If no addComponentEnvironment is specied the environment wont be set.

Figure 14: Command representation

Hostlist A hostlist is an element which checks the list of host names. It veries the resolvability of the host and if it is alive.

MpCCI 3.1.0-1

VIII

39

2 Code API

VIII Programmers Guide

Whitespace, comma or semicolon may be used as delimiters to dene the list of host names. A host name may be given as [user@]host.

<Identifier type="hostlist" default="" description="Optional host host ... to be used"/>

default is the initial default value and may be left empty.

Figure 15: Hostlist representation

Panel A panel is used to group elements which only have to be set if a special feature is used. The panel itself consists of a checkbox and indicates if the special feature is used or not. If the checkbox is set the panel expands and shows its subelements. Now these subelements can be set and will be evaluated if required. If the checkbox is unset, the panel will disappear and hide its subelements.

<Identifier type="panel" default="false" description="Run parallel"> ... subelements ... </Identifier>

default must be initialized with true or false. Common Feature: Dependency For each of the previous elements a dependency may be added. This means that an element is only shown in the MpCCI GUI if the set dependency is complied.

<Identifier type="<element type>" default="<default value>" description="Title" dependsOn="%(ModelsMenuEntries.Units)" dependingValue="variable" dependingCondition="<true | false>"/>

40 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.4 MpCCI GUI Conguration File gui.xcf

Figure 16: Panel representation for unused and used feature

is a reference to the element this element depends on. is the value the referenced value will be compared to. If this element depends on more than one value of the referenced element this depending value may be a list of values separated by a | (i.e.: dependingValue="value 1 | value 5" ) dependingCondition provides the condition for the comparison between the depending value and the referenced value. If the condition is true this depending element is only shown if the compared values (resp. one of the compared values if the depending value is a list of values) are equal. On false this element is shown if the compared values (resp. all of the compared values if the depending value is a list of values) are not equal. The default condition true is taken when the dependingCondition is omitted. dependsOn dependingValue If the dependency is used in a panel the panel cannot be set or unset by the user anymore because this will be done automatically in reliance on its dependency then. An example can be viewed in the template which you unpacked in your code subdirectory. There the element GridLengthUnit in the <ModelsMenuEntries> block depends on the Units element of the same block. The GridLengthUnit element is only shown if the value of Units is set to variable. Common Option: Required Another option which is common to all previously described MpCCI GUI elements is the required option.

<Identifier type="<element type>" default="" description="Title" required="true | false" />

MpCCI 3.1.0-1

VIII

41

2 Code API

VIII Programmers Guide

required states that this element must be set before going on with the next step in the MpCCI GUI. Normally the default value for the element is left empty so that the user must choose a value explicitly e. g. as with the <ModelFile> . In MpCCI GUI required elements are marked with a (*) at the end of the title. A dialog box is shown if required elements are not set while going on with the next step. The default for the required option is false.

Figure 17: Required representation for a le selector element

2.4.9 Testing "gui.xcf"


Testing of the les in the conguration directory is described in Integration . 2.2.2 Step-by-Step Procedure for Code

42 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.5 Perl Scripts

2.5 Perl Scripts


You need not really learn Perl to write the scripts to run with your code. Basic documentation on the language (Linux/UNIX: man perl ) is included in the Perl distributions, Schwartz et al. [2005] is recommended as a book for beginners. So just edit the provided templates.

2.5.1 Using Information from "gui.xcf" in Scripts


As mentioned in the description of "gui.xcf" you need to pass information from the MpCCI GUI to the scanner, starter and stopper scripts. This information is exported from the MpCCI GUI into the Perl world via environment variables. These variable need to be dened in the "gui.xcf" as described in 2.4.7 Environments for Scanner, Starter, Stopper and Killer and are then evaluated within the Perl scripts. As a Perl programmer you can access the environment variables via the global Perl hash %ENV $value = $ENV{VARIABLE_NAME}; During testing it may be helpful to read the variables with an automatic error check. For this purpose some Perl routines are provided in a Perl module MpCCICore::Env which needs to be included ( use or require ) in your Perl scripts. env optional value(<variable name>) get value of a variable, return an empty string if not dened. env required value(<variable name>) same as above, but exit with an error if variable is not dened. env boolean value(<variable name>) interpret value of the variable as Boolean value, the variable must be one of t , true or 1 to yield true and f , false or 0 to yield false. env optional int(<variable name>, <default>, [<min>,[ <max> ] ]) get value of a variable as an integer value. If the variable is not dened, the given default value is returned. If <min> and <max> are given, it is checked if the value lies within the given limits. env required int(<variable name>, [<min>,[ <max> ] ]) Same as above, but the variable must be dened, i. e. also a default value is not needed.

2.5.2

"Scanner.pm"

This le contains one subroutine which is called by MpCCI to scan the model le, which is named sub code scanner($$$) . It has three arguments:

MpCCI 3.1.0-1

VIII

43

2 Code API
$codename $modelFile $tmpName

VIII Programmers Guide The name of your code. The name of the model le which shall be scanned.

The name of a temporary le, which can be used during the scanning process if necessary. Sometimes the scanner does not only retrieve information but also applies some changes to the model le.

It returns two hashes (i. e. associative arrays):


%regionList

contains all possible coupling components. The hash with the $regionName as key has the following structure: $regionList{$regionName} = [$regionName, $regionType, $regionId]; $regionName = string with the name of the component for later use in adapter $regionType = type of the region (references to Component Types in gui.xcf) $regionID = number with ID of the component for later use in the adapter See 2.4.4 Component Types: <ComponentTypeDimensions> $regionType (=Typename) in "gui.xcf". for denition of the dimension of

%modelInfo

contains some general information on the model le and has the following structure: => => => => => => 3, C, S, ?, ?, D # # # # # # Model dimension: 1,2,3 Coordinate system: C=cartesian, S=Spherical, A=axis symmetric Solution type: S=Static, T=Transient, D=Dynamic, C=Coupled Load cases: Number of loaded cases Unit system Precision: S=Single precision (32 bit), D=Double precision (64 bit), L=Long double precision (128 bit)

MDIM CSYS SOLU LCAS UNIT PREC

The "Scanner.pm" consists of three steps: 1. Parsing the model le. The le is opened, and a loop is run over all lines of the le. In the loop the le is scanned for coupling components. The search process must be adapted to your model le format to get the name, type and id of the component. A numerical id can also be omitted (specify 0 ) if your le does not use ids. 2. Adding further variables, which are not contained in the model le, but always present. Usually this is only the case for global variables. 3. Dening the basic model information, which can be retrieved during the scan or given as xed values.

44 VIII MpCCI 3.1.0-1

VIII Programmers Guide

2.5 Perl Scripts

2.5.3

"Starter.pm"

"Starter.pm" contains one subroutine, which does not actually start the code, but provides the necessary information. The starter function obtains two arguments, $codeName and $modelFile . It must provide the command line arguments for starting the code and put it into the variable @arg , which is the rst return value. Additionally, %infoHash is required to determine how the output of the simulation code is handled. The following options can be chosen: option default description STDOUT null What to do with data written to stdout, can be any of xterm (i. e. write to an xterm), mpcci (i. e. output handled by MpCCI), null (ignore output), combined with the keyword file if it shall also written to a log le. STDERR null Same as STDOUT , but for stderr. STDLOG <emtpy string> Name of logle BACKGR white Background color of xterm. FOREGR black Foreground color of xterm ATSTART <not set> Reference to a Perl subroutine which is called before the code starts. You can dene this routine in "Starter.pm". ATEXIT <not set> Reference to a Perl subroutine which is called as soon as the code exits. You can dene this routine in "Starter.pm". As for the scanner, a testing script is provided for "Starter.pm", which is named "test Starter.pl".

2.5.4

"Stopper.pm"

The stopper script should cause the code to perform a regular exit, i. e. not simply kill the code, but save data and quit. This is often achieved with a stop le, which is read by the code. A test for the stopper is provided in "test Stopper.pl" of the MpCCI API Kit.

2.5.5

"Info.pm"

In the script "Info.pm" the subroutine sub code information($) is dened. It has one argument:
$codename

The name of your code.

This subroutine will be called by MpCCI, e. g. when sub code print releases or sub code print info is called in "Subcmd.pm". It returns one hash (i. e. associative array) %infoHash :
CODE NAME the ocial name of the code. CODE HOME the home path of the code installation.

MpCCI 3.1.0-1

VIII

45

2 Code API
CODE EXEC the full pathname of executable to start the application. CODE RLSE the code internal release token. CODE ARCH the architecture token of the application.

VIII Programmers Guide

MPCCI RLSE the adapter release token (should be equal CODE RLSE or STATIC ). MPCCI ARCH the adapter architecture token (should be == CODE ARCH).

Example: $infoHash{$codeName} = [ $codeName=solverxy, $codeDirectory=/opt/code, $pathToExecutable=$codeDirectory/bin/code.exe, $release=1.2.4, $architecture=linux_x86, $adapterRelease=$release, $arch=$architecture ];

2.5.6

"Subcmd.pm"

In this Perl module exactly one public subroutine sub code subcommand($) is dened. This subroutine is called from the MpCCI command as a code specic subcommand like mpcci <codename> releases . This le is optional, but it is recommended to use it! The subroutine has one argument:
$codename

The name of your code.

You need to inspect the global Perl array @ARGV and then make decisions based on its contents. The simplest way of implementing a command line parser is to use the parsing tools which comes with MpCCI. You just dene a Perl hash %hash3 with the command line options as the key. The value for each command line option is a reference to an array containing three entries: the MpCCI environment setup level 0=no, 1=arch 2=core, 3=gui a short help message the name of an environment variable or a code reference The Perl subroutine sub code subcommand($) then has to call hash3ref run(option,%hash3) to process the hash. hash3ref run then either prints the help text, displays the value of the environment variable or calls the subroutine specied via the code reference.

46 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.5 Perl Scripts

The returned value of sub code subcommand($) is irrelevant. sub code subcommand($) may either call exit(0) or exit(1) in case of a failure or simply return.

2.5.7 Testing the Perl Scripts


For each script, a "test *.pl" script is included in the MpCCI API Kit, which can be used to test the scripts separately. Testing of the scripts in the conguration directory is described in 2.2.2 Step-by-Step Procedure for Code Integration .

MpCCI 3.1.0-1

VIII

47

2 Code API

VIII Programmers Guide

2.6 MpCCI Coupling Manager Functions


The coupling manager functions are called by the calling code. They are dened in some MpCCI header les and you should add #include "mpcci.h" to the source les, from which you call the coupling manager functions. Example calls are given "adapter.c" in the MpCCI API Kit. The coupling manager functions are: 2.6.1 Denition of Output Functions: MpCCI Message init on page 49 2.6.2 Initialization: MpCCI Init on page 50 2.6.3 Get Initial Exchange Mode: MpCCI Get init actions on page 52 2.6.4 Data Exchange: MpCCI Transfer on page 53 2.6.5 End of Coupled Simulation: MpCCI Exit on page 54 2.6.6 Denition of Nodes: MpCCI Def nodes on page 55 2.6.7 Denition of Elements: MpCCI Def elems on page 56

48 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.6 MpCCI Coupling Manager Functions


MpCCI Message init

2.6.1 Denition of Output Functions:


void MpCCI_Message_init( void void void void void void void

(*printFullMessage)(const (*printFullWarning)(const (*printFullFatal )(const (*printLineMessage)(const (*printLineWarning)(const (*printLineFatal )(const (*atExitHandler)(void));

char char char char char char

*str, *str, *str, *str, *str, *str,

int int int int int int

len), len), len), len), len), len),

Before calling any other coupling manager function, the functions for input and output should be dened. There are seven dierent functions, the three rst functions get multi-line strings for ordinary output messages, warnings and fatal messages together with the string length. The second set of functions only receive one line at a time, i. e. the strings contain no newline characters (line-printer mode), which is useful for calling from FORTRAN. It is not necessary to dene all functions (give NULL pointers instead), but you should dene either the rst set of three functions or the second set of three functions. Do not use printf for output as the strings are already formatted and may contain percent ( % ) signs!

MpCCI 3.1.0-1

VIII

49

2 Code API

VIII Programmers Guide


MpCCI Init

2.6.2 Initialization:

The initialization function must be called from your code before the beginning of the iteration or time loop. However, the geometry of the mesh should already be known, as it is passed to MpCCI at this point. int MpCCI_Init(const char *jobId, const char *codeId, MPCCI_DRIVER_t *codeDriver); The arguments are: const char *jobId

Job name, only needed for coupling a code with itself, should be NULL in other cases. const char *codeId Name of your code. MPCCI DRIVER t *codeDriver Pointer to list of driver functions. See 2.7 MpCCI Driver Functions .

The return value is a Boolean value and true if a connection to the server could be established. This can be used to detect whether a coupled or uncoupled simulation is run. The initialization routine performs the following tasks: Check if initialization is already done and return in that case to avoid repeated initializations. Check if the supplied driver functions match the MpCCI version. Register driver functions, i. e. the pointers to the function pointers are saved to internal data structures. Set the code ID string to codeName if it is not set already via the MpCCI GUI (see also the description of MPCCI CODE IDSTRING in 2.4.7 Environments for Scanner, Starter, Stopper and Killer ). Establish socket connection to the MpCCI server. Receive information from the server, i. e. all information dened in the MpCCI GUI, including the coupling components. Call the driver function MpCCI Driver appendComponents if it is dened. Close the list of coupling components, i. e. it cannot be altered any longer. If the list is empty, the connection to the server is closed as no coupling is necessary. Calls the driver function MpCCI Driver updateComponents , in which the numbers of nodes and elements of the coupling components can be dened. Loops over all coupling components: Calls MpCCI Driver selectComponent (if dened) for each component. Calls MpCCI Driver defineGrid to get the mesh denitions.

50 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.6 MpCCI Coupling Manager Functions

Print the list of coupling components and establish communication channels for each coupling component. Wait until neighborhood search is complete. Return to the calling code.

Simulation Code

Driver Functions list of driver functions

MpCCI Adapter Library MpCCI Init

MpCCI server

defineGrid Run Control Mesh Data MpCCI Def nodes

MpCCI Def elems

Figure 18: Call of MpCCI Init

MpCCI 3.1.0-1

VIII

51

2 Code API

VIII Programmers Guide


MpCCI Get init actions

2.6.3 Get Initial Exchange Mode:

This function is used to determine which kind of exchange was selected. In the MpCCI GUI for each code the option Initial quantities transfer is set to exchange, none, receive or send. This information is given to the executed code via the environment variable MPCCI INITIAL EXCHANGE. Each of the possible values corresponds to a bit mask, which can be retrieved with MpCCI Get init actions . int MpCCI_Get_init_actions (const char *actStr, int *actBits); The arguments are: const char *actStr is the default value for the initial exchange, should be NULL if no default value is selected or one of "exchange" , "none" , "receive" or "send" . int *actBits Pointer to an integer variable to which the bit set will be stored. The return value is one if an exchange mode could be found and zero if no mode could be determined.

52 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.6 MpCCI Coupling Manager Functions


MpCCI Transfer

2.6.4 Data Exchange:

The transfer function must be called from your code before or after the solver. int MpCCI_Transfer(int actMask, int doWait) The arguments are: int actMask Action mask. A bit set which denes the actions to be performed: Send and/or Receive data. The possible values are: QTACT SEND send bits. QTACT RECV receive bits. int doWait Wait ag for receiving data: 1 Wait until other code sends data. 0 Do not wait, keep the Receive bits set in the return value if no data was available from the other code. The return value is: openActions Action mask, which is empty if all actions given in actMask were performed. Otherwise it contains the actions which should be performed in the next call of MpCCI Transfer , i. e. the return value should be used as actMask argument for the next transfer. Usually actMask is set to the value obtained by calling MpCCI Get init actions for the rst exchange and then to actMask = QTACT SEND | QTACT RECV . The waiting ag should be set to doWait = 1 , then it is not necessary to check the return value, as sending is always possible (values are buered) and MpCCI Transfer waits until it receives some data. The transfer routine performs the following tasks: If actMask indicates a send, for each coupling component: Get the quantities from the application by calling the appropriate driver function get...Values . Send quantities to the MpCCI server. If actMask does not indicate a receive, return to the calling code. Test if the requested information (quantities) is already available at the server. If not doWait is not set, return immediately with return value QTACT RECV. wait until the partner code has send information to the server. For each coupling component: Receive the interpolated quantities from the server. Copy quantities into the application by calling the appropriate driver function put...Values . Return to calling code.

MpCCI 3.1.0-1

VIII

53

2 Code API

VIII Programmers Guide


MpCCI Exit

2.6.5 End of Coupled Simulation:

int MpCCI_Exit(int status, const char message[]); The arguments are: status Exit status, i. e. a number to identify the error 0 means no error occurred. message Error message, which is written with the number to the corresponding log les and/or the screen. The return value corresponds to the return value of MPI and indicates if the MPI communication could be terminated. The only task of MpCCI Exit is: Close connection to the coupling server. If the status is zero, normal program termination is assumed and the message is ignored.

54 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.6 MpCCI Coupling Manager Functions


MpCCI Def nodes

2.6.6 Denition of Nodes:

The node denition should be called from the driver function MpCCI Driver defineGrid to dene the nodes of a coupling component, see also "adapter.c" of the MpCCI API Kit. Only those nodes who send or receive data during the coupling process should be given. The syntax is: int MpCCI_Def_nodes(int meshId, int partId, int globalDim, int nNodes, int nNodeIds, const int nodeIds[], int coordsDataType, const void* coords ) The parameters are: int meshId int partId int globalDim

mesh ID, should be set to CCP MESHID(ccp) part ID, should be set to CCP PARTID(ccp) dimension of your mesh, usually 2 or 3, should be equal to number of coordinates for each node. int nNodes number of nodes of the component, can be simply set to CCP NNODES(ccp) . int nNodeIds number of node IDs, should be set to same value as nNodes , i. e. CCP NNODES(ccp) . const int nodeIds[] Array of the node IDs. The array size must be equal to nNodeIds . int coordsDataType The data type of the node coordinates, possible values are: MPCCI FLOAT C float type. MPCCI DOUBLE C double type. MPCCI LONG DOUBLE C long double type. MPCCI REAL FORTRAN real type. MPCCI REAL4 FORTRAN real*4 type. MPCCI REAL8 FORTRAN real*8 type. const void* coords pointer to array of coordinates of type coordsDataType . The size of the array must be nNodes globalDim .

MpCCI 3.1.0-1

VIII

55

2 Code API

VIII Programmers Guide


MpCCI Def elems

2.6.7 Denition of Elements:

The element denition should be called from the driver function MpCCI Driver defineGrid after the node denition to dene the elements of a coupling component, see also "adapter.c" of the MpCCI API Kit. All nodes used in MpCCI Def elems must be already dened with MpCCI Def nodes . The syntax is: int MpCCI_Def_elems(int meshId, int partId, int nElems, int nElemIds, const int elemIds[], int nElemTypes, const int elemTypes[], const int nNodesPerElem[], const int elemNodes[] )

The parameters are: int meshId int partId int nElems int nElemIds const int elemIds[] int nElemTypes const int elemTypes[]

mesh ID, should be set to CCP MESHID(ccp) part ID, should be set to CCP PARTID(ccp) number of elements, can be set to CCP NELEMS(ccp) . number of element IDs, same as nElems , set to CCP NELEMS(ccp) . array of element IDs. Size should be nElemIds . number of element types, usually the same as nElems . Element types. This can be one of the predened element types, which are given in Table 1. const int nNodesPerElem[] Array of numbers of nodes per element. See also the more detailed description below. const int elemNodes[] Array of the node numbers (your node numbers) of the element nodes. See description below.

Denition of Element Nodes The nodes of each element are given in two arrays. The rst, nNodesPerElem contains one integer value for each element, which corresponds to the number of nodes for the element. The nodes for all elements are simply listed in elemNodes , the size of this array is therefore dicult to give, but it does not matter if it is too big. So, if you have a 4-node element with nodes 1, 2, 3, 4 and two 3-node elements with nodes 11, 12, 13 and 21, 22, 23, you should dene: int nNodesPerElem[] = { 4, 3, 3}; int elemNodes[] = { 1, 2, 3, 4, 11, 12, 13,

21, 22, 23 };

It is important to specify the nodes in the correct order! The order which you must use is given in Table 1.

56 VIII

MpCCI 3.1.0-1

VIII Programmers Guide Denition of Element Types The element types are listed in Table 1.

2.6 MpCCI Coupling Manager Functions

The element types can be given in two ways: Either you have a mesh, which consists of elements of the same type. In this case you can set nElemTypes=1 and elemTypes[] = <> Element type> , i. e. the list of element types only consists of one type, which is valid for all elements. It is also possible to call MpCCI Def elems several times from MpCCI Driver defineGrid to dene elements of dierent types. If you have a mesh which consists of dierent types you can give the type for each element. Then nElemTypes should have the same value as nElems and the array elemTypes should contain one type for each element. 7 7 4 3 8 4 1 2 2 1 MPCCI ELEM QUAD 3 MPCCI ELEM QUAD8 4 5 3 6 1 2 MPCCI ELEM TRIANGLE 4 1 2 MPCCI ELEM PENTAGON 6 4 6 1 5 3 1 2 MPCCI ELEM PRISM 4 3 2 MPCCI ELEM PYRAMID 5 5 3 5 2 1 2 1 2 6 5 4 5 6 8 9

MPCCI ELEM LINE

3 MPCCI ELEM QUAD9 4 3

3 1 2 MPCCI ELEM TRIANGLE6 8 7 3 5

1 6 MPCCI ELEM HEXAGON

4 4 3 1 2 MPCCI ELEM TETRAHEDRON 1 2 MPCCI ELEM HEXAHEDRON

Table 1: Element types in the MpCCI code API

MpCCI 3.1.0-1

VIII

57

2 Code API

VIII Programmers Guide

2.7 MpCCI Driver Functions


The driver functions are responsible for the exchange of data between the code adapter and the application. To enable a coupled simulation a set of functions must be provided. Exemplary implementations of the necessary driver functions are given in "adapter.c" of the MpCCI API Kit. A description of all functions is given on the following pages. The driver functions are called by the coupling manager functions as described in 2.6 MpCCI Coupling Manager Functions , therefore they can be regarded as the passive part of the adapter. A structure of pointers to these functions is handed over to MpCCI via the MpCCI Init routine, see also "adapter.c" of the MpCCI API Kit and 2.6.2 Initialization: MpCCI Init . The names of the functions can be chosen arbitrarily. Only two functions are required functions, which must be provided, all other functions need not be dened, a NULL-pointer can be given instead. The complete structure without NULL pointers is: typedef struct _mpcci_driver_info { /* REQUIRED: information to do a compatibility check */ size_t this_size; /* sizeof this "struct _mpcci_driver_info" */ unsigned this_version; /* version 3.0.6=306, 3.1.0=310 */ /* REQUIRED: pointer to a static string containing the name of the code */ const char *code_name; /* REQUIRED: define symbolic names for the types of regions in code terminology * example: [0]="Gloval var", [1]="Line", [2]="SURFACE", [3]="domain" */ const char *region_description[4]; /* REQUIRED: sizeof(float|double): tell the manager the size of floating point * values that are arguments to the set of putXXXValues() functions */ size_t values_size; /* REQUIRED: tell the manager what to do */ unsigned ccm_action; /* bitmask: __QTACT_.... */ /* OPTIONAL: methods called before/after some actions */ void (*appendComponent) (int ndefined); /* store/copy component names in CCLIST */ void (*afterCloseSetup) (void); /* method called after def_close */ void (*componentSelect) (const CC_DESC_t *ccp); void (*beforeGetAndSend)(void); /* method called before send operation */ void (*afterGetAndSend) (void); /* method called after send operation */ void (*beforeRecvAndPut)(void); /* method called before receive operation */ void (*afterRecvAndPut) (void); /* method called after receive operation */

58 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.7 MpCCI Driver Functions

/* REQUIRED: methods to get information about a component * REQUIRED: method to update and check component names - may be C or FORTRAN code * returns != 0, if this is an MpCCI process == valid coupled component found * REQUIRED: method used to define the grid (nodes & elements) */ int (*updateComponents)(void); void (*defineGrid) (CC_DESC_t *ccp); void (*moveNodes) (CC_DESC_t *ccp); /* OPTIONAL(depends): methods used to get int (*getGlobalValues )(const CC_DESC_t int (*getLineNodeValues)(const CC_DESC_t int (*getLineElemValues)(const CC_DESC_t int (*getFaceNodeValues)(const CC_DESC_t int (*getFaceElemValues)(const CC_DESC_t int (*getVoluNodeValues)(const CC_DESC_t int (*getVoluElemValues)(const CC_DESC_t quantities from the application */ *ccp, const CQ_DESC_t *cqp, void *values); *ccp, const CQ_DESC_t *cqp, void *values); *ccp, const CQ_DESC_t *cqp, void *values); *ccp, const CQ_DESC_t *cqp, void *values); *ccp, const CQ_DESC_t *cqp, void *values); *ccp, const CQ_DESC_t *cqp, void *values); *ccp, const CQ_DESC_t *cqp, void *values); application */ *cqp, void *values); *cqp, void *values); *cqp, void *values); *cqp, void *values); *cqp, void *values); *cqp, void *values); *cqp, void *values);

/* OPTIONAL(depends): methods used to store quantities into the void (*putGlobalValues )(const CC_DESC_t *ccp, const CQ_DESC_t void (*putLineNodeValues)(const CC_DESC_t *ccp, const CQ_DESC_t void (*putLineElemValues)(const CC_DESC_t *ccp, const CQ_DESC_t void (*putFaceNodeValues)(const CC_DESC_t *ccp, const CQ_DESC_t void (*putFaceElemValues)(const CC_DESC_t *ccp, const CQ_DESC_t void (*putVoluNodeValues)(const CC_DESC_t *ccp, const CQ_DESC_t void (*putVoluElemValues)(const CC_DESC_t *ccp, const CQ_DESC_t } MPCCI_DRIVER_t;

MpCCI 3.1.0-1

VIII

59

2 Code API

VIII Programmers Guide

2.7.1 Description Values


size t this size

The size of the structure, must be set to sizeof(MPCCI DRIVER t) .


unsigned this version

The version of the code adapter, i. e. the MpCCI version, without dots. Should currently be set to 306 to match this description.
const char *code name

Should be set to the name of the simulation code.


const char *region description[4]

An array of descriptions to improve output. You should give a set of names that match the terminology of your code, e. g. { "global value", "edge", "surface", "body" }
size t values size

/* /* /* /*

name name name name

for for for for

global quantities */ lines */ faces */ volumes */

The size of the values given to the put functions, usually set to one of sizeof(float) or sizeof(double) .
unsigned ccm action

This denes the actions of the code coupling manager (ccm). In most cases it should be the combination (QTACT SEND|QTACT RECV) , i. e. the adapter sends and receives data. Other values should only be used in special case, e. g. codes with several processes, where only on process communicates with MpCCI.

60 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.7 MpCCI Driver Functions

2.7.2 Methods Called before/after some Action


void appendComponent(int ndefined)

This method is intended for future use only. It is planned that coupling components can be added automatically and need not be selected in the MpCCI GUI. Please do not use this method yet. All components can be chosen in the MpCCI GUI.
void afterCloseSetup(void)

This method is called at the end of the setup of coupling components. It is usually not necessary to dene this function.
void * componentSelect(const int *compId, const char *compName, int len)

You can use this driver function to remember which components were selected in the MpCCI GUI for coupling, it is called once for each component, which is given in ccp . The id and name and the length of the name are given as arguments. In most codes this function is not needed.
void beforeGetAndSend(void)

This method is called before any get functions are called and data is send. Dene this method if you need to perform any actions before the get functions can read data.
void afterGetAndSend(void)

This method is called after all required get functions were called and the data was transferred to the MpCCI server.
void beforeRecvAndPut(void)

This method is called before data is received and before appropriate put functions are called.
void afterRecvAndPut(void)

This method is called after the put functions were called.

MpCCI 3.1.0-1

VIII

61

2 Code API

VIII Programmers Guide

2.7.3 Mesh Denitions


The mesh denition functions are called if information on the meshes is needed.
int updateComponents(void)

This function is called during MpCCI Init . You should update the components in this function, namely the number of nodes and elements of each component, for details please see "adapter.c" of the MpCCI API Kit. The tasks are: Loop over all coupling components (with CCP LOOP ALL ) Set number of elements with the command CCP NELEMS(ccp) = ... and the number of nodes with CCP NNODES(ccp) = ... for the coupling component. This often depends on the dimension of the component which can be checked with CCP DIMENSION(ccp) . If any valid coupling components were found, return 1 , otherwise 0 . If a zero is returned, the process is not coupled, which can appear in parallel processes, where only some processes have coupling components.
void defineGrid(CC DESC t *ccp)

This function is required. You should dene nodes and elements of the coupling component given by ccp : Set number of nodes with MpCCI Def nodes (see 2.6.6 Denition of Nodes: MpCCI Def nodes ).

Set number of elements with MpCCI Def elems (see 2.6.7 Denition of Elements: MpCCI Def elems ).
void moveNodes(CC DESC t *ccp)

This function is intended for future use. Do not dene it!

62 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.7 MpCCI Driver Functions

2.7.4 Data Exchange


There are two kind of exchange functions. The get functions read data from the code and are called before sending data to the partner code via the MpCCI servers. The put functions are called after data was received and must write the data to the code. The get functions are all similar and have the same syntax:
int get...Values(const CC DESC t *ccp, const CQ DESC t *cqp, void *values);

The parameters are: const CC DESC t *ccp Pointer to coupling component structure. const CQ DESC t *cqp Pointer to quantity structure. void *values Pointer to data array. Return value: int floatSize Size of the oating point values which are written to *values . Typically this is sizeof(float) or sizeof(double) . In the get functions, the required values must be to the compact data array, which is already allocated. The pointer is given as parameter. You can give the data in any oating point format. The length of the All information on the coupling component and the requested quantity are given in ccp and cqp . The get functions are distinguished by the component dimension, Global , Line , Face or Volu , and by the location, i. e. Node or Elem . You only need to dene those functions, which are supported by your code, i. e. if your code only supports coupling on faces with nodal values, only MPCCI DRIVER getFaceNodeValues must be dened. In each function, loop over nodes or elements and collect the values. These values must be written to the array, which values points to. The size of the array is given by CCP NNODES(ccp) * CQP DIM(cqp) for nodal values and CCP NELEMS(ccp) * CQP DIM(cqp) for element values. CQP DIM(cqp) is the dimension of each value, e. g. 3 for a vector. The order of nodes and elements is given by the order in which they are dened in CCI Def nodes and CCI Def elems in MpCCI Init .
void put...Values(const CC DESC t *ccp, const CQ DESC t *cqp, void *values);

The parameters are the same as for the get functions. The data array is now lled with values which can be read and transferred to the mesh. The values are of the type given as values size in the driver function structure, see 2.7 MpCCI Driver Functions .

MpCCI 3.1.0-1

VIII

63

2 Code API

VIII Programmers Guide

2.8 Data Structures and Predened Macros


MpCCI uses some predened macros, which can be used in function calls and are described here briey. Most of the macros described below are dened in the les "<MpCCI home>/include/ccllib.h" and "<MpCCI home>/include/mpcciconst.h", which include short descriptions as well.

2.8.1 Coupling Components


The coupling component descriptor CC DESC t represents a coupling component for the code. Many driver functions obtain an argument ccp which is a pointer to the coupling component (coupling component pointer). The structure contains the basic properties of a component and a list of the quantities, which shall be exchanged. The most important macros for CC DESC t are listed below, all macros take an argument of type CC DESC t * , thus they can be applied directly to the pointer ccp . E. g. CCP NNODES(ccp) should be used to set or determine the number of nodes of a component. Return value Macro Description const char * CCP NAME(ccp) name of coupling component CC DIM t CCP DIMENSION(ccp) dimension of component. Possible values are: CC DIM DUMMY (dummy value), CC DIM GLOBAL = 0 (scalar), CC DIM LINE = 1 (line), CC DIM FACE = 2 (face), CC DIM VOLUME = 3 (volume) int CCP NQUANT(ccp) number of quantities to transfer int CCP NNODES(ccp) number of nodes/points in component int CCP NELEMS(ccp) number of faces/elements/cells in component int CCP NODMAX(ccp) max. number of nodes per element in this component int CCP MESHID(ccp) MpCCI mesh id int CCP PARTID(ccp) MpCCI partition id void * CCP AUXPTR(ccp) pointer to auxiliary optional information dened and used by the application CQ DESC t* CCP GETCQP(ccp) list of quantities to transfer bool CCP ISGLOBAL(ccp) check whether component represents global values bool CCP ISLINE(ccp) check whether component is a line bool CCP ISFACE(ccp) check whether component is a face bool CCP ISVOLUME(ccp) check whether component is a volume

See also 2.8.3 Loop Functions for loops over components.

64 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

2.8 Data Structures and Predened Macros

2.8.2 Quantities
The quantity descriptor CQ DESC t represents one quantity. It contains the name and properties of the quantity. Return value Macro const char * CQP NAME(cqp) int CQP IDC(cqp) int CQP DIM(cqp) int CQP LOC(cqp) Description symbolic name e. g. temp, JHeat . . . ID code of quantity (see also the Quantity Reference in the Appendix) dimension of quantity: 1=scalar, 3=vector etc. . location of value, one of: CCI QUANTITY LOCATION NODE CCI QUANTITY LOCATION ELEM CCI QUANTITY LOCATION GLOBAL type of quantity, one of CCI QUANTITY TYPE MESH CCI QUANTITY TYPE FIELD CCI QUANTITY TYPE FLUX CCI QUANTITY TYPE USERDEF default type of interpolation, one of: CCI QUANTITY IPOL MAX maximum value is taken CCI QUANTITY IPOL MIN minimum value is taken CCI QUANTITY IPOL SUM sum CCI QUANTITY IPOL PROD product physical meaning of this quantity, one of MPCCI QPM UNDEF physical meaning of quantity really undened MPCCI QPM ANY quantity is not further specied MPCCI QPM SRC MASS a mass sink/source MPCCI QPM SRC MOM a momentum sink/source MPCCI QPM SRC ENTH an energy sink/source MPCCI QPM PROP MAT a property (material) MPCCI QPM BC VALUE a boundary condition value MPCCI QPM BC GRAD a boundary condition wall normal gradient MPCCI QPM GRID a grid coordinate/displacement MPCCI QPM CHEMCOMP a chemical component concentration transfer direction, one of CQ TDIR NONE no transfer CQ TDIR SEND quantity is sent CQ TDIR RECV quantity is received state of transfer, one of CQ TSTATE UNDEF no transfer was done before CQ TSTATE SEND quantity was sent

int CQP FTYP(cqp)

int CQP IPOL(cqp)

int CQP PMEAN(cqp)

int CQP TDIR(cqp)

int CQP TSTATE(cqp)

MpCCI 3.1.0-1

VIII

65

2 Code API Return value Macro

VIII Programmers Guide

Description CQ TSTATE RECV quantity was received int CQP SMETHOD(cqp) how to store received quantities, one of MPCCI QSM UNDEF invalid send method MPCCI QSM DIRECT directly written into buer MPCCI QSM BUFFER quantity is buered locally and copied later MPCCI QSM USRMEM quantity to store in users indexed memory MPCCI QSM SCALAR quantity to store in users index scalars MPCCI QSM SPECIES quantity to store the chemical species int CQP SINDEX(cqp) index to user supplied memory or user scalars void * CQP SBUFFER(cqp) quantities local transfer buer int CQP SBFSIZE(cqp) size of allocated local buer

return value macro description int CQP ISNODAL(ccp,cqp) check whether quantity is a nodal quantity int CQP ISELEMENT(ccp,cqp) check whether quantity is an element quantity

2.8.3 Loop Functions


In addition to the data access functions, a number of predened loops are available:
CCP LOOP ALL(ccp,i){ ... }

Loop over all coupling components. Parameters: CC DESC t* ccp Is set to coupling components during loop. int i Loop counter.
CCP LOOP VALID(ccp,i){ ... }

Loop over all valid coupling components, i. e. all components with dimension other than CC DIM DUMMY . Parameters: CC DESC t* ccp Is set to coupling components during loop. int i Loop counter.
CQP LOOP ALL(ccp,cqp,cqpEnd){ ... }

Loop over all quantities of a coupling component given by ccp . Parameters: CC DESC t* ccp Coupling component, must be given. CQ DESC t* cqp Variable is set to quantities during loop. CQ DESC t* cqpEnd Variable is set to end of loop (not used).

66 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CQP LOOP RECV(ccp,cqp,cqpEnd){ ... }

2.8 Data Structures and Predened Macros

Like CQP LOOP ALL , but loop goes only over quantities which are received.
CQP LOOP SEND(ccp,cqp,cqpEnd){ ... }

Like CQP LOOP ALL , but loop goes only over quantities which are sent.

MpCCI 3.1.0-1

VIII

67

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

3 MpCCI SDK Code Coupling Library


3.1 The MpCCI SDK Concepts 3.1.1 Communication levels
In the layered approach described in detail below we have in mind that MpCCI SDK is situated between the application and the MPI library. Similar to the Message Passing Interface MPI, MpCCI SDK uses the communicator concept. Instead of just transferring data from one process to another MpCCI SDK takes into account the grids on which the data are located. Thus tools for neighborhood search and interpolation are provided. Additionally, MpCCI SDK is able to support several grids used within each of the codes. This concept is obviously required in the multigrid context. MpCCI SDK is independent of the parallelization strategy used by a code. It integrates SPMD (single program multiple data) as well as MPMD (multiple program multiple data) programs. The user can use the codes he is familiar with. No training for new application software packages is required. Only minimal source code changes of the simulation codes themselves are necessary. While the codes internally may use a communication platform of their own choice (e. g. MPI, PVM or Shared Memory) MpCCI SDK uses a TCP/IP based socket connection for communication between the codes and the MpCCI SDK Coupling Server. Internally the MpCCI SDK Coupling Server uses MPI as its parallelization platform. For each parallel process in the coupled application codes there is exactly one corresponding mirror process in the MpCCI SDK Coupling Server. Communication between code process and MpCCI SDK process is handled bidirectional - an exclusive socket connection is established a the beginning of the coupled job for each pair of code process and MpCCI SDK mirror process.

3.1.2 Coupling quantities


The values transferred by MpCCI SDK are referred to as quantities. A quantity can be any type of variable used in any of the codes. An arbitrary dimension can be assigned to these quantities. Velocity, temperature, size of time-steps are typical examples for quantities. Obviously there are two types of quantities: On the one hand, some quantities are represented by discrete functions, evaluated during the computation on an arbitrary mesh. Those values are assigned to a specic geometric position. On the other hand, there are quantities represented by one or more single values, which are independent of a geometrical position. The former are referred to as grid-based quantities, whereas the latter are described as global quantities. A grid in MpCCI SDK consists of a certain amount of parts, called coupling partitions. Each partition consists of a certain amount of geometrical positions referred to as nodes. Nodes can be combined using various types of elements in order to specify connectivity information used in the simulation codes. In the multigrid context this structure is applied to any of the grid levels separately. Each grid-based quantity has to be assigned to exactly one grid. On the other hand, more than one quantity can be dened on each grid. Further, more than one grid can exist in each of the simulation codes

68 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.1 The MpCCI SDK Concepts

participating in the coupled computation. Application of a multigrid algorithm could be one reason for using several grids covering the same geometrical region. Chimera techniques can be considered a more prominent example for the existence of several grids in one code. A staggered grid can be seen as a number of grids covering the same geometrical position.

3.1.3 Synchronization concepts and data transfer


Data transfer is one of the main tasks of MpCCI SDK. Coupling values are transferred both transparently and eciently. Full exibility as well as high comfort are oered to the user. To ensure a high degree of scalability and performance communication takes place exclusively among processes participating in the coupled computation. MpCCI SDK supports two kinds of concepts for the data exchange. Blocking and non-blocking communication can be invoked by routines similar to the according routines in MPI. This concept is MPI-like based on send and receive actions and will not be described in this paragraph. For more information see the descriptions of the subroutines ( CCIsend and CCIrecv ) in 3.2 MpCCI SDK Functions or read the example in 3.4 An Example . The second concept is based on so-called synchronization points which oers the opportunity of bidirectional communication: Reaching a synchronization point a process may send and receive data. Only those quantities are transferred to other processes, that are required by the remote processes. An illustration is given in Figure 1. Codes taking part in a synchronization point may be dened in a exible way. Code 1 Code 2 Code 3 SyncPoint 1 SyncPoint 2 SyncPoint 3

Figure 1: Exchange of data via synchronization points

An example for a simple algorithmic use of synchronization points is given in Figure 2. For a more detailed description see the denitions of the subroutines ( CCIdefsync , CCIsyncinfo and CCIreachsync ) in 3.2 MpCCI SDK Functions and 3.3.9 Coupling block .

MpCCI 3.1.0-1

VIII

69

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

solve

solve

Figure 2: Algorithmic use of synchronization points

3.1.4 Coupling Regions


MpCCI SDK supports dierent kinds of coupling regions and spaces. In the two-dimensional and threedimensional space line, surface and volume coupling based on element denitions are possible. Meshes consisting of spherical triangles or (exclusive) quadrilaterals are treated as a special case. Furthermore MpCCI SDK is able to perform data transfer on nodes without element denition.

3.1.5 Neighborhood Search and Interpolation


The exchange of grid based coupling quantities is a non-trivial task. Due to the basic discretization in the simulation codes the coupling data are usually arranged on dierent structured or unstructured meshes. As an example the grid of one multigrid level of each code is shown in Figure 3. Therefore, MpCCI SDK has to perform neighborhood search and interpolation between the meshes to realize a sensible exchange of coupling data. Each of the meshes is usually distributed on several parallel processes. The complex problem raised by this distribution is solved by MpCCI SDK eciently. The main problem is to determine how these surfaces t together, the so-called neighborhood computation. This information is used then to establish the inter-processor communication, and to assist the codes in

70 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.1 The MpCCI SDK Concepts

SOLID

FLUID

exchange of coupling values Figure 3: Data exchange between two non-matching grids (distance exaggerated)

the interpolation of coupling values between the dierent grids. The simulation codes must specify their coupling region to MpCCI. The coupling regions may consist of the element types described in 3.2.3 CCIdefelems . The coordinate systems must be global in the MpCCI SDK standard version to enable MpCCI SDK to detect the distances and relations between the specied regions. It is allowed that the coupling regions are not identical but distant from each other. The maximum distance allowed is adjustable by a parameter in the input le of MpCCI. In the case of non-matching grids the data arranged on the nodes of the source grid are interpolated by MpCCI SDK on the nodes of the target grid. In MpCCI SDK advanced and professional version coordinate systems can be transformed so that they match each other. In the coupling denition phase each process of a code announces its parts of the coupling region with their nodes and elements of the coupling surface to MpCCI. Each coupling partition has to be assigned with a partition identier (see 3.2 MpCCI SDK Functions ) which must be used in subsequent MpCCI SDK calls to indicate the involved part of the coupling region. When each code has specied the grid data of its side of the coupling surface, MpCCI SDK performs the contact or neighborhood search which is necessary for

MpCCI 3.1.0-1

VIII

71

3 MpCCI SDK Code Coupling Library the interpolation.

VIII Programmers Guide

A linear and a bilinear interpolation depending on the type of the element is implemented. Also, the user can choose between a conservative and a non-conservative interpolation (see V-3.2.5 Flux and Field Interpolation for details). With respect to the whole coupling process the main computation is carried out in the communication phase. In this phase the coupling data are specied to the library. MpCCI SDK sends the data to the receiver code, interpolates the data onto the nodes of the target grid and distributes the interpolated data to the specied arrays. Then the computations of the receiver code, which depend on the coupling data, can start. Based on this information the communication is optimized in the following way: Only those processors exchange data, that have grid points for which a connectivity was detected, instead of distributing all data to all processors.

3.1.6 The MpCCI SDK coupling server scheme


Since MpCCI 3.0.5 MpCCI SDK only works with the concept of coupling servers, where each code lives in its own MPI world (if it is parallel in itself) and is started independently of the others. This chapter describes the general idea of the coupling server scheme and names more advanced features.

3.1.6.1 General Idea of the Coupling Server Scheme


The idea of the coupling server scheme is to separate the codes into their own independent communication worlds: each code uses its own MPI or another communication platform for its internal parallelization. There are no restrictions or interferences with the MPIs of the remote codes. The codes are started independently in the same way as in the standalone case. The coupling of codes is realized via additional coupling server processes (one for each code process). MpCCI SDK internally uses MPI for communication between its parallel server processes. In case of two coupled codes there are three a priori independent communication and parallelization worlds: the processes of code A the processes of code B the MpCCI SDK coupling server processes, one process for each code process of A and B The coupling server processes execute the special binary "mpcci-server" which is provided by the MpCCI SDK distribution. Each coupling server process is associated to exactly one code process. The coupling server does nothing else but listen for MpCCI SDK requests from its code process. If such an MpCCI SDK request arrives, the coupling server calls the corresponding MpCCI SDK subroutine, and communicates the results of the MpCCI SDK subroutine back to its code process.

72 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

The communication between a coupling server and its code process is not MPI based (because they do not live in the same MPI world), but instead based on sockets. The code processes themselves need to be linked with the "libmpccisdk 32.a" or "libmpccisdk 64.a" communication library.

3.1.6.2 Advanced Features


Let us begin with a few technical words about the setup phase of the MpCCI SDK Coupling Server.This will help you understand some of the advanced conguration parameters. How do the server processes nd their clients? This is non-trivial because the server processes and the clients are started independently of each other. In our implementation, the rst MpCCI-server process (the so called leading MpCCI-server) plays a special role: it mediates the communication setup between each code process and its corresponding MpCCI-server. This is done in the following way: The leading MpCCI-server knows from the MpCCI SDK input le, how many clients are to be expected. It opens a socket connection and listens to a specic port for client registration messages. The clients, i.e. the processes of the codes read a setup le "$HOME/.cciclientrc" (if the variable CCI CLIENT HOME is set and a writable directory: "$CCI CLIENT HOME/.cciclientrc") which has been written by the ccirun script when starting the MpCCI SDK world of the MpCCI-servers. This setup le contains information about the IP address and the port number of the leading MpCCIserver. So the rst action of each client during CCIinit is to contact the leading MpCCI-server for registration. After receiving the registration message from a code process, the leading MpCCI-server associates one of the MpCCI-servers to the client. It sends the IP address and a port number to both the client and the corresponding MpCCI-server. The relevant MpCCI-server then listens to this port, and the client connects to this port. In this way, the client sets up a connection to its MpCCI-server. When it is set up, all subsequent communication between client and server will be handled via this connection. The hand-over of port information to establish socket connections will change with MpCCI 3.0.6. Instead of creating a le "$HOME/.cciclientrc" for each client process the user has to dene environment variables describing the host and port number of the leading MpCCI-server. In addition to this setup mechanism where the leading MpCCI-server mediates the connections, there is an alternative setup where clients and servers nd themselves directly. This direct setup requires additional information both for the MpCCI-servers and the clients. There are a lot of conguration switches by means of which the user can adjust the behavior of the coupling servers. They are described in 3.2 MpCCI SDK Functions

MpCCI 3.1.0-1

VIII

73

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

3.2 MpCCI SDK Functions


This chapter describes the basic MpCCI SDK subroutines needed to perform the coupling algorithms described previously. Before we start with a detailed description of the individual calls we give a brief introduction to the terminology used. The reader who is familiar with FORTRAN, C and MPI may skip 3.2.1 Naming Conventions and Terminology . For a brief overview of the complete set of MpCCI functions the reader is referred to Table 4 on page 146 and to the index list at the end of this manual.

3.2.1 Naming Conventions and Terminology


The naming conventions for MpCCI SDK subroutines are similar to those in MPI. Each subroutine name consists of a list of words separated by underscores . Subroutine names start with the word CCI as in Code Coupling Interface. The rst letter of the second word is capitalized as in CCI Send. The FORTRAN versions will have names that are all upper case, e. g. FCCsend . To achieve portability, the names of MpCCI SDK subroutines will be at most 30 characters long. The names of non-blocking routines start with CCI I (followed by lower case letters in C). For example, the non-blocking counterpart of CCIsend is CCIisend , in FORTRAN it is FCCisend . According to Snir et al. [1996] we will use the following terminology in the description of MpCCI SDK subroutines: local: If the procedure of the subroutine depends only on the local executing process. Such an operation does not require an explicit communication with another process. non-local:If completion of the procedure may require the execution of a MpCCI SDK procedure on another process. blocking: If return from a MpCCI SDK procedure indicates the user is allowed to re-use resources specied in the call. Any visible change in the state of the calling process is completed before the call returns. non-blocking: If the procedure may return before the operation initiated by the call completes, and before the user is allowed to re-use resources (such as arrays specied in the call). collective:If all processes in a certain process group must invoke the procedure. In addition to MPI, the following terminology is used: one-side collective:If completion of the operation initiated by the call is a collective operation over the MpCCI SDK processes of the local code. two-side collective:If completion of the operation initiated by the call depends on the MpCCI SDK processes of both the local and remote code.

74 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

MpCCI SDK procedures are specied in language independent notation. Subroutine arguments are marked as IN , for arguments whose values may be used but are not changed, OUT , for arguments whose values are not used on input, but may be changed by the call, or INOUT , for arguments whose values may be used on input to the call, and may be changed by the call. Arguments of type OUT may have arbitrary input values. Aliasing of arguments in procedure calls is only allowed if these arguments are all IN variables. Otherwise, the results are undened. Concrete C and FORTRAN descriptions are added for MpCCI SDK subroutines that have been implemented. Note that all MpCCI SDK subroutines in FORTRAN have an additional argument ierror at the end of the argument list. This argument is a FORTRAN integer and has the same meaning as the return value of the routine in C. In FORTRAN, MpCCI SDK and MPI routines are subroutines, and are invoked with the call statement. The index order of array elements diers in FORTRAN and C: In our examples we refer to the FORTRAN index ordering where the rst element of an array ary is ary(1) 1 . MpCCI SDK subroutines for receiving coupling values have a return status output argument. This argument contains more detailed information about the information received. In C, status is a structure of type CCIstatus . In FORTRAN, it is an integer array which has the length CCIstatussize . The constant CCIstatussize is dened in "ccif.h".

3.2.2 MpCCI SDK Data Types


Some of the MpCCI SDK functions described in the following have an argument concerning the data type of values. To avoid problems with the dierent data types on various platforms MpCCI SDK denes constants of its own that should be used. The dierent data types for C and FORTRAN are collected in the tables below. Table 1 lists the available MpCCI SDK data types for C: Table 2 lists the available MpCCI SDK data types for FORTRAN.

3.2.3 Initialization and Coupling Denition


Connections between dierent codes are established by MpCCI SDK in the start-up and initialization phase.
1 In

C it would be ary[0] .

MpCCI 3.1.0-1

VIII

75

3 MpCCI SDK Code Coupling Library C type int float double long double char [] bool MpCCI type CCIint CCIfloat CCIdouble CCIlongdouble CCIstring CCIbool

VIII Programmers Guide

Table 1: MpCCI SDK data types for C. C type integer real real*4 real*8 double precision character*(*) logical MpCCI type CCIinteger CCIreal CCIrealfour CCIrealeight CCIdoubleprec CCIstring CCIlogical

Table 2: MpCCI SDK data types for FORTRAN.

In the MpCCI SDK initialization phase, several constants are computed. To access these constants from C, one must use: #include "mpcci.h" To access these constants from FORTRAN, one must use the following: c --- include common block containing MpCCI constants include mpccif.h

In the coupling denition phase, each code species its coupling region to MpCCI. This coupling region in general consists of the part of the grid coordinates that take part at the coupling. After that the initial neighborhood computation takes place. The search algorithm is explained in V-3.2.1 Pre-Contact Search .

76 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIinit

3.2 MpCCI SDK Functions

pArgc pArgv

INOUT INOUT

pointer to pass the argument count to MPI Init pointer to pass the arguments to MPI Init

int CCI_Init( int* pArgc, char*** pArgv )

subroutine CCI_INIT( ierror ) integer ierror

This subroutine enrolls a code in the coupled computation. CCIinit initializes MpCCI SDK for both C and FORTRAN/ FORTRAN 90 usage. Afterwards, the complete environment for the caller has been set as specied in the MpCCI SDK input le (working directory, environment variables). CCIinit initializes the following external variables dened in "mpcci.h" (for C), "mpccif.h" (for FORTRAN): CCIncodes The number of codes (jobs) involved in the current computation. CCImycodeid The code id of the current code (job), 1 CCImycodeid CCIncodes. A code id CCImycodeid is always in the range 1 CCImycodeid CCIncodes. If the same code occurs twice in the coupled computation, CCImycodeid will have dierent values at the dierent instances of this code. CCIinit is a blocking collective operation over all processes of all codes, to be performed after start-up of a code, and before any other MpCCI SDK subroutines are called. No MPI calls should take place between call to MPI Init and CCIinit , and no I/O should take place before CCIinit . Also the communicator MPIcommworld should not be used for any communication in the whole coupled computation. Class Position non-local, blocking rst MpCCI SDK call

MpCCI 3.1.0-1

VIII

77

3 MpCCI SDK Code Coupling Library


CCIinitwithidstring

VIII Programmers Guide

pArgc pArgv idString

INOUT INOUT IN

pointer to pass the argument count to MPI Init pointer to pass the arguments to MPI Init id string

int CCI_Init_with_id_string( int* pArgc, int*** pArgv, const char* idString )

subroutine CCI_INIT_WITH_ID_STRING( idString, ierror ) character*(*) idString integer ierror

In addition to the task of the subroutine CCIinit this subroutine oers the possibility to overwrite the id string of the code block of the MpCCI SDK input le with the string idString . The subroutines CCIinit and CCIinitwithidstring must not be called both in one code. Class Position non-local, blocking rst MpCCI SDK call

78 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIdefmesh

3.2 MpCCI SDK Functions

meshId idString

IN IN

grid identier within each code identier(s) of the mesh

int CCI_Def_mesh( int meshId, const char idString[] )

subroutine CCI_DEF_MESH( meshId, idStringLen, idString, ierror ) integer meshId, idStringLen, ierror character*(*) idString

Subroutine CCIdefmesh enables the user to dene expressive names for the dierent meshes. These names can be used in the coupling block of the MpCCI input le. The argument idString may contain dierent names separated by comma. All sub-strings are compared with those of the other code to determine the matching meshes. Note: this subroutine has to be called before CCIsyncinfo and CCIcomminfo. Otherwise the meshes dened in the latter calls are unknown to MpCCI.

MpCCI 3.1.0-1

VIII

79

3 MpCCI SDK Code Coupling Library Figure 4 illustrates the naming conventions of CCIdefmesh: Meshes of the rst code 3 1 part 1 part 2 part 3 12

VIII Programmers Guide

Meshes of the second code part 1

part 2

part 3 1 part 3

Figure 4: Naming conventions for CCIdefmesh.

Class Position

local, non-blocking after closing the initial phase, rst denition

80 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIdefpart

3.2 MpCCI SDK Functions

meshId partId

IN IN

grid identier within each code partition identier of each grid

int CCI_Def_partition( int meshId, int partId )

subroutine CCI_DEF_PARTITION( meshId, partId, ierror ) integer meshId, partId, ierror

With CCIdefpart a partition of a grid is dened which will take part in the coupling process. The call of CCIdefpart with the parameters meshId and partId denes a partition with the identier partId on the grid with identier meshId . Each code may use several (N) grids for solving the equations (multigrid, staggered grid). Every grid of each code is identied by the meshId . This numbering of the dierent grids is arbitrary. Each grid identied by the meshId may consist of several partitions. From the view of MpCCI the grid partitions are the smallest parts of a grid, the grid atoms. Every MpCCI process may work on a set of partitions.

MpCCI 3.1.0-1 VIII

81

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide partId1 partId2

meshId2

partId3

Process 1Process 2

Process 3Process 4 partId1 partId2 Process 5Process 6

meshId1 partId3

Figure 5: Mesh partitioning for parallel applications The following example denes two grids with three partitions on both grids like in Figure 5 (the number of partitions on each grid may not be equal): CCI_Def_partition( CCI_Def_partition( CCI_Def_partition( CCI_Def_partition( CCI_Def_partition( CCI_Def_partition( meshId1, meshId1, meshId1, meshId2, meshId2, meshId2, partId1 partId2 partId3 partId1 partId2 partId3 ); ); ); ); ); );

82 VIII

MpCCI 3.1.0-1

VIII Programmers Guide Class Position

3.2 MpCCI SDK Functions local, non-blocking after closing the initial phase, second denition (after calls of CCIdefmesh, if used)

MpCCI 3.1.0-1

VIII

83

3 MpCCI SDK Code Coupling Library


CCIdefnodes

VIII Programmers Guide

meshId partId globalDim nNodes nNodeIds nodeIds realType coords

IN IN IN IN IN IN IN IN

grid identier within each code partition identier of each grid dimension of the global coordinate system number of nodes switch node numbering, dimension of array nodeIds node identier data type of elements of coords address of coordinate array

int CCI_Def_nodes( int meshId, int partId, int globalDim, int nNodes, int nNodeIds, const int nodeIds[], int realType, const void* coords )

subroutine CCI_DEF_NODES( meshId, partId, globalDim, nNodes, nNodeIds, nodeIds, realType, coords, ierror) integer meshId, partId, globalDim, nNodes, nNodeIds, nodeIds(nNodeIds), realType, ierror coords(globalDim*nNodes)

<real type>

The purpose of subroutine CCIdefnodes is to specify the nodes (grid points) within each partition that will take part in the coupling. CCIdefnodes is a strictly local operation. Based on these nodes the elements are dened. There are three dierent ways of numbering the nodes. They can be selected by the actual choice of variable nNodeIds : The nodes are numbered consecutively from 1 to nNodes . nodeIds is ignored. 2. nNodeIds = 1 The nodes are numbered consecutively from nodeIds(1) to nodeIds(1)+nNodes . nodeIds(1) has to be specied of course. 3. nNodeIds = nNodes The numbering of the nodes will be according to the elements of array nodeIds . The number of the i-th node is nodeIds(i) . 1. nNodeIds = 0 The layout of array coords containing the coordinates of the nodes is the same in FORTRAN/ FORTRAN 90

84 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

and C. If, for globalDim = 3, xi , yi , and zi are the coordinates of the i-th point with 1 i nNodes, then the points are stored in the following way: x1 , y1 , z1 , x2 , y2 , z2 , . . . , xnNodes , ynNodes , znNodes . For the value of variable realType please refer to Table 1 and Table 2. It is possible to redene coordinates for any nodeId later in the program. But this has to be done by a call of CCImodnodes within a remeshing operation (and not in a second call to CCIdefnodes). CCIdefnodes has to be called for each partition dened. This implies that CCIdefpart has to be called rst before invoking CCIdefnodes for each partition. For each partition CCIdefnodes must only be called once. It is not possible to add nodes to a partition by calling CCIdefnodes a second time. Example: The following example denes the nodes of partition partId on grid meshId ( see Figure 20):

/** * Variables for CCI_Def_nodes: */ /* Global dimension: 3 coordinates per node. int globalDim = 3; /* Number of nodes for the partition: int nNodes = 9; /* Node numbering according to the first item: int nNodeIds = 0; int* nodeIds = 0; /* Data type of the coordinates of the nodes: int realType = CCI_FLOAT; /* Coordinates of the nodes: float coordsData[] = { 0, 0, 0, /* 0.5, 0, 0, /* 1, 0, 0, /* 0, 0.5, 0, /* 0.5, 0.5, 0, /* 1, 0.5, 0, /* 0, 1, 0, /* 0.5, 1, 0, /* 1, 1, 0 }; /* ... /* Call of the subroutine CCI_Def_nodes( meshId, */ */ */ */

*/ */ node node node node node node node node node

1 2 3 4 5 6 7 8 9

*/ */ */ */ */ */ */ */ */

MpCCI 3.1.0-1

VIII

85

3 MpCCI SDK Code Coupling Library partId, globalDim, nNodes, nNodeIds, nodeIds, realType, coordsData );

VIII Programmers Guide

Class Position

local, non-blocking behind CCIdefpart (or within a remeshing)

86 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIdefelems

3.2 MpCCI SDK Functions

meshId partId nElems nElemIds elemIds nElemTypes elemTypes nNodesPerElem elemNodes

IN IN IN IN IN IN IN IN IN

grid identier within each code partition identier of each grid number of elements switch for element numbering, dimension of array elemIds element identier length of array elemTypes element type of the specied elements number of nodes needed to describe one specic element indices of the nodes which dene the elements

int CCI_Def_elems( int meshId, int partId, int nElems, int nElemIds, const int elemIds[], int nElemTypes, const int elemTypes[], const int nNodesPerElem[], const int elemNodes[] )

subroutine CCI_DEF_ELEMS( meshId, partId, nElems, nElemIds, elemIds, nElemTypes, elemTypes, nNodesPerElem, elemNodes, ierror ) integer meshId, partId, nElems, nElemIds, elemIds(nElemIds), nElemTypes, elemTypes(nElemTypes), nNodesPerElem( ), elemNodes( ), ierror

This strictly local operation is used to specify the topology of a coupling partition by specifying the number of elements, element type, and for each element the indices of the nodes that dene it. The node indices correspond to the ordering of the node specication in the call of CCIdefnodes (see 3.2.3 CCIdefnodes on page 84). nElems elements can be dened. These may consist of only one type ( nElemTypes = 1) up to nElems types with dierent element types elemTypes . Thus, dierent element types can be specied for the same coupling partition with just one call of this subroutine. For nearest-neighbor interpolation from node to node CCIdefelems can be omitted. In MpCCI the interpolation type depends on the element type which is chosen and the settings in the MpCCI input le. For every element type it is possible to dene element-based and node-based quantities. Seven types of surface elements, where two element types can also be used for volume coupling in the two-dimensional space, four types of volume elements in the three-dimensional space, one line element,

MpCCI 3.1.0-1

VIII

87

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

i.e. surface element in the two-dimensional space, and two element types for coupling on the sphere are provided in the current version: 1. CCIelemquad : The number of nodes is four. The nodes can be enumerated anti-clockwise or clockwise, but the direction has to be the same for the whole partition. This element type can be used for surface coupling in the three-dimensional space and volume coupling in the two-dimensional space. 4 3

Figure 6: CCIelemquad.

2. CCIelemtri : The number of nodes is three. This element type can be used for surface coupling in the three-dimensional space and volume coupling in the two-dimensional space. 3

Figure 7: CCIelemtri.

3. CCIelemquaeight : The number of nodes is eight. The rst node stored in elemNodes must be a node at a vertex of the element, the other nodes must be enumerated anti-clock-wise. 7 8 4 1 2 3 6 5

Figure 8: CCIelemquaeight.

4. CCIelemquanine : The number of nodes is nine. The rst node stored in elemNodes must be a node at a vertex of the element, the other nodes must be enumerated in rows.

88 VIII

MpCCI 3.1.0-1

VIII Programmers Guide 7 4 5 1 2 6 8 9

3.2 MpCCI SDK Functions

Figure 9: CCIelemquanine. 5 6 1 2 4 3

Figure 10: CCIelemtrsix. 5. CCIelemtrsix : The number of nodes is six. The rst node stored in elemNodes must be a node at a vertex of the element, the other nodes must be enumerated anti-clock-wise. 6. CCIelempentagon : The number of nodes is ve. The nodes are enumerated anti-clock-wise. The interpolation will be done via triangles. 4 5 3

Figure 11: CCIelempentagon.

7. CCIelemhexagon : The number of nodes is six. The nodes are enumerated anti-clock-wise. The interpolation will be done via quadrilaterals. For line coupling in the 2-dimensional space there is currently implemented only one element type: CCIelemline. This element type represents the line segment between two nodes. The volume elements are described in the following enumeration:

MpCCI 3.1.0-1

VIII

89

3 MpCCI SDK Code Coupling Library 4 5 3

VIII Programmers Guide

Figure 12: CCIelemhexagon. 1 2

Figure 13: CCIelemline. 1. CCIelemtetrahedron : The number of nodes is four. The interpolation dened for this element is linear. 4 3 1 2 Figure 14: CCIelemtetrahedron. 2. CCIelemhexahedron : The number of nodes is eight. The numbering of the nodes is shown in the gure. The interpolation dened for this element is linear. 8 4 5 1 2 3 6 7

Figure 15: CCIelemhexahedron. 3. CCIelemprism : The number of nodes is six. The interpolation dened for this element is linear. 4. CCIelempyramid : The number of nodes is ve. The interpolation is non-linear.

90 VIII

MpCCI 3.1.0-1

VIII Programmers Guide 6 4 5 3 1 2

3.2 MpCCI SDK Functions

Figure 16: CCIelemprism. 5 4 1 2 Figure 17: CCIelempyramid. The element types for surface coupling, line coupling and volume coupling must not be mingled on the same mesh. The global dimension of nodes for line coupling and volume coupling in the two-dimensional space is 2, for surface and volume coupling in the three-dimensional space the global dimension is 3. MpCCI supports coupling on the sphere, but several restrictions must be regarded. The midpoint of the sphere must be the origin of the coordinate system. All meshes must consist of the same spherical element type. This is due to the fact that the spherical quadrilateral cannot be decomposed in two spherical triangles. The spherical element types are dened as follows: CCIelemsphtri : The number of nodes is three. The nodes are connected by curves on the sphere which have the minimal length. 3 3

Figure 18: CCIelemsphtri. CCIelemsphqua : The number of nodes is four. The nodes can be enumerated anti-clockwise or clockwise. Degenerated quadrilaterals may be dened if the north or the south pole of the sphere is a doubly dened node. The north and the south pole must not be an inner point or lie

MpCCI 3.1.0-1

VIII

91

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

on an edge of the spherical quadrilateral. The edges of the spherical quadrilateral must be a line of latitude or longitude on the sphere. 4 3

Figure 19: CCIelemsphqua.

The sphere or parts of the sphere may also be treated as a normal surface in the three-dimensional space and all surface elements may be used to dene it. Based on the nodes specied by the user, MpCCI automatically computes the centers of the elements (open circles). Coupling quantities can be assigned to the nodes by CCIputnodes. CCIgetnodes is used to get values located at the nodes. The centers are referred to by CCIputelems and CCIgetelems. Further element types are intended to be included in later versions of MpCCI. nElemIds must be set either to 0 or to nElems . The elements are numbered consecutively if you choose nElemIds = 0. If e. g. the rst 10 triangles (CCIelemtri) and thereafter 20 quadrilaterals (CCIelemquad) are specied, then the 11th element is the rst quadrilateral. If you choose nElemIds = nElems the elements will be numbered according to elemIds ( see also CCIdefnodes ). All nodes dened by CCIdefnodes must be used in the topology specication calls for a coupling partition. The various elements can be dened by more than one call to CCIdefelems. It is the callers responsibility to ensure that no degenerate elements occur and that dierent elements do not overlap. The ordering of array elemNodes is according to the order specied with routine CCIdefnodes for array coords . Example: In the following example we refer to the denitions made in the example of CCIdefnodes. With the help of the nodes dened there we build a mesh consisting of three quadrilaterals with the ids 1, 2, 3 and two triangles with the ids 4, 5. /** * Variables for CCI_Def_elems: */ /* int /* int Number of quadrilaterals: nElems1 = 3; Numbering of the quadrilaterals: 1, 2, 3 nElemIds1 = 0; */ */

92 VIII

MpCCI 3.1.0-1

VIII Programmers Guide (0,1,0) 7 (0.5,1,0) 8 (1,1,0) 9

3.2 MpCCI SDK Functions

4 (0,0.5,0)

5 (0.5,0.5,0)

(1,0.5,0)

1 (0,0,0)

2 (0.5,0,0)

3 (1,0,0)

Figure 20: Mesh for the example.

int* elemIds1 = 0; /* Elementtypes ( must be 1 ): */ int nElemTypes1 = 1; int elemTypes1[] = { CCI_ELEM_QUAD }; /* Nodes per quadrilateral: */ int nNodesPerElem1[] = { 4 }; /* Node ids of the quadrilaterals: */ int elemNodes1[] = { 1, 2, 5, 4, /* quadrilateral 1 */ 2, 3, 6, 5, /* quadrilateral 2 */ 5, 6, 9, 8 }; /* quadrilateral 3 */ /* int /* int int /* int int /* int /* int Number of triangles: */ nElems2 = 2; Numbering of the triangles: 4, 5 */ nElemIds2 = 2; /* or = 0 */ elemIds2[] = { 4, 5 }; Elementtypes ( must be one ): */ nElemTypes2 = 1; elemTypes2[] = { CCI_ELEM_TRIANGLE }; Nodes per element: */ nNodesPerElem2[] = { 3 }; Node ids of the triangles: */ elemNodes2[] = { 4, 5, 8, /* triangle 4 */ 4, 8, 7 }; /* triangle 5 */

...

MpCCI 3.1.0-1

VIII

93

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

/* Call of the subroutine to define the quadrilaterals: */ CCI_Def_elems( meshId, partId, nElems1, nElemIds1, elemIds1, nElemTypes1, elemTypes1, nNodesPerElem1, elemNodes1 ); /* Call of the subroutine to define the triangles: CCI_Def_elems( meshId, partId, nElems2, nElemIds2, elemIds2, nElemTypes2, elemTypes2, nNodesPerElem2, elemNodes2 ); */

Class Position

local, non-blocking behind CCIdefnodes

94 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIdefcomm

3.2 MpCCI SDK Functions

localCommId remoteCodeId remoteCommId nQuantityIds quantityIds nLocalMeshIds localMeshIds

IN IN IN IN IN IN IN

communicator of local code id of the remote code communicator of remote code length of array quantityIds ids as dened in the input le length of array localMeshIds id of local meshes

int CCI_Def_comm( int int int int

localCommId, int remoteCodeId, remoteCommId, nQuantityIds, const int quantityIds[], nLocalMeshIds, const int localMeshIds[] )

subroutine CCI_DEF_COMM( localCommId, remoteCodeId, remoteCommId, nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, ierror ) integer localCommId, remoteCodeId, remoteCommId, nQuantityIds, quantityIds(nQuantityIds), nLocalMeshIds, localMeshIds(nLocalMeshIds), ierror

By calling CCIdefcomm communicators are built which group processes for later communication. CCIdefcomm has to be called by all local MpCCI SDK processes that take part at least at one of the local grids that are dened by localMeshIds . Besides these requirements any other local process may call CCIdefcomm as well. This routine collects all the information which is needed to build up the communication but does not interpret it in contrast to MPIcommcreate . It is also possible to specify communicator parameters in the coupling block of the MpCCI SDK input le. To get those information CCIcomminfo has to be called before calling CCIdefcomm. By calling CCIdefcomm an MpCCI SDK communicator is created on the calling side. In the MpCCI SDK communication routines (e. g. CCIsend, CCIrecv, see 3.2.4 CCIsend on page 112 and 3.2.4 CCIrecv on page 116) this communicator will be addressed by the variable localCommId . Every MpCCI SDK communicator is nally based on an MPI inter-communicator. Any communication like CCIsend or CCIrecv has to be called by all processes that share the same identier localCommId . localCommId is a local variable in the sense that it is only known on every process within the local code. On the remote side it nds its counterpart in the variable remoteCommId . In combination with the variable localCommId an MpCCI SDK communicator is dened unmistakably as a pair consisting of

MpCCI 3.1.0-1

VIII

95

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

a communicator ID and a code ID [ remoteCommId , remoteCodeId ] or [ localCommId , localCodeId ]. Predened constants for these identiers are CCIncodes and CCImycodeid. Note that with every MpCCI SDK communicator a MPI communicator is dened. If the input le is not used to specify the parameters of the communicators all variables localCommId should be documented since these values are required by the remote code when calling CCIdefcomm. Both variables localCommId and remoteCommId need to be greater than zero. In the communicator the nQuantityIds quantities which are stored in quantityIds may be communicated. The quantities and their identiers must be dened in the MpCCI SDK input le. Instead of naming all quantities, a wild card CCIanyquantity can be used. This constant is also very helpful when coupling more than two codes. In localMeshIds the corresponding mesh identiers are to be stored. There are two ways to do this. If there is only one mesh involved for all quantities of quantityIds , nlocalMeshIds may be set to 1 and the ( only ) entry of localMeshIds is the identier of that mesh. If the quantities are to be communicated on dierent meshes nLocalMeshIds equals nQuantityIds and the corresponding mesh identiers must be stored in localMeshIds . In the MpCCI SDK input le the quantities of the codes which match each other must be specied in the quantities block. Make sure that the local communicator ( localCommId ) and the communicator of the remote code ( remoteCommId ) communicate matching quantities. It is possible to communicate one quantity on dierent meshes in one communicator. In this case the order of those meshes in localMeshIds in the local communicator denition and in the denition of the remote communicator in the remote code are used to put or get the values. Example: In the following example we dene a communicator for a code with the identier 1. The variable localCommId is 112 and the corresponding communicator of the remote code which is code 2 in this case has the identier 221. The identier of the quantities are 1, 2, 3, so in the MpCCI SDK input le those quantities must be dened in the code block of code 1. We assume that there is only one mesh involved in the communication of this communicator. The identier of that mesh is 1. /** * Variables for CCI_Def_comm: */ /* int /* int /* int /* int /* Identifier of the communicator: localCommId = 112; Identifier of the remote code: remoteCodeId = 2; Identifier of the communicator of the remote code: remoteCommId = 221; Number of quantities: nQuantityIds = 3; Identifier of the quantities: */ */ */ */ */

96 VIII

MpCCI 3.1.0-1

VIII Programmers Guide int /* int /* int quantityIds[] Number of mesh nLocalMeshIds Identifiers of localMeshIds[] = { 1, 2, 3 }; identifiers: = 1; the meshes: = { 1 };

3.2 MpCCI SDK Functions

*/ /* or = 3 */ */ /* or = { 1, 1, 1} */ */

/* Call of the subroutine: CCI_Def_comm( localCommId, remoteCodeId, remoteCommId, nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds );

Class Position

local, non-blocking before CCIclosesetup

MpCCI 3.1.0-1

VIII

97

3 MpCCI SDK Code Coupling Library


CCIdefsync

VIII Programmers Guide

syncPointId nQuantitiesToSend quantitiesToSend nMeshIdsToSend meshIdsToSend nQuantitiesToRecv quantitiesToRecv nMeshIdsToRecv meshIdsToRecv

IN IN IN IN IN IN IN IN IN

identier of the synchronization point number of quantities to be sent array of quantityidentiers, length nQuantitiesToSend length of the array meshIdsToSend , either 1 or nQuantitiesToSend , array of meshidentiers, length nMeshIdsToSend number of quantities to be received array of quantityidentiers, length nQuantitiesToRecv length of the array meshIdsToRecv , either 1 or nQuantitiesToRecv , array of meshidentiers, length nMeshIdsToRecv

int CCI_Def_sync_point( int int int int int

syncPointId, nQuantitiesToSend, const int quantitiesToSend[], nMeshIdsToSend, const int meshIdsToSend[], nQuantitiesToRecv, const int quantitiesToRecv[], nMeshIdsToRecv, const int meshIdsToRecv[] )

subroutine CCI_DEF_SYNC_POINT( syncPointId, nQuantitiesToSend, quantitiesToSend, nMeshIdsToSend, meshIdsToSend, nQuantitiesToRecv, quantitiesToRecv, nMeshIdsToRecv, meshIdsToRecv, ierror ) integer syncPointId, nQuantitiesToSend, quantitiesToSend( nQuantitiesToSend ), nMeshIdsToSend, meshIdsToSend( nMeshIdsToSend ), nQuantitiesToRecv, quantitiesToRecv( nQuantitiesToRecv ), nMeshIdsToRecv, meshIdsToRecv( nMeshIdsToRecv ), ierror

A synchronization point initiates a number of send and receive operations. As it is obvious from the parameter list above the receivers of the send operation and the senders of the receive operations are not to be specied. All synchronization points which are going to be used in the code must be dened in the initialization phase. To start the action see CCIreachsync, to get the synchronization point information specied via the input le see CCIsyncinfo ( the coupling block of the input le is concerned with synchronization points). Due to the matching criterion from the input le or if no matching criterion was given in the input le due to the numbering of the synchronization points of the dierent codes MpCCI automatically determines the sending and receiving codes for the quantities. If there is no sender resp.

98 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

receiver found there will be no error message, so the user has to care about that. But if there is more than one sender found an error message will be given. Every code which takes part in a synchronization point communication has to call CCIdefsync. The identier of the synchronization point ( i.e. syncPointId ) may be dierent in dierent codes, the matching of the synchronization points of the codes must then be specied in the coupling block of the input le, otherwise synchronization points with the same identier match each other. The identiers of the quantities the code is going to send ( receive ) at the synchronization point are stored in quantitiesToSend ( quantitiesToRecv ) of length nQuantitiesToSend ( nQuantitiesToRecv ). The corresponding mesh identiers are stored in the arrays meshIdsToSend ( meshIdsToRecv ) of length nMeshIdsToSend ( nMeshIdsToRecv ). The value of nMeshIdsToSend ( nMeshIdsToRecv ) must be equal to nQuantitiesToSend ( nQuantitiesToRecv ) or 1, if the same mesh is valid for all quantities to be sent ( received ). The values nQuantitiesToSend and nQuantitiesToRecv must be nonnegative and may not exceed CCImaxnquant. The value 0 is allowed here and implies that there are no send or no receive operations for the code at the current synchronization point. Example: A synchronization point will be dened without using the MpCCI input le. The quantities 2 and 3 on mesh 1 are to be sent and the quantity 1 is to be received on mesh 1. ( An example for dening a synchronization point with the help of the input le can be found in in 3.3 MpCCI Input File . )

/** * Variables for CCI_Def_sync_point: */ /* int /* int /* int /* int /* int /* int /* int /* int /* int Identifier of the synchronization point syncPointId = 1; Number of quantities to be sent: nQuantitiesToSend = 2; Identifier of the quantities to be sent: quantitiesToSend[] = { 2, 3 }; Number of the mesh identifiers: nMeshIdsToSend = 1; Identifiers of the meshes: meshIdsToSend[] = { 1 }; Number of quantities to be received: nQuantitiesToRecv = 1; Identifier of the quantities to be received: quantitiesToRecv[] = { 1 }; Number of the mesh identifiers: nMeshIdsToRecv = 1; Identifiers of the meshes: meshIdsToRecv[] = { 1 }; */ */ */ */ */ */ */ */ */

MpCCI 3.1.0-1

VIII

99

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

/* Call of the subroutine: CCI_Def_sync_point( syncPointId, nQuantitiesToSend, quantitiesToSend, nMeshIdsToSend, meshIdsToSend, nQuantitiesToRecv, quantitiesToRecv, nMeshIdsToRecv, meshIdsToRecv );

*/

Class Position

local, non-blocking before CCIclosesetup

100 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIdefsearchtags

3.2 MpCCI SDK Functions

meshId partId nSearchTags searchTags

IN IN IN IN

identier of a mesh identier of a partition number of search tags (length of searchTags ) array of search tags

int CCI_Def_search_tags( int meshId, int partId, int nSearchTags, const int searchTags[] ) subroutine CCI_DEF_SEARCH_TAGS( meshId, partId, nSearchTags, searchTags, ierror ) integer meshId, partId, nSearchTags, searchTags(nSearchTags), ierror

For the coupled computation the neighborhood of a local and remote grids must be determined. If the subroutine CCIdefsearchtags is not used MpCCI determines the neighborhood between all grids and partitions which take part in the coupled computation. CCIdefsearchtags allows the user to decide between which partitions the neighborhood must be computed. The tags stored in searchTags are global identiers. If CCIdefsearchtags is called in the initialization phase MpCCI only determines the neighborhood between such partitions which have a search tag ( an element of searchTags ) in common. If CCIdefsearchtags is not called by a code MpCCI will interpret that all possible search tags are set. Class Position local, non-blocking before CCIclosesetup

MpCCI 3.1.0-1

VIII

101

3 MpCCI SDK Code Coupling Library


CCIdefctf

VIII Programmers Guide

meshId globalDim type equalsZero origin unitVectors

IN IN IN IN IN IN

grid identier within each code global dimension type of the original coordinate system Values smaller than this parameter are treated as zero coordinates of the old origin in the new coordinate system, length globalDim unit vectors of the new coordinate system length globalDim*globalDim

int CCI_Def_coord_transform( const int meshId, const int globalDim, const int type, const float equalsZero, const void* origin, const void* unitVectors )

In coupled computation the dierent codes may dene meshes with dierent underlying coordinate systems. They can dier in the location of the origin, in the unit vectors and even in the types of the coordinates such as Cartesian, spherical or cylindrical coordinates. The coordinate transformation module supports dierent kinds of coordinate systems in the two- and three-dimensional space. The computations carried out by MpCCI are based on Cartesian coordinate systems so that spherical and cylindrical coordinates are always transformed to Cartesian coordinates internally. Doubly dened nodes may occur after the transformation from e. g. a cylindrical coordinate system to a Cartesian coordinate system. These nodes are mapped on one node by MpCCI and the element denitions are adjusted: Quadrilaterals e. g. may be deformed to triangles in the Cartesian coordinate system. MpCCI supports Cartesian, cylindrical and spherical coordinate systems whereas cylindrical coordinates must not be used in the two-dimensional case ( see Table 3 ). Currently there is only a C-interface implemented for coordinate transformations. Type Cartesian coordinate system cylindrical coordinate system spherical coordinate system two-dimensional space three-dimensional space Name yes yes CCIcoordcart no yes CCIcoordcyl yes yes CCIcoordsph

Table 3: Types of coordinate systems. The mesh meshId is prepared for a coordinate transformation. The parameter globalDim must equal 2 for the two-dimensional space and must equal 3 for the three-dimensional space. The parameter type determines the type of the original coordinate system:

102 VIII

MpCCI 3.1.0-1

VIII Programmers Guide CCIcoordcart Abbreviation for Cartesian coordinate systems.

3.2 MpCCI SDK Functions

CCIcoordcyl Abbreviation for cylindrical coordinate systems. A point is determined by (r, , z) where the radius r is a non-negative real number, the height z is a real number, and the angle varies between 0 and 2. The coordinates are transformed to Cartesian coordinates (x, y, z) according to x = r cos y = r sin z = z in the three-dimensional space. Cylindrical coordinates are not dened for the two-dimensional space. Afterwards origin and unitVectors are transformed according to the parameters as described below. CCIcoordsph Abbreviation for spherical coordinate systems. A point is determined by (r, , ) where the radius r is a non-negative real number, the angle varies between 0 and 2 and the angle varies between 0 and . The coordinates are transformed to Cartesian coordinates (x, y, z) according to x = r cos sin y = r sin sin z = r cos in the three-dimensional space and according to x = r cos y = r sin

in the two-dimensional space. Afterwards origin and unitVectors are transformed according to the parameters as described below. The coordinates of the origin of the original Cartesian coordinate system in the new coordinates are given by origin . The array unitVectors consists of two two-dimensional vectors w1 , w2 if globalDim equals 2 or of three three-dimensional vectors v1 , v2 , v3 in the three-dimensional case. In the two-dimensional space the unit vectors (1, 0), and (0, 1) of the original Cartesian coordinate systems are mapped on w1 , w2 . In the three-dimensional space the unit vectors (1, 0, 0), (0, 1, 0), and (0, 0, 1) of the original Cartesian coordinate systems are mapped on v1 , v2 , v3 . The parameter equalsZero is used to determine whether two points have the same coordinates after the coordinate transformation. If a coordinate transformation is dened for a mesh, then the elements of a partition of that mesh must be dened by only one call of the subroutine CCIdefelems. This is necessary because the type of some elements may change during the transformation.

MpCCI 3.1.0-1

VIII

103

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

The vector-valued quantities are transformed to the new coordinate system and re-transformed to the original coordinate system automatically during the communication. The subroutine CCIdefctf is only one of two methods to dene a coordinate transformation. additional block of the MpCCI input le can also be used. The

4 w1 1 3 2 0 1 1 origin w2

Figure 21: Coordinate transformation The following example denes a partition with a Cartesian coordinate system: int int int float double double 1; 3; CCI_COORD_CART; 1.0e-6; { 1.0, 1.0, 1.0 }; { 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 2.0, 0.0 }; CCI_Def_coord_transform( meshId, globalDim, type, equalsZero, origin, unitVectors ); meshId globalDim type equalsZero origin[] unitVectors[] = = = = = =

Class Position

local, non-blocking before node denition on the partitions

104 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIclosesetup

3.2 MpCCI SDK Functions

cciProcess

IN

ag for MpCCI SDK process

int CCI_Close_setup( int cciProcess )

subroutine CCI_CLOSE_SETUP( cciProcess, ierror ) integer cciProcess, ierror

Subroutine CCIclosesetup terminates the coupling and denition phase. MpCCI SDK processes must call this subroutine with cciProcess = 0, other processes with cciProcess = 0. The exact value of cciProcess = 0 is not important. CCIclosesetup must be called collectively by all processes of all codes, this means, by all processes that called CCIinit. Class Position non-local, blocking, collective following the last denition CCIdefpart, CCIdefnodes, CCIdefcomm, CCIdefsync routine, e. g. CCIdefelems,

MpCCI 3.1.0-1

VIII

105

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

3.2.4 Coupling Communication


CCIputnodes

meshId partId quantityId quantityDim nNodes nNodeIds nodeIds valuesDataType values

IN IN IN IN IN IN IN IN IN

grid identier within each code partition identier of each grid identier specied in the input le dimension of quantity number of nodes switch node numbering, dimension of array nodeIds node identier identier of input data returned data values

int CCI_Put_nodes( int meshId, int partId, int quantityId, int quantityDim, int nNodes, int nNodeIds, const int nodeIds[], int valuesDataType, const void* values )

subroutine CCI_PUT_NODES( meshId, partId, quantityId, quantityDim, nNodes, nNodeIds, nodeIds, valuesDataType, values, ierror ) integer meshId, partId, quantityId, quantityDim, nNodes, nNodeIds, nodeIds(nNodeIds), valuesDataType, ierror

<real type> values(quantityDim*nNodes)

Subroutine CCIputnodes, a strictly local operation, is used for specifying coupling values at the nodes to MpCCI. The data items in array values are ordered according to the node identier specied in array nodeIds . The specied coupling values are later sent to the remote code by using CCIsend or CCIisend (see 3.2.4 CCIsend on page 112 and 3.2.4 CCIisend on page 114). According to the type of values the parameter valuesDataType must be chosen: for the value of variable valuesDataType please refer to Table 1 and Table 2. The quantity with the identier quantityId must be dened in the relevant code block of the MpCCI input le with the location specication loc = nodes . ( If loc = elem was chosen CCIputelems must be applied. ) The dimension quantityDim of the quantity also depends on the specication of the code

106 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

block of the input le. If scalar was chosen the value of quantityDim must be 1, if vector was chosen the value of quantityDim must equal the dimension of the vector. The number of nodes nNodes is at most the total number of the nodes of the partition partId specied via CCIdefnodes. It is possible to call CCIputnodes for a subset of the nodes of a partition. The value of nNodeIds and nodeIds may be chosen for grid based quantities according to the enumeration in the description of CCIdefnodes. Example: In the description of CCIdefnodes an example is given which will be extended now. There a mesh is dened with nine nodes numbered from 1 to 9. The mesh with identier meshId consists of one partition partId .

/** * Variables for CCI_Put_nodes: */ /* Quantity identifier: This quantity must be specified /* in the input file. int quantityId = 1; /* Dimension of the quantity: We assume that quantity 1 /* is of scalar type. int quantityDim = 1; /* Number of nodes to which the subroutine will be applied: int nNodes = 9; /* The following choice selects all nodes of the partition. int nNodeIds = 0; int* nodeIds = 0; /* Data type for the values: int valuesDataType = CCI_FLOAT; /* Values at the nodes: float values[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; /* Call of the subroutine: CCI_Put_nodes( meshId, partId, quantityId, quantityDim, nNodes, nNodeIds, nodeIds, valuesDataType, values ); */ */ */ */ */ */

*/ */

MpCCI 3.1.0-1

VIII

107

3 MpCCI SDK Code Coupling Library Class Position

VIII Programmers Guide

local, non-blocking following the denition phase, after CCIclosesetup and before a corresponding CCIsend of CCIisend

108 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIputelems

3.2 MpCCI SDK Functions

meshId partId quantityId quantityDim nElems nElemIds elemIds nDataPointsPerElem dataPointsPerElem valuesDataType values

IN IN IN IN IN IN IN IN IN IN IN

grid identier within each code partition identier of each grid quantity identier specied in the input le dimension of quantity number of elements switch for element numbering, dimension of array elemIds element identier length of array dataPointsPerElem number of data belonging to one element identier of input data coupling values

int CCI_Put_elems( int int int int

meshId, int partId, int quantityId, int quantityDim nElems, int nElemIds, const int elemIds[], nDataPointsPerElem, const int dataPointsPerElem[], valuesDataType, const void* values )

subroutine CCI_PUT_ELEMS( meshId, partId, quantityId, quantityDim, nElems, nElemIds, elemIds, nDataPointsPerElem, dataPointsPerElem, valuesDataType, values, ierror ) integer meshId, partId, quantityId, quantityDim, nElems, nElemIds, elemIds(nElemIds), nDataPointsPerElem, dataPointsPerElem(nDataPointsPerElem), valuesDataType, ierror values(quantityDim*nPoints)

<real type>

Subroutine CCIputelems, which is a strictly local operation, is used for specifying coupling values at the data locations of an element to MpCCI which can be communicated by CCIsend or CCIisend. The quantity with the identier quantityId must be dened in the relevant code block of the MpCCI input le with the location specication loc = elem . ( If loc = node was chosen CCIputnodes must be applied. ) The quantityDim also depends on the specication of the code block of the input le. If scalar was chosen the value of quantityDim must be 1, if vector was chosen the value of quantityDim must equal the dimension of the vector. The number of elements nElems is at most the total number of elements specied to MpCCI for the coupling partition in dierent calls of CCIdefelems for this partition. It is possible to call CCIputelems

MpCCI 3.1.0-1

VIII

109

3 MpCCI SDK Code Coupling Library for a subset of the elements of a partition.

VIII Programmers Guide

The value of nElemIds and elemIds may be chosen according to the three possibilities of the enumeration listed in the description of CCIdefnodes. In the current version nDataPointsPerElem must be 1 and the ( only ) entry of dataPointsPerElem must be 1, too. This is due to the interpolations which are currently implemented in MpCCI. For further information about CCIputelems see also the description of the subroutine CCIputnodes. CCIputelems species the coupling values at the element centers to MpCCI in the same way as CCIputnodes species the coupling values at the nodes to MpCCI. Example: We now continue with the example which was started in the description of CCIdefnodes and CCIdefelems . It should be recalled that ve elements were dened for partition partId on mesh meshId .

/** * Variables for CCI_Put_elems: */ /* Quantity identifier: This quantity must be specified /* in the input file. int quantityId = 7; /* Dimension of the quantity: In the input file quantity 7 /* was defined vector. int quantityDim = 3; /* Number of elements which are involved in the call of /* the subroutine: Must be smaller or equal the number /* of the elements of the partition which is 5. int nElems = 5; /* Ids of the elements involved. The following choice /* selects all elements of this example. int nElemIds = 0; int* elemIds = 0; /* Number of data points per element: There is no other /* choice than to use the following. int nDataPointPerElem = 1; int dataPointPerElem[] = { 1 }; /* Data type of the values: int valuesDataType = CCI_FLOAT; /* Values which are associated with the data points: float values[] = { 1, 1, 1, /* vector 2, 2, 2, /* vector 3, 3, 3, /* vector 4, 4, 4, /* vector */ */ */ */ */ */ */ */ */

*/ */

*/ */ 1 */ 2 */ 3 */ 4 */

110 VIII

MpCCI 3.1.0-1

VIII Programmers Guide 5, 5, 5 }; /* Call of the subroutine: CCI_Put_elems( meshId, partId, quantityId, quantityDim, nElems, nElemIds, elemIds, nDataPointsPerElem, dataPointsPerElem, valuesDataType, values ); /*

3.2 MpCCI SDK Functions vector 5 */ */

Class Position

local, non-blocking as for CCIputnodes

MpCCI 3.1.0-1

VIII

111

3 MpCCI SDK Code Coupling Library


CCIsend

VIII Programmers Guide

nQuantityIds quantityIds nLocalMeshIds localMeshIds comm

IN IN IN IN IN

length of array quantityIds ids as dened in the input le length of array localMeshIds id of local meshes MpCCI communicator

int CCI_Send( int nQuantityIds, const int quantityIds[], int nLocalMeshIds, const int localMeshIds[], int comm )

subroutine CCI_SEND( nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, comm, ierror ) integer nQuantityIds, quantityIds(nQuantityIds), nLocalMeshIds, localMeshIds(nLocalMeshIds), comm, ierror

CCIsend is a blocking two-side collective operation over the MpCCI processes of the local and remote code (see also 3.2.4 CCIisend on page 114). This subroutine sends the computed coupling values (specied using CCIputnodes and CCIputelems) to a remote code with coupling partitions through which coupling occurs with the calling code. All MpCCI processes of the calling code must call this routine, even if they have no coupling partitions through which coupling occurs with the other code. This enables MpCCI to do the computations required for keeping the neighborhood information up to date in parallel using all MpCCI processes of a code. Example: In the description of CCIdefnodes a communicator with the identier 112 was dened. Here it is used to send some quantities. /** * Variables for CCI_Send: */ /* int /* int Number of quantities: nQuantityIds = 3; Identifier of the quantities: quantityIds[] = { 1, 2, 3 }; */ */

112 VIII

MpCCI 3.1.0-1

VIII Programmers Guide /* int /* int /* int Number of mesh identifier: Here the same mesh for all. */ nLocalMeshIds = 1; Identifier of the mesh: */ localMeshIds[] = { 1 }; Identifier of the communicator: */ comm = 112; */

3.2 MpCCI SDK Functions

/* Call of the subroutine: CCI_Send( nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, comm ); Code 1

Code 2

meshId = 1

QuantityId = 1 QuantityId = 2 QuantityId = 3

QuantityId = 7 QuantityId = 8 QuantityId = 9

meshId = 1 meshId = 2 Figure 22: Data transfer between meshes of dierent codes Class Position non-local, blocking, collective following the CCIput routines

MpCCI 3.1.0-1

VIII

113

3 MpCCI SDK Code Coupling Library


CCIisend

VIII Programmers Guide

nQuantityIds quantityIds nLocalMeshIds localMeshIds comm request

IN IN IN IN IN OUT

length of array quantityIds ids as dened in the input le length of array localMeshIds id of local meshes MpCCI communicator request handle

int CCI_Isend( int nQuantityIds, const int quantityIds[], int nLocalMeshIds, const int localMeshIds[], int comm, CCI_Request* request )

subroutine CCI_ISEND( nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, comm, request, ierror ) integer nQuantityIds, quantityIds(nQuantityIds), nLocalMeshIds, localMeshIds(nLocalMeshIds), comm, request, ierror

CCIisend is a non-blocking one-side collective operation over the MpCCI processes of the local code (see also 3.2.4 CCIsend on page 112). Its completion is independent of other processes. After this call, new calls to other MpCCI subroutines may be issued. The subroutine returns a handle to a MpCCI request object, which must be explicitly tested for completion by a code using CCIwait (see page 3.2.4 CCIwait on page 118). If a code does not explicitly test for requests to nish, then in the course of computation many such request objects will be created, and the system can run out of resources. Class Position local, non-blocking, collective behind a set of CCIput routines

114 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIiprobe

3.2 MpCCI SDK Functions

nQuantityIds quantityIds nLocalMeshIds localMeshIds comm flag status

IN IN IN IN IN OUT OUT

length of array quantityIds ids as dened in the input le length of array localMeshIds id of local meshes MpCCI communicator Boolean status object

int CCI_Iprobe( int nQuantityIds, const int quantityIds[], int nLocalMeshIds, const int localMeshIds[], int comm, int* flag, CCI_Status* status )

subroutine CCI_IPROBE( nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, comm, flag, status, ierror ) integer nQuantityIds, quantityIds(nQuantityIds), nLocalMeshIds, localMeshIds(nLocalMeshIds), comm, status(CCI_STATUS_SIZE), ierror flag

logical

This subroutine tests whether there is a message matching the rst ve parameters ( see also CCIrecv ) which can be received. The value of flag will be one ( i.e. true ) if all of the processes of communicator comm can receive that message, otherwise flag will be zero ( i.e. false ). In the rst case the status parameter status contains the information of the message as it is described in the description of CCIrecv. Class Position non-local, non-blocking, collective before a call of CCIrecv

MpCCI 3.1.0-1

VIII

115

3 MpCCI SDK Code Coupling Library


CCIrecv

VIII Programmers Guide

nQuantityIds quantityIds nLocalMeshIds localMeshIds comm status

IN IN IN IN IN OUT

length of array quantityIds ids as dened in the input le length of array localMeshIds id of local meshes MpCCI communicator status object

int CCI_Recv( int nQuantityIds, const int quantityIds[], int nLocalMeshIds, const int localMeshIds[], int comm, CCI_Status* status )

subroutine CCI_RECV( nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, comm, status, ierror ) integer nQuantityIds, quantityIds(nQuantityIds), nLocalMeshIds, localMeshIds(nLocalMeshIds), comm, status(CCI_STATUS_SIZE), ierror

CCIrecv is a blocking two-side collective operation over the MpCCI processes of the local code. This subroutine is used for receiving coupling values from a remote code with coupling partitions through which coupling occurs with the calling code (to be obtained using CCIgetnodes and CCIgetelems). All MpCCI processes of the calling code must call this routine, even if they have no partitions through which coupling occurs with the other code. If nQuantityIds is set to a value greater than 0, the next message containing at least the given quantities is received. In case nQuantityIds equals zero, quantities are received in the same order as they have been sent. The status variable contains the identier of received quantities. In C, status is a structure of type CCIstatus that contains elds constants nQuantities , quantityIds and localMeshIds . Thus status. nQuantities contains the number of quantities, status. quantityIds the ids of the received quantities and status. localMeshIds the identier for the local mesh on which the received quantities have to be placed. In FORTRAN, status is an array of length CCIstatussize, which is set to 1 + 2 CCImaxnquant.2 Analogous to the C programming syntax status (CCInquantities) contains the number of quantities, status
2 With

CCImaxnquant the maximum number of quantities is specied that can be transferred with MpCCI. In the current implementation this value is set to 30.

116 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

(CCIquantityids) the identier of the received quantities and status (CCIlocalmeshid) the identication for the local mesh on which the received quantities have to be placed. Example: The example in the description of CCIsend is extended here. Code 1 has sent three quantities 1, 2, 3. We assume that the matching quantities of code 2 are 7, 8, 9 resp.. This must have been specied in the quantities block of the MpCCI input le. In the example of CCIdefcomm the communicator 112 of code 1 matches with the communicator 221 of the remote code 2. We assume that code 2 is prepared to receive the quantities 7, 8, 9 via the communicator 221. So the following is a part of code 2. /** * Variables for CCI_Recv: */ /* Number of quantities: int nQuantityIds = 3; /* or /* Identifiers of the quantities: int quantityIds[] = { 7, 8, 9 }; /* Number of mesh identifiers: Here different meshes. int nLocalMeshIds = 3; /* Identifiers of the meshes: int localMeshIds[] = { 1, 1, 2 }; /* Identifier of the communicator: int comm = 221; /* Status object: CCI_Status status; /* Call of the subroutine: CCI_Recv( nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, comm, &status ); */ = 0 */ */ */ */ */ */

Class Position

non-local, blocking, collective before CCIgetnodes and/or CCIgetelems

MpCCI 3.1.0-1

VIII

117

3 MpCCI SDK Code Coupling Library


CCIwait

VIII Programmers Guide

request status

INOUT OUT

request handle status object

int CCI_Wait( CCI_Request* request, CCI_Status* status )

subroutine CCI_WAIT( request, status, ierror ) integer request, status(CCI_STATUS_SIZE), ierror

The function CCIwait is a one-side collective operation over the MpCCI processes of the local code. It blocks all processes until all MPI requests associated with the non-blocking MpCCI operation have nished. It is used to complete non-blocking MpCCI sends (see 3.2.4 CCIisend on page 114) . Completion of a non-blocking MpCCI send indicates that all non-blocking MPI sends associated with this call have terminated. On completion of a non-blocking MpCCI send, MpCCI performs some nal tasks like unpacking and storing received messages, (possibly) interpolation, and deletion of buers allocated internally. If CCIwait is never called for requests, then the system can run out of resources during coupled computation. CCIwait deletes the request object pointed to by request and sets the request handle to the value CCIrequestnull. Information on the completed operation is returned in status . CCIwait with request = CCIrequestnull is a no-operation. Class Position non-local, blocking after a corresponding CCIisend

118 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIreachsync

3.2 MpCCI SDK Functions

syncPointId status

IN OUT

identier of a synchronization point status object

int CCI_Reach_sync_point ( int syncPointId, CCI_Status* status ) subroutine CCI_REACH_SYNC_POINT( syncPointId, status, ierror ) integer syncPointId, status( CCI_STATUS_SIZE ), ierror

CCIreachsync performs the communication between those codes which are specied in the match syncpt statement of the coupling block of the input le or if this statement was not used between those codes which have dened a synchronization point with the identier syncPointId . It must therefore be called by all of the concerned codes. The send and receive operations are determined by the synchronization point denition (see CCIdefsync ) of the codes. The communication at the synchronization point with the identier syncPointId is carried out. The identier syncPointId is a code local identier if the match syncpt statement was used, otherwise the identier is global. For the interpretation of the parameter status see CCIrecv. Class Position nonlocal, blocking, collective between a couple of CCIput and CCIget routines

MpCCI 3.1.0-1

VIII

119

3 MpCCI SDK Code Coupling Library


CCIgetnodes

VIII Programmers Guide

meshId partId quantityId quantityDim nNodes nNodeIds nodeIds valuesDataType values maxnEmptyNodes emptyNodes nEmptyNodes

IN IN IN IN IN IN IN IN OUT IN OUT OUT

grid identier within each code partition identier of each grid identier specied in the input le dimension of quantity number of nodes switch for node numbering, dimension of array nodeIds node identier identier of input data returned data values maximum number of nodes with(out) data returned nodes containing (no) data length of array emptyNodes

int CCI_Get_nodes( int meshId, int partId, int quantityId, int quantityDim, int nNodes, int nNodeIds, const int nodeIds[], int valuesDataType, void* values, int maxnEmptyNodes, int emptyNodes[], int* nEmptyNodes )

subroutine CCI_GET_NODES( meshId, partId, quantityId, quantityDim, nNodes, nNodeIds, nodeIds, valuesDataType, values, maxnEmptyNodes, emptyNodes, nEmptyNodes, ierror ) integer meshId, partId, quantityId, quantityDim, nNodes, nNodeIds, nodeIds(nNodeIds), valuesDataType, maxnEmptyNodes, emptyNodes(maxnEmptyNodes), nEmptyNodes, ierror values(quantityDim*nNodes)

<real type>

This subroutine CCIgetnodes, a strictly local operation, is used for obtaining coupling values received from the code by the previous CCIrecv. According to the type of values the parameter valuesDataType must be chosen: for the value of variable valuesDataType please refer to Table 1 and Table 2. nNodes is the number of nodes specied for this coupling partition in the call of subroutine CCIdefnodes. The array emptyNodes indicates the nodes where no new values were obtained or where new values were obtained depending on the sign of maxnEmptyNodes . If maxnEmptyNodes is positive the MpCCI internal

120 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

identiers of the empty nodes are returned and if maxnEmptyNodes is negative the internal identiers of the non-orphaned nodes are determined. The user is advised to check whether the returned value nEmptyNodes exceeds absolute value of the user dened value of maxnEmptyNodes . In cases where nEmptyNodes | maxnEmptyNodes | some information is lost about the location of data gaps. If a coordinate transformation is dened the user dened node identiers are returned instead of the MpCCI internal identiers. The orphaned and non-orphaned nodes cannot be retrieved if overlap = partial is specied in the contact block of the MpCCI input le unless warn orphaned points = on is specied in the contact block or the additional block contains a non orphaned objects statement for the mesh meshId . Example: In the example at the end of the description of CCIrecv among other quantity 7 was received by code 2. Now we apply CCIgetnodes to obtain the values for quantity 7 on partition 1 of mesh 1. We assume that the number of nodes of that partition is 6 and that all nodes should obtain a value. We assume that in the quantities block for code 2 of the MpCCI input le the location loc = node was chosen. Otherwise CCIgetelems must be applied. Quantity 7 of code 2 matches with quantity 1 of code 1, which was a scalar quantity. This implies that the dimension of quantity 7 of code 2 has dimension 1. /** * Variables for CCI_Get_nodes: */ /* Identifier of the mesh: */ int meshId = 1; /* Identifier of the partition: */ int partId = 1; /* Identifier of the quantity: */ int quantityId = 7; /* Dimension of the quantity: */ int quantityDim = 1; /* Number of nodes: */ const int nNodes = 6; /* Node numbering: All nodes of the partition are chosen. */ int nNodeIds = 0; int* nodeIds = 0; /* Data type of the values: */ int valuesDataType = CCI_FLOAT; /* Data values: */ float values[nNodes]; /* Maximum number of nodes with(out) data: */ int maxnEmptyNodes = 0; /* Identifiers of nodes with(out) data: */ int* emptyNodes = 0; /* Number of nodes with(out) data: */ int nEmptyNodes;

MpCCI 3.1.0-1

VIII

121

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

/* Call of the subroutine: CCI_Get_nodes( meshId, partId, quantityId, quantityDim, nNodes, nNodeIds, nodeIds, valuesDataType, values, maxnEmptyNodes, emptyNodes, &nEmptyNodes );

Class Position

local, non-blocking behind CCIrecv

CCIgetelems

meshId partId quantityId quantityDim nElems nElemIds elemIds nDataPointsPerElem dataPointsPerElem valuesDataType values maxnEmptyElems emptyElems nEmptyElems

IN IN IN IN IN IN IN IN IN IN OUT IN OUT OUT

grid identier within each code partition identier of each grid identier specied in the input le dimension of quantity number of elements switch for element numbering, dimension of array elemIds element identier number of elements specied for the given coupling partition number of data belonging to one element identier of input data coupling values maximum number of elements without data returned elements containing no data length of array emptyElems

int CCI_Get_elems( int meshId, int partId, int quantityId, int quantityDim, int nElems, int nElemIds,

122 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions const int elemIds[], int nDataPointsPerElem, const int dataPointsPerElem[], int valuesDataType, void* values, int maxnEmptyElems, int emptyElems[], int* nEmptyElems )

subroutine CCI_GET_ELEMS( meshId, partId, quantityId, quantityDim, nElems, nElemIds, elemIds, nDataPointsPerElem, dataPointsPerElem, valuesDataType, values, maxnEmptyElems, emptyElems, nEmptyElems, ierror ) integer meshId, partId, quantityId, quantityDim, nElems, nElemIds, elemIds(nElemIds), nDataPointsPerElem, dataPointsPerElem(nDataPointsPerElem), valuesDataType values(quantityDim*nPoints) maxnEmptyElems, nEmptyElems, emptyElems(maxnEmptyElems), ierror

<real type> integer

Subroutine CCIgetelems is a strictly local operation. It retrieves coupling values from element centers received from the code by the previous CCIrecv. The number of elements nElems is the total number of elements specied for this coupling partition in consecutive calls of CCIdefelems. nEmptyElems tells the number of elements that did not receive a value and the array emptyElems describes these elements. In the current version nDataPointsPerElem must be 1 and the ( only ) entry of dataPointsPerElem must be 1, too. See CCIputelems ( 3.2.4 CCIputelems on page 109 ). For further information about CCIgetelems see also the description of the subroutine CCIgetnodes ( 3.2.4 CCIgetnodes on page 120). CCIgetelems is used for retrieving the coupling values at the element centers in the same way as CCIgetnodes is used for retrieving the coupling values at the nodes. Example: For all 3 elements of the partition 1 of mesh 1 values for quantity 11 will be obtained. We assume that quantity 11 is a scalar quantity. /** * Variables for CCI_Get_elems: */ /* Identifier of the mesh: int meshId = 1; /* Identifier of the partition: */ */

MpCCI 3.1.0-1

VIII

123

3 MpCCI SDK Code Coupling Library int partId = 1; /* Identifier of the quantity: int quantityId = 11; /* Dimension of the quantity: int quantityDim = 1; /* Number of elements: Here all 3 elements are chosen. const int nElems = 3; /* Node numbering: Here all elements are chosen. int nElemIds = 0; int* elemIds = 0; /* There is no choice for the following settings: int nDataPointsPerElems = 1; int dataPointsPerElems[] = { 1 }; /* Data type of the values: int valuesDataType = CCI_FLOAT; /* Data values: float values[nElems]; /* Currently the following variables have no relevance: /* Maximum number of elements without data: int maxnEmptyElems = 0; /* Identifiers of elements without data: int* emptyElems = 0; /* Number of elements without data: int nEmptyElems; /* Call of the subroutine: CCI_Get_elems( meshId, partId, quantityId, quantityDim, nElems, nElemIds, elemIds, nDataPointsPerElems, dataPointsPerElems, valuesDataType, values, maxnEmptyElems, emptyElems, &nEmptyElems );

VIII Programmers Guide

*/ */ */ */

*/

*/ */ */ */ */ */

*/

124 VIII

MpCCI 3.1.0-1

VIII Programmers Guide Class Position local, non-blocking following a CCIrecv

3.2 MpCCI SDK Functions

MpCCI 3.1.0-1

VIII

125

3 MpCCI SDK Code Coupling Library


CCIcheckconv

VIII Programmers Guide

myConvergence globalConvergence comm

IN OUT IN

code of local convergence state global convergence state MpCCI communicator

int CCI_Check_convergence( int myConvergence, int *globalConvergence, int comm )

subroutine CCI_CHECK_CONVERGENCE( myConvergence, globalConvergence, comm, ierror ) integer myConvergence, globalConvergence, comm, ierror

CCIcheckconv is a blocking two-side collective operation over the MpCCI processes of the given communicator comm . In addition, the constant CCIanycode can be used as the comm argument. In this case, CCIcheckconv must be called by all codes and exchanges the convergence states. Each code species its local convergence state myConvergence by an integer. These integers are exchanged between the codes and the maximum of all integers is returned to each code in globalConvergence . MpCCI denes four constants for the local convergence state with the following meaning: CCIconverged CCIcontinue CCIstop CCIdiverged (=0) (=1) (=2) (=3) I have converged and could stop here, but I can also do a further coupling step. I have not yet converged and would like to do a further coupling step. I have converged and I must stop here. No further coupling step is possible for me! I have diverged and I must stop here. 3.2.5 Remeshing ).

This subroutine has to be called to start the remeshing (see

Another important meaning of this subroutine is the creation of coupling steps when writing a MpCCI tracele. CCIcheckconv introduces a new coupling step in the tracele. With a suitable visualization tool for MpCCI traceles the user can observe the data sent and received in the dierent steps in an animation. Class Position non-local, blocking, collective following the CCIsend or CCIrecv routines to initiate a new coupling step; after the remeshing subroutines to actually start the remeshing

126 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

3.2.5 Remeshing
In the current version MpCCI SDK supports the remeshing in a straight-forward and simple way only. First, changes of the mesh of one code can be dened after a coupling step by subsequent calls of CCIremesh , CCIdefnodes and CCIdefelems or CCImodnodes , and nally CCIcloseremesh . Second, the remote code has to be informed about the changes by calling CCIcheckconv . This will lead to a new setup of the coupling, i.e. a complete neighborhood search from scratch. It is planned to introduce a faster remeshing that takes into account the existing neighborhood information into the next version.

CCIremesh

int CCI_Remesh()

subroutine CCI_REMESH( ierror ) integer ierror

The subroutine CCIremesh introduces a remeshing operation (mesh deformation or mesh redenition). Within this operation the nodes of the meshes can be totally redened with CCIdefnodes and CCIdefelems as in the denition phase. If the nodes have new coordinates only and the elements are unchanged, the nodes can be modied with CCImodnodes. At the end of the remeshing operation, a call of CCIcloseremesh is necessary. It is not allowed to call an other MpCCI subroutine in between. Note that the remeshing is a local operation. In order to inform the remote code about the remeshing the subroutine CCIcheckconv has to be called after the remeshing denition has been nished with CCIcloseremesh. Class Position local, non-blocking before CCIcloseremesh

MpCCI 3.1.0-1

VIII

127

3 MpCCI SDK Code Coupling Library


CCImodnodes

VIII Programmers Guide

meshId partId globalDim nNodes nNodeIds nodeIds realType coords

IN IN IN IN IN IN IN IN

grid identier within each code partition identier of each grid dimension of the global coordinate system number of nodes switch node numbering, dimension of array nodeIds node identier data type of elements of coords address of coordinate array

int CCI_Mod_nodes( int meshId, int partId, int globalDim, int nNodes, int nNodeIds, const int nodeIds[], int realType, const void* coords )

subroutine CCI_MOD_NODES( meshId, partId, globalDim, nNodes, nNodeIds, nodeIds, realType, coords, ierror) integer meshId, partId, globalDim, nNodes, nNodeIds, nodeIds(nNodeIds), realType, ierror coords(globalDim*nNodes)

<real type>

The subroutine CCImodnodes denes the nodes within each partition that are to be modied. For the arguments of the subroutine, please refer to CCIdefnodes. Class Position local, non-blocking between CCIremesh and CCIcloseremesh

128 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIcloseremesh

3.2 MpCCI SDK Functions

nMeshIds meshIds nRemeshingModes remeshingMode

IN IN IN IN

length of array meshIds id of meshes to remesh length of array remeshingModes modes for remeshing

int CCI_Close_remesh( int nMeshIds, const int meshIds[], int nRemeshingModes, const int remeshingMode[])

subroutine CCI_CLOSE_REMESH( nMeshIds, meshIds, nRemeshingModes, remeshingMode, ierror ) integer nMeshIds, meshIds(nMeshIds), nRemeshingModes, remeshingMode(nRemeshingModes), ierror

With the subroutine CCIcloseremesh the remeshing denition is closed. nMeshIds is the length of the array meshIds that holds the numbers of the meshes. The array remeshingMode contains the mode of remeshing for every mesh in meshIds . In the current version, the only remeshing mode is CCItotalremesh. Class Position local, non-blocking after CCIremesh and CCImodnodes (or CCIdefnodes and CCIdefelems), before CCIcheckconv

MpCCI 3.1.0-1

VIII

129

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

3.2.6 Termination
CCIfinalize

int CCI_Finalize()

subroutine CCI_FINALIZE( ierror ) integer ierror

Subroutine CCIfinalize terminates the coupling and has to be called collectively by all those processes of any code that called CCIinit. If MPIinit has been called from within CCIinit (see 3.2.3 CCIinit on page 77) MPIfinalize will also called by CCIfinalize. If MPIinit has been called explicitly before invoking CCIinit, MPIfinalize has to be called accordingly after CCIfinalize. No MpCCI subroutines may be called after this subroutine (even MPIinit ). When the codes have collectively determined that the coupled computation has converged and must be terminated, they must collectively notify MpCCI of this by calling subroutine CCIfinalize. This must be done by all processes of all codes (not only the MpCCI processes). If the coupled computation has been started by simultaneously invoking a control process CCIfinalize sends a message to the control process telling that the coupled computation has nished, and it cleans up the local MpCCI layers. After the control process (when present) has received termination messages from all processes it performs its local cleanup, writes its output les, and calls MPIfinalize . The subroutine CCIfinalize returns control to the code, which can continue its own termination phase, such as writing output les (dierent to CCIinit). The order in which the code-local termination proceeds and when CCIfinalize is called is insignicant. A code can just as well rst write all its output les and then call CCIfinalize. Class Position non-local, blocking nal MpCCI call

130 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

3.2.7 Control
Sometimes the user nds it necessary to have the opportunity to read in parameter values or any other information that might be helpful to gain some control over the coupled computation. Such functionality is provided by the routine CCIparaminfo .

CCIparaminfo

idString valueDataType value flag

IN IN OUT OUT

string to identify input value data type of value return value set in input le return ag

int CCI_Parameter_info( const char* idString, int valueDataType, void* value, int* flag )

subroutine CCI_PARAMETER_INFO( idString, valueDataType, value, flag, ierror ) character*(*) integer <type> logical idString valueDataType, ierror value flag

In the MpCCI input le (see 3.3 MpCCI Input File ) arbitrary code specic values can be specied which can be copied into the address space of the corresponding program with the help of routine CCIparaminfo. Each input value is identied by a character string idString of arbitrary length. Note that spaces are not allowed to dene the identier string. The value associated with idString can be of all data types named in Table 1 and Table 2. valueDataType has to be set according to these types. In case of the type CCIstring the argument value should be dened with the length CCImaxstringlen to ensure that the complete value can be returned. The return ag indicates whether the requested value has been dened in the input le ( flag = 1 ) or not ( flag = 0 ). Class Position local between CCIinit and CCIfinalize

MpCCI 3.1.0-1

VIII

131

3 MpCCI SDK Code Coupling Library


CCIgeneralinfo

VIII Programmers Guide

item IN subItem IN maxnIntParams IN intParams OUT nIntParams OUT maxnRealParams IN realParams OUT nRealParams OUT maxStringParamLengthIN stringParam OUT stringParamLength OUT

identier of the type of information identier of the required sub-item maximum number of elements of intParams array of information of integer type number of elements of intParams maximum number of elements of realParams array of information of real type number of elements of realParams maximum length of stringParam string length of stringParam

int CCI_General_info( int item, int subItem, int maxnIntParams, int intParams[], int* nIntParams, int maxnRealParams, double realParams[], int* nRealParams, int maxStringParamLength, char stringParam[], int* stringParamLength )

subroutine CCI_GENERAL_INFO( item, subItem, maxnIntParams, intParams, nIntParams, maxnRealParams, realParams, nRealParams, stringParam, stringParamLength, ierror ) integer item, subItem, maxnIntParams, intParams( maxnIntParams ), nIntParams, maxnRealParams, nRealParams, stringParamLength, ierror double precision realParams( maxnRealParams ) character*(1024) stringParam

This subroutine extracts the settings of the sub-item subItem of type item from the input le. Currently possible types are information about quantities (CCIquantinfo) and about the matching of the grids (CCImatchinginfo) . For the item CCIquantinfo there is a quantity identier required for subItem . maxnIntParams should be set to CCIquantinfolen . In case of a failure nIntParams is 0. Otherwise, the result is stored in the

132 VIII

MpCCI 3.1.0-1

VIII Programmers Guide arrays intParams and stringParam which have the following entries: - intParams[CCIquantdim] contains the dimension. - intParams[CCIquanttype] contains the type: - CCIquanttypemesh, - CCIquanttypefield, - CCIquanttypeflux or - CCIquanttypeuser . - intParams[CCIquantloc] contains the location: - CCIquantlocnode, - CCIquantlocelem or - CCIquantlocglobal

3.2 MpCCI SDK Functions

- intParams[CCIquantipol] contains the ipol entry of the quantities block of the input le. - stringParam consists of the name of the quantity. nIntParams is set to 4 and stringParamLength contains the length of the name of the quantity. For the item CCImatchinginfo the value of subItem is ignored, because no further choices are possible. The result is stored in intParams which has the length 1 in this case: - intParams[0] contains the matching information about the grids: - CCImatchgrids or - CCInonmatchgrids Class Position local between CCIinit and CCIfinalize

MpCCI 3.1.0-1

VIII

133

3 MpCCI SDK Code Coupling Library


CCIsyncinfo

VIII Programmers Guide

syncPointId maxnQuantToSend quantitiesToSend meshIdsToSend nQuantitiesToSend maxnQuantToRecv quantitiesToRecv meshIdsToRecv nQuantitiesToRecv

IN IN OUT OUT OUT IN OUT OUT OUT

identier of the synchronization point maximum number of quantities to be sent array of quantity identiers, length maxnQuantToSend array of the mesh identiers, length maxnQuantToSend number of relevant entries in the arrays quantitiesToSend and meshIdsToSend maximum number of quantities to be received array of quantity identiers, length maxnQuantToRecv array of the mesh identiers, length maxnQuantToRecv number of relevant entries in the arrays quantitiesToRecv and meshIdsToRecv

int CCI_Sync_point_info( int syncPointId, int maxnQuantToSend, int quantitiesToSend[], int meshIdsToSend[], int* nQuantitiesToSend, int maxnQuantToRecv, int quantitiesToRecv[], int meshIdsToRecv[], int* nQuantitiesToRecv )

subroutine CCI_SYNC_POINT_INFO( syncPointId, maxnQuantToSend, quantitiesToSend, meshIdsToSend, nQuantitiesToSend, maxnQuantToRecv, quantitiesToRecv, meshIdsToRecv, nQuantitiesToRecv, ierror ) integer syncPointId, maxnQuantToSend, quantitiesToSend( maxnQuantToSend ), meshIdsToSend( maxnQuantToSend ), nQuantitiesToSend, maxnQuantToRecv, quantitiesToRecv( maxnQuantToRecv ), meshIdsToRecv( maxnQuantToRecv ), nQuantitiesToRecv, ierror

134 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

CCIsyncinfo gets information from the syncpt statement of the code and coupling blocks of the MpCCI input le for a synchronization point. Only the information for the local code is read. For the synchronization point with the identier syncPointId the communication information is extracted from the input le. The integer values maxnQuantToSend and maxnQuantToRecv specify the maximal number of quantities which may be sent or received. A natural choice for these parameters is CCImaxnquant as this value is not a restriction (see CCIdefsync). The identiers for the quantities which are going to be sent (received) are stored in the array quantitiesToSend ( quantitiesToRecv ). The corresponding mesh identiers are stored in the array meshIdsToSend ( meshIdsToRecv ). The number of the relevant entries of the arrays are given by nQuantitiesToSend ( nQuantitiesToRecv ). To dene the synchronization point CCIsyncinfo must be followed by a call of CCIdefsync with the same identier syncPointId . Class Position local, nonblocking between CCIinit and CCIclosesetup

MpCCI 3.1.0-1

VIII

135

3 MpCCI SDK Code Coupling Library


CCIcomminfo

VIII Programmers Guide

localCommId remoteCodeId remoteCommId maxnQuantToSend quantitiesToSend meshIdsToSend nQuantitiesToSend maxnQuantToRecv quantitiesToRecv meshIdsToRecv nQuantitiesToRecv

IN OUT OUT IN OUT OUT OUT IN OUT OUT OUT

identier of the communicator identier of the remote code identier of the remote communicator maximum number of quantities to be sent array of quantity identiers, length maxnQuantToSend array of the mesh identiers, length maxnQuantToSend number of relevant entries in the arrays quantitiesToSend and meshIdsToSend maximum number of quantities to be received array of quantity identiers, length maxnQuantToRecv array of the mesh identiers, length maxnQuantToRecv number of relevant entries in the arrays quantitiesToRecv and meshIdsToRecv

int CCI_Comm_info( int int int int int

localCommId, int* remoteCodeId, int* remoteCommId, maxnQuantToSend, int quantitiesToSend[], meshIdsToSend[], int* nQuantitiesToSend, maxnQuantToRecv, int quantitiesToRecv[], meshIdsToRecv[], int* nQuantitiesToRecv )

subroutine CCI_COMM_INFO( localCommId, remoteCodeId, remoteCommId, maxnQuantToSend, quantitiesToSend, meshIdsToSend, nQuantitiesToSend, maxnQuantToRecv, quantitiesToRecv, meshIdsToRecv, nQuantitiesToRecv, ierror ) integer localCommId, remoteCodeId, remoteCommId, maxnQuantToSend, quantitiesToSend( maxnQuantToSend ), meshIdsToSend( maxnQuantToSend ), nQuantitiesToSend, maxnQuantToRecv, quantitiesToRecv( maxnQuantToRecv ), meshIdsToRecv( maxnQuantToRecv ), nQuantitiesToRecv, ierror

136 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

CCIcomminfo gets information from the comm statement of the coupling block of the MpCCI input le about a communicator. Only the information for the local code is read. For the communicator with the identier localcommId the communication information is extracted from the input le. The identiers of the remote code and the remote communicator are to be stored in remoteCodeId and remoteCommId . The integer values maxnQuantToSend and maxnQuantToRecv specify the maximum number of quantities which may be sent or received. A natural choice for these parameters is CCImaxnquant as this value is not a restriction (see CCIdefcomm). The identiers for the quantities which are going to be sent (received) are stored in the array quantitiesToSend ( quantitiesToRecv ). The corresponding mesh identiers are stored in the array meshIdsToSend ( meshIdsToRecv ). The number of the relevant entries of the arrays are given by nQuantitiesToSend ( nQuantitiesToRecv ). To dene the communicator CCIcomminfo must be followed by a call of CCIdefcomm with the same identier localCommId . There is only one exception to this. There may be some specications for the standard communicator CCIcommrcode in the input le. In this case no call of CCIdefcomm is necessary to dene the communicator. Class Position local, nonblocking between CCIinit and CCIclosesetup

MpCCI 3.1.0-1

VIII

137

3 MpCCI SDK Code Coupling Library


CCIgetidstring

VIII Programmers Guide

jobId maxCodeIdStringLen codeIdString codeIdStringLen maxJobIdStringLen jobIdString jobIdStringLen

IN IN OUT OUT IN OUT OUT

identier of the job maximal length of codeIdString id string from the code block length of codeIdString maximal length of jobIdString id string from the job block length of jobIdString

int CCI_Get_id_string( int jobId, int maxCodeIdStringLen, char codeIdString[], int* codeIdStringLen, int maxJobIdStringLen, char jobIdString[], int* jobIdStringLen )

subroutine CCI_GET_ID_STRING( jobId, codeIdString, codeIdStringLen, jobIdString, jobIdStringLen, ierror ) character*(*) codeIdString, jobIdString integer jobId, codeIdStringLen, jobIdStringLen, ierror

The subroutine CCIgetidstring extracts the id string from the code block and the job block of the MpCCI input le and stores them in codeIdString and jobIdString resp. In the call of the FORTRAN subroutine the number of parameters is smaller than in the call of the C subroutine: maxCodeIdStringLen and maxJobIdStringLen are missing. Class Position local, nonblocking between CCIinit and CCIfinalize

138 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIgetisp

3.2 MpCCI SDK Functions

meshId IN partId IN remoteJobId IN remoteMeshId IN globalDim IN nElems IN nElemIds IN elemIds IN nRemoteElemsPerLocalElem OUT nTotalElemPairs IN/OUT nIntersPointsPerElemPair OUT nTotalIntersPoints IN/OUT coordsValueType IN intersPointsCoords OUT

grid identier within each code partition identier of each grid identier of a remote job identier of a mesh of the remote job global dimension number of elements length of identier array beneath identier of the elements array of numbers of intersecting remote elements length of array beneath array of numbers of intersection points per element pair length of the coordinates array type of the coordinates array below array of numbers of intersection points per element pair

int CCI_Get_intersection_points( int meshId, int partId, int remoteJobId, int remoteMeshId, int globalDim, int nElems, int nElemIds, const int elemIds[], int nRemoteElemsPerLocalElem[], int* nTotalElemPairs, int nIntersPointsPerElemPair[], int* nTotalIntersPoints, int coordsValueType, void* intersPointsCoords )

The subroutine CCIgetisp retrieves the intersection points computed in the neighborhood search of type EE to determine the size of the overlap regions of the remote elements w.r.t a local element. Please note that this subroutine is dened in "cciext.h" and has a C-Interface only . To use this function two specications in the MpCCI input le are necessary: In the contact block an EE neighborhood search algorithm must be specied for the mesh pair meshId for the local job and remoteMeshId for the remote job with the identier remoteJobId . There must be an inters points statement in the additional block for this mesh pair.

MpCCI 3.1.0-1

VIII

139

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

globalDim is the number of coordinates of a point. The parameters nElems , nElemIds and elemIds have the same meaning as in CCIdefelems. According to the type of intersPointsCoords the parameter coordsValueType must be chosen: for the value of variable coordsValueType please refer to Table 1 and Table 2. The function CCIgetisp must be called twice: The rst call is required to retrieve the length of the arrays nIntersPointsPerElemPair and intersPointsCoords , here the parameters nTotalElemPairs and nTotalIntersPoints must have a negative value when the subroutine is called. Both parameters are IN+OUT parameters. The second call is necessary to ll the data arrays nTotalElemPairs , nIntersPointsPerElemPair and intersPointsCoords . The subroutine must be called with the integer values retrieved in the rst call. nTotalElemPairs and nTotalIntersPoints are IN parameters now. After the second call the coordinates of the intersection points are stored in intersPointsCoords . These intersection points can be grouped into intersection points of element pairs according to the entries of nIntersPointsPerElemPair and nally these element pairs can be associated with the local elements with the help of the information stored in nRemoteElemsPerLocalElem . Notice the following items: The intersection points are computed by projecting elements of the remote mesh onto the local mesh elements in a surface coupling, so the elements are not intersecting in the intersection points but one projected element and a non-projected element. During the neighborhood computation the elements are decomposed into triangles, tetrahedrons or line segments, so all projections, computation of overlap regions etc. are done w.r.t. these three types. The computed intersection points are just approximations to the real intersection points in two ways: the usual numerical approximation and the approximation of an element by decomposing it into triangles, tetrahedrons or line segments ( Figure 24 ). The underlying algorithms are implemented to compute the size of the element overlaps and not to determine the minimal number of points to describe the gure. Caused by this the number of intersection points may be bigger than necessary. It is possible that a point on an edge of the intersection gure is retrieved by this subroutine even if this point is not necessary to describe the gure ( Figure 23 and Figure 24 ). Example: The following very simple meshes are dened: After the rst call of the function with nElems globalDim nElemIds = = = 2 2 0

140 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

DUMMY

Figure 23: Intersection points.

DUMMY

Figure 24: Intersection points. The lilac point is not necessary to describe the intersection gure.

nTotalElemPairs = -1 nTotalIntersPoints = -1

MpCCI 3.1.0-1

VIII

141

3 MpCCI SDK Code Coupling Library (0,1) (1,1) (0,1) (1,1)

VIII Programmers Guide

(0,0) Local Code mesh 1

(1,0)

(0,0)

(1,0) Remote Code mesh 5

Figure 25: Meshes for the example. we retrieve the values nTotalElemPairs = 4 nTotalIntersPoints = 12 Now it is known the total number of element pairs is 4 and the total number of intersection points is 12. The second call of the subroutine will retrieve for example the following array values: nRemoteElemsPerLocalElem = { 2, 2 } Both elements on the local mesh intersect with two elements on the remote mesh. nIntersPointsPerElemPair = { 3, 3, 3, 3 } Each intersection gure is described by three points. intersPointsCoords = { 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.5, 1.0, 0.5, 0.5, 0.5, 0.0, 0.5, 0.5, 0.0, 0.5, 1.0, 1.0, 1.0, 0.5, 1.0, 1.0 }

The coordinate array depends on which element was dened rst and the order of the nodes dening the elements in CCIdefelems. So the result of the coordinate array may be given in another order than above. Class Position local, non-blocking after CCIclosesetup

142 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.2 MpCCI SDK Functions

3.2.8 Miscellaneous functions


There are a few miscellaneous functions that might be helpful in some situations. These functions are counterparts to the corresponding MPI functions. They are listed in a separate section as they do not belong to the MpCCI SDK core functions.

CCIabort

commId errorCode message

IN IN IN

id of the communicator - currently unused number of error code message text

int CCI_Abort( int commId, int errorCode, char message[] )

subroutine CCI_ABORT( commId, errorCode, message, ierror ) character*(*) message integer commId, errorCode, ierror

The subroutine CCIabort prints the string message and stops the process by calling MPI Abort . The argument commId is currently not used. Class Position local, nonblocking between CCIclosesetup and CCIfinalize

MpCCI 3.1.0-1 VIII

143

3 MpCCI SDK Code Coupling Library


CCIwtick

VIII Programmers Guide

double CCI_Wtick()

double precision CCI_WTICK()

The function CCIwtick returns the resolution of CCIwtime in seconds (as MPI Wtick ). Class Position local, nonblocking between CCIclosesetup and CCIfinalize

144 VIII

MpCCI 3.1.0-1

VIII Programmers Guide


CCIwtime

3.2 MpCCI SDK Functions

double CCI_Wtime()

double precision CCI_WTIME()

The function CCIwtime returns a oating-point number of seconds, representing the elapsed wall-clock time since some time in the past. It enables the user to easily measure the time spent in a certain part of the program (as MPI Wtick ). The resolution is given by CCIwtick. An example shows the usage of this function: { double starttime, endtime; starttime = CCI_Wtime(); ... stuff to be timed ... endtime = CCI_Wtime(); printf("stuff took %f seconds\n", endtime - starttime); }

Class Position

local, nonblocking between CCIclosesetup and CCIfinalize

MpCCI 3.1.0-1

VIII

145

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

3.2.9 Overview of the MpCCI SDK functions Initialization and Denition


Enroll in the coupled computation. CCIinitwithidstring Enroll in the coupled computation. CCIdefmesh Dene a name for a mesh. CCIdefpart Dene the partitions of each grid. CCIdefnodes Specify the nodes of a coupling partition. CCIdefelems Specify the elements of a coupling partition. CCIdefcomm Dene communicators for process groups. CCIdefsync Dene synchronization point. CCIdefsearchtags Dene tags for neighborhood search. CCIdefctf Specify a coordinate transformation. CCIclosesetup Terminate the initialization phase. CCIinit CCIputnodes CCIputelems CCIsend CCIisend CCIiprobe CCIrecv CCIwait CCIreachsync CCIgetnodes CCIgetelems CCIcheckconv Put coupling values node wise. Put coupling values at element centers. Send coupling values. Send coupling values (nonblocking). Test of incoming messages. Receive coupling values. Wait for MpCCI SDK request to nish. Reach synchronization point. Get coupling values node wise. Get coupling values from element centers. Check state of convergence. 3.2.3 CCIinit on page 77 3.2.3 CCIinitwithidstring on page 78 3.2.3 CCIdefmesh on page 79 3.2.3 CCIdefpart on page 81 3.2.3 CCIdefnodes on page 84 3.2.3 CCIdefelems on page 87 3.2.3 CCIdefcomm on page 95 3.2.3 CCIdefsync on page 98 3.2.3 CCIdefsearchtags on page 101 3.2.3 CCIdefctf on page 102 3.2.3 CCIclosesetup on page 105

Coupled Computation
3.2.4 CCIputnodes on page 106 3.2.4 CCIputelems on page 109 3.2.4 CCIsend on page 112 3.2.4 CCIisend on page 114 3.2.4 CCIiprobe on page 115 3.2.4 CCIrecv on page 116 3.2.4 CCIwait on page 118 3.2.4 CCIreachsync on page 119 3.2.4 CCIgetnodes on page 120 3.2.4 CCIgetelems on page 122 3.2.4 CCIcheckconv on page 126

Table 4: Overview of the MpCCI SDK functions (1).

146 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.3 MpCCI Input File

Remeshing
CCIremesh Begin the remeshing denition. CCImodnodes Specify the nodes to be modied. CCIcloseremesh Terminate the remeshing denition. 3.2.5 CCIremesh on page 127 3.2.5 CCImodnodes on page 128 3.2.5 CCIcloseremesh on page 129 3.2.6 CCIfinalize on page 130

Termination
CCIfinalize CCIparaminfo CCIgeneralinfo CCIsyncinfo CCIcomminfo CCIgetidstring CCIgetisp CCIabort CCIwtick CCIwtime Terminate the coupling.

Control
Read in input values. Read in input values. Get synchronization point info. Get communicator info. Get id strings from the input le. Get intersection points. 3.2.7 3.2.7 3.2.7 3.2.7 3.2.7 3.2.7 CCIparaminfo on page 131 CCIgeneralinfo on page 132 CCIsyncinfo on page 134 CCIcomminfo on page 136 CCIgetidstring on page 138 CCIgetisp on page 139

Miscellaneous
Abort MpCCI SDK processes. Give resolution of wtime . Give elapsed wall-clock time. 3.2.8 CCIabort on page 143 3.2.8 CCIwtick on page 144 3.2.8 CCIwtime on page 145

Table 5: Overview of the MpCCI SDK functions (2).

3.3 MpCCI Input File


In the coupled computation dierent types of information have to be provided to the MpCCI library. At rst, MpCCI needs to know the application codes that take part in the coupling, their default environment and the way to start them. Of great importance are the dierent coupling quantities the codes can send and receive, and how the codes refer to them. The information so far can be described as code conguration le that should be shipped with the distribution of the application codes. Then, an important information is the mapping between the coupling quantities that allows each code to use dierent numbers for the same physical quantity. Finally there are a lot of settings for MpCCI itself, like parameters for algorithms, e. g. search algorithms or mesh quality checks, switches controlling the output level for debugging, or information about the coupling algorithm. MpCCI provides defaults for almost all settings thus reducing the work for the user. On the other hand all such default values can be changed via the input le. In order to keep the input le readable and taking into account that settings of the codes can be supplied by the code owners, an input le can consist of several les. An eective mechanism for collecting input information distributed to dierent les is described in 3.3.11 Include Mechanism .

MpCCI 3.1.0-1

VIII

147

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

Note that all MpCCI input les are case-sensitive. After reading the user input le, the control process, when active, checks if the coupling is possible. In the following description <key> indicates mandatory keywords or identiers and [args] indicates optional arguments. A loose syntax description will be used. For instance, < key1 >, . . . , < keyn > denotes a comma-separated list of an arbitrary number of keywords.

3.3.1 Structure of the Input File


The MpCCI input le consists of several blocks: - code block(s) - quantities block(s) - control block - contact block - switches block - jobs block - parameters block - coupling block - additional block Each of these blocks starts with a main keyword and ends with the word end: <MainKeyword> ... end

The dierent blocks in the MpCCI input le are described below. Some of these blocks are mandatory, others are optional. The blocks must occur in the input le in the same ordering as listed above. When working with the MpCCI GUI an other block named addcontrol (additional control) might appear at the end of the input le. This block is generated by MpCCI and used internally only.

148 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.3 MpCCI Input File

3.3.2 Code block


code codename % coupling quantities of the code, at least one quantity: quantity1 (no = no1 , loc = node|elem, dim = scalar|vector, type = f ield|f lux); quantity2 (no = no2 , loc = node|elem, dim = scalar|vector, type = f ield|f lux); quantity3 (no = no3 , loc = node|elem, dim = scalar|vector| < n >, type = userdef , ipol = max|min|sum|prod); quantity4 (no = no4 , loc = global, dim = scalar|vector, ipol = max|min|sum|prod); mesh(no = no5 ); quantity6 (no = no6 , loc = < .. >, dim = < .. >, type = < .. >, SI = a Q + b); % information about start-up env(env var name) = env var value; pre exec = pre exec string; exec = exec string; post exec = post exec string; % additional command line arguments for the exec command: add exec args = add exec arguments; % id string for this code: id string = id string; % enumeration of the parameters for the current code block (for MpCCI GUI only): parameter parameter name1 ( type = string|integer|real|logical, default = def ault value1 , doc = doc string1 ); parameter parameter name2 ( type = string|integer|real|logical, default = def ault value2 ); parameter parameter name3 ; % enumeration of the synchronization points (for MpCCI GUI only): syncpt no : send( send quantity id1 , send quantity id2 , send quantity idn ), recv( recv quantity id1 , recv quantity id2 , recv quantity idn ); end

For each code in the coupling there must be a code block, i.e. in a coupling of three dierent codes, there will be three code blocks, whereas in a coupling of the same code one code block is sucient. The code block describes what quantities there are, their name, number, location in the grid, dimension and type. At present, ve types of quantities are supported, namely field , flux , userdef , global and mesh . For the rst two types ( field or flux ), an arbitrary name must be specied together with a number, the location in the grid ( node or elem ) with the attribute loc (in former MpCCI versions: attribute where ), the dimension and the type. Type field is recommended for quantities located at the nodes on the sending side, i.e. sending values from nodes to nodes or elements. Type flux is recommended for quantities located at the nodes on the receiving side, i.e. sending values from nodes or elements to nodes.

MpCCI 3.1.0-1

VIII

149

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

For the user-dened quantities (type userdef ) it is possible to specify extended dimensions besides scalar and vector , i.e. the integer names the dimensions. In this case MpCCI needs the interpolation method ( ipol ). An other type are global quantities that are dened with the attribute loc . Currently, there are four possibilities for the interpolation of global quantities: max , min , sum and prod . Finally the type mesh is recognized by MpCCI and handled in a special way, therefore, only the numbers by which a code refers to them must be specied. The SI setting supports transformations of quantities when two codes refer to the same quantity in dierent units. For example, code A may use mm (millimeter) for the quantity displacement, whereas code B uses m (meter). With SI = 1000 * Q in the quantity setting of code A, the values of both codes will have the same unit. The SI statement has the general form SI = a * Q + b where a and b are real numbers and a is nonzero. It means that the relation between the quantity value w.r.t. the unit used by the code ( Q ) and the quantity value w.r.t. the corresponding reference unit ( SI ) is given by the equation SI = a * Q + b . Typically, the reference unit will be the corresponding SI unit, but this is not necessary: it is only necessary that all codes use the same reference unit for a given quantity. The linear shift b in the equation is provided for a quantity such as temperature with several common units (Celsius and Fahrenheit). For all types of quantities holds: dierent numbers must be used for dierent quantities. Negative numbers are allowed. The instructions env , pre exec , exec , post exec specify the default environment for a code, the startup commands , and are identical in meaning to those elds in the jobs block of the input le. This means, that one can specify general code-specic but job-independent parameters for a code in the code block instead of repeating them for each computation in latter blocks. This will make the MpCCI input le much more readable. By using add exec args additional command line arguments can be given for the exec command of each process which belongs to the code codename. In id string an identier for the code can be stored. The parameter information is only relevant for the MpCCI GUI, so the description is omitted here. The information concerning the synchronization points of the code are only relevant for the MpCCI GUI. Example: code struc % Define coupling quantities of the code: temperature (no = 7, loc = node, dim pressure (no = 13, loc = elem, dim geschwindigkeit(no = 100, loc = node, dim kraft (no = 1000, loc = elem, dim mesh (no = 101);

= = = =

scalar, scalar, vector, vector,

type type type type

= = = =

field); field); field); flux);

% Define specific environment variables for the code % (may be overwritten in the "jobs" block): env(STRUC_LICENSE_DIR) = "/home/struc/license_dir";

150 VIII

MpCCI 3.1.0-1

VIII Programmers Guide exec = "/home/struc/bin/struc"; % Id string for this code: id_string = "FEM_CODE 2.4.5"; end

3.3 MpCCI Input File

3.3.3 Quantities block


quantities % how do the quantities correspond to each other? codei .quantityj = codek .quantityl ; % enumeration of the parameters for all code blocks (for MpCCI GUI only): parameter parameter name1 ( default = def ault value1 , doc = doc string1 ); parameter parameter name2 ( default = def ault value2 ); parameter parameter name3 ; end

This section describes how the coupling quantities dened for each code in the code blocks match. The instruction codei .quantityj = codek .quantityl species that quantityj of codei is the same physical quantity as quantityl of code codek . This mechanism enables new codes of dierent application areas to use MpCCI, because the knowledge about quantities and their type is not present in the MpCCI source. Also, this mechanism enables dierent codes to use their own local numbering of coupling quantities, independent of the other ones. MpCCI will perform the mapping of coupling types internally. For instance, if we couple a uid code requiring the mesh velocity with a structures code requiring forces, then the quantities section looks like: quantities % how do the quantities correspond to each other? cfd.velocity = struc.geschwindigkeit; cfd.force = struc.kraft; end In the above example, the structures code happens to use the German words for velocity and force, so that it has to be specied that velocity = geschwindigkeit. An equality of two quantities is valid when they have the same type and dimension. They may reside at dierent positions of the computational grids, however. Currently there are some restrictions due to the interpolation algorithms: The above matching conditions for the quantities are necessary for the communication between the codes. Values for quantities of type flux must be sent to quantities with the location specication loc = node and values for quantities of type field must be located at the nodes on the sending side.

MpCCI 3.1.0-1

VIII

151

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

The parameter information is only relevant for the MpCCI GUI, so the description is omitted here.

3.3.4 Control block


control tracele ( name = f ile name, trace par2 , . . . , trace parn ); check mesh quality ( on|of f ); mesh quality nodes ( tol = ); mesh quality quad ( quad par1 , . . . , quad parn ); mesh quality quad8 ( quad8 par1 , . . . , quad8 parn ); mesh quality quad9 ( quad9 par1 , . . . , quad9 parn ); mesh quality triangle ( triangle par1 , . . . , triangle parn ); mesh quality triangle6 ( triangle6 par1 , . . . , triangle6 parn ); skip element checks = f alse|true; timeout = seconds; allow core dump ( of f |on ); restart le name = restart f ile name stem; restart le access = none|read|write; contact detection ( contact par1 , . . . , contact parm ); end

The optional control block species some general steering parameters and some parameters for algorithms used by MpCCI internally. It can be used to specify: tracele: Information for the tracele, currently written in format HDF5 3 . The tracele can be used to visualize the coupled computation with a suitable visualization tool. For more information about traceles, please see V-6 MpCCI Visualizer . The name of the tracele can be specied through control tracefile ( name = "test.ccv" ); end If no name or an empty name is specied, no tracele will be written. Besides the name, there is a number of switches (value: on or off ) for the tracele to be generated. With trace comm values MpCCI will write, in addition to the geometry data, communication values into the tracele, default is on . The switches trace mesh values and trace mesh change values will lead communication values of coupling type mesh and mesh change into the tracele (unless trace comm values is switched o). With close after writing MpCCI will close the tracele each time after writing data into it, default is off . And nally, the switch implicit coupling steps tells MpCCI whether or not to generate a new coupling step in the tracele during a call of the subroutine CCIcheckconv , default is on . The parameter format
3 Hierarchical

Data Format, www.hdfgroup.org

152 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.3 MpCCI Input File

tells MpCCI the format of the tracele to be written. hdf5 is the current HDF format and the default setting. It is recommended for large traceles. The older HDF format hdf4 is provided for compatibility reason to former MpCCI version. control tracefile( name = "test.ccv", close_after_writing = on, trace_comm_values = on, trace_mesh_values = on, trace_mesh_change_values = off, implicit_coupling_steps = on, format = hdf4 ); end

% % % % % %

default: default: default: default: default: default:

off on off on on hdf5

check mesh quality: This statements turns on (or o) the mesh quality checks during CCIclosesetup . The checks give a warning if there are badly shaped elements or other inconsistencies of the mesh. By default it is turned on and some parameters of the mesh tests can be set in the subsequent items - mesh quality nodes, - mesh quality triangle, - mesh quality triangle6, - mesh quality quad, - mesh quality quad8 and - mesh quality quad9. The setting check mesh quality(on) may cause an MpCCI internal problem if the coordinates of the nodes are big. This problem can be avoided by turning the checks o or by raising the tolerance with mesh quality nodes . mesh quality nodes: MpCCI checks for each coupling partition if the specied nodes are all dierent. That is, no two dierent nodes v1 and v2 may be the same within a given tolerance tol , i.e. v1 v2 < tol. This statement can be used to specify an alternate tolerance for this check. The default is tol = 17 . mesh_quality_nodes( tol = 1e-5 ); % default 1e-7

mesh quality quad: Specify parameters for the mesh quality checks for quadrilaterals.

MpCCI 3.1.0-1

VIII

153

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

mesh_quality_quad(taper aspect_ratio skew warp

= 0.4, = 30.0, = 60.0, = 5.0 );

% % % %

default default default default

0.35 39.0 60.0 degrees 5.0 degrees

mesh quality triangle: Specify parameters for the mesh quality checks for triangles. mesh_quality_triangle( aspect_ratio = 30.0, skew = 45.0 ); % default 39.0 % default 45.0 degrees

mesh quality quad8, mesh quality quad9, mesh quality triangle6: Specify parameters for the mesh quality checks for CCIelemquaeight , CCIelemquanine and CCIelemtrsix . The syntax and the meaning of the parameters are the same for these three element types, so we only give an example for CCIelemquaeight . mesh_quality_quad8(taper angle area = 0.4, = 150.0, = 0.0 ); % default 0.35 % default 150.0 degrees % default 0.0

There are two more surface element types in MpCCI: CCIelempentagon and CCIelemhexagon . For interpolation these elements are decomposed into triangles ( CCIelempentagon ) or into quadrilaterals ( CCIelemhexagon ). The element checks are therefore done on the elements of the decomposition. So the parameters set in mesh quality triangle and mesh quality quad are relevant for CCIelempentagon and CCIelemhexagon as well. The shape of the faces of the three-dimensional elements are checked in the same way. skip element checks: If this parameter is set no element checks will be performed. The default value is f alse. timeout: The timeout statement species the maximum allowed time in seconds between two consecutive messages arriving at the control process. This is a primitive method for dead-lock detection. The default is 0, which means that this mechanism is not active. allow core dump: If this parameter is set a core dump will be written in case of abnormal termination. The default value is of f . restart le name and restart le access: With the restart file settings the neighborhood relations can be stored in les to be reused and skip the neighborhood search which can be very time-consuming. The restart file name denes the base of the le names: if xxx is set, xxx.1 will keep the data of process 1, xxx.2 that of process 2, etc. If restart file access is set to write , the neighborhood relations will be written to les. Then, restart file access can be set to read in order to reuse this information. Default setting is none . contact detection: This statement could be used to specify attributes of the grids and to dene the contact detection algorithm and matching criterion to use in former MpCCI versions. The user should use

154 VIII

MpCCI 3.1.0-1

VIII Programmers Guide the contact block instead. See parameters. 3.3.5 Contact block

3.3 MpCCI Input File about the contact block for information about the

3.3.5 Contact block


This optional block is used to specify attributes of the grids and to dene the contact detection algorithm and matching criterion to use. This block substitutes the contact detection statement of the control block. contact type = P P |P E|EE|nearest neighbor; overlap = f ull|partial; warn orphaned points = on|of f ; user performs contact search = f alse|true; global dim = n; coupling dim = m; pre contact search = search alg ( search par name1 = search par value1 , ... search par namen = search par valuen ); matching criterion = match crit name ( match par name1 = match par value1 , ... match par namen = match par valuen ); default alg ( def ault alg par name1 = def ault alg par value1 , ... def ault alg par namen = def ault alg par valuen ); alg alg name1 ( alg par name1 = alg par value1 , ... alg par namen = alg par valuen ); mesh pair ( job name1 /meshIdm , job name2 /meshIdn ) : alg name1 ; end

type: Default setting for the grid type is PE that switches to the standard interpolation for non-matching grids. For matching grids, i.e. the nodes of one grid are (almost) the same of the other, the type must be

MpCCI 3.1.0-1

VIII

155

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

PP . With setting the type to EE for non-matching grids the user can switch to a neighborhood search and an interpolation based on intersection methods. If type is set to nearest neighbor interpolation and neighborhood search is substituted by the nearest neighbor algorithm: For each node of the local grid the node of the remote grid is computed which has the minimal distance from the local grid point. The value on this node will then be transferred to the node of the remote grid. The value of skip element checks of the control block is set to of f automatically. overlap: The overlap region can be partial or full , which is the default value. If the overlap is partial , no brute force search for orphaned nodes or elements is executed. This can be useful for grid type EE . warn orphaned points: The setting warn orphaned points denes if the test for orphaned points should be made. A warning will be given if orphaned points are found. The test can take some time, so if the overlap is partial this switch should be set to off . Default is on . user performs contact search: The setting user performs contact search enables the user to switch to a user-dened contact search algorithm, default is false . The denition of a contact search algorithm by the user is only possible if the interface user def. interpolation is installed. This interface is not available by now. global dim: The setting denes the global dimension, default is 3 (see 3.1.4 Coupling Regions ). coupling dim: The setting denes the dimension of the coupling region, default is 2 (see 3.1.4 Coupling Regions ). For instance, for a coupling of two codes in the 2-dimensional space (along a 1-dimensional coupling line), the contact block has to be added with the following two statements: contact ... global_dim = 2; coupling_dim = 1; ... end pre contact search and matching criterion: For the pre contact search algorithm and for the matching criterion , parameters may be specied in brackets. If no parameters for the pre-contact search algorithm or matching criterion are specied, then defaults are used. The specication of precontact search algorithms and matching criteria may also be omitted entirely; in this case, default for pre contact search algorithm is bucket and for the matching criterion is minimal distance . The possible algorithms are described in more detail in V-3.2 Data Exchange .
default alg: The item default alg allows the user to redene the internal defaults, e. g. type , global dim

or coupling dim , for the neighborhood search algorithm. There are four dierent combinations possible for the global and the coupling dimension: (3,2), (3,3), (2,2), and (2,1).
alg and mesh pair: The item alg allows the user to dene specic neighborhood search algorithms.

Settings of the contact block, e. g. type , global dim or pre contact search , can be summarized with a name for the algorithm. By giving this name in the mesh pair denition the dened neighborhood search

156 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.3 MpCCI Input File

algorithm can be applied for a pair of meshes each identied by jobname and meshId . Thus, dierent neighborhood search algorithms can be used within a coupling of codes with dierent meshes. In the following example an algorithm mySpherContactAlg is dened with dierent settings for the contact search of grids consisting of spherical quadrilaterals as one can see at the pre contact search item ( bucket sphquad ). The dimension items are left out as they are properly defaulted. Then, the algorithm dened is set to be used for the neighborhood search between mesh 2 of myJob1 and mesh 4 of Jobname2. contact ... alg mySpherContactAlg ( type = EE, overlap = partial, warn_orphaned_points = off, pre_contact_search = bucket_sphquad( bbox_expansion = 2, bucket_expansion = 1.5 ), matching_criterion = intersection_sphquad( rejection = 0.01, equals_zero = 2.0e-6, perform_tests = false, scale_result = false, ), ); mesh_pair ( myJob1/2, Jobname2/4 ) : mySpherContactAlg; end

3.3.6 Switches block


switches switch namei = valuei ; ... group namej : switch namek = valuek ; ... ... end

MpCCI 3.1.0-1

VIII

157

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

The optional switches block denes the general behavior of MpCCI. For this purpose we distinguish between groups and switches. A simple example of a switch is the integer switch output level , which determines how much output MpCCI writes: switches output_level = 3; end The following switches are available: output level 0 1 2 3 0 1 no output, default value print message when entering and leaving a MpCCI subroutine print input and output arrays as well print maximal output no debugging output, default value produce debugging output

debug level

A group identies a part of the program with a given name. The group mechanism is used to specify for which part of MpCCI the switch holds. For instance, switches cci_put_nodes: output_level = 3; end species that an output level of 3 must be used for MpCCI subroutine CCIputnodes . Some groups are subdivided into subgroups so that it is also possible to dene a switch value for several parts of MpCCI at the same time. It is also possible to do this, and dene a special switch value for one subgroup which overwrites the default. For instance, switches cci_subroutines: output_level = 3; cci_put_nodes: output_level = 2; end species that for all MpCCI subroutines an output level of 3 must be used, except for MpCCI subroutine CCIputnodes , for which an output level of 2 is used. The ordering in which switches are specied for groups and subgroups is irrelevant. So, in the above example, it would have been equivalent to specify the switch output_level for group cci_put_nodes before that for group cci_subroutines instead. More than one switch may be specied for a group. The construct group name : merely species that all subsequent switches apply to the indicated group. If a switch is specied at the start of a switches block, then it applies to all groups, except those for which another value has been specied. So for example, switches

158 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.3 MpCCI Input File

output_level = 3; cci_put_nodes: output_level = 2; end species a default output level of 3 for all groups. The output level of MpCCI subroutine CCIputnodes will be 2. The following group names are available: cci_subroutines cci_init cci_init_with_id_string cci_setup cci_def_partition cci_def_nodes cci_def_elems cci_def_comm cci_def_sync_point cci_def_search_tags cci_close_setup cci_putget cci_put_nodes cci_get_nodes cci_put_elems cci_get_elems cci_sendrecv cci_send cci_isend cci_recv cci_reach_sync_point cci_wait cci_iprobe cci_check_convergence cci_remeshing cci_remesh cci_mod_nodes cci_close_remesh cci_info cci_parameter_info cci_general_info cci_sync_point_info cci_comm_info cci_get_id_string

MpCCI 3.1.0-1

VIII

159

3 MpCCI SDK Code Coupling Library cci_finalize ccv_tracefile neighborhood_search linear_search bucket_search timing

VIII Programmers Guide

The indentation in this list shows the hierarchy of groups and subgroups. The group cci subroutines comprises some articial subgroups and all MpCCI subroutines starting with the CCI prex. On the other hand, the subgroup cci send belongs to the subgroup cci sendrecv and of course to the group cci subroutines . An other top-level group is neighborhood search that refers to information about the used search algorithms. Finally, a switch >0 for the group timing will generate runtime information of the subroutines and output it in CCIfinalize . The interpretation of a switch by a group depends on the group. Some parts of MpCCI may not use a particular switch at all.

3.3.7 Jobs block


This section species the codes that participate in the coupled computation, and how they are to be started. We use the term job instead of code to allow for multiple occurrences of a single code in the coupled computation. To allow for any type of programming model, dierent processes of the parallel code may be started in dierent ways, which is indicated by the process groups. For an SPMD code there is only one process group. For a host-node parallelization there are two: one containing only one process called the host, and one containing the node processes. A job may also consist of more than two process groups. A simple example for a jobs block is: jobs struc1 = struc( nprocs = 10, env(STRUC_JOB) = "flap" ); ... % job2 end The process group name struc after the arbitrary job name struc1 identies the code information already specied for struc in a code block. Since the start-up information for the code is already known, one does not need to repeat it. It is allowed, however, to override the defaults specied in the code block.

160 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.3 MpCCI Input File

For each process group the following specications can be given: pwd , pre exec , exec , post exec , nprocs and env . The pwd describes in what directory the job will run, and this directory will be set by the CCIinit call. The execution string exec species the command needed to start up the process. The command will be searched for rst in the directory indicated by pwd , and then in the directories in the normal search path for executables. The nprocs command describes how many processes are to be started. Environment variables can be specied optionally using the env construct. This design allows for the case where dierent process groups or codes require dierent values for the same environment variable. Optionally one can use the pre exec and post exec scripts to be executed before and after the coupled computation runs. The scripts should not read standard input. When the script is run, only the working directory is set as specied in the input le. Other environmental settings are not in eect (system defaults). Because the scripts are run prior to starting the coupled computation, any environment variables that are set are not in eect anymore during computation. The pre exec and post exec facilities are useful for example when a code requires its input les to be distributed to the local disks of the hosts where it will run. By doing so, I/O is optimized because dierent processes will perform I/O on dierent hard disks. The scripts are executed with the specied arguments. The name of a host list le for this process group is added by the start-up procedure as nal argument. The tasks specied by the pre exec and post exec must be done during the MpCCI start-up procedure since it is unknown beforehand on what hosts the process group will run, and because with some scheduling systems (e. g. EASY), one does not have access to the remote hosts until the processes are available. The specied environment variables and working directories are in eect after the CCIinit call. The default environment variables and working directories depend on the platform and MPI implementation used. An example job specication that shows all settings is as follows: jobs % Define environment variables which are set in all jobs % (may be overwritten in each job): env( ENVVAR5 ) = "value5"; env( ENVVAR6 ) = "value6";

% Define the directory of the MpCCI distribution (for license mechanism). % Valid for all jobs (unless overwritten there). Overwrites the default % value from the "addcontrol" block. cci_home_dir = "/home/user/mpcci";

% Job 1 consists of two groups of processes: 1 host and 3 nodes. % It executes the code "CodeName1" (this must be the name of one of

MpCCI 3.1.0-1

VIII

161

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

% the code blocks above). JobName1 = CodeName1 ( % Define startup information and environment variables % for all process groups of this job. They overwrite % the defaults from the corresponding code block "CodeName1" % and from the above environment variables which are set % in all jobs, but the settings here may be overwritten % in each separate process group below. pwd = ".", pre_exec = "ex3.pre arg1", exec = "ex3Binary1", post_exec = "ex3.post arg1 arg2", nprocs = 1, env( ENVVAR7 ) = "value7", env( ENVVAR8 ) = "value8" ) : host ( % Define start-up information and environment variables % for the host process group. This overwrites all % previous defaults. pwd = ".", pre_exec = "host.pre arg1", exec = "host", post_exec = "host.post arg1 arg2", nprocs = 1, env( ENVVAR7 ) = "value7a", env( ENVVAR8 ) = "value8a" ) + nodes ( pwd = ".", pre_exec = "ex3.pre arg1", exec = "node", post_exec = "ex3.post arg1 arg2", nprocs = 2, env( ENVVAR7 ) = "value7b", env( ENVVAR8 ) = "value8b" ); % Additional process groups would be allowed here. % You would add them as further summands. % Job 2 consists of one process group only and executes the code % "CodeName2".

162 VIII

MpCCI 3.1.0-1

VIII Programmers Guide JobName2 = CodeName2 ( pwd = ".", exec = "ex3Binary2", nprocs = 1 ); end

3.3 MpCCI Input File

The above example denes two jobs JobName1 and JobName2 . The rst job uses a host-node parallelization with 1 host process and 2 node processes. The second job is an SPMD job with 1 process. The code ids given to jobs during coupled computation are determined by the order in which they were specied in the MpCCI input le. The rst job gets code id 1, and the i-th job gets id i. MpCCI needs the home directory of the MpCCI distribution to check the validity of the license. Usually the name is available through the environment variable CCIhome . With cci home dir the search for the license le can be redirected.

3.3.8 Parameters block


The parameters block is optional. It enables the user to provide values of dierent kind (integer, oat, string) to the codes involved. A value is identied by a string given in the form parameter stringi = valuei ; end

The codes can query these values via CCIparaminfo . An example illustrates the use of the parameters block: parameters % Default settings for all jobs: temperature = 12.34; pressure = 67.89; nSteps = 1000; % Specific settings for JobName1( temperature = pressure = mode = additional = job 1 (overwrite the above defaults): 1234.5678, 5678.12, "sequential", 5678 );

MpCCI 3.1.0-1

VIII

163

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

% Specific settings for job 2: JobName2( temperature = 1200.0 ); end In this example the integer value 1000 is assigned to the parameter nSteps . This setting is valid and accessible by the MpCCI subroutine CCIparaminfo for all codes. Then, there is a specication of values for JobName1. The job name has to be the one already used in the previous jobs block. This statement denes four parameters. The value of parameter temperature is changed to 1234.5678 for JobName1 because this setting is more specic. The parameter mode is of type string, so the value has to be written in quotation-marks. JobName2 will operate with a temperature of 1200.0 . The names of parameters are not allowed to contain any blanks. Note: the MpCCI GUI will present the parameters only if they are dened in the code or quantities blocks before!

3.3.9 Coupling block


The coupling block is optional. In this block synchronization points and communicators can be dened and the matching of the denitions can be specied. coupling % Denition of synchronization points: syncpt job name1 ( sync point id1 ) : send( send quantity id1 /send mesh id1 , send quantity id2 /send mesh id2 , ...), recv( recv quantity id1 /recv mesh id1 , recv quantity id2 /recv mesh id2 , ...); % matching of the synchronization points of the dierent jobs: match syncpt job name1 ( sync point id1 , sync point id2 , ...) = job name2 ( sync point ida , sync point idb , ...) = job name3 ( sync point idA , sync point idB ,... ) = ... ; % Redenition of the predened communicators: comm job name1 ( with job name2 ) : send( send quantity id1 /send mesh id1 , send quantity id2 /send mesh id2 , ...), recv( recv quantity id1 /recv mesh id1 , recv quantity id2 /recv mesh id2 , ...); % Switch for the redened communicators: set communicators = true; % User-dened communicators: comm job name1 ( comm id1 ) : send( send quantity id1 /send mesh id1 , send quantity id2 /send mesh id2 , ...),

164 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.3 MpCCI Input File

recv( recv quantity id1 /recv mesh id1 , recv quantity id2 /recv mesh id2 , ...); comm job name1 ( comm id2 ) : sendrecv( sendrecv quantity ida /mesh ida , sendrecv quantity idb /mesh idb , ...); % matching of communicators of the dierent jobs: match comm job name1 ( comm id1 ) = job name2 ( comm ida ); end

Synchronization points A synchronization point initiates a number of send and receive operations dened here for all codes which take part in a synchronization point. This has to be done for all these codes in the following way:

syncpt JobName( SyncPointId ) : send( quantityId1/meshId1, quantityId2/meshId2, ...), recv( QuantityId1/MeshId1, QuantityId2/MeshId2, ...);

It is possible to dene a synchronization point containing e. g. a number of send (or receive) operations only. In this case, the recv part (or the send part) can be left out. The meshes can be named by meshId or by idString as dened with CCIdefmesh . If the codes have just one mesh, the mesh specication can be omitted. To dene the synchronization point with id syncPointId for job jobName the subroutines CCIsyncinfo ( syncPointId, ...) and CCIdefsync ( syncPointId, ...) must be called in the initialization phase of the code. To start the action CCIreachsync ( syncPointId, ...) must be called ( after the call of CCIclosesetup ). Instead of dening a synchronization point in the input le the user may call CCIdefsync in the initialization part of each code concerned. If synchronization points are used for communication one can specify which synchronization points of the codes match each other even if they are not dened in the coupling block. If no match syncpt is given although there are synchronization points dened it is assumed that matching synchronization points of the dierent codes have the same identier. If the matching is done explicitly this must then be done with the help of the match syncpt statement:

match_syncpt

jobName1( syncPointId1, syncPointId2, ...) = jobName2( idSyncPoint1, idSyncPoint2, ...) = jobName3( syncPoint1, syncPoint2, ...) = ... ;

This statement is interpreted as follows: The synchronization point syncPointId1 of code jobName1 matches with the synchronization point idSyncPoint1 of code jobName2 etc. and the synchronization

MpCCI 3.1.0-1

VIII

165

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

point syncPointId2 of code jobName1 matches with the synchronization point idSyncPoint2 of code jobName2 etc.. Caution: Every code from the job block must be in that enumeration! It is not allowed to repeat the match syncpt statement, i.e. every synchronization point you want to use in your code must be in that enumeration, even those you are going to dene in your code without the syncpt statement described above. If a code does not take part in a synchronization communication you must write - in the enumeration instead of a synchronization point id. For example: syncPoint1 in the enumeration belonging to the code jobName3 may be equal to - instead of being an integer. If synchronization points are dened in the code and no matching criterion is given in the input le then matching synchronization points of dierent codes must have the same identier. We give an example for synchronization point denition via the coupling block:

coupling syncpt JobName1( 2 ) : send( recv( syncpt JobName2( 1 ) : send( recv( temperature1/1, temperature2/1 ), temperature0/2 ); Temperatur0/1 ), Temperatur1/1, Temperatur2/2 );

match_syncpt JobName1( 2, 5 ) = JobName2( 1, 6 ); end

In this example the quantities temperature1 and temperature2 will be sent by code JobName1 at the synchronization point with the id 2. The meshId is 1 in both cases. In addition, the code JobName1 may receive the quantity temperature0 on mesh 2 at the same synchronization point 2. Caution: No check will be done whether there is a sending code for a corresponding quantity due to the quantities block. That means that it is up to the user to decide whether code JobName1 will actually receive values for temperature0 . The user can be sure that the code does not receive values, which were not intended to be received. Whether there is a receiving code for the quantities which are sent will not be checked either. But, if there is more than one code sending a quantity an error will occur. For there are only two codes involved in the coupled computation of the example above no error message will be given. For code JobName2 the following communication is dened at synchronization point 1: Temperatur0 on mesh 1 will be sent and Temperatur1 on mesh 1 and Temperatur2 on mesh 2 may be received. How the quantities of the codes match each other is up to the quantities block. In this example there are two synchronization points dened for each code: synchronization points 2 and 5 for code JobName1 and synchronization point 1 and 6 for code JobName2 . For there is only one synchronization point dened for each code in the input le the other synchronization points can only be dened in the codes themselves.

166 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.3 MpCCI Input File

The match syncpt statement implies that the synchronization point 2 of code JobName1 matches the synchronization point 1 of code JobName2 , and the synchronization point 5 of code JobName1 matches the synchronization point 6 of code JobName2 . Communicators For the denition of communicators we distinguish between two types of communicators: - predened communicators (i.e. CCIcommrcode ) - user-dened communicators. For the specication of the predened communicators we use the following type of the comm statement:

comm JobName1( with JobName2 ) : send( quantityId1/meshId1, quantityId2/meshId2, ...), recv( QuantityId1/MeshId1, QuantityId2/MeshId2, ...);

It is possible to dene a communicator for send (or receive) operations only. In this case, the recv part (or the send part) can be left out. Moreover, a * can be used instead of naming all quantities. This wild card is also very helpful when coupling more than two codes. As another easement, it is possible to name the mesh by the meshId or by idString as dened with CCIdefmesh . If the codes have just one mesh, the mesh specication can be omitted. Finally, the send and the receive part can be combined with sendrecv if the quantities are exactly the same for both directions. The set communicators statement tells MpCCI that the predened communicators CCIcommrcode are redened according to the above settings, i.e. CCIdefcomm is called implicitly during CCIclosesetup for these communicators (unless the code itself has called CCIdefcomm ).

set_communicators = true;

For user-dened communicators the comm statement must be used in the following way:

comm JobName1( CommId1 ) : send( quantityId1/meshId1, quantityId2/meshId2, ...), recv( QuantityId1/MeshId1, QuantityId2/MeshId2, ...);

In both cases the communicators are then prepared to send the quantities specied in the send part of the statement and prepared to receive the quantities specied in the recv part of the statement.

MpCCI 3.1.0-1

VIII

167

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

The possibilities mentioned above for naming the quantities easily can be used for user-dened communicators too. The following denition for instance covers the case that the send and the receive quantities are equal:

comm JobName1( CommId2 ) : sendrecv( quantityIdA/meshA, quantityIdB/meshB, ...);

To dene a user-dened communicator with id commId for job jobName the subroutines CCIcomminfo ( commId, ...) and CCIdefcomm ( commId, ...) must be called in the initialization phase of the code. For predened communicators this can be omitted. For user-dened communicators it is necessary to specify how the dened communicators match each other (the predened communicators provide this information by denition). We use the match comm statement to store the matching information:

match_comm

jobName1( commId1 ) = jobName2( commIdA );

The parameters commId* must be identiers of user-dened communicators. This statement is interpreted as follows: The communicator commId1 of job jobName1 matches with the communicator commIdA of job jobName2 . The match comm must be called separately for every pair of user-dened communicators which are specied in the input le. Communicators and synchronization points can also be dened in the initialization phase of the codes with the help of the subroutines CCIdefcomm and CCIdefsync .

3.3.10 Additional block


The additional block is optional. It can be used to dene and initiate some additional features for the coupling. In the current MpCCI version the following features are available: Coordinate transformation Computation of the intersection points between the elements ( or their projection ) of two meshes. Determination of the non-orphaned nodes and elements of the meshes The additional block of the MpCCI input le has the following form: additional

168 VIII

MpCCI 3.1.0-1

VIII Programmers Guide % Coordinate transformation: coord system job name( mesh id = mesh id, global dim = dim, type = cart|cyl|sph, equals zero = double value, origin = (x, y, z)|(x, y), unit vectors = (v1 , v2 , v3 )|(w1 , w2 ) ); % Compute intersection points: inters points ( job id1 /mesh id1 , job id2 /mesh id2 ); % (Non-)orphaned nodes and elements: non orphaned objects ( job id/mesh id ); end

3.3 MpCCI Input File

Coordinate transformation For a mesh of a certain code a coordinate transformation for the node coordinates can be dened. For the parameters are the same as in the MpCCI subroutine CCIdefctf a description is left out here. A coordinate transformation for job JobName1 for mesh 1 can be dened in the following way: coord_system JobName1 ( mesh_id global_dim type equals_zero origin unit_vectors = = = = = = 1, 3, cart, 1.0e-6, ( 0.5, 0.5, ( 0.5, 0.0, 0.0, 0.5, 0.0, 0.0,

0.5), 0.0, 0.0, 1.0 ) );

Intersection points The subroutine CCIgetisp must not be used without the inters points statement in the additional block. For mesh pairs for which an EE neighborhood algorithm was dened an inters points statement may be dened. inters_points ( JobName1/1, JobName2/1 ); This statement holds for both meshes, so getting intersection points is prepared for both meshes specied here. In the current version one mesh must not compute the intersection points with more than ve remote meshes. Non-orphaned objects

MpCCI 3.1.0-1

VIII

169

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

If the identier of the non-orphaned nodes or elements of a mesh should be given in CCIgetnodes or CCIgetelems the non orphaned objects statement must be used to prepare this. This statement can also be used to get the identiers of the orphaned nodes and elements. This holds for partial and full overlaps ( see contact block ). The non orphaned objects statement overwrites the warn orphaned points statement of the control block. If the user-dened node identiers shall be returned in the call of CCIgetnodes in addition a coordinate transformation must be dened otherwise the MpCCI internal identiers ( i.e. the position in the coordinate array in the call of CCIdefnodes ) is returned there. Please remember that all elements must be dened in one call of CCIdefelems if a coordinate transformation is dened. coord_system JobName2 ( mesh_id global_dim type equals_zero origin unit_vectors = = = = = = 1, 3, cart, 1.0e-6, ( 0.0, 0.0, ( 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,

0.0 ), 0.0, 0.0, 1.0 ) );

non_orphaned_objects ( JobName2/1 );

3.3.11 Include Mechanism


Typically the dierent input blocks described above that refer to the conguration of a code are located in dierent les, which have to be merged into one using an include mechanism: In the MpCCI input le, one includes the required conguration les. The MpCCI environment variable CCIpath is the search path used for nding the conguration les. A typical MpCCI input le for a coupling between a structure code ( struc ) and a uid code ( cfd ) will look like this: include "struc-config.cci"; include "cfd-config.cci"; include "struc-cfd-config.cci"; % % % % specific settings for struc specific settings for cfd how do the quantities of struc and cfd match

% first block of the input file defined by the user control ... end % second block of the input file defined by the user ... etc.

170 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.4 An Example

In this example, "struc-config.cci" and "cfd-config.cci" describe the code conguration les for code struc and cfd , and struc-cfd-config.cci describes additional information for the coupling of struc and cfd . The latter will include a denition of how coupling quantities used by the dierent codes match.

3.4 An Example
This section describes an example of two codes coupled with each other. For ease of exposition, we consider a two-dimensional example with a one-dimensional coupling region. The term coupling surface or coupling region used before, now refers to this coupling line. The example is the coupling of a uid ( F ) with a structures code ( S ). The coupling method considered is one where the structures code requires forces and heat uxes at the nodes, that are computed by the uid code at the cell-centers. The uid code on the other hand requires the new mesh coordinates and velocities from the structures code at its nodes. The structures code computes these quantities at its nodes. The grids do not match at the grid interfaces. The coupling is depicted in Figure 26. The example code fragments are in FORTRAN. Structure Fluid

force ux heat ux force ux velocity mesh velocity mesh heat ux velocity mesh velocity mesh force ux heat ux

Figure 26: Two-dimensional coupling example of a structures with a uid code.

MpCCI 3.1.0-1

VIII

171

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

3.4.1 Start-up and Initialization


In the coupled computation, both code S and F use 4 processes. Code S only wants to call MpCCI subroutines from the two processes that lie at the grid interface. The uid code wants to call MpCCI subroutines from all its processes, which implies of course that some processes of code F do not have a coupling partition. The jobs block of the MpCCI input le may look the following way: jobs JobName1 pwd exec nprocs ); JobName2 pwd exec nprocs ); end

= = = = = = = =

S ( ".", "binary1", 2 F ( ".", "binary2", 4

where binary1 and binary2 are the names of the executables. The initialization of the coupled computation starts with the enrolling of both codes the coupled computation: c --- enroll in the coupled computation call CCI_INIT(ierror)

3.4.2 Coupling Denition


In the coupling denition phase, each of the codes species its coupling region to MpCCI. In this example only one mesh with one partition on each processor is used. For process S4 this looks like: c --- specify partitions meshId = 1 partId = 1 call CCI_DEF_PARTITION(meshId, partId, ierror) c --- specify nodes

172 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.4 An Example

globalDim nNodes nNodeIds nodeIds dataType coords(1) coords(2) coords(3) coords(4) coords(5) coords(6)

= = = = =

2 3 0 0 CCI_REAL = = = = = = 0.0e0 0.0e0 0.0e0 0.5e0 0.0e0 1.0e0 ! ! ! ! ! ! x y x y x y coordinate coordinate coordinate coordinate coordinate coordinate of of of of of of the the the the the the first node first node second node second node third node third node

call CCI_DEF_NODES(meshId, partId, globalDim, nNodes, nNodeIds, nodeIds, dataType, coords, ierror)

For the interpolation chosen in this example information concerning the topology of elements is necessary. This will be dened as follows: c --- specify elements by defining their nodes nElems nElemIds elemIds nElemTypes elemTypes nNodesPerElem elemNodes(1) elemNodes(2) elemNodes(3) elemNodes(4) = = = = = = = = = = 2 0 0 1 CCI_ELEM_LINE 2 1 2 2 3

+ +

call CCI_DEF_ELEMS(meshId, partId, nElems, nElemIds, elemIds, nElemTypes, elemTypes, nNodesPerElem, elemNodes, ierror)

The above pseudo-code must be executed only by the MpCCI processes, so for code S , only processes 2 and 4 should execute this code. In this example, globalDim equals 2. Since every element is made up by two nodes in both codes, nNodesPerElem equals 2. The values of the parameters nNodes , nElems and elemTypes for the other processes are given in Table 6.

MpCCI 3.1.0-1

VIII

173

3 MpCCI SDK Code Coupling Library process nNodes nElems elemTypes S2 2 1 CCIelemline S4 3 2 CCIelemline F1 3 2 CCIelemline F3 3 2 CCIelemline

VIII Programmers Guide

Table 6: Values of parameters in interface denition for the example.

The processes F2 and F4 need not dene a mesh. Note that in Table 6, the nodes at the centers of the cells of code F have not been specied. This is because these nodes are derived nodes, whose coordinates can be computed from the other nodes. The denition of the derived nodes as a function of the other nodes is part of the element denition. Besides the denition of the topology of the coupling region, each code has to specify the locations of the coupling quantities for the coupling with each of the other codes separately. It can be specied in the MpCCI input le if coupling values reside at the element centers. The code blocks and the quantities block of the MpCCI input le should look the following way: code S mesh( velocity( force( heat( end code F mesh( velocity( force( heat( end

id id id id

= = = =

6 ); 7, loc = node, dim = scalar, type = field ); 8, loc = node, dim = 2, type = flux ); 9, loc = node, dim = scalar, type = flux );

id id id id

= = = =

10 ); 11, loc = node, dim = scalar, type = field ); 12, loc = elem, dim = 2, type = flux ); 13, loc = elem, dim = scalar, type = flux );

quantities S.velocity = F.velocity; S.force = F.force; S.heat = F.heat; end MpCCI can only map uxes to the nodes and from elements to elements. Fields can be interpolated from nodes and from elements to elements. In the denition phase other subroutines may be called for dening synchronization points, communicators, search tags etc. For instance the denition of a communicator in the structure code could look as follows:

174 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.4 An Example

localCommId remoteCodeId remoteCommId nQuantityIds quantityIds(1) quantityIds(2) nLocalMeshIds localMeshIds

= = = = = = = =

123 2 321 2 6 7 1 1

+ +

call CCI_DEF_COMM( localCommId, remoteCodeId, remoteCommId, nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, ierror)

The remote communicator 321 must be dened in the remote code which is the uid code in this example. The communicator 321 should be able to communicate the quantities 10 and 11 which match the quantities 6 and 7 of the structure code as dened in the input le above. The third step of the initialization phase is to dene the MpCCI processes to MpCCI. Thus after the coupling regions have been completely specied, FCCclosesetup must be called to commit to the denition of the regions and perform the initial neighborhood computation. This is done by calling subroutine FCCclosesetup with an argument that indicates if the calling process is a MpCCI process or not. c --- specify MpCCI processes to MpCCI if ( I_am_a_MpCCI_process ) then included = 1 else included = 0 end if call CCI_CLOSE_SETUP(included, ierror) In this example the processes S2 , S4 , F1 and F3 must call FCCclosesetup with the value included = 1 . F2 and F4 must call FCCclosesetup with the value included = 0 . After this call, only the above dened MpCCI processes S2 , S4 , F1 and F3 may call MpCCI subroutines, with the exception of FCCfinalize , which must be called by all processes of the coupling. After this the coupled computation can start.

MpCCI 3.1.0-1

VIII

175

3 MpCCI SDK Code Coupling Library

VIII Programmers Guide

3.4.3 Coupled Computation


The exchange of coupling values through a coupling partition is simple. Here we only give pseudo-code for sending and receiving of coupling values between two codes. More details are algorithm-dependent and therefore omitted. Code S species coupling values at the nodes, and can therefore call FCCputnodes for node-wise specication: c --- specify values at the nodes for the first quantity meshId partId quantityId quantityDim nNodes nNodeIds nodeIds dataType values(1) values(2) ... values(6) = = = = = = = = = = 1 1 6 2 3 0 0 CCI_REAL ... ...

= ...

+ + c

call CCI_PUT_NODES(meshId, partId, quantityId, quantityDim, nNodes, nNodeIds, nodeIds, dataType, values, ierror) --- and for the second quantity quantityId quantityDim values(1) values(2) values(3) = = = = = 7 1 ... ... ...

+ + c

call CCI_PUT_NODES(meshId, partId, quantityId, quantityDim, nNodes, nNodeIds, nodeIds, dataType, values, ierror) --- send values nQuantityIds quantityIds(1) = 2 = 6

176 VIII

MpCCI 3.1.0-1

VIII Programmers Guide quantityIds(2) nLocalMeshIds localMeshIds(1) localMeshIds(2) comm = = = = = 7 2 1 1 123

3.4 An Example

call CCI_SEND(nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, comm, ierror)

The line comm = 123 could be exchanged by comm = CCI COMM RCODE(2) in this example. The specication of coupling values by code F is dierent because there the values reside at the cell-centers: c --- specify values at the elements meshId partId quantityId quantityDim nElems nElemIds elemIds nDataPointsPerElem dataPointsPerElem dataType values(1) values(2) ... values(6) = = = = = = = = = = = = 1 1 12 2 2 0 0 1 1 CCI_REAL ... ...

= ...

+ + + c

call CCI_PUT_ELEMS(meshId, partId, quantityId, quantityDim, nElems, nElemIds, elemIds, nDataPointsPerElem, dataPointsPerElem, dataType, values, ierror) --- fill array with the second quantity quantityId quantityDim values(1) values(2) values(3) = = = = = 13 1 ... ... ...

MpCCI 3.1.0-1

VIII

177

3 MpCCI SDK Code Coupling Library call CCI_PUT_ELEMS(meshId, partId, quantityId, quantityDim, nElems, nElemIds, elemIds, nDataPointsPerElem, dataPointsPerElem, dataType, values, ierror) --- send values nQuantityIds quantityIds(1) quantityIds(2) nLocalMeshIds localMeshIds(1) localMeshIds(2) remoteCodeId comm = = = = = = = = 2 12 13 2 1 1 1 CCI_COMM_RCODE(remoteCodeId)

VIII Programmers Guide

+ + + c

call CCI_SEND(nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, comm, ierror)

For the quantities 12 and 13 there is no user dened communicator, so the predened communicator CCI COMM RCODE(1) must be used. The pseudo-code for receiving coupling values is analogous.

3.4.4 Termination
Termination of the coupled computation must be done by calling subroutine FCCfinalize . After calling this subroutine, the calling process is still alive, but may not use MpCCI calls anymore. The caller can continue its own termination sequence by closing output les and so on. Of course, any output le of a code may also be closed before calling FCCfinalize . In pseudo-code: c --- termination sequence of a code ... some statements for cleaning up, closing files etc.... c --- exit MpCCI call CCI_FINALIZE(ierror) c --- continue termination sequence ... last statements for cleaning up, closing files etc....

178 VIII

MpCCI 3.1.0-1

VIII Programmers Guide

3.4 An Example

In this design, the termination sequence of the codes can be used without modication. Only the FCCfinalize call must be added. The MpCCI control process will not kill the codes, but just terminate the coupling.

MpCCI 3.1.0-1

VIII

179

MpCCI 3.1.0

MpCCI

IX Appendix

MpCCI 3.1.0-1 Documentation Part IX Appendix PDF version January 20, 2009

MpCCI is a registered trademark of Fraunhofer SCAI www.scai.fraunhofer.de/mpcci

Fraunhofer Institute
Algorithms and Scientic Computing Fraunhofer Institute for Algorithms and Scientic Computing SCAI Schloss Birlinghoven, 53754 Sankt Augustin, Germany Abaqus and SIMULIA are trademarks or registered trademarks of Dassault Syst`mes e ANSYS is a registered trademark of Ansys, Inc. FLUENT is a registered trademark of Fluent Inc. FLUX is a registered trademark of Cedrat of Grenoble, France ICEPAK is a registered trademark of Fluent Inc. MSC.Marc is a registered trademark of MSC.Software Corporation PERMAS is a registered trademark of Intes GmbH STAR-CD is a registered trademark of CD adapco Group RadTherm is a registered trademark of ThermoAnalytics Inc. FLEXlm is a registered trademark of Macrovision Perl has a copyright by Larry Wall and others ActivePerl has a Community License Copyright of Active State Corp. OpenSSH has a copyright by Tatu Ylonen, Espoo, Finland Java is a registered trademark of Sun Microsystems, Inc. MPICH-1 and MPICH-2 has a copyright by University of Chicago and Mississippi State University Linux is a registered trademark of Linus Torvalds UNIX is a registered trademark of The Open Group Windows, Windows XP and Windows Vista are registered trademarks of Microsoft Corp.

IX Appendix

Contents

IX Appendix Contents
Quantity Reference Literature Glossary Keyword Index 4 41 42 46

MpCCI 3.1.0-1

IX 3

Quantity Reference

IX Appendix

Quantity Reference
MSC.NASTRAN

Flowmaster

MSC.Marc

RadTherm s

FLUENT

ICEPAK

ANSYS

Quantity AbsPressure AcstPressure BodyForce BoundaryMassFlow BoundaryMassFlux BoundaryStaticPressure BoundaryTemp BoundaryTotalPressure BoundaryVelocityMagnitude BoundaryVolumeFlow CGAngle CGOmega CGPosition CGVelocity ChargeDensity Current1 Current4 CurrentDensity DeltaTime Density DynPressure ElectrCond1 ElectrCond3 ElectrCondX ElectrCondY ElectrCondZ ElectricField ElectricFlux ElectrRes1 ElectrRes3 ElectrResX ElectrResY ElectrResZ Enthalpy

s/r s/r

s/r s/r s/r s/r s/r s/r r r r r r s s s s s

PosRad

Abaqus

FLUX

CFX

s/r s/r s/r r r r

s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r

s/r s/r s/r s/r s/r s/r s/r s/r s/r s s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r

4 IX

MpCCI 3.1.0-1

STAR-CD

PERMAS

IX Appendix MSC.NASTRAN

Quantity Reference

Flowmaster

MSC.Marc

RadTherm r s s s

Quantity Film2Temp FilmTemp gs00 gs19 gv00 gv19 HeatFlux HeatSource IntFlag IterationNo JouleHeat JouleHeatLin LorentzForce MagneticField MagneticFlux MassFlowRate MassFlowVect MassFluxRate MassFluxVect NDisplacement NPosition OverPressure PhysicalTime PorePressure PorousFlow RealFlag RefPressure RelWall2Force RelWallForce Residual SpecicHeat Temperature ThermCond1 ThermCond3 ThermCondX ThermCondY ThermCondZ

s/r s/r

s/r

s/r r

s/r

s/r s/r s/r s/r s/r s/r s/r s/r

s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s s

s/r s/r s/r s/r s/r s/r s/r r r

s/r s/r s/r s/r s/r s/r

s/r s/r s/r s/r s/r s/r s/r s s

s s/r s/r s s s/r r s/r r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r r s/r s/r s/r s/r s/r s/r s/r s/r r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r s/r

s s r

s s r

s/r

r r s/r s/r s/r s/r s/r

r s/r s/r s/r s/r s/r s/r s/r s/r

s/r s/r s/r s/r s/r s/r s/r s/r s/r

MpCCI 3.1.0-1

STAR-CD IX 5

PERMAS

FLUENT

ICEPAK

ANSYS

PosRad

Abaqus

FLUX

CFX

Quantity Reference MSC.NASTRAN

IX Appendix

Flowmaster

MSC.Marc

RadTherm s r r s

Quantity TimeStepNo TotalPressure TotalTemp udm00 udm19 uds00 uds19 Velocity VelocityMagnitude Voltage1 Voltage4 VolumeFlow VolumeFlowRate Wall2Force Wall2HeatFlux Wall2HTCoe Wall2Temp WallForce WallHeatFlux WallHTCoe WallTemp

s/r

s/r s/r s s/r s/r s/r s/r s s/r s/r

s/r r

s/r s

s s

s/r r s/r

s/r

r s/r s/r s/r s/r r s/r s/r r r s/r s/r s/r s/r s/r s/r

s/r s/r s/r

r r r s

r r r s

r r s s/r r r s/r

s/r s/r s/r s/r s/r s/r s/r s/r s/r

Table 7: Codes and Quantities: s = code can send quantity, r = code can receive quantity

IX

MpCCI 3.1.0-1

STAR-CD

PERMAS

FLUENT

ICEPAK

ANSYS

PosRad

Abaqus

FLUX

CFX

IX Appendix AbsPressure Absolute pressure [ N/m2 ] Code API symbol: MPCCI QID ABSPRESSURE Default value: 0.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Flux density Coupling Dimensions: Line, Face, Volume Code ANSYS Abaqus CFX FLUENT MSC.Marc MSC.NASTRAN STAR-CD Coupling Dimensions Line, Face, Volume Face Volume Face, Volume Line, Face, Volume Line, Face, Volume Face, Volume Location Element Element Node Element Element Element Element

Quantity Reference

Send option Receive option Direct ETAB Direct Direct Direct Direct Dir UDM Direct Direct Direct SCALAR

AcstPressure Acoustic pressure [ N/m2 ] Code API symbol: MPCCI QID ACSTPRESSURE Default value: 0.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Flux density Coupling Dimensions: Line, Face, Volume Code CFX FLUENT STAR-CD Coupling Dimensions Location Face Node Volume Element Volume Element Send option Direct Dir Direct Receive option Direct UDM SCALAR

MpCCI 3.1.0-1

IX 7

Quantity Reference BodyForce General Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS CFX FLUENT STAR-CD body force density vector [ N/m3 ] MPCCI QID BODYFORCE 0.0 Vector Momentum source Flux density Volume Send option Direct ETAB Direct UDM SCALAR Receive option Direct Direct UDM SCALAR

IX Appendix

Coupling Dimensions Location Volume Node, Element Volume Node Volume Element Volume Element

BoundaryMassFlow Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions:

Boundary mass ow [ kg/s] MPCCI QID BNDMASSFLOW 0.0 Scalar Boundary condition: value Flux Face

Code Coupling Dimensions Location Send option Receive option Flowmaster Face Element Direct

BoundaryMassFlux Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code FLUENT Flowmaster STAR-CD

Boundary mass ux [ kg/m2 s] MPCCI QID BNDMASSFLUX 0.0 Scalar Boundary condition: value Flux density Face

Coupling Dimensions Location Send option Receive option Face Element UDM Face Element Direct Face Element SCALAR

IX

MpCCI 3.1.0-1

IX Appendix BoundaryStaticPressure Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Boundary static pressure [ N/m2 ] MPCCI QID BNDSTATICPRESSURE 0.0 Scalar Boundary condition: value Flux density Line, Face, Volume

Quantity Reference

Code Coupling Dimensions Location Send option Receive option FLUENT Face Element UDM

BoundaryTemp Boundary temperature [ K] Code API symbol: MPCCI QID BNDTEMPERATURE Default value: 300.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Field Coupling Dimensions: Face Code FLUENT Flowmaster STAR-CD Coupling Dimensions Location Send option Receive option Face Element UDM Face Element Direct Face Element SCALAR

BoundaryTotalPressure Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code FLUENT Flowmaster STAR-CD

Boundary total pressure [ N/m2 ] MPCCI QID BNDTOTALPRESSURE 0.0 Scalar Boundary condition: value Flux density Line, Face, Volume

Coupling Dimensions Location Send option Receive option Face Element UDM Face Element Direct Face Element SCALAR

MpCCI 3.1.0-1

IX 9

Quantity Reference BoundaryVelocityMagnitude Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Boundary velocity magnitude [ m/s] MPCCI QID BNDVELOCITYMAG 0.0 Scalar Boundary condition: value Field Line, Face, Volume

IX Appendix

Code Coupling Dimensions Location Send option Receive option FLUENT Face Element UDM Flowmaster Face Element Direct

BoundaryVolumeFlow Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions:

Boundary volume ow [ m3 /s] MPCCI QID BNDVOLFLOW 0.0 Scalar Boundary condition: value Flux Face

The quantity is currently not supported by any standard code.

CGAngle Moving obstacle CG angle [ rad] Code API symbol: MPCCI QID MO ANGLE Default value: 0.0 Dimension: Vector Physical meaning: Grid displacement/coordinate Interpolation type: max/min/sum/prod Coupling Dimensions: Global Code ANSYS FLUENT STAR-CD Coupling Dimensions Location Global global Global global Global global Send option APDL Dir Direct Receive option APDL Dir Direct

10 IX

MpCCI 3.1.0-1

IX Appendix CGOmega Moving obstacle CG angular velocity [ rad/s] Code API symbol: MPCCI QID MO OMEGA Default value: 0.0 Dimension: Vector Physical meaning: Grid displacement/coordinate Interpolation type: max/min/sum/prod Coupling Dimensions: Global Code ANSYS FLUENT STAR-CD Coupling Dimensions Location Global global Global global Global global Send option APDL Dir Direct Receive option APDL Dir Direct

Quantity Reference

CGPosition Moving Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS FLUENT STAR-CD

obstacle CG position [ m] MPCCI QID MO POSITION 0.0 Vector Grid displacement/coordinate max/min/sum/prod Global Send option APDL Dir Direct Receive option APDL Dir Direct

Coupling Dimensions Location Global global Global global Global global

CGVelocity Moving Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS FLUENT STAR-CD

obstacle CG velocity [ m/s] MPCCI QID MO VELOCITY 0.0 Vector Grid displacement/coordinate max/min/sum/prod Global Send option APDL Dir Direct Receive option APDL Dir Direct

Coupling Dimensions Location Global global Global global Global global

MpCCI 3.1.0-1

IX 11

Quantity Reference ChargeDensity Charge density [ C/m3 ] Code API symbol: MPCCI QID CHARGEDENSITY Default value: 0.0 Dimension: Scalar Physical meaning: General Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT STAR-CD Coupling Dimensions Line, Volume Volume Volume Volume Location Element Node Element Element Send option Direct Direct UDM SCALAR Receive option Direct Direct UDM SCALAR

IX Appendix

Current1 Current4 Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS FLUENT FLUX STAR-CD

Electric current - phase 1 4 [ A] MPCCI QID CURRENT1 0.0 Scalar General max/min/sum/prod Global Send option APDL Dir Direct Direct Receive option APDL Dir Direct Direct

Coupling Dimensions Location Global global Global global Global global Global global

CurrentDensity Electric current density vector [ A/m2 ] Code API symbol: MPCCI QID CURRENTDENSITY Default value: 0.0 Dimension: Vector Physical meaning: Boundary condition: face normal gradient Interpolation type: Flux density Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT FLUX STAR-CD Coupling Dimensions Line, Face, Volume Volume Face, Volume Line, Face, Volume Face, Volume Location Node, Element Node Element Node Element Send option Direct Direct UDM UDS Direct SCALAR Receive option Direct Direct UDM Direct SPATIAL SCALAR

12 IX

MpCCI 3.1.0-1

IX Appendix DeltaTime Time step size [ s] Code API symbol: MPCCI QID TIMESTEP SIZE Default value: 1.0 Dimension: Scalar Physical meaning: General Interpolation type: max/min/sum/prod Coupling Dimensions: Global Code ANSYS Abaqus FLUENT FLUX Flowmaster ICEPAK MSC.Marc MSC.NASTRAN RadTherm STAR-CD Coupling Dimensions Location Global global Global global Global global Global global Global global Global global Global global Global global Global global Global global Send option APDL Direct Dir Direct Direct Dir Direct Direct Direct Direct

Quantity Reference

Receive option APDL Direct Dir Direct Direct Dir Direct Direct Direct

Density Density [ kg/m3 ] Code API symbol: MPCCI QID DENSITY Default value: 1.0 Dimension: Scalar Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Volume Code CFX FLUENT STAR-CD Coupling Dimensions Location Volume Node Volume Element Volume Element Send option Direct Dir Direct Receive option Direct UDM SCALAR

MpCCI 3.1.0-1

IX 13

Quantity Reference DynPressure Dynamic pressure [ N/m2 ] Code API symbol: MPCCI QID DYNPRESSURE Default value: 0.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Flux density Coupling Dimensions: Line, Face, Volume Code Coupling Dimensions Location Send option Receive option FLUENT Face Element Dir STAR-CD Face Element Direct

IX Appendix

ElectrCond1 Electric conductivity - xyz [ S/m] Code API symbol: MPCCI QID ELECTCOND1 Default value: 0.0 Dimension: Scalar Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT FLUX STAR-CD Coupling Dimensions Line, Face, Volume Volume Face, Volume Line, Face, Volume Face, Volume Location Element Node Element Node Element Send option Direct Direct UDM Direct SCALAR Receive option Direct Direct UDM SPATIAL SCALAR

ElectrCond3 Electric conductivity - (x,y,z) [ S/m] Code API symbol: MPCCI QID ELECTCOND3 Default value: 0.0 Dimension: Vector Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT STAR-CD Coupling Dimensions Line, Face, Volume Volume Face, Volume Face, Volume Location Element Node Element Element Send option Direct Direct UDM SCALAR Receive option Direct Direct UDM SCALAR

14 IX

MpCCI 3.1.0-1

IX Appendix ElectrCondX Electric conductivity - x [ S/m] Code API symbol: MPCCI QID ELECTCONDX Default value: 0.0 Dimension: Scalar Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Volume Code ANSYS CFX FLUENT STAR-CD Coupling Dimensions Line, Face, Volume Volume Volume Volume Location Element Node Element Element Send option Direct Direct UDM SCALAR Receive option Direct Direct UDM SCALAR

Quantity Reference

ElectrCondY Electric conductivity - y [ S/m] Code API symbol: MPCCI QID ELECTCONDY Default value: 0.0 Dimension: Scalar Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Volume Code ANSYS CFX FLUENT STAR-CD Coupling Dimensions Line, Face, Volume Volume Volume Volume Location Element Node Element Element Send option Direct Direct UDM SCALAR Receive option Direct Direct UDM SCALAR

ElectrCondZ Electric conductivity - z [ S/m] Code API symbol: MPCCI QID ELECTCONDZ Default value: 0.0 Dimension: Scalar Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Volume Code ANSYS CFX FLUENT STAR-CD Coupling Dimensions Line, Face, Volume Volume Volume Volume Location Element Node Element Element Send option Direct Direct UDM SCALAR Receive option Direct Direct UDM SCALAR

MpCCI 3.1.0-1

IX 15

Quantity Reference ElectricField Electric eld vector [ V/m] Code API symbol: MPCCI QID ELECTRICFIELD Default value: 0.0 Dimension: Vector Physical meaning: Boundary condition: face normal gradient Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT FLUX Coupling Dimensions Line, Volume Volume Volume Line, Volume Location Element Node Element Node Send option Direct Direct UDM UDS Direct Receive option Direct Direct UDM Direct SPATIAL

IX Appendix

ElectricFlux Electric ux vector [ C/m2 ] Code API symbol: MPCCI QID ELECTRICFLUX Default value: 0.0 Dimension: Vector Physical meaning: Boundary condition: face normal gradient Interpolation type: Flux density Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT STAR-CD Coupling Dimensions Line, Volume Volume Face, Volume Face, Volume Location Element Node Element Element Send option Direct Direct UDM UDS SCALAR Receive option Direct Direct UDM SCALAR

ElectrRes1 Electric Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS CFX FLUENT FLUX STAR-CD

resistivity - xyz [ ohm m] MPCCI QID ELECTRESV1 0.0 Scalar Material property/general property Field Line, Face, Volume Location Element Node Element Node Element Send option Direct Direct UDM Direct SCALAR Receive option Direct Direct UDM SPATIAL SCALAR

Coupling Dimensions Line, Face, Volume Volume Face, Volume Line, Face, Volume Face, Volume

16 IX

MpCCI 3.1.0-1

IX Appendix ElectrRes3 Electric Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS CFX FLUENT STAR-CD resistivity - (x,y,z) [ ohm m] MPCCI QID ELECTRESV3 0.0 Vector Material property/general property Field Line, Face, Volume Location Element Node Element Element Send option Direct Direct UDM SCALAR Receive option Direct Direct UDM SCALAR

Quantity Reference

Coupling Dimensions Line, Face, Volume Volume Face, Volume Face, Volume

ElectrResX Electric Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS CFX FLUENT STAR-CD

resistivity - x [ ohm m] MPCCI QID ELECTRESVX 0.0 Scalar Material property/general property Field Volume Location Element Node Element Element Send option Direct Direct UDM SCALAR Receive option Direct Direct UDM SCALAR

Coupling Dimensions Line, Face, Volume Volume Volume Volume

ElectrResY Electric Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS CFX FLUENT STAR-CD

resistivity - y [ ohm m] MPCCI QID ELECTRESVY 0.0 Scalar Material property/general property Field Volume Location Element Node Element Element Send option Direct Direct UDM SCALAR Receive option Direct Direct UDM SCALAR

Coupling Dimensions Line, Face, Volume Volume Volume Volume

MpCCI 3.1.0-1

IX 17

Quantity Reference ElectrResZ Electric Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS CFX FLUENT STAR-CD resistivity - z [ ohm m] MPCCI QID ELECTRESVZ 0.0 Scalar Material property/general property Field Volume Location Element Node Element Element Send option Direct Direct UDM SCALAR Receive option Direct Direct UDM SCALAR

IX Appendix

Coupling Dimensions Line, Face, Volume Volume Volume Volume

Enthalpy Enthalpy Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS CFX FLUENT ICEPAK STAR-CD

density [ W/m3 ] MPCCI QID ENTHALPY 0.0 Scalar General Flux density Volume Send option Direct Direct Dir Dir Direct Receive option Direct Direct UDM UDM SCALAR

Coupling Dimensions Location Volume Node, Element Volume Node Volume Element Volume Element Volume Element

Film2Temp 2 sided Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions:

wall lm temperature [ K] MPCCI QID FILM2TEMPERATURE 300.0 Biscalar Boundary condition: value Field Face

Code Coupling Dimensions Location Send option Receive option PERMAS Face Node Direct Direct

18 IX

MpCCI 3.1.0-1

IX Appendix FilmTemp Film temperature [ K] Code API symbol: MPCCI QID FILMTEMPERATURE Default value: 300.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Field Coupling Dimensions: Face Code ANSYS Abaqus CFX FLUENT ICEPAK MSC.Marc PERMAS RadTherm STAR-CD Coupling Dimensions Face Face Face Face Face Line, Face Face Face Face Location Element Element Node Element Element Element Node Element Element Send option Receive option Direct Direct Direct Direct Dir UDM Dir UDM Direct Direct Direct Direct SCALAR

Quantity Reference

gs00 gs19 Global Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions:

scalar 00 19 [] MPCCI QID UGS 00 0.0 Scalar General max/min/sum/prod Global

The quantity is currently not supported by any standard code.

gv00 gv19 Global Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions:

vector 00 19 [] MPCCI QID UGV 00 0.0 Vector General max/min/sum/prod Global

The quantity is currently not supported by any standard code.

MpCCI 3.1.0-1

IX 19

Quantity Reference HeatFlux Heat ux Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS CFX FLUENT ICEPAK STAR-CD density vector [ W/m2 ] MPCCI QID HEATFLUX 0.0 Vector Boundary condition: face normal gradient Flux density Volume Send option Direct ETAB Direct UDM UDM Direct Receive option Direct Direct UDM UDM SCALAR

IX Appendix

Coupling Dimensions Location Volume Node, Element Volume Node Volume Element Volume Element Volume Element

HeatSource General heat source density [ W/m3 ] Code API symbol: MPCCI QID HEATSOURCE Default value: 0.0 Dimension: Scalar Physical meaning: Energy source Interpolation type: Flux density Coupling Dimensions: Volume Code ANSYS CFX FLUENT ICEPAK STAR-CD Coupling Dimensions Location Volume Node, Element Volume Node Volume Element Volume Element Volume Element Send option Direct ETAB Direct UDM UDM SCALAR Receive option Direct Direct UDM UDM SCALAR

20 IX

MpCCI 3.1.0-1

IX Appendix IntFlag Control switch(Int) [] Code API symbol: MPCCI QID INT SWITCH Default value: 0 Dimension: Scalar Physical meaning: General Interpolation type: max/min/sum/prod Coupling Dimensions: Global Code ANSYS FLUENT FLUX ICEPAK STAR-CD Coupling Dimensions Location Global global Global global Global global Global global Global global Send option APDL Dir Direct Dir Direct Receive option APDL Dir Direct Dir Direct

Quantity Reference

IterationNo Iteration number [] Code API symbol: MPCCI QID ITERATION COUNT Default value: 0 Dimension: Scalar Physical meaning: General Interpolation type: max/min/sum/prod Coupling Dimensions: Global Code ANSYS FLUENT FLUX ICEPAK RadTherm STAR-CD Coupling Dimensions Location Global global Global global Global global Global global Global global Global global Send option APDL Dir Direct Dir Direct Direct Receive option APDL Dir Direct Dir Direct

MpCCI 3.1.0-1

IX 21

Quantity Reference JouleHeat Joule heat density [ W/m3 ] Code API symbol: MPCCI QID JOULEHEAT Default value: 0.0 Dimension: Scalar Physical meaning: Energy source Interpolation type: Flux density Coupling Dimensions: Volume Code ANSYS CFX FLUENT FLUX ICEPAK STAR-CD Coupling Dimensions Location Volume Node, Element Volume Node Volume Element Volume Node Volume Element Volume Element Send option Direct ETAB Direct UDM Direct UDM SCALAR Receive option Direct Direct UDM Direct SPATIAL UDM SCALAR

IX Appendix

JouleHeatLin Joule Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code FLUENT FLUX ICEPAK

heat linearization [ W/m3 K] MPCCI QID JOULEHEATLIN 0.0 Scalar Energy source Flux density Volume Send option UDM Direct UDM Receive option UDM SPATIAL UDM

Coupling Dimensions Location Volume Element Volume Node Volume Element

22 IX

MpCCI 3.1.0-1

IX Appendix LorentzForce Lorentz force density vector [ N/m3 ] Code API symbol: MPCCI QID LORENTZFORCE Default value: 0.0 Dimension: Vector Physical meaning: Momentum source Interpolation type: Flux density Coupling Dimensions: Volume Code ANSYS CFX FLUENT FLUX STAR-CD Coupling Dimensions Location Volume Node, Element Volume Node Volume Element Volume Node Volume Element Send option Direct ETAB Direct UDM Direct SCALAR

Quantity Reference

Receive option Direct Direct UDM Direct SPATIAL SCALAR

MagneticField Magnetic eld vector [ A/m] Code API symbol: MPCCI QID MAGNETICFIELD Default value: 0.0 Dimension: Vector Physical meaning: Boundary condition: face normal gradient Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT FLUX Coupling Dimensions Line, Volume Volume Volume Line, Volume Location Element Node Element Node Send option Direct Direct UDM UDS Direct Receive option Direct Direct UDM Direct SPATIAL

MpCCI 3.1.0-1

IX 23

Quantity Reference MagneticFlux Magnetic ux density vector [ T] Code API symbol: MPCCI QID MAGNETICFLUX Default value: 0.0 Dimension: Vector Physical meaning: Boundary condition: face normal gradient Interpolation type: Flux density Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT FLUX STAR-CD Coupling Dimensions Line, Face, Volume Volume Face, Volume Line, Face, Volume Face, Volume Location Node, Element Node Element Node Element Send option Direct Direct UDM UDS Direct SCALAR Receive option Direct Direct UDM Direct SPATIAL SCALAR

IX Appendix

MassFlowRate Mass ow rate [ kg/s] Code API symbol: MPCCI QID MASSFLOWRATE Default value: 0.0 Dimension: Scalar Physical meaning: Mass source Interpolation type: Flux Coupling Dimensions: Face Code FLUENT Flowmaster STAR-CD Coupling Dimensions Location Send option Receive option Face Element Dir Face Element Direct Face Element Direct

MassFlowVect Mass ow vector [ kg/s] Code API symbol: MPCCI QID MASSFLOWVECT Default value: 0.0 Dimension: Vector Physical meaning: Mass source Interpolation type: Flux Coupling Dimensions: Volume The quantity is currently not supported by any standard code.

24 IX

MpCCI 3.1.0-1

IX Appendix MassFluxRate Mass ux rate [ kg/m2 s] Code API symbol: MPCCI QID MASSFLUXRATE Default value: 0.0 Dimension: Scalar Physical meaning: Mass source Interpolation type: Flux density Coupling Dimensions: Face Code FLUENT Flowmaster STAR-CD Coupling Dimensions Location Send option Receive option Face Element Dir Face Element Direct Face Element Direct

Quantity Reference

MassFluxVect Mass ux vector [ kg/m2 s] Code API symbol: MPCCI QID MASSFLUXVECT Default value: 0.0 Dimension: Vector Physical meaning: Mass source Interpolation type: Flux density Coupling Dimensions: Volume The quantity is currently not supported by any standard code.

NDisplacement Nodal displacement [ m] Code API symbol: MPCCI QID NODE DIS Default value: 0.0 Dimension: Vector Physical meaning: Grid displacement/coordinate Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS Abaqus CFX MSC.Marc MSC.NASTRAN PERMAS STAR-CD Coupling Dimensions Line, Face, Volume Face Face Line, Face, Volume Line, Face, Volume Face, Volume Face, Volume Location Node Node Node Node Node Node Node Send option Direct Direct Direct Direct Direct Direct Receive option Direct Direct

Direct Buered

MpCCI 3.1.0-1

IX 25

Quantity Reference NPosition Nodal position [ m] Code API symbol: MPCCI QID NODE POS Default value: 0.0 Dimension: Vector Physical meaning: Grid displacement/coordinate Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS Abaqus CFX FLUENT MSC.Marc MSC.NASTRAN STAR-CD Coupling Dimensions Line, Face, Volume Face Face Face, Volume Line, Face, Volume Line, Face, Volume Face, Volume Location Node Node Node Node Node Node Node Send option Receive option Direct Direct Direct Direct Buf Direct Direct Buered

IX Appendix

OverPressure Relative pressure [ N/m2 ] Code API symbol: MPCCI QID OVERPRESSURE Default value: 0.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Flux density Coupling Dimensions: Line, Face, Volume Code ANSYS Abaqus CFX FLUENT MSC.Marc MSC.NASTRAN STAR-CD Coupling Dimensions Line, Face, Volume Face Face, Volume Face, Volume Line, Face, Volume Line, Face, Volume Face, Volume Location Element Element Node Element Element Element Element Send option Receive option Direct ETAB Direct Direct Direct Direct Dir UDM Direct Direct Direct SCALAR

26 IX

MpCCI 3.1.0-1

IX Appendix PhysicalTime Physical time [ s] Code API symbol: MPCCI QID PHYSICAL TIME Default value: 0.0 Dimension: Scalar Physical meaning: General Interpolation type: max/min/sum/prod Coupling Dimensions: Global Code ANSYS FLUENT FLUX Flowmaster ICEPAK RadTherm STAR-CD Coupling Dimensions Location Global global Global global Global global Global global Global global Global global Global global Send option APDL Dir Direct Direct Dir Direct Direct Receive option APDL Dir Direct Direct Dir Direct

Quantity Reference

PorePressure Pore pressure [ N/m2 ] Code API symbol: MPCCI QID POREPRESSURE Default value: 0.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Flux density Coupling Dimensions: Line, Face, Volume Code CFX FLUENT STAR-CD Coupling Dimensions Location Volume Node Volume Element Volume Element Send option Direct Dir Direct Receive option Direct UDM SCALAR

PorousFlow Pore uid ow [ m/s] Code API symbol: MPCCI QID POREFLOW Default value: 0.0 Dimension: Scalar Physical meaning: Boundary condition: face normal gradient Interpolation type: Flux density Coupling Dimensions: Face, Volume The quantity is currently not supported by any standard code.

MpCCI 3.1.0-1

IX 27

Quantity Reference RealFlag Control switch(Real) [] Code API symbol: MPCCI QID REAL SWITCH Default value: 0.0 Dimension: Scalar Physical meaning: General Interpolation type: max/min/sum/prod Coupling Dimensions: Global Code ANSYS FLUENT FLUX ICEPAK STAR-CD Coupling Dimensions Location Global global Global global Global global Global global Global global Send option APDL Dir Direct Dir Direct Receive option APDL Dir Direct Dir Direct

IX Appendix

RefPressure Reference pressure [ N/m2 ] Code API symbol: MPCCI QID REF PRESSURE Default value: 1.12e5 Dimension: Scalar Physical meaning: General Interpolation type: max/min/sum/prod Coupling Dimensions: Global Code ANSYS FLUENT STAR-CD Coupling Dimensions Location Global global Global global Global global Send option APDL Dir Direct Receive option APDL Dir Direct

RelWall2Force 2 sided wall boundary relative force vector [ N] Code API symbol: MPCCI QID RELWALL2FORCE Default value: 0.0 Dimension: Symmetric tensor Physical meaning: Boundary condition: value Interpolation type: Flux Coupling Dimensions: Face The quantity is currently not supported by any standard code.

28 IX

MpCCI 3.1.0-1

IX Appendix RelWallForce Boundary relative force vector [ N] Code API symbol: MPCCI QID RELWALLFORCE Default value: 0.0 Dimension: Vector Physical meaning: Boundary condition: value Interpolation type: Flux Coupling Dimensions: Face Code ANSYS Abaqus CFX FLUENT MSC.Marc MSC.NASTRAN PERMAS STAR-CD Coupling Dimensions Face Face Face Face Line, Face Line, Face Face Face Location Node, Element Node Node Element Node Node Node Element

Quantity Reference

Send option Receive option Direct Direct Direct Direct Dir UDM Direct Direct Direct Direct SCALAR

Residual Global residual [] Code API symbol: MPCCI QID GLOBAL RESIDUAL Default value: 0.0 Dimension: Scalar Physical meaning: General Interpolation type: max/min/sum/prod Coupling Dimensions: Global Code ANSYS FLUENT FLUX ICEPAK RadTherm STAR-CD Coupling Dimensions Location Global global Global global Global global Global global Global global Global global Send option APDL Dir Direct Dir Direct Direct Receive option APDL Dir Direct Dir Direct

MpCCI 3.1.0-1

IX 29

Quantity Reference SpecicHeat Specic heat [ J/kg K] Code API symbol: MPCCI QID SPECHEAT Default value: 1.0 Dimension: Scalar Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Volume Code ANSYS CFX FLUENT ICEPAK STAR-CD Coupling Dimensions Location Volume Element Volume Node Volume Element Volume Element Volume Element Send option Direct Direct Dir Dir Direct Receive option Direct Direct UDM UDM SCALAR

IX Appendix

Temperature Temperature [ K] Code API symbol: MPCCI QID TEMPERATURE Default value: 300.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT FLUX Flowmaster ICEPAK STAR-CD Coupling Dimensions Line, Volume Volume Face, Volume Line, Volume Face Volume Volume Location Node, Element Node Element Node Element Element Element Send option Direct ETAB Direct Dir Direct Dir Direct Receive option Direct Direct UDM Direct SPATIAL Direct UDM SCALAR

30 IX

MpCCI 3.1.0-1

IX Appendix ThermCond1 Thermal conductivity - xyz [ W/m K] Code API symbol: MPCCI QID THERMCOND1 Default value: 0.0 Dimension: Scalar Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT FLUX ICEPAK STAR-CD Coupling Dimensions Line, Face, Volume Volume Face, Volume Line, Face, Volume Face, Volume Face, Volume Location Element Node Element Node Element Element Send option Direct Direct Dir Direct Dir Direct Receive option Direct Direct UDM SPATIAL UDM SCALAR

Quantity Reference

ThermCond3 Thermal conductivity -(x,y,z) [ W/m K] Code API symbol: MPCCI QID THERMCOND3 Default value: 0.0 Dimension: Vector Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS CFX FLUENT ICEPAK STAR-CD Coupling Dimensions Line, Face, Volume Volume Face, Volume Face, Volume Face, Volume Location Element Node Element Element Element Send option Direct Direct Dir Dir Direct Receive option Direct Direct UDM UDM SCALAR

MpCCI 3.1.0-1

IX 31

Quantity Reference ThermCondX Thermal conductivity - x [ W/m K] Code API symbol: MPCCI QID THERMCONDX Default value: 0.0 Dimension: Scalar Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Volume Code ANSYS CFX FLUENT ICEPAK STAR-CD Coupling Dimensions Line, Face, Volume Volume Volume Volume Volume Location Element Node Element Element Element Send option Direct Direct Dir Dir Direct Receive option Direct Direct UDM UDM SCALAR

IX Appendix

ThermCondY Thermal conductivity - y [ W/m K] Code API symbol: MPCCI QID THERMCONDY Default value: 0.0 Dimension: Scalar Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Volume Code ANSYS CFX FLUENT ICEPAK STAR-CD Coupling Dimensions Line, Face, Volume Volume Volume Volume Volume Location Element Node Element Element Element Send option Direct Direct Dir Dir Direct Receive option Direct Direct UDM UDM SCALAR

32 IX

MpCCI 3.1.0-1

IX Appendix ThermCondZ Thermal conductivity - z [ W/m K] Code API symbol: MPCCI QID THERMCONDZ Default value: 0.0 Dimension: Scalar Physical meaning: Material property/general property Interpolation type: Field Coupling Dimensions: Volume Code ANSYS CFX FLUENT ICEPAK STAR-CD Coupling Dimensions Line, Face, Volume Volume Volume Volume Volume Location Element Node Element Element Element Send option Direct Direct Dir Dir Direct Receive option Direct Direct UDM UDM SCALAR

Quantity Reference

TimeStepNo Time Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS FLUENT FLUX ICEPAK RadTherm STAR-CD

step number [] MPCCI QID TIMESTEP COUNT 0 Scalar General max/min/sum/prod Global Send option APDL Dir Direct Dir Direct Direct Receive option APDL Dir Direct Dir Direct

Coupling Dimensions Location Global global Global global Global global Global global Global global Global global

MpCCI 3.1.0-1

IX 33

Quantity Reference TotalPressure Total pressure [ N/m2 ] Code API symbol: MPCCI QID TOTALPRESSURE Default value: 0.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Flux density Coupling Dimensions: Line, Face, Volume Code FLUENT Flowmaster STAR-CD Coupling Dimensions Location Send option Receive option Face Element Dir Face Element Direct Face Element Direct

IX Appendix

TotalTemp Total Temperature [ K] Code API symbol: MPCCI QID TOTALTEMP Default value: 300.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Field Coupling Dimensions: Line, Face, Volume The quantity is currently not supported by any standard code.

udm00 udm19 User dened memory 00 19 [] Code API symbol: MPCCI QID UMEM 00 Default value: 0.0 Dimension: Scalar Physical meaning: General Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code ANSYS FLUENT FLUX Coupling Dimensions Volume Face, Volume Face, Volume Location Element Element Node Send option Receive option ETAB UDM UDM SPATIAL SPATIAL

34 IX

MpCCI 3.1.0-1

IX Appendix uds00 uds19 User dened scalar 00 19 [] Code API symbol: MPCCI QID USCL 00 Default value: 0.0 Dimension: Scalar Physical meaning: General Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code Coupling Dimensions Location Send option Receive option ANSYS Volume Element ETAB FLUENT Face, Volume Element UDS UDS

Quantity Reference

Velocity Velocity vector [ m/s] Code API symbol: MPCCI QID VELOCITY Default value: 0.0 Dimension: Vector Physical meaning: Boundary condition: value Interpolation type: Field Coupling Dimensions: Line, Face, Volume Code Coupling Dimensions Location Send option Receive option FLUENT Face, Volume Element Dir UDM STAR-CD Face, Volume Element Direct SCALAR

VelocityMagnitude Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions:

Velocity magnitude [ m/s] MPCCI QID VELOCITYMAG 0.0 Scalar Boundary condition: value Field Line, Face, Volume

Code Coupling Dimensions Location Send option Receive option FLUENT Face Element Dir Flowmaster Face Element Direct

MpCCI 3.1.0-1

IX 35

Quantity Reference Voltage1 Voltage4 Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code ANSYS FLUENT FLUX STAR-CD Electric voltage - phase 1 4 [ V] MPCCI QID VOLTAGE1 0.0 Scalar General max/min/sum/prod Global Send option APDL Dir Direct Direct Receive option APDL Dir Direct Direct

IX Appendix

Coupling Dimensions Location Global global Global global Global global Global global

VolumeFlow Volume ow vector [ m3 /s] Code API symbol: MPCCI QID VOLFLOWVECT Default value: 0.0 Dimension: Vector Physical meaning: Mass source Interpolation type: Flux Coupling Dimensions: Volume The quantity is currently not supported by any standard code.

VolumeFlowRate Volume ow rate [ m3 /s] Code API symbol: MPCCI QID VOLFLOWRATE Default value: 0.0 Dimension: Scalar Physical meaning: Mass source Interpolation type: Flux Coupling Dimensions: Face The quantity is currently not supported by any standard code.

36 IX

MpCCI 3.1.0-1

IX Appendix Wall2Force 2 sided Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: wall boundary absolute force vector [ N] MPCCI QID WALL2FORCE 0.0 Symmetric tensor Boundary condition: value Flux Face

Quantity Reference

The quantity is currently not supported by any standard code.

Wall2HeatFlux 2 sided wall boundary normal heat ux density [ W/m2 ] Code API symbol: MPCCI QID WALL2HEATFLUX Default value: 0.0 Dimension: Biscalar Physical meaning: Boundary condition: face normal gradient Interpolation type: Flux density Coupling Dimensions: Face Code Coupling Dimensions Location Send option Receive option PERMAS Face Node Direct PosRad Face Element Direct Direct

Wall2HTCoe 2 sided wall boundary heat transfer coecient [ W/m2 K] Code API symbol: MPCCI QID WALL2HTCOEFF Default value: 0.0 Dimension: Biscalar Physical meaning: Boundary condition: value Interpolation type: Field Coupling Dimensions: Face Code Coupling Dimensions Location Send option Receive option PERMAS Face Node Direct

MpCCI 3.1.0-1

IX 37

Quantity Reference Wall2Temp 2 sided Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions: Code PERMAS PosRad STAR-CD wall boundary temperature [ K] MPCCI QID WALL2TEMPERATURE 300.0 Biscalar Boundary condition: value Field Face Send option Receive option Direct Direct Direct Direct SCALAR

IX Appendix

Coupling Dimensions Location Face Node Face Element Face Element

WallForce Boundary absolute force vector [ N] Code API symbol: MPCCI QID WALLFORCE Default value: 0.0 Dimension: Vector Physical meaning: Boundary condition: value Interpolation type: Flux Coupling Dimensions: Face Code ANSYS Abaqus CFX FLUENT MSC.Marc MSC.NASTRAN PERMAS STAR-CD Coupling Dimensions Face Face Face Face Line, Face Line, Face Face Face Location Node, Element Node Node Element Node Node Node Element Send option Receive option Direct Direct Direct Direct Direct Dir UDM Direct Direct Direct Direct Direct SCALAR

38 IX

MpCCI 3.1.0-1

IX Appendix WallHeatFlux Boundary normal heat ux density [ W/m2 ] Code API symbol: MPCCI QID WALLHEATFLUX Default value: 0.0 Dimension: Scalar Physical meaning: Boundary condition: face normal gradient Interpolation type: Flux density Coupling Dimensions: Face Code ANSYS Abaqus CFX FLUENT ICEPAK MSC.Marc MSC.NASTRAN PERMAS PosRad RadTherm STAR-CD Coupling Dimensions Face Face Face Face Face Line, Face Line, Face Face Face Face Face Location Element Element Node Element Element Element Element Node Element Element Element

Quantity Reference

Send option Receive option Direct Direct Direct Direct Direct Dir UDM Dir UDM Direct Direct Direct Direct Direct Direct Direct SCALAR

WallHTCoe Boundary heat transfer coecient [ W/m2 K] Code API symbol: MPCCI QID WALLHTCOEFF Default value: 0.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Field Coupling Dimensions: Face Code ANSYS Abaqus CFX FLUENT ICEPAK MSC.Marc MSC.NASTRAN PERMAS RadTherm STAR-CD Coupling Dimensions Face Face Face Face Face Line, Face Line, Face Face Face Face Location Element Element Node Element Element Element Element Node Element Element Send option Receive option Direct Direct Direct Direct Dir UDM Dir UDM Direct Direct Direct Direct Direct SCALAR

MpCCI 3.1.0-1

IX 39

Quantity Reference WallTemp Boundary temperature [ K] Code API symbol: MPCCI QID WALLTEMPERATURE Default value: 300.0 Dimension: Scalar Physical meaning: Boundary condition: value Interpolation type: Field Coupling Dimensions: Face Code ANSYS Abaqus CFX FLUENT ICEPAK MSC.Marc MSC.NASTRAN PERMAS PosRad RadTherm STAR-CD Coupling Dimensions Face Face Face Face Face Line, Face Line, Face Face Face Face Face Location Node, Element Node Node Element Element Node Node Node Element Element Element Send option Direct Direct Direct Dir Dir Direct Direct Direct Direct Direct Direct

IX Appendix

Receive option Direct FieldVariable Direct UDM UDM

Direct Direct SCALAR

40 IX

MpCCI 3.1.0-1

IX Appendix

Literature

Literature
Lyttle, I., B. Pulido, A. Zolfaghari, and K. Parker, 2006: CUSTOMIZATION OF MPCCI FOR USE BY DEVELOPMENT TEAMS: MAGNETO-THERMAL SIMULATIONS. K. Wolf, ed., Proceedings of the 7th MpCCI User Forum, Fraunhofer Institute SCAI. Schwartz, R. L., T. Phoenix, and B. D. Foy, 2005: Learning Perl . 4th edn., OReilly, covers Perl 5.8. Snir, M., S. Otto, S. Huss-Lederman, D. Walker, and J. Dongarra, 1996: MPI: The complete reference. The MIT Press, Cambridge, Massachusetts, London, England. Walhorn, E., B. Hbner, and D. Dinkler, 2002: Starke Kopplung von Fluid und Struktur mit Raum-Zeitu Elementen. Fluid-Struktur-Wechselwirkung, VDI-Bericht 1682 , 221240, VDI Verlag GmbH. Wall, W. A., 1999: Fluid-Struktur-Wechselwirkungen mit stabilisierten Finiten Elementen. Ph.D. thesis, Institut fr Baustatik, Universitt Stuttgart. u a Zienkiewicz, O. C. and R. Taylor, 2000: The Finite Element Method . Butterworth-Heinemann.

MpCCI 3.1.0-1

IX 41

Glossary

IX Appendix

Glossary
The aim of this glossary is to give a short description of the most important technical terms which are used in this manual and the context of MpCCI. For further reference, links to the corresponding manual sections are given. architecture In the MpCCI context, architecture refers to the computer system, i. e. the combination of operating system and system hardware. Each characteristic combination supported by MpCCI is denoted by an architecture token, see V-2.3.1 MPCCI ARCH - Architecture Tokens . A list of current architecture tokens is given in the Release Notes. association Association is the search for nodes/elements which lie close to a node/element of the partner mesh, also referred to as contact search or neighborhood search. The association is carried through during the initialization phase of MpCCI as a preparation for data interpolation. See V-3.2.1 Pre-Contact Search . client A simulation code with a code adapter acts as a client of the MpCCI server, i. e. the term client refers to a code or adapter, see V-3.4.1 Client-Server Structure of MpCCI . code adapter A code adapter is a plug-in into a simulation code which allows coupling of the code with other codes via MpCCI. Code adapters can be based on user-dened functions and are usually linked with the simulation code, preferably as a shared library, see V-3.4.1 Client-Server Structure of MpCCI . Code adapters are provided for all codes which are ocially supported by MpCCI, further code adapters can be added using the code API (see IX-2 Code API ). control process The control process is an optional process, which is started to write a tracele (see tracele below). coupling algorithm A coupling algorithm is the procedure of a coupled simulation. It determines when data is transferred, which code starts computing a new time step, etc. . An overview of possible coupling algorithms is given in V-3.3 Coupling Algorithms . coupling component A coupling component is a part of a coupling region, typically a set of elements, see description of coupling region. coupling region Coupling regions dene a part of a mesh which is coupled. In one coupling region, certain quantities are exchanged with the partner code. Each coupling region has a counterpart in the mesh of the partner code, which should have roughly the same geometry. A coupling region is composed of one or

42 IX

MpCCI 3.1.0-1

IX Appendix

Glossary

several coupling components. Coupling regions are dened in the MpCCI GUI (see IV-2.5 Coupling Step Denition of Coupling Regions and Quantities and V-4.4 Coupling Step ). coupling type A set of typical coupling types can be selected in the Coupling Step of the MpCCI GUI. Each type corresponds to a predened selection of quantities for a coupling dimension, see V-4.4 Coupling Step for details. Edit Step The Edit Step is the third panel in the wizard-like MpCCI GUI. The control parameters for MpCCI can be set in this panel as described in V-4.5 Edit Step . element-element (EE) Old name for the intersection algorithm. exchange Other term for transfer. eld One of the two interpolation principles (see also ux ). Field interpolation is applied for quantities which do not depend on the element area, e. g. density, electric resistivity or temperature. See V-3.2.5 Flux and Field Interpolation . ux One of the two interpolation principles (see also eld ). Flux interpolation is applied for quantities for which the integral over an area/volume must be preserved, e. g. forces or mass ux. See V-3.2.5 Flux and Field Interpolation . grid See mesh. Go Step The Go Step is the fourth and last panel in the wizard-like MpCCI GUI, where options for starting the simulation codes can be set and the coupled simulation is started (and stopped). See V-4.6 Go Step . initialization The initialization is carried through at the beginning of a coupled simulation. Both codes send their mesh data to MpCCI and the meshes are associated. See V-3.3.1 Course of the Coupling Process for details. interpolation In most coupled simulations, data is transferred between non-matching grids. I. e. the data is given on one mesh and a corresponding set of data for a dierent mesh is expected by the other code. The process of nding such a distribution is called interpolation. Dierent methods for this procedure are described in V-3.2 Data Exchange .

MpCCI 3.1.0-1

IX 43

Glossary

IX Appendix

intersection The intersection method is one of the interpolation schemes oered by MpCCI. It is based on overlapping surfaces or penetrating volumes of elements, see V-3.2.3 Intersection . mesh The mesh (also called grid ) consists of a set of nodes which are given by their spatial coordinates and a set of elements each which is connected to a typical number of nodes. The connection of nodes and elements is known as mesh topology. MpCCI can transfer data between mesh-based simulation codes, e. g. Finite Element (FE) or Finite Volume (FV) codes. minimal distance The minimal distance method is one of the interpolation schemes oered by MpCCI. It is based on an association of nodes of one mesh to elements of the other mesh. The value which is transferred depends on the location of the node (or its projection) inside the element, see V-3.2.3 Intersection . Models Step The Models Step is the rst panel in the wizard-like MpCCI GUI, where the models which shall be coupled are selected. In addition some code-specic options can be selected, see V-4.3 Models Step . multi-physics The purpose of MpCCI is to couple codes for the solution of multi-physics problems. Such problems consist of partial problems each of which can be classied into a dierent physical domain. Typical domains are uid mechanics, solid mechanics, heat transfer or electromagnetism. See V-3.1 MultiPhysics for details. neighborhood search Other term for association. orphaned nodes If mesh association fails, some nodes cannot be associated with nodes or elements of the other mesh. This means they cannot be considered during data transfer, which usually yields severe errors. See V-3.2.4 Orphaned Nodes and Elements . point-element (PE) Other name for minimal distance interpolation. quantity Physical quantities must be exchanged between meshes for a coupled simulation. For each coupling case a typical set must be selected in the Coupling Step of MpCCI. A quantity has a typical SI-unit. remote le browser MpCCI uses a remote le browser for model le selection, which allows to connect to a remote computer via a remote shell. By selecting model le on a remote computer, a user determines where to run a simulation code. See V-4.7 Remote File Browser for a description of the MpCCI remote le browser.

44 IX

MpCCI 3.1.0-1

IX Appendix

Glossary

scanner In the Models Step of the MpCCI GUI the scanner must be started to scan the model le. The scanner searches the le for denition of possible coupling regions and further code-dependent information. See IX-2.5.2 Scanner.pm for a detailed description of what the scanner does. server The communication of a simulation code with MpCCI is based on a client-server model, i. e. during a computation a set of MpCCI servers is started, which are connected to the simulation codes (clients). The servers perform all tasks required for data transfer between two codes. See IV-1.3 Code Coupling with MpCCI and V-3.4.1 Client-Server Structure of MpCCI for a description. simulation code All software programs which can be coupled by MpCCI are commonly referred to as simulation codes. A description of all codes is given in the Codes Manual. staggered method MpCCI uses the staggered approach to solve multi-physics problems: Each code computes one time step independently and data is only exchanged after such a partial solution is obtained. This is also known as weak coupling. The solution procedure is discussed in IV-1.2 Solution of Coupled Problems . tracele The tracele can be best described as graphical log le. If a tracele is written during a computation (by an additional control process), the mesh geometry and transferred data is stored. The contents of the tracele can be viewed with the MpCCI Visualizer as described in V-6 MpCCI Visualizer .

MpCCI 3.1.0-1

IX 45

Keyword Index
All page numbers are preceded by the roman part numbers: I Overview II Release Notes III Installation Guide IV Getting Started V User Manual VI Codes Manual VII Tutorial VIII Programmers Guide IX Appendix Important entries are bold, italic entries refer to the glossary. Abaqus, VI-12 acoustics, V-22 ActivePerl, III-9 addcontrol block (SDK), VIII-148 additional block (SDK), VIII-168 Additional Scalars, VI-107 align, VI-10 ANSYS, VI-24 API Kit, VIII-11 architecture, V-13, V-13, V-40, IX-42 , V-98, V100 supported by MpCCI, II-8 association, IV-5, VIII-23, V-30, IX-42 , VIII-51, V-74 axisymmetry, VII-70 backup, V-116 batch execution, V-42, V-58, V-117 block (SDK) addcontrol, VIII-148 additional, VIII-168 code, VIII-149 contact, VIII-155 control, VIII-152 coupling, VIII-164 jobs, VIII-160 parameters, VIII-163 quantities, VIII-151 switches, VIII-157 bounding box check, V-57 CCI-functions CCIabort, VIII-143 CCIanycode, VIII-126 CCIanyquantity, VIII-96 CCIcheckconv, VIII-126 CCIcloseremesh, VIII-129 CCIclosesetup, VIII-105 CCIcomminfo, VIII-136 CCIcontinue, VIII-126 CCIconverged, VIII-126 CCIcoordcart, VIII-102 CCIcoordcyl, VIII-103 CCIcoordsph, VIII-103 CCIdefcomm, VIII-95 CCIdefctf, VIII-102 CCIdefelems, VIII-87 CCIdefmesh, VIII-79 CCIdefnodes, VIII-84 CCIdefpart, VIII-81 CCIdefsearchtags, VIII-101 CCIdefsync, VIII-98 CCIdiverged, VIII-126 CCIelemhexagon, VIII-89

IX Appendix CCIelemhexahedron, VIII-90 CCIelemline, VIII-89 CCIelempentagon, VIII-89 CCIelemprism, VIII-90 CCIelempyramid, VIII-90 CCIelemquad, VIII-88 CCIelemquaeight, VIII-88 CCIelemquanine, VIII-88 CCIelemsphqua, VIII-92 CCIelemsphtri, VIII-91 CCIelemtetrahedron, VIII-90 CCIelemtriangle, VIII-88 CCIelemtrsix, VIII-89 CCInalize, VIII-130 CCIgeneralinfo, VIII-132 CCIgetelems, VIII-122 CCIgetidstring, VIII-138 CCIgetisp, VIII-139 CCIinit, VIII-77 CCIinitwithidstring, VIII-78 CCIiprobe, VIII-115 CCIisend, VIII-114, VIII-118 CCIlocalmeshid, VIII-115, VIII-117 CCImatchgrids, VIII-133 CCImatchinginfo, VIII-132 CCImaxnquant, VIII-99, VIII-115, VIII-117, VIII-135 CCImaxstringlen, VIII-131 CCImodnodes, VIII-128 CCImycodeid, VIII-96 CCIncodes, VIII-96 CCInonmatchgrids, VIII-133 CCInquantities, VIII-115, VIII-117 CCIparaminfo, VIII-131 CCIputelems, VIII-109 CCIputnodes, VIII-106 CCIquantdim, VIII-133 CCIquantinfo, VIII-132 CCIquantinfolen, VIII-132 CCIquantipol, VIII-133 CCIquantityids, VIII-115, VIII-117 CCIquantloc, VIII-133

Keyword Index CCIquantlocelem, VIII-133 CCIquantlocglobal, VIII-133 CCIquantlocnode, VIII-133 CCIquanttype, VIII-133 CCIquanttypeeld, VIII-133 CCIquanttypeux, VIII-133 CCIquanttypemesh, VIII-133 CCIquanttypeuser, VIII-133 CCIreachsync, VIII-119 CCIrecv, VIII-116 CCIremesh, VIII-127 CCIrequestnull, VIII-118 CCIsend, VIII-112 CCIstatus, VIII-75 CCIstatussize, VIII-75 CCIstop, VIII-126 CCIsyncinfo, VIII-134 CCItotalremesh, VIII-129 CCIwait, VIII-118 CCIwtick, VIII-144 CCIwtime, VIII-145 communicator, VIII-95 coupling steps, VIII-126 data types, VIII-75 fortran data types, VIII-75 overview, VIII-146, VIII-146 tracele, VIII-126 CFD, IV-3, IV-8, I-9, IV-9, V-22 cgs units, VII-8 check mesh, V-57 mesh quality, V-73, VIII-153 clean temporary les, V-124 client, V-39, IX-42 home (SDK), VIII-73 cluster, V-42 code adapter, IV-6, VI-8, IX-42 code API, VIII-7 code block (SDK), VIII-149 code conguration directory, VIII-28 code integration, VIII-7, VIII-8

MpCCI 3.1.0-1

IX 47

Keyword Index step-by-step, VIII-14 command line interface, V-84 communicator (SDK), VIII-164 complex start, V-38 Computational Fluid Dynamics, see CFD conguration directory, VIII-28 contact, V-74, VIII-156 contact block (SDK), VIII-155 control block (SDK), VIII-152 control parameters, V-71 control process, IX-42 , see tracele control window, V-137 coordinate systems, VIII-102 coordinate transformation, VI-10 coordinate transformation (SDK), VIII-169 coupled system, IV-4 coupling, V-21 coupling algorithm, V-30, IX-42 coupling block (SDK), VIII-164 coupling component, IX-42 coupling manager functions, VIII-48 coupling region, IX-42 coupling server (SDK), VIII-72 Coupling Step, IV-13, see GUI coupling type, V-22, IX-43 , V-67 data ow visualizer, V-136 data structure, VIII-64 data types (SDK), VIII-75 debugging, V-14, V-102, VIII-158 directory MpCCI resource, V-17 code conguration, VIII-28 domain physical, V-21 download, III-6 driver function, VIII-58 duc heater, VII-80 Edit Step, IX-43 , see GUI EE, V-27 elastic ap, VII-20

IX Appendix elastic foundation, VIII-11 electromagnetic, VII-54 electromagnetism, V-22 electrothermal analysis, V-24 element check, V-57 element denition, VIII-56 element types, VIII-57 element-element (EE), IX-43 element-element relationship, see intersection endianness, V-40 environment variable, V-12, III-16, VIII-35, V97, V-102 example code integration, VIII-11 exchange, IX-43 , VIII-53, VIII-63 before solution, IV-22 initial, V-15, VIII-52 exhaust, VII-37 FE, IV-3, IV-8, I-9, IV-10 FEM, V-21 eld, IX-43 le system, V-81 les, V-16 temporary, V-18 nalization, V-30 Finite Element, see FE rewall, V-41 ap elastic, VII-20 FLEXlm, see license, V-109 Flowmaster, VI-40 FLUENT, VI-48 uid domain, IV-9 Fluid Dynamics, see CFD uid-structure interaction, see FSI ux, V-27, IX-43 FLUX, VI-66 foundation example, VIII-11 FSI, VII-8, VII-20, V-23, VII-70 full overlap (SDK), VIII-156 GLOBUS, V-52, V-123

48 IX MpCCI 3.1.0-1

IX Appendix glossary, IX-42 Go Step, IX-43 , see GUI Graphical User Interface, see GUI grid, IX-43 grid morpher, V-145 grid type (SDK), VIII-155 group switches, VIII-158 GUI, V-58, V-89 Coupling Step, IV-13 Edit Step, IV-16 options, V-71 Go Step, IV-18, V-76 menus, V-59 Models Step, IV-11 title, V-59 conguration le, VIII-29 Go Step, VIII-33 Models Step, VIII-30 Start, IV-10 HDF (SDK), VIII-152 heat transfer, V-22 HOME, III-16 home MpCCI, V-11 home directory, V-13 hostlist le, V-41 include mechanism, VIII-170 info, VI-9, VIII-45 information, V-97 initial exchange, V-15, IV-19, VIII-52 initialization, V-30, IX-43 , VIII-50 input le SDK, VIII-147 insideOnly, V-27 installation, III-5, V-106 Java, III-39 Perl, III-37 Windows, III-13 multi-platform, III-12 prerequisites, III-6 interpolation, IV-6, IX-43

Keyword Index intersection, V-27, IX-44 , V-74, V-76 intersection points (SDK), VIII-169 ipol (SDK), VIII-150 iteration, V-30 Java, III-9 installation, III-39 job control, V-115 job scheduler, V-42 jobs block (SDK), VIII-160 killer, VIII-35 killing jobs, V-125 license, III-19, V-106, V-107 manager, V-109 LoadLeveler, V-50, V-122 loop, VIII-66 LSF, V-44, V-119 macro, VIII-64 Magneto-Thermal, VII-54 manifold, VII-37 matching criterion (SDK), VIII-156 mesh, IX-44 mesh check, V-57 mesh denition, VIII-55, VIII-56, VIII-62 mesh quality check, V-57, V-73, VIII-153 Microsoft Windows, see Windows minimal distance, V-26, IX-44 , V-74, V-75 model le, VI-11 model preparation, IV-8 Models Step, IX-44 , see GUI morpher, VII-20, V-90, VI-116, V-145 mount, V-82 MpCCI Control Panel (FLUENT), VI-57 GUI, see GUI Morpher, V-90, VI-116, V-145 Observer, V-93 Project Manager, V-146 Visualizer, IV-24, V-95, V-136 MPCCI ARCH, see architecture

MpCCI 3.1.0-1

IX 49

Keyword Index MPCCI DEBUG, V-14 MPCCI HOME, V-11, V-104 MPCCI HOSTLIST FILE, V-41 MPCCI INITIAL EXCHANGE, V-15 MPCCI RSHTYPE, III-27, V-42 MPCCI TMPDIR, V-18 MPICH, III-11, III-35 MSC.Marc, VI-78 MSI, see windows installer multi-physics, IV-4, V-21, IX-44 multi-platform installation, III-12 N1GE, V-48, V-121 neighborhood search, IX-44 , see association network, III-27, V-39, V-80 node denition, VIII-55 nozzle, VII-70 nprocs (SDK), VIII-161 OpenPBS, V-46, V-120 OpenSSH, III-10 orphaned nodes, V-29, IX-44 SDK, VIII-156 Visualizer, V-139 output, VIII-49, V-72, VIII-158 overlap (SDK), VIII-156 parallel run, V-39 parameters block (SDK), VIII-163 partial overlap (SDK), VIII-156 PATH, V-11, III-12 PBS, V-46, V-120 PBSPro, V-46, V-120 PE, V-26 Perl, III-8, III-16, VIII-43 installation, III-37 PERMAS, VI-86 physical domain, V-21 pipe nozzle, VII-70 platform, see architecture Plug-In, VI-104 point-element (PE), IX-44 point-element relationship, see minimal distance port, V-40 post-processing, IV-25 prerequisites installation, III-6 pressure reference, V-23 project manager, V-94, V-146 projection distance, V-28 ptoi, V-128 pwd (SDK), VIII-161 quantities block (SDK), VIII-151 quantity, IV-4, VIII-32, IX-44 descriptor, VIII-65 reference, IX-4 visualizer, V-139 quantity (SDK), VIII-147 queuing system, V-42

IX Appendix

radiation, V-22 RadTherm, VI-97 reference pressure, V-23 FLUENT, VI-49 region, see coupling region releases, VI-9 remote computing, V-39 remote le browser, IX-44 , V-80 remote shell, V-20, III-27, V-42, V-101, V-110 testing, III-28 requirements code integration, VIII-8 resource directory, V-17 restart, V-38, V-73, VIII-154 results, IV-24 return status, VIII-75 MpCCI-RSH, III-11 Preparing the .rhosts le, III-33 rsh, see remote shell, V-82 runtime information (SDK), VIII-160 scanner, VI-11, VIII-35, VIII-43, IX-45 Start, IV-12 server, V-39, IX-45 , VIII-72, V-129

50 IX MpCCI 3.1.0-1

IX Appendix SGE, V-48, V-121 SGEEE, V-48, V-121 simulation code, VI-8, III-17, IX-45 software MpCCI, V-10 third party, V-20 solid mechanics, V-21 ssh, see remote shell, V-82 staggered method, IV-5, IX-45 STAR-CD, VI-103 Additional Scalars, VI-107 Plug-In, VI-104 Restart, VI-104, VI-109 starter, VIII-35, VIII-45 starting MpCCI, V-88 step-by-step code integration, VIII-14 stopper, VIII-35, VIII-45 storage index, VI-107 subcmd, VIII-46 subcommands list, V-86 subcycling, V-37 surface coupling, IV-4 switches block, VIII-157 symmetry axial, VII-70 synchronization point (SDK), VIII-69, VIII-98, VIII-164 temporary les, V-18 terminal window, V-96 testing installation, III-16 license server, III-26 MpCCI installation, V-111 remote shell, III-28 thermal coupling, V-23, VII-54 third party software, V-20 time step size exchange, V-36 timeout (SDK), VIII-154 timing (SDK), VIII-160 tolerance, VIII-153

Keyword Index Torque, V-46, V-120 tracele, IV-24, V-40, IX-45 , V-72, V-136, VIII152 transient problems, V-31 type (contact) (SDK), VIII-155 unit, VII-70 units, VII-8, VI-11 units (SDK), VIII-150 update MpCCI, V-114 user-dened function, VII-70 version mpcci, V-101 vibration, VII-8 viewer window, V-139 visualizer, see MpCCI Visualizer volume coupling, IV-4 vortex street, VII-8 Windows rcp, III-32 rsh, III-32 rlogin, III-32 Windows, III-16, III-32, III-32, III-35 windows installer, III-13 xterm, V-96 Y-Junction, VII-96

MpCCI 3.1.0-1

IX 51

You might also like