MP CCIdoc
MP CCIdoc
MP CCIdoc
MpCCI
I Overview
MpCCI 3.1.0-1 Documentation Part I Overview PDF version January 20, 2009
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.
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
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
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 . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
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 . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
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
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
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
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 . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .
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 . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MpCCI 3.1.0-1
I 19
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
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
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
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
II Release Notes
II
MpCCI 3.1.0-1
II Release Notes
1.9 FLUENT
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
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
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
II Release Notes
II
MpCCI 3.1.0-1
II Release Notes
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
II Release Notes
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.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
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 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
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
II Release Notes
14 II
MpCCI 3.1.0-1
MpCCI 3.1.0
MpCCI
MpCCI 3.1.0-1 Documentation Part III Installation Guide PDF version January 20, 2009
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.
Contents
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
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
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
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
MpCCI 3.1.0-1
III
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.
III
MpCCI 3.1.0-1
III Installation Guide For MpCCI under UNIX and Linux you need at least Perl 5.6.
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
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.
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.
10 III
MpCCI 3.1.0-1
Recommendations
Do never install MPICH separately. Please let MpCCI do this job.
MpCCI 3.1.0-1
III 11
12 III
MpCCI 3.1.0-1
export PATH=<MPCCI_HOME>/bin:$PATH
set PATH=<MPCCI_HOME>\bin;%PATH%
Please keep in mind that a list separator is : under UNIX and ; under Microsoft Windows.
MpCCI 3.1.0-1
III 13
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
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
16 III
MpCCI 3.1.0-1
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
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 .
18 III
MpCCI 3.1.0-1
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.
MpCCI 3.1.0-1
III 19
5 Licensing
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.
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"
Total ----2 10 1 1 1 1
Used ----0 0 0 0 0 0
Free ----2 10 1 1 1 1
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.
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.
mpcci arch
MpCCI 3.1.0-1
III 21
5 Licensing
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
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
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.
24 III
MpCCI 3.1.0-1
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
26 III
MpCCI 3.1.0-1
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.
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
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
28 III
MpCCI 3.1.0-1
MpCCI 3.1.0-1
III 29
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
[...] 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
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.
in a command shell. You need to have administrative rights to restart a service under Microsoft Windows .
32 III
MpCCI 3.1.0-1
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 )
You need to have administrative rights to start or stop a service under Microsoft Windows
MpCCI 3.1.0-1
III 33
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
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.
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
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.
MpCCI 3.1.0-1
III 37
9 Installing Perl
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
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.
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
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
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
MpCCI 3.1.0-1
IV
IV Getting Started
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
First system: Electrical conduction (Maxwells equations) Second system: Heat conduction (Fouriers law) Quantities: Temperature/electric conductivity (2 1), power loss/Joule heat (1 2)
time step wait for data data time step data wait for data
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
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.
IV
MpCCI 3.1.0-1
IV Getting Started
model le code B
start
start
Post-Processing A
MpCCI Visualizer
MpCCI 3.1.0-1
IV
IV Getting Started
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
IV
MpCCI 3.1.0-1
IV Getting Started Valve FE CFD MpCCI Airfoil FE CFD MpCCI Figure 3: Organization of the directories
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.
Fluid Domain
outlet
wall
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
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
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.
10 IV
MpCCI 3.1.0-1
IV Getting Started
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
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
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.
MpCCI 3.1.0-1
IV
13
IV Getting Started
14 IV MpCCI 3.1.0-1
IV Getting Started
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.
MpCCI 3.1.0-1
IV
15
IV Getting Started
16 IV MpCCI 3.1.0-1
IV Getting Started
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
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.
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
For the FE-code, set the Initial quantities transfer mode to receive (see Figure 16).
MpCCI 3.1.0-1
IV
19
IV Getting Started
With this Initial quantities transfer conguration for the CFD- and FE-code, the coupled simulation will use a parallel coupling algorithm (see Figure 17).
20 IV
MpCCI 3.1.0-1
IV Getting Started
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
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
parallel coupling
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
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.
MpCCI 3.1.0-1
IV
23
IV Getting Started
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
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
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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
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 3.1.0-1
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.
MpCCI 3.1.0-1
V User Manual
MpCCI 3.1.0-1
V User Manual
10 V
MpCCI 3.1.0-1
V User Manual
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
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
V User Manual
12 V MpCCI 3.1.0-1
V User Manual
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
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
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.3
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
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.
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
You should avoid to delete this directory once it was created and contains les.
MpCCI 3.1.0-1
17
V User Manual
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
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
V User Manual
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.
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.
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
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.
22 V
MpCCI 3.1.0-1
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 .
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
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 .
triangle 2
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.
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
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
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
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
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.
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.
30 V
MpCCI 3.1.0-1
V User Manual
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.
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
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. 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.
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
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
5 4 5 6 parallel coupling
A: exchange
A: receive
5 3
A: receive
A: send
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
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.
36 V
MpCCI 3.1.0-1
V User Manual
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
MpCCI 3.1.0-1
37
3 Code Coupling
V User Manual
38 V
MpCCI 3.1.0-1
V User Manual
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
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
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.
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
42 V
MpCCI 3.1.0-1
V User Manual
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
V User Manual
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
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
V User Manual
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
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
V User Manual
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
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
V User Manual
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
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
V User Manual
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
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>
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.
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
MpCCI 3.1.0-1
57
V User Manual
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.
-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.
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.
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:
60 V
MpCCI 3.1.0-1
V User Manual
MpCCI 3.1.0-1
61
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).
BatchKill kills a batch job. You are able to select one of your previously submitted jobs referenced by its job id (see Figure 5).
62 V
MpCCI 3.1.0-1
V User Manual
LicenseStop MpCCI license server stops the FHGSCAI vendor daemon running on the local host.
MpCCI 3.1.0-1
63
V User 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.
64 V
MpCCI 3.1.0-1
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:
MpCCI 3.1.0-1
65
V User Manual
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 ).
66 V
MpCCI 3.1.0-1
V User Manual
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
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
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.1 Control
In this section you may specify some general steering parameters used by MpCCI.
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
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.
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
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
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
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 .
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.
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
MpCCI 3.1.0-1
75
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 .
76 V
MpCCI 3.1.0-1
V User Manual
4.6 Go Step
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
V User Manual
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):
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):
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.
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
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.
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
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
Figure 19: Secure Connection Icon (left) and a non secure Connection Icon (right)
MpCCI 3.1.0-1
83
V User Manual
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 *************************************************
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
The list of commands is omitted here, a concise list is given in the following section.
MpCCI 3.1.0-1
85
V User Manual
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
V User Manual
88 V MpCCI 3.1.0-1
V User Manual
5.3.1
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
-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
V User Manual
5.3.2
mpcci morpher
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]
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
92 V
MpCCI 3.1.0-1
V User Manual
5.3.3
mpcci observe
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
V User Manual
5.3.4
mpcci pm
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.5
mpcci vis
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
V User Manual
5.3.6
mpcci xterm
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.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
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.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
MpCCI 3.1.0-1
99
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
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
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
MpCCI 3.1.0-1
103
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.6
mpcci where
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
V User Manual
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.1
mpcci license
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
-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
V User Manual
5.5.2
mpcci list
Synopsis: mpcci list is used to list information about the MpCCI installation.
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.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
V User Manual
5.5.4
mpcci ssh
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.
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.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
V User Manual
Options: -connect <port@hostname> 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.
-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
-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.
MpCCI 3.1.0-1
113
V User Manual
5.5.6
mpcci update
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
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
V User Manual
5.6.1
mpcci backup
...]]]
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.
=>
path/to/file.ext.bak000
116 V
MpCCI 3.1.0-1
V User Manual
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
[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.
MpCCI 3.1.0-1
117
V User Manual
OPENPBS batch system control. PBS batch system control. PBSPRO batch system control. TORQUE batch system control. for details.
118 V
MpCCI 3.1.0-1
V User Manual
5.6.3
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.
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
V User Manual
5.6.4
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.
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.5
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.
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
V User Manual
5.6.6
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
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.7
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.
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
V User Manual
5.6.8
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.9
mpcci kill
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.10
mpcci ps
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
V User Manual
5.6.11
mpcci ptoi
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.
128 V
MpCCI 3.1.0-1
V User Manual
5.6.12
mpcci server
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
-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
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
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.
132 V
MpCCI 3.1.0-1
V User Manual
-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.
MpCCI 3.1.0-1
133
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.13
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.
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
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.
MpCCI 3.1.0-1
137
6 MpCCI Visualizer
V User Manual
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
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
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
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
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
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.
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
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
144 V
MpCCI 3.1.0-1
V User Manual
MpCCI 3.1.0-1
145
V User Manual
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
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
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.
MpCCI 3.1.0
MpCCI
VI Codes Manual
MpCCI 3.1.0-1 Documentation Part VI Codes Manual PDF version January 20, 2009
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
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
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
VI
MpCCI 3.1.0-1
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
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
MpCCI 3.1.0-1
VI 5
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
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
VI
MpCCI 3.1.0-1
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 99 99
Post-Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
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
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
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.
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
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 -
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
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.
MpCCI 3.1.0-1
VI 13
2 Abaqus
VI Codes Manual
14 VI
MpCCI 3.1.0-1
VI Codes Manual
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 .
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
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 .
MpCCI 3.1.0-1
VI 17
2 Abaqus
VI Codes Manual
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
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.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
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.
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
MpCCI 3.1.0-1
VI 21
2 Abaqus
VI Codes Manual
22 VI
MpCCI 3.1.0-1
VI Codes Manual
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.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
MpCCI 3.1.0-1
VI 25
3 ANSYS
VI Codes Manual
26 VI
MpCCI 3.1.0-1
VI Codes Manual
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.
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
+ + +
28 VI MpCCI 3.1.0-1
VI Codes Manual
/inquire, mpcciaction,ENV,MPCCI_INITIAL_EXCHANGE,1 /com > > > /com > > > /com > > >
*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.
30 VI
MpCCI 3.1.0-1
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
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
32 VI
MpCCI 3.1.0-1
VI Codes Manual
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.
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
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
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
Direct Direct
3.2.5 Go Step
36 VI MpCCI 3.1.0-1
VI Codes Manual
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 ).
MpCCI 3.1.0-1
VI 37
3 ANSYS
VI Codes Manual
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.
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
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.3 References
Flowmaster documentation is part of the Flowmaster distribution.
40 VI
MpCCI 3.1.0-1
VI Codes Manual
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
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
MpCCI 3.1.0-1
VI 43
4 Flowmaster
VI Codes Manual
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".
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
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.2 Post-Processing
You may use the Flowmaster interface and analyze the results by querying the database or creating a report.
46 VI
MpCCI 3.1.0-1
VI Codes Manual
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 .
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.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
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.
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 .
50 VI
MpCCI 3.1.0-1
VI Codes Manual
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-
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.
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
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
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
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
56 VI
MpCCI 3.1.0-1
VI Codes Manual
> /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.
MpCCI 3.1.0-1
VI 57
5 FLUENT
VI Codes Manual
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.
58 VI
MpCCI 3.1.0-1
VI Codes Manual
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
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
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 .
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
62 VI
MpCCI 3.1.0-1
VI Codes Manual
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
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
UDF Hook INIT EXECUTE AT END EXECUTE AT EXIT ADJUST DELTAT ON DEMAND
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
PROPERTY
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.3 References
FLUX Documentation is part of the FLUX distribution.
66 VI
MpCCI 3.1.0-1
VI Codes Manual
MpCCI 3.1.0-1
VI 67
6 FLUX
VI Codes Manual
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
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.
MpCCI 3.1.0-1
VI 69
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.
70 VI
MpCCI 3.1.0-1
VI Codes Manual
MpCCI 3.1.0-1
VI 71
6 FLUX
VI Codes Manual
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".
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
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
Direct
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
74 VI MpCCI 3.1.0-1
VI Codes Manual FLUX oers a number of options in the Go panel, see Figure 3.
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.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.
MpCCI 3.1.0-1
VI 75
6 FLUX
VI Codes Manual
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 .
76 VI
MpCCI 3.1.0-1
VI Codes Manual
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
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
MpCCI 3.1.0-1
VI 79
7 MSC.Marc
VI Codes Manual
80 VI
MpCCI 3.1.0-1
VI Codes Manual
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.
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.
82 VI
MpCCI 3.1.0-1
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
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.
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
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.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
MpCCI 3.1.0-1
VI 87
8 PERMAS
VI Codes Manual
88 VI
MpCCI 3.1.0-1
VI Codes Manual
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.
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 .
90 VI
MpCCI 3.1.0-1
VI Codes Manual
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
Figure 4: Coupling algorithm Jacobi for PERMAS with a CFD code, code id has no inuence
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.
MpCCI 3.1.0-1 VI 93
8 PERMAS
VI Codes Manual
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
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
96 VI MpCCI 3.1.0-1
VI Codes Manual
9 RadTherm
9.1 Quick Information
Physical Domains Company Name Company Homepage Support Radiation ThermoAnalytics www.thermoanalytics.com support thermoanalytics.com
9.1.3 References
RadTherm Documentation is part of the RadTherm distribution.
MpCCI 3.1.0-1
VI 97
9 RadTherm
VI Codes Manual
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.
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.4 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
MpCCI 3.1.0-1
VI 99
9 RadTherm
VI Codes Manual
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
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.
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.
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 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
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.3 References
STAR-CD Documentation is part of the STAR-CD distribution (e. g. STAR-CD User Guide).
104 VI
MpCCI 3.1.0-1
VI Codes Manual
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.
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
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.
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
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 .
112 VI
MpCCI 3.1.0-1
VI Codes Manual
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.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
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 .
116 VI
MpCCI 3.1.0-1
VI Codes Manual
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").
118 VI
MpCCI 3.1.0-1
VI Codes Manual
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.
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 !
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
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
MpCCI 3.1.0-1
VI 123
10 STAR-CD
VI Codes Manual
124 VI
MpCCI 3.1.0-1
VI Codes Manual
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
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
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
126 VI
MpCCI 3.1.0-1
VI Codes Manual
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
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
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
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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
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 . . . . . . . . . . . . . . . . . . . . . . . . .
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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
VII
MpCCI 3.1.0-1
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Running the Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.7.1 7.7.2 Starting the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . End of the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Discussion of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Y-Junction Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Model Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.1 8.2.2 Network Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fluid Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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
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
VII Tutorial
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
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.
g cm s
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. ...
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
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
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 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.6 Go Step
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
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
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
MpCCI 3.1.0-1
VII 17
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
time [s]
1 2 3 4 5 6 7 8 9 10
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
VII Tutorial
0.0
inlet v = 8 m/s
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
20 VII
MpCCI 3.1.0-1
0.06
0.052
0.134
VII Tutorial
control point
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
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. ...
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
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. ...
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
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
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.
...
MpCCI 3.1.0-1
VII 25
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
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
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 > .
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 In the server panel, no changes are necessary. The code panels are described for each code.
MpCCI 3.1.0-1
VII 29
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
3.6 Go Step
Set Initial quantities transfer to receive. All other options should not be changed.
MpCCI 3.1.0-1
VII 31
VII Tutorial
to
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
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.
...
MpCCI 3.1.0-1
VII 33
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
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. ...
MpCCI 3.1.0-1
VII 35
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.15
0.2
Figure 6: Elastic ap: Displacement of the control point for Abaqus, ANSYS and MSC.Marc coupled with FLUENT.
VII Tutorial
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
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
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
VII Tutorial
W mK
Conductivity
55.0
Abaqus In Abaqus DC3D8 elements are used. PERMAS In PERMAS HEXE8 solid elements and CONA4 convection elements are used. ...
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
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. ...
40 VII
MpCCI 3.1.0-1
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. ...
MpCCI 3.1.0-1
VII 41
4 Exhaust Manifold
VII Tutorial
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
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.
...
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 > .
44 VII
MpCCI 3.1.0-1
VII Tutorial
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
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
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
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 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". ...
VII Tutorial
4.8 Post-processing
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
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
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.
MpCCI 3.1.0-1
VII 55
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. ...
+ (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
~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. ...
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
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
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
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:
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.
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
VII Tutorial
STAR-CD
Select index 1
...
62 VII
MpCCI 3.1.0-1
VII Tutorial
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
VII Tutorial
...
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.
64 VII
MpCCI 3.1.0-1
VII Tutorial
5.6 Go Step
5.6 Go Step
MpCCI 3.1.0-1
VII 65
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
5.6 Go Step
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
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.
68 VII
MpCCI 3.1.0-1
The STAR-CD job will be prepared and started. The data transfer is handled by the MpCCI plug-in calls in STAR-CD.
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
70 VII
MpCCI 3.1.0-1
1 mm 4 mm
outlet, p = p0
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.
inlet, p = pi
5 mm
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. ...
VII Tutorial
Abaqus
r=0.5 mm
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
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
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
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
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
VII Tutorial
Set Initial quantities transfer to receive. All other options need not be changed.
78 VII
MpCCI 3.1.0-1
VII Tutorial
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
VII Tutorial
0.1
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
MpCCI 3.1.0-1
VII 81
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
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.
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. ...
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
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.
84 VII
MpCCI 3.1.0-1
VII Tutorial
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
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.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
7.6 Go Step
The Initial quantities transfer is set to receive. All other options should not be changed.
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
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.
...
90 VII
MpCCI 3.1.0-1
VII Tutorial
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
92 VII
MpCCI 3.1.0-1
VII Tutorial
MpCCI 3.1.0-1
VII 93
VII Tutorial
VII Tutorial
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
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
96 VII
MpCCI 3.1.0-1
VII Tutorial
subdirectories from "<MpCCI home>/tutorial/Y-Junction" which correspond to the simulation codes you want to use.
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
VII Tutorial
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.
MpCCI 3.1.0-1
VII 99
8 Y-Junction
VII Tutorial
100 VII
MpCCI 3.1.0-1
VII Tutorial
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
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
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
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.
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
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. ...
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. ...
110 VII
MpCCI 3.1.0-1
MpCCI 3.1.0-1
VII 111
8 Y-Junction
VII Tutorial
112 VII
MpCCI 3.1.0-1
VII Tutorial
MpCCI 3.1.0-1
VII 113
MpCCI 3.1.0
MpCCI
MpCCI 3.1.0-1 Documentation Part VIII Programmers Guide PDF version January 20, 2009
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.
Contents
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
2.6
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 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 . . . . . . . . . . . . . . . . . . . . . . . . . .
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
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
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
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.
2 Code API
VIII
MpCCI 3.1.0-1
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.
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
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
MpCCI 3.1.0-1
VIII
11
7 3 5
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
-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 -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
All changes are commented and marked with CHANGED: . (For FORTRAN see the corresponding les in "example/FORTRAN".)
14 VIII
MpCCI 3.1.0-1
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
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
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
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
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
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
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
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
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
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 ,
23
2 Code API
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
top
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)
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
MpCCI 3.1.0-1
VIII
27
2 Code API
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
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
<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" .
<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.
<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>
Figure 8: Example of <ModelMenuEntries> denition in "gui.xcf" and resulting Model step buttons.
<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
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.
<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
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="" />
<!-- 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
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
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
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.
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.
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.
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
<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
<Identifier type="bool" default="true" description="Start additional control process"/> default must be initialized with true or false.
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.
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
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.
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.
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
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.
MpCCI 3.1.0-1
VIII
41
2 Code API
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.
42 VIII
MpCCI 3.1.0-1
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.
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)
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.
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
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.
MPCCI RLSE the adapter release token (should be equal CODE RLSE or STATIC ). MPCCI ARCH the adapter architecture token (should be == CODE ARCH).
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
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
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.
MpCCI 3.1.0-1
VIII
47
2 Code API
48 VIII
MpCCI 3.1.0-1
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
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
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
MpCCI server
MpCCI 3.1.0-1
VIII
51
2 Code API
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
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
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
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
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.
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 3.1.0-1
VIII
57
2 Code API
58 VIII
MpCCI 3.1.0-1
/* 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
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
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
/* /* /* /*
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
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)
MpCCI 3.1.0-1
VIII
61
2 Code API
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)
62 VIII
MpCCI 3.1.0-1
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
64 VIII
MpCCI 3.1.0-1
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
MpCCI 3.1.0-1
VIII
65
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
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
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
68 VIII
MpCCI 3.1.0-1
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.
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
solve
solve
70 VIII
MpCCI 3.1.0-1
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
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.
72 VIII
MpCCI 3.1.0-1
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.
MpCCI 3.1.0-1
VIII
73
74 VIII
MpCCI 3.1.0-1
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".
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
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
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
pArgc pArgv
INOUT INOUT
pointer to pass the argument count to MPI Init pointer to pass the arguments to MPI Init
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
INOUT INOUT IN
pointer to pass the argument count to MPI Init pointer to pass the arguments to MPI Init id string
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
meshId idString
IN IN
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
part 2
part 3 1 part 3
Class Position
80 VIII
MpCCI 3.1.0-1
meshId partId
IN IN
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.
81
meshId2
partId3
Process 1Process 2
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
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
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
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, */ */ */ */
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 );
Class Position
86 VIII
MpCCI 3.1.0-1
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
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
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
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
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
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
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
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
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)
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
/* 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
94 VIII
MpCCI 3.1.0-1
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
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
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 };
*/ /* or = 3 */ */ /* or = { 1, 1, 1} */ */
/* Call of the subroutine: CCI_Def_comm( localCommId, remoteCodeId, remoteCommId, nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds );
Class Position
MpCCI 3.1.0-1
VIII
97
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
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
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
/* Call of the subroutine: CCI_Def_sync_point( syncPointId, nQuantitiesToSend, quantitiesToSend, nMeshIdsToSend, meshIdsToSend, nQuantitiesToRecv, quantitiesToRecv, nMeshIdsToRecv, meshIdsToRecv );
*/
Class Position
100 VIII
MpCCI 3.1.0-1
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
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
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
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
104 VIII
MpCCI 3.1.0-1
cciProcess
IN
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
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
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
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
local, non-blocking following the denition phase, after CCIclosesetup and before a corresponding CCIsend of CCIisend
108 VIII
MpCCI 3.1.0-1
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
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.
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 ); /*
Class Position
MpCCI 3.1.0-1
VIII
111
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; */
/* Call of the subroutine: CCI_Send( nQuantityIds, quantityIds, nLocalMeshIds, localMeshIds, comm ); Code 1
Code 2
meshId = 1
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
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
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
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
(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
MpCCI 3.1.0-1
VIII
117
request status
INOUT OUT
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
syncPointId status
IN OUT
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
meshId partId quantityId quantityDim nNodes nNodeIds nodeIds valuesDataType values maxnEmptyNodes emptyNodes nEmptyNodes
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
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
/* Call of the subroutine: CCI_Get_nodes( meshId, partId, quantityId, quantityDim, nNodes, nNodeIds, nodeIds, valuesDataType, values, maxnEmptyNodes, emptyNodes, &nEmptyNodes );
Class Position
CCIgetelems
meshId partId quantityId quantityDim nElems nElemIds elemIds nDataPointsPerElem dataPointsPerElem valuesDataType values maxnEmptyElems emptyElems nEmptyElems
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
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
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 );
*/ */ */ */
*/
*/ */ */ */ */ */
*/
124 VIII
MpCCI 3.1.0-1
MpCCI 3.1.0-1
VIII
125
IN OUT IN
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 ).
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
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()
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
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
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.2.6 Termination
CCIfinalize
int CCI_Finalize()
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
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
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
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
- 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
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
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
localCommId remoteCodeId remoteCommId maxnQuantToSend quantitiesToSend meshIdsToSend nQuantitiesToSend maxnQuantToRecv quantitiesToRecv meshIdsToRecv nQuantitiesToRecv
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
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
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
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
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
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
DUMMY
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
(1,0)
(0,0)
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
CCIabort
IN IN IN
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
143
double 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
double 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
MpCCI 3.1.0-1
VIII
145
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
146 VIII
MpCCI 3.1.0-1
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
MpCCI 3.1.0-1
VIII
147
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.
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
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
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);
= = = =
= = = =
% 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
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
The parameter information is only relevant for the MpCCI GUI, so the description is omitted here.
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
152 VIII
MpCCI 3.1.0-1
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
% % % % % %
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
% % % %
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
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
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
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
MpCCI 3.1.0-1
VIII
157
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
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
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.
160 VIII
MpCCI 3.1.0-1
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
% 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
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.
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
% 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!
164 VIII
MpCCI 3.1.0-1
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
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 );
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
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
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:
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
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 .
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
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,
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
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,
non_orphaned_objects ( JobName2/1 );
% 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
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
MpCCI 3.1.0-1
VIII
171
= = = = = = = =
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)
172 VIII
MpCCI 3.1.0-1
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
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
3.4 An Example
= = = = = = = =
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
= ...
+ + 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
3.4 An Example
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)
+ + + c
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
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
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
PosRad
Abaqus
FLUX
CFX
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 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
MpCCI 3.1.0-1
STAR-CD IX 5
PERMAS
FLUENT
ICEPAK
ANSYS
PosRad
Abaqus
FLUX
CFX
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 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
r r r s
r r r s
r r s s/r r 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
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
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
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
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
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
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:
gv00 gv19 Global Code API symbol: Default value: Dimension: Physical meaning: Interpolation type: Coupling Dimensions:
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
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
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
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
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
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