Sei sulla pagina 1di 78

Tutorial: Setup of Coupling Cases

MpCCI 3.0.4
Manuals and Tutorials

April 25, 2005

MpCCI is a registered trademark of Fraunhofer SCAI

Fraunhofer Institute for Algorithms and Scientific Computing SCAI


Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
http://www.scai.fraunhofer.de/mpcci

ABAQUS is a registered trademark of ABAQUS Inc.


ANSYS is a registered trademark of Ansys Inc.
FLUENT is a registered trademark of Fluent Inc.
STAR-CD is a registered trademark of CD adapco Group
PERMAS is a registered trademark of Intes GmbH
RadTherm is a registered trademark of ThermoAnalytics Inc.
FLEXlm is a registered trademark of Macrovision

1
Contents
1 About the document 3

2 Code Adapter Description 4


2.1 ABAQUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.1 Information on supported coupling elements types . . . . . . . . . . . . . . . . . . . 4
2.1.2 Job Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.3 Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 ANSYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1 Installation Directory and Adaptor related files . . . . . . . . . . . . . . . . . . . . . 6
2.2.2 Information on supported coupling elements types . . . . . . . . . . . . . . . . . . . 6
2.2.3 Job Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.4 Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.1 Installation Directory and Adaptor related files . . . . . . . . . . . . . . . . . . . . . 14
2.3.2 Information on supported coupling elements types . . . . . . . . . . . . . . . . . . . 14
2.3.3 Job Control User Defined Function Hooking . . . . . . . . . . . . . . . . . . . . . . 14
2.3.4 Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4 STAR-CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4.1 Installation Directory and Adaptor related files . . . . . . . . . . . . . . . . . . . . . 18
2.4.2 Information on supported coupling elements types . . . . . . . . . . . . . . . . . . . 18
2.4.3 Job Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4.4 Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3 How to prepare a coupled simulation 30


3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.2 General Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3 The Elastic Flaps: FLUENT and ANSYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.3.2 Coupling Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.3.3 Setting Parameters in ANSYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.3.4 Setting Parameters in FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.5 MpCCI GUI: Setting up a Coupled simulation . . . . . . . . . . . . . . . . . . . . . . 34
3.4 The Three Dimensional Flap: ABAQUS and FLUENT . . . . . . . . . . . . . . . . . . . . 45
3.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.4.2 Coupling Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.4.3 Setting Parameters in ABAQUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4.4 Setting Parameters in FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4.5 Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4.6 Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.4.7 Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.4.8 Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

2
3.5 The Three Dimensional Flap: ANSYS and FLUENT . . . . . . . . . . . . . . . . . . . . . 49
3.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.5.2 Coupling Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.5.3 Setting Parameters in ANSYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.5.4 Setting Parameters in FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.5.5 Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.5.6 Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.5.7 Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.5.8 Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.6 Exhaust Manifold: ABAQUS and FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.6.2 Coupling Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.6.3 Setting Parameters in ABAQUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.6.4 Setting Parameters in FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.6.5 Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.6.6 Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.6.7 Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.6.8 Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.7 Electro-Thermal analysis with Joule heat source term: ANSYS and STARCD . . . . . . . 58
3.7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.7.2 Coupling Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.7.3 Setting Parameters in ANSYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.7.4 Setting Parameters in STARCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.7.5 Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3.7.6 Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.7.7 Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.7.8 Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.8 Electro-Thermal analysis with Joule heat source term: ANSYS and FLUENT . . . . . . . 65
3.8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.8.2 Coupling Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.8.3 Setting Parameters in ANSYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.8.4 Setting Parameters in FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.8.5 Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.8.6 Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.8.7 Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.8.8 Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.9 The Rotating Harddisk: ANSYS and FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.9.2 Coupling Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.9.3 Setting Parameters in ANSYS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.9.4 Setting Parameters in FLUENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.9.5 Models Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

3
3.9.6 Coupling Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.9.7 Edit Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.9.8 Go Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

4
1 About the document
In chapter 2 of this document, you will find information on the code adapter description for each code.

Chapter 3 of this tutorial contains examples of applying MpCCI to a variety of tutorial problems thus
demonstrating its features and illustrating its use. Each tutorial starts with a brief description of the
physical problem. There follows a description of all GUI operations (and their equivalent commands)
required to set up the model covered by the tutorial and perform the coupled analysis.

All example files used in this tutorial are located in the <MpCCI>/tutorial/ directory. There you find
directories sorting the examples. These directories contain all the necessary files for a coupled simulation.

5
2 Code Adapter Description
2.1 ABAQUS
2.1.1 Information on supported coupling elements types
The interface region is a surface that adjoins the domains of a multidisciplinary problem. The surface must
be an element-based surface. Any element type available for the supported procedures can be used in a
co-simulation step. Refer to ABAQUS on-line manual for elements which underlie the interface region.

2.1.2 Job Control


Performing a multidisciplinary analysis using the ABAQUS co-simulation interface involves the following
steps:

- Preparing the ABAQUS analysis and the third party code for co-simulation

- Directing the exchange process

- Executing the coupled analysis


Preparing an ABAQUS analysis job for co-simulation involves the following steps:

- Defining the co-simulation step

- Defining the interface region or regions, and

- Defining the physical quantities to be exchanged during the analysis

Each of these steps is described in detail below.


The ABAQUS co-simulation interface is used in conjunction with existing ABAQUS procedures. In
steps where you wish to define a co-simulation, you specify a valid ABAQUS procedure, loads, and bound-
ary conditions irrespective of coupling considerations. You then indicate that the step should be performed
as a co-simulation step in which solution quantities will be exchanged with a third-party code.

Communication with the MpCCI server is initiated at the beginning of the co-simulation step and is
terminated at the end of the co-simulation step.

Because a co-simulation involves real-time communication between ABAQUS and a third-party code,
with actions required to start and stop the third-party process, you can define only one co-simulation step
per analysis job.

Use the following option within a step definition to indicate that the step should be a co-simulation:
*CO-SIMULATION

6
For each interface region you must specify the physical quantities that are to be exchanged with the
third-party code. Refer to the ABAQUS online manual for the list of the physical quantities that can be
exchanged during a co-simulation and provides the quantity identifier and a description of the quantity.

Use the following option to specify the data to be received from the third-party code:

*CO-SIMULATION, IMPORT

surface A, quantity l1, quantity l2,... surface B,quantity l3

Use the following option to specify the data to be sent to the third-party code:

*CO-SIMULATION, EXPORT

surface A, quantity E1 surface B, quantity E2

ABAQUS does not require that the analysis be run with a particular unit system. However, in a co-
simulation the unit system used by ABAQUS must coincide with the internal unit system of the third-party
code. The MpCCI configuration file provides a mechanism to perform unit transformations.

2.1.3 Functionality
In a co-simulation analysis ABAQUS communicates in real time with the MpCCI server to exchange quan-
tities with a third -party code while each analysis advances its simulation time. Directing the exchange
process between ABAQUS and the third-party analysis requires performing the following tasks:

- defining the pairs of coupling regions between the third-party codes across which co-simulation quantities
will be communicated

- defining the coupling scheme, which controls how data are exchanged between ABAQUS and the third-
party code; and

- defining the rendezvousing scheme, which controls the frequency of exchanges between ABAQUS and the
third-party code
You will use the MpCCI Graphical User Interface (GUI) to define the MpCCI configuration file and to
control the startup of the server and client applications.

7
2.2 ANSYS
2.2.1 Installation Directory and Adaptor related files
Within the MpCCI distribution the <MpCCI>/adapters directory contains the necessary software to
connect the simulation programs to MpCCI depending on your license. The files are located within this
subdirectory:

<MpCCI>/adapters/ansys

This subdirectory is further divided by several release subdirectories (e.g. v71,v80 and v81 for
ANSYS).

The ANSYS version directories are further divided by several architectures (e.g. linuxia32). There
you find the library files of the ANSYS adapter (e.g. libansysmpcci.so). The connection to MpCCI is
established using these shared libraries. The binding to the APDL command mpcci is set in the an-
sys ext.tbl file.

2.2.2 Information on supported coupling elements types


The old cci APDL command is renamed to mpcci. Normally the degree of freedom (DOF) of the elements
involved in the coupling process determines which quantities can be transferred. It is laborious to find out
if all DOFs are actually supported by the ANSYS API. As this API is used for the MpCCI ANSYSadapter,
it is not guaranteed that all theoretically supported DOFs are valid.
All elements are mapped to MpCCI element types. Have a look at the MpCCI Technical Reference to see
what types are supported. The following list shows all supported ANSYS elements and the corresponding
MpCCI element types.
Only few of the element type mappings are already validated with certain quantities. The compatibility
index shows the validated element quantity pairs. It is constantly added. Please inform us if you have
problems with other combinations.
For coupling faces on volume elements, additional area elements on the coupling face must be generated.
For instance SHELL63 elements for a fluid structure interaction can be used as dummy elements to receive
forces from the partner code. The dummy elements must have the corresponding quantities you want to
receive or send. Only these elements take part in the coupling process and must be deselected when the
solution is performed. In case of line coupling on area elements BEAM3 elements can be used. The attached
example cases for 2D and 3D fluid structure interaction contains such dummy elements. Furthermore we
need an additional variable in ANSYS to be used with the time command to synchronise FLUENT and
ANSYS. Every element of your model must be assigned a unique material property number. In ANSYS
you assign properties to such numbers with the mp command.

2.2.3 Job Control


To enable coupling capabilities the mpcci command is added to the standard APDL commands. By the
command line options you decide which coupling function is called. The basic tasks of the command are

8
MpCCI Element Types ANSYS Element Types
MPCCI ELEM LINE BEAM3, BEAM4, BEAM23
MPCCI ELEM TRIANGLE, PLANE13, PLANE42, PLANE55,
MPCCI ELEM QUAD HYPER56, SHELL57, SHELL63, PLANE67,
VISCO106, SHELL131 SHELL143, SHELL157,
PLANE181, PLANE182
MPCCI ELEM TRIANGLE6, PLANE2, PLANE35, PLANE53, HYPER74,
MPCCI ELEM QUAD8 PLANE77, PLANE82, VISCO88, SHELL93,
2D Volume coupling SHELL99, VISCO108, PLANE121, SHELL132,
MPCCI ELEM TRIANGLE, PLANE145, PLANE14, SHELL150, PLANE183
MPCCI ELEM QUAD
MpCCI cannot handle midside nodes.
So only the vertex nodes are consid-
ered. Midpoint nodes must lie on the
straight line between the two vertex
nodes. Otherwise face area calculation
would fail.
MPCCI ELEM PRISM, SOLID5, SOLID45, SOLID46, HYPER58,
MPCCI ELEM TETRAHEDRON, SOLID62, SOLID64, SOLID65, SOLID69,
MPCCI ELEM HEXAHEDRON, SOLID70, HYPER86, SOLID96, SOLID97,
MPCCI ELEM PYRAMID VISCO107, SOLID185
Tetrahedron and Hexahedron solid ele- SOLID87, VISCO89, SOLID90, SOLID92,
ments with midpoint nodes can not yet SOLID95, SOLID98, SOLID122, SOLID123,
be handled properly by MpCCI. SOLID127, SOLID128, SOLID147, SOLID148,
SOLID168, SOLID186, SOLID187
Can only be used if all mid node rest SOLID117
on the straight line between the corner
nodes.

Table 1: MpCCI ANSYS Element Mappings

9
Quantity Joule Lorentz Electric Nodal Wall Relative
Heat Force Resistivity Positions Forces Wall
Density Density Forces
BEAM3 + + +
SHELL63 + + +
PLANE13 + + +
SOLID5 + + + + +
SOLID45 + + + +
SOLDI69 + + +
SOLID97 + + +
SOLID117 + + +

Table 2: Element Compatibility Index

to initialise the coupling and to manage the data transfer to MpCCI commands.
ATTENTION : Ensure that the directory path of your MpCCI-APDL scripts on MS-Windows do not
contain any white spaces!!!!!
The following APDL script demonstrates how and where to place the new command:
/BATCH
/COM *******************************************************************
/COM * FILENAME: startjob.ans ANSYS 9.0 *
/COM * PROPERTIES: *
/COM * linear, transient, structural mechanics, 2D *
/COM * *
/COM * DESCRIPTION: *
/COM * Coupled Fluid-Structure-Interaction *
/COM * ANSYS <--> MpCCI <--> FLUENT *
/COM *******************************************************************
/CONFIG, SZBIO, 163840
/CONFIG, FSPLIT, 256 ! 1GB
/CONFIG, NRES, 3000

/COM The number of processors is set to one because ANSYS is restricted


/COM to one processor during the use of shared libraries.
/CONFIG, NPROC, 1

/COM > > > Resume ANSYS database


resume, ansys, db

/FILNAME, FSI2D
RUN = 0
STEPS=1000
SOLTYPE=1 ! type of solution: 0-static; 1-transient
save

/PREP7
/COM > > > Material
mp, ex, 1, 2e8 !rubber N/m^2
mp, prxy, 1,0.495
mp, dens, 1, 1000

/COM > > > Initialize MpCCI

10
(a) Ansys Flap (b) Additional SHELL63 elements for coupling

~mpcci, init, noinitiator, 2D

fini

/SOLU
*IF, SOLTYPE, EQ, 0, THEN
antype, static, new ! new static analysis
*ELSE
antype, transient, new ! new transient analysis
trnopt, full
*ENDIF

/COM > > > Boundary conditions


alls
*get, ymin, NODE, , MNLOC, y
*get, ymax, NODE, , MXLOC, y

nsel,,ext
nsel,r,loc,y, ymin-1e-6, ymin+1e-6
d, all, ux,0
d, all, uy,0
alls
nsel,,ext
nsel,r,loc,y, ymax-1e-6, ymax+1e-6
d, all, ux,0
d, all, uy,0

! gravity in negative y direction -> positive value


ACEL, 0, 9.81, 0

nsubst, 1 ! 2 substep for this LS


NLGEOM, on ! nonlinear geometry effects on
kbc, 0 ! ramp the loads
neqit, 30 ! max. 30 equilibrium iteration for each substep
outres, basic, last ! Put at least the basic results into the result file
!!!!!!!! Otherwise the coupling will fail

11
eqslv, SPARSE
save
*DO, i, 1, steps+1
*IF, i, ne, 1, THEN
/GOPR
RUN = RUN +1

/COM > > > Next ANSYS run

~mpcci , (receive/send/exchange)

/COM > > > Start calculation


esel, all
nsle ! make sure to have all of the model

! deselect the beam elements, only used for transfer of values


cmsel, u, TOP
cmsel, u, BOTTOM
nsle

time, PhysicalTime ! time at the end of this loadstep

solve
/COM > > > Calculation finished

/COM > > > Send data

~mpcci, exchange, wait

/COM > > > Send data finished

*ELSE
/COM > > > First run is DUMMY
*ENDIF
*ENDDO

fini

/COM > > > Finalize MpCCI


save
~mpcci, stop

/exit, nosa

MpCCI is initialised by mpcci, init, noinitiator, 2D. This means ANSYS is not the initiator and
the model is two dimensional. Next the loop for the coupled simulation starts with one dummy run first.
ANSYS sometimes has problems without this dummy run. Next, ANSYS receives data by mpcci, receive,
wait. Following it waits for the partner code to finish the solution and receives the results. Afterwards
the solution mpcci, send, wait sends the nodal positions to FLUENT. ANSYS will wait until FLUENT
has received this data. The loop continues until the final step is reached. The command mpcci, stop is
finishing the MpCCI process regularly and ANSYS could be finished. If element table items should be
transferred, generate them before the send command is executed.

Data access
In the GUI-option receive/send method there are two methods:
Direct direct read or store of data using UPF (user programmable feature) subroutines

12
ETAB only send possible (no receive of values into ETAB)
Here the ETAB option means that a quantity is read out of an element-table (ETAB). It is only valid
when sending an element based quantity.
If the quantity is a scalar quantity with dim=1 (e.g. Joule heat density), choose a storage index <sindex>.
The user has to generate a element table fulfilling the naming convention:

etab, MPCCI <sindex>, <item>, <component>

For example: to get joule heat density from storage index 0 the APDL command should be:

etab, MPCCI_00, jheat


(see ANSYS documentation of ETABLE command for details)
The user has to fill the ETAB with senseful values before the quantities are sent to the partner application.
If the quantity has a dimension > 1 (vector quantity) then you have to generate element tables following
this naming convention:

etab, MPCCI < sindex >, <item>, <component>


etab, MPCCI <sindex+1>, <item>, <component>
etab, MPCCI <sindex+2>, <item>, <component>

For example: to get lorentz force denstiy from storage index 5 the APDL command should be:
etab, volu, volu ! element volume
sexp, MPCCI_05, lfx, volu,,-1 ! lorentz force density
sexp, MPCCI_06, lfy, volu,,-1
sexp, MPCCI_07, lfz, volu,,-1

2.2.4 Functionality
As you can see in the APDL script above the command for MpCCI calls within ANSYS is ~mpcci followed
by command line options. The following command line options are valid, where * marked values are default
values and options in [] are optional.
WRCPL, filename.cpl
STATUS
*HELP
INIT [, *DEFAULT | INITIATOR | NOINITIATOR ] [, 2D | *3D ]
IPROBE
SEND [, *WAIT | NOWAIT ]
RECEIVE [, *WAIT | NOWAIT ]
EXCHANGE [, *WAIT | NOWAIT ]
DEFAULT [, *WAIT | NOWAIT ]
WAIT
STOP

13
WRCPL, filename.cpl
Writes a component list file with all defined components and variables into filename.cpl. This file is nor-
mally generated and used by the MpCCI GUI, but can also be generated with the wrcpl command option.
Then the GUI will use this file for the <filename>.db file.

STATUS
Gives the actual MpCCI status.

HELP
Gives the possible commands.

INIT [, *DEFAULT | INITIATOR | NOINITIATOR ] [, 2D | *3D ]


Initialises the MpCCI process with different initialize states. Only one process during a bilateral coupled
simulation can be the initiator. The difference between the statements INITIATOR and NOINITIATOR
is that the initiator is doing the first send transfer action. If the dimensionality of the model is not given
by 2D or 3D the adapter will perform a dimension check itself.

IPROBE
Sends a MpCCI IPROBE request to 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.

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.

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.

EXCHANGE [, *WAIT | NOWAIT ]


Performs EXCHANGE transfer operation, first 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.

DEFAULT [, *WAIT | NOWAIT ]


Performs data transfer depending on the usage of MpCCI before. If data was transferred before this call, a
full exchange is done. Elsewhere if MpCCI data transfer was not used before and during initialisation the
INITIATOR statement was given, a SEND operation is performed for the first send after first iteration. If
the NOINITIATOR statement was given a RECEIVE operation is performed for the first receive before
first iteration.

14
WAIT
Performs a MpCCI ISEND call and completes the pending isend request.

STOP
Performs a MpCCI FINALIZE and stops the MpCCI process within ANSYS.

15
2.3 FLUENT
2.3.1 Installation Directory and Adaptor related files
Within the MpCCI distribution the <MpCCI>/adapters directory contains the necessary software to
connect the simulation programs to MpCCI depending on your license. The files are located within this
subdirectory:

<MpCCI>/adapters/fluent

This subdirectory is further divided by several release subdirectories.


The connection between FLUENT and MpCCI is also made by a shared library, located in the fluent
directory and further sorted in subdirectories defining the FLUENT release number, e.g. 6.2.16 for
release 6.2.16. These directories contain a subdirectory src and one for each operating system being
supported. There you find different directories for different solver versions (2d, 2ddp, 3d, 3ddp). Within
these subdirectories you find static libraries of the MpCCI adapter routines.

2.3.2 Information on supported coupling elements types


For the coupling process you need to group the elements that are included in the coupling region. It is
just allowed to have one element type in each group.
For simulations with dynamic meshes be sure that the mesh near the coupling region can be smoothed.
For elements others than triangles or tetrahedra you have to set spring-on-all-shapes so that fluent smoothes
those elements. Type in spring-on-all-shapes in the FLUENT console in the define>models>dynamic-
mesh-controls folder. You also have to set the all-element-type to true by
(rpsetvar dynamesh/spring/all-element-type? #t)

2.3.3 Job Control User Defined Function Hooking


In FLUENT one need to hook user defined functions that manage the data transfer between FLUENT
and MpCCI. Therefore the MpCCI libudf.so (libudf.dll for Windows) need to be hooked to FLUENT. In
the <MpCCI>/adapter/fluent directory you find subdirectories for each supported FLUENT version
(e.g. 6.2.16). These directories contain a subdirectory src and one for each operating system being
supported. There you find different directories for different solver versions (2d, 2ddp, 3d, 3ddp). These
directories contain the necessary libudf.so. After starting FLUENT you need to hook the libudf
with DefineUser-DefinedFunctionsCompiled.... If you are using the MpCCI GUI this can be done
automatically. ATTENTION : When you are using your own user defined functions ensure that you execute
the vcvars32.bat for setting up a proper VisualC6.0 environment. Start MpCCI in the same dos-shell.
With Visual .Net you only need to start MpCCI in the Visual .Net command window.

Automatic hooking of MpCCI UDFs With the MpCCI GUI UDFs are hooked automatically if not
switched off in the FLUENT panel of the GO-panel. With steady state simulations data is transferred at
the beginning of each iteration. Thus the Adjust function is hooked automatically.
With transient simulations the data is transferred at the end of each iteration. Thus the AtEnd function

16
is hooked automatically.
Initialisation functions and read, write functions are hooked automatically as well.

Hooking of MpCCI UDFs with the MpCCI Panel If you want to control MpCCI-initialisation and
-communication manually then have a look at the MpCCI Control panel. You find it in the Solve menu of
FLUENT. There you can setup all UDFs that shall be hooked automatically during the simulation. You
can also start MpCCI functions by hand, whenever it is necessary(See the Manifold Example).

Adding own UDFs If you want to add your own UDFs, please follow the steps bellow:
1. Create a libudf directory in your working directory.
2. Create the libudf/src directory.
3. Add your sources to the src directory

4. If you are not using the MpCCI GUI type


<MpCCI>/gui/tools/fluent install libudf.pl <release> <version>
in the parent directory of the libudf directory. For example if you are using FLUENT 6.2.16 and
want to use the 2d and 3d version the command is
<MpCCI>/gui/tools/fluent install libudf.pl 6.2.16 2d 3d.
If you are using the MpCCI GUI this is done automatically.
For manually hooking the start of FLUENT, read the .cas file and hook the libudf.dll:
DefineUser-DefinedFunctionsCompiled...
Then hook these UDFs:

Initialization Function = UDF Initialize


Read Data Function = UDF Read globals
Write Data Function = UDF Write globals
After each iteration the Execute At End Function is called. If you hook the UDF At end Function, data
will be transferred after the iteration. If you hook the UDF Adjust Function, data will be transferred
before the iteration. For the given example FLUENT is the initiator. So the UDF At end is hooked.

Adjust Function = UDF Adjust


Execute At End Function = UDF At end

2.3.4 Functionality
This section lists all predefined UDFs. The makefile ensures that the mpcci udf template.c is compiled
and linked with the static libraries to libudf.so or libudf.dll for all versions.

17
Type of Function Name of Function Description of Function
---------------------------------------------------------------------------------
DEFINE_INIT UDF_Initialize Initialization MpCCI Function, called
when the flow field is initialized
DEFINE_EXECUTE_AT_END UDF_At_end Function to exchange all quantities
DEFINE_ADJUST UDF_Adjust Function to exchange all quantities
DEFINE_RW_FILE UDF_Read_globals Read global data from .dat file
DEFINE_RW_FILE UDF_Write_globals Write global data into .dat file

Panel: Define -> User-Defined -> Execute On Demand


Type of Function Name of Function Description of Function
--------------------------------------------------------------------------------
DEFINE_ON_DEMAND UDF_List_globals Host process lists the global variables
DEFINE_ON_DEMAND UDF_Init_MpCCI Initialize MpCCI
DEFINE_ON_DEMAND UDF_Exit_MpCCI Finalize MpCCI
DEFINE_ON_DEMAND UDF_Abort_MpCCI Abort MpCCI
DEFINE_ON_DEMAND UDF_Send_on_demand Send all quantities via MpCCI
DEFINE_ON_DEMAND UDF_Recv_on_demand Receive all quantities via MpCCI
DEFINE_ON_DEMAND UDF_Xchg_on_demand Exchange all quantities via MpCCI

Panel: Solve -> Iterate -> (Adaptive Time Stepping) User Defined Time Step
DEFINE_DELTAT UDF_Deltat Set DT to the received value

Panel: Define -> Dynamic Mesh -> Zones -> (Type= Rigid Body) Motion UDF/Profile
DEFINE_CG_MOTION UDF_CG_motion Set CG information from received
globals

Panel: Define -> Dynamic Mesh -> Zones -> (Type = User Defined) Mesh Motion UDF
Type of Function Name of Function Description of Function
--------------------------------------------------------------------------------
DEFINE_GRID_MOTION UDF_Grid_motion Move nodal coordinates by the
received displacement
DEFINE_GRID_MOTION UDF_Grid_position Set nodal coordinates to the
received position

Panel: Define -> Boundary Conditions -> (face zone name) -> (set boundary profile)
Type of Function Name of Function Description of Function
--------------------------------------------------------------------------------
DEFINE_PROFILE UDF_Profile (Try) to set the profile on a boundary
DEFINE_PROFILE UDM00_Profile Set boundary profile values stored in UDM 0
DEFINE_PROFILE UDM01_Profile Set boundary profile values stored in UDM 1
DEFINE_PROFILE UDM02_Profile "
DEFINE_PROFILE UDM03_Profile "
DEFINE_PROFILE UDM04_Profile "
DEFINE_PROFILE UDM05_Profile "
DEFINE_PROFILE UDM06_Profile "
DEFINE_PROFILE UDM07_Profile "
DEFINE_PROFILE UDM08_Profile "
DEFINE_PROFILE UDM09_Profile "
DEFINE_PROFILE UDM10_Profile "

18
Panel: Define -> Boundary Conditions -> (cell zone name) -> (set source terms)
Type of Function Name of Function Description of Function
---------------------------------------------------------------------------------
DEFINE_SOURCE UDF_Source (Try) to set the source value for a cell
DEFINE_SOURCE UDM00_Source Set a cell source value stored in UDM 0
DEFINE_SOURCE UDM01_Source Set a cell source value stored in UDM 1
DEFINE_SOURCE UDM02_Source "
DEFINE_SOURCE UDM03_Source "
DEFINE_SOURCE UDM04_Source "
DEFINE_SOURCE UDM05_Source "
DEFINE_SOURCE UDM06_Source "
DEFINE_SOURCE UDM07_Source "
DEFINE_SOURCE UDM08_Source "
DEFINE_SOURCE UDM09_Source "
DEFINE_SOURCE UDM10_Source "

Panel: Define -> Materials -> Properties -> user defined


Type of Function Name of Function Description of Function
--------------------------------------------------------------------------------
DEFINE_PROPERTY UDF_Property (Try) to set the property value for a material
DEFINE_PROPERTY UDM00_Property Set a cell property value stored in UDM 0
DEFINE_PROPERTY UDM01_Property Set a cell property value stored in UDM 1
DEFINE_PROPERTY UDM02_Property "
DEFINE_PROPERTY UDM03_Property "
DEFINE_PROPERTY UDM04_Property "
DEFINE_PROPERTY UDM05_Property "
DEFINE_PROPERTY UDM06_Property "
DEFINE_PROPERTY UDM07_Property "
DEFINE_PROPERTY UDM08_Property "
DEFINE_PROPERTY UDM09_Property "
DEFINE_PROPERTY UDM10_Property "

19
2.4 STAR-CD
2.4.1 Installation Directory and Adaptor related files
Within the MpCCI distribution the <MpCCI>/adapters directory contains the necessary software to
connect the simulation programs to MpCCI depending on your license. The files are located within these
subdirectories:

<MpCCI>/adapters/starcd

This subdirectory is further divided by several release subdirectories.


STARCD is connected via shared libraries (e.g., libstarcdmpcci-<precision>.so, where <precision>
stands for the single (sp) or double (dp) precision solver. The libraries are located in the architecture
subdirectories of the release version directories. The library can be used for coupled simulation if it is
linked with starlink as additional library. This is done automatically if you use the MpCCI GUI.

2.4.2 Information on supported coupling elements types


To be able to identify the components each component taking part in the coupling process has to be
grouped into a separate CELL TABLE or additional REGION. By giving these TABLE s and REGION s
names similar to the corresponding components of the FE simulation, it will be easy to select the pair in
the MpCCI GUI.

2.4.3 Job Control


From the user-subroutine mpcci posdat.f the MpCCIadapter is called as a Fortran subroutine. From there
all the data is collected and handed over to the code independent coupling library. All the communication
is done in the background without user interaction. You need to start prostar to create the file parm.inc
and a .vrt vertex file.

Adding own user subroutines in ufile If you want to add your own user subroutine, please follow
the steps bellow:
1. Create a ufile directory in your working directory.
2. Add your sources to the ufile directory
3. If you are not using the MpCCI GUI type
<MpCCI>/gui/tools/starcd install ufile.pl
in the parent directory of the ufile directory. For example if you want to compile a ufile for douple
precision the command is
<MpCCI>/gui/tools/starcd install ufile.pl -dp. Whitout option you use single precision.
If you are using the MpCCI GUI this is done automatically.
Note: This commands only works with STARCD version >= 3.2.

20
Sending Data
For every coupling step the values of all coupled quantities specified in the MpCCI GUI (or in the MpCCI
input file) are gathered directly by the MpCCISTARCD adapter from the internal array in STARCD
as defined in the Fortran common blocks. No user coding is needed to transfer data from STARCD to
the partner code.

Receiving Data
After the MpCCIAdapter received the values from the MpCCI communication layer, they are stored within
a user-memory usermem. For coupled quantity a usermem-index has to be defined. The MpCCI GUI will
assist you in choosing a unique one.

Face coupling
For receiving Wall-, Boundary-, Inlet-, Outlet-Data the corresponding user function bcdef[w|i|o|f|...].f is
implemented with a single subroutine call. See here a demo implementation of bcdefw.f :
C This file is a template to demonstrate the access to quantities received
C by MpCCI.
C
C MpCCI stores the received quantities in dynamically allocated memory chunks
C of the size NBMAX+NCTMAX+1. We call this memory UDM(=UserDefinedMemory).
C
C From the view of a Fortran programmer this memory looks like
C
C REAL UDM(0:127, -NBMAX:NCTMAX)
C
C The first index 0..127 is the memory chunk index or UDM-Index (IUDM_INDEX),
C the second index is either the POSITIVE cell index (IP) or
C the NEGATIVE boundary face index IBG.
C
C This UDM is DYNAMICALLY ALLOCATED/FREED ON REQUEST and managed in C-Code
C and in principal looks like
C
C real *udm[128];
C ......
C udm[0] = malloc((NBMAX+NCTMAX+1)*sizeof(real));
C udm[1] = malloc((NBMAX+NCTMAX+1)*sizeof(real));
C ......
C
C so in fact the memory is NOT accessible before its allocation since its not
C static memory.
C
C
C You do not have direct access from Fortran like
C
C IUDM_INDEX = 15
C CELL_VALUE = UDM(IUDM_INDEX, IP)
C FACE_VALUE = UDM(IUDM_INDEX, IBG)
C

21
C Instead call
C
C CALL STARUDM_GET(IUDM_INDEX, IP , CELL_VALUE)
C CALL STARUDM_GET(IUDM_INDEX, IBG, FACE_VALUE)
C
C to read/get the values and call
C
C CALL STARUDM_PUT(IUDM_INDEX, IP , CELL_VALUE)
C CALL STARUDM_PUT(IUDM_INDEX, IBG, FACE_VALUE)
C
C to assign the values.
C
C For the allocation of this memory chunk with index IUDM_INDEX for you private use
C inside StarCD please call
C
C CALL STARUDM_ALLOC(IUDM_INDEX)
C
C and to free the memory after its usage please call
C
C CALL STARUDM_FREE(IUDM_INDEX)
C
C Memory chunks used by MpCCI (where MpCCI stores the received quantities) are allocated
C automatically. You may call STARUDM_ALLOC() without any consequences.
C The MpCCI memory is locked from being freed with STARUDM_FREE().
C
C
C The IUDM_INDEX used by MpCCI is either specified in the GUI or in the MpCCI input file.
C
C code starcd
C temperature(id=...,...,dim=1,,,,....sindex=15, ....);
C end
C
C In this case MpCCI stores the received scalar quantity "temperature"
C in IUDM_INDEX=15.
C
C If the quantity is a vector like
C
C code starcd
C forceVect(id=...,dim=3,,,,,....sindex=33, ....);
C end
C
C MpCCI stores the received vector quantity "forceVect" in 3 memory chunks
C
C IUDM_INDEX_X=33+0
C IUDM_INDEX_X=33+1
C IUDM_INDEX_X=33+2
C
C
C An other issue is that if MpCCI was not initialized before the calls
C to the subroutines listed below, the UDM is not allocated or it would
C contain random data or zeros.
C
C To avoid a too early access to invalid data, you need to check the

22
C MpCCI initialisation first and return without any changes.
C
C
C***********************************************************************
SUBROUTINE SORSCA(S1P,S2P)
C***********************************************************************

INCLUDE comdb.inc
INCLUDE usrdat.inc

EQUIVALENCE( UDAT09(1), IS )

C Avoid access to invalid data


COMMON /MPCCI_INIT_DONE/ MPCCI_INIT_DONE
IF (MPCCI_INIT_DONE .EQ. 0) RETURN

C PLEASE SET UDM-INDEX: THE INDEX -1 IS INVALID AND YOU RUN INTO ERRORS
IUDM_SORSCA = -1
CALL STARUDM_GET(IUDM_SORSCA+IS-1, IP, S1P)
S2P = 0.0
RETURN
END

C***********************************************************************
SUBROUTINE SORMOM(S1U,S2U,S1V,S2V,S1W,S2W,POROS)
C***********************************************************************

INCLUDE comdb.inc
INCLUDE usrdat.inc

C Avoid access to invalid data


COMMON /MPCCI_INIT_DONE/ MPCCI_INIT_DONE
IF (MPCCI_INIT_DONE .EQ. 0) RETURN

C PLEASE SET UDM-INDEX: THE INDEX -1 IS INVALID AND YOU RUN INTO ERRORS
IUDM_SORMOM = -1
CALL STARUDM_GET(IUDM_SORMOM+0, IP, S1U)
CALL STARUDM_GET(IUDM_SORMOM+1, IP, S1V)
CALL STARUDM_GET(IUDM_SORMOM+2, IP, S1W)
S2U = 0.0
S2V = 0.0
S2W = 0.0
RETURN
END

C***********************************************************************
SUBROUTINE SORENT(S1P,S2P)
C***********************************************************************

INCLUDE comdb.inc
INCLUDE usrdat.inc

C Avoid access to invalid data

23
COMMON /MPCCI_INIT_DONE/ MPCCI_INIT_DONE
IF (MPCCI_INIT_DONE .EQ. 0) RETURN

C PLEASE SET UDM-INDEX: THE INDEX -1 IS INVALID AND YOU RUN INTO ERRORS
IUDM_SORENT = -1
CALL STARUDM_GET(IUDM_SORENT, IP, S1P)
S2P = 0.0
RETURN
END

C***********************************************************************
SUBROUTINE DTSTEP(DTSTP)
C***********************************************************************

INCLUDE comdb.inc
INCLUDE mpcci_quants.inc
INCLUDE mpcci_globls.inc

C Avoid access to invalid data


COMMON /MPCCI_INIT_DONE/ MPCCI_INIT_DONE
IF (MPCCI_INIT_DONE .EQ. 0) RETURN

DTSTP = gTimeStepSize
RETURN
END

C***********************************************************************
SUBROUTINE BCDEFW(U,V,W,TORHF,SCALAR,RESWT,RSTSC)
C***********************************************************************

INCLUDE comdb.inc
INCLUDE usrdat.inc

EQUIVALENCE( UDAT09(1), IS )
DIMENSION SCALAR(50),RSTSC(50)

C Avoid access to invalid data


COMMON /MPCCI_INIT_DONE/ MPCCI_INIT_DONE
IF (MPCCI_INIT_DONE .EQ. 0) RETURN

C-----------------------------------------------------------------------
C
C This subroutine enables the user to specify WALL boundary
C conditions for U,V,W,TORHF,SCALAR,RESWT and RSTSC(IS).
C
C ** Parameters to be returned to STAR: U,V,W,TORHF,SCALAR,
C RESWT, RSTSC(IS)
C
C NB U,V and W are in the local coordinate-system of the
C wall boundary. The wall boundary may be adjacent to a solid.
C
C-----------------------------------------------------------------------

24
c CALL STARUDM_GET(IUDM_BCDEFW , IBG, U)
c CALL STARUDM_GET(IUDM_BCDEFW+1, IBG, V)
c CALL STARUDM_GET(IUDM_BCDEFW+2, IBG, W)

C SCALAR(IS) Mass-fraction of species IS.


C *for the cell or boundary (as appropriate) when
C input in COMMON to CONDUC, CONVET, CONVTE,COTEET,
C DENSIT, DIFFUS, SPECHT, VISMOL,
C *for the boundary when input to and output from
C BCDEFI, BCDEFP, BCDEFS, BCDEFW,
C [can be either species mass-fraction or its flux
C (kg/m2s) in BCDEFW]
C *for the cell when input to and output from
C INITFI,
C *of the cell activated by an INCLUDE event
C when input to and output from UBINIT,
C *for the cell when input to
C FLUINJ, LSCALE, PORCON, PORDIF, PORKEP,
C POROS1, POROS2, RADPRO, SCALFN, SORENT, SORKEP,
C SORMOM, SORSCA, VISTUR, VARPRT, REACFN,
C *for the cell adjacent to the boundary when input
C to MODSWF, ROUGHW.
c CALL STARUDM_GET(IUDM_BCDEFW, IBG, SCALAR(IS))

C RESWT wall thermal resistance (m2K/W)


c CALL STARUDM_GET(IUDM_BCDEFW, IBG, RESWT)

C RSTSC(IS) wall resistance for species IS (m2s/kg)


c CALL STARUDM_GET(IUDM_BCDEFW, IBG, RSTSC(IS))

C TORHF temperature (K) or heat flux (W/m2)


CALL STARUDM_GET(IUDM_BCDEFW, IBG, TORHF)

RETURN
END

C***********************************************************************
SUBROUTINE VISMOL(VISM)
C***********************************************************************

INCLUDE comdb.inc
INCLUDE usrdat.inc

C Avoid access to invalid data


COMMON /MPCCI_INIT_DONE/ MPCCI_INIT_DONE
IF (MPCCI_INIT_DONE .EQ. 0) RETURN

C-----------------------------------------------------------------------
C
C This subroutine enables the user to specify the molecular viscosity
C (VISM) in an arbitrary manner.
C STAR calls this subroutine for boundaries and cells.
C

25
C ** Parameter to be returned to STAR: VISM
C-----------------------------------------------------------------------

C PLEASE SET UDM-INDEX: THE INDEX -1 IS INVALID AND YOU RUN INTO ERRORS
IUDM_VISMOL = -1
CALL STARUDM_GET(IUDM_VISMOL, IP, VISM)
RETURN
END

C***********************************************************************
SUBROUTINE VISTUR(VIST)
C***********************************************************************

INCLUDE comdb.inc
INCLUDE usrdat.inc

C Avoid access to invalid data


COMMON /MPCCI_INIT_DONE/ MPCCI_INIT_DONE
IF (MPCCI_INIT_DONE .EQ. 0) RETURN

C-----------------------------------------------------------------------
C
C This subroutine enables the user to arbitrarily specify the
C turbulent viscosity (VIST).
C
C ** Parameter to be returned to STAR: VIST
C-----------------------------------------------------------------------

C PLEASE SET UDM-INDEX: THE INDEX -1 IS INVALID AND YOU RUN INTO ERRORS
IUDM_VISTUR = -1
CALL STARUDM_GET(IUDM_VISTUR, IP, VIST)
RETURN
END

C***********************************************************************
SUBROUTINE MODSWF(TBULK,SCBULK,HWF,SMTC)
C***********************************************************************

INCLUDE comdb.inc
INCLUDE usrdat.inc

EQUIVALENCE( UDAT09(1), IS )
DIMENSION TBULK(100),SCBULK(100,50)
DIMENSION SMTC(50)

C Avoid access to invalid data


COMMON /MPCCI_INIT_DONE/ MPCCI_INIT_DONE
IF (MPCCI_INIT_DONE .EQ. 0) RETURN

C-----------------------------------------------------------------------
C
C This subroutine enables the user to specfy heat and mass transfer
C wall functions HWF,SMTC(IS) in an arbitrary manner.

26
C
C ** Parameters to be returned to STAR: HWF,SMTC(IS)
C
C-----------------------------------------------------------------------

C PLEASE SET UDM-INDEX: THE INDEX -1 IS INVALID AND YOU RUN INTO ERRORS
IUDM_MODSWF_HWF = -1
IUDM_MODSWF_SMTC = -1
CALL STARUDM_GET(IUDM_MODSWF_HWF , IP, HWF)
CALL STARUDM_GET(IUDM_MODSWF_SMTC, IP, SMTC(IS))

RETURN
END

C***********************************************************************

Displacement transfer
For Fluid-Structure-Interaction simulations the user subroutine mpcci newxyz.f has to be implemented
with the single subroutine call.

C*************************************************************************
SUBROUTINE NEWXYZ(VCORN)
C*************************************************************************

INCLUDE comdb.inc
INCLUDE ../parm.inc
INCLUDE usrdat.inc

DIMENSION VCORN(3,1)

C common blocks copied from starin.f


COMMON /MAINU/ NDUM2,NBP23,NDUM3,NNODE

C MASTER : .TRUE. in sequential run or on master node


C SLAVE : .NOT.MASTER
C HPCRUN : .TRUE. in HPC sequential run via HPC preprocessing
C PARRUN : .TRUE. if NOPROC.GT.1
LOGICAL MASTER,SLAVE,HPCRUN,PARRUN
COMMON /MPP430/ MASTER,SLAVE,HPCRUN,PARRUN

C IDENT: Case name, as entered at the start of the analysis


CHARACTER IDENT*127
COMMON /CASE/ IDENT

C
C use the morpher: 0(false) .or. 1(true)
INTEGER IUSE_SBM

C sbm setup done: 0(false) .or. 1(true)


INTEGER INIT_DONE

27
C set sbm communication via binary(0) .or. formatted(1) data transfer.
C sbm communication should be binary(0), but must be formatted(1) if
C star-cd and the morpher are running on different hardware architectures
C with e.g. mixed up little or big endian processors.
INTEGER IFMT_IO

SAVE IUSE_SBM, INIT_DONE, IFMT_COM


DATA IUSE_SBM, INIT_DONE, IFMT_COM / 1, 0, 0/

IF (IUSE_SBM .EQ. 0) THEN

C call mpcci newxyz without using the spring based grid morpher
CALL STARMPCCI_NEWXYZ(VCORN, IUSE_SBM, NMOVED)
RETURN

END IF

C-----------------------------------------------------------------------
C use the spring based grid morpher, do setup only once
C-----------------------------------------------------------------------

IF (INIT_DONE .EQ. 0) THEN


C setup only once, IPARRUN is the parallel run flag
IPAR_RUN = 0
if (PARRUN) IPAR_RUN = 1
CALL STARSBM_SETUP(IPAR_RUN,IFMT_COM,VCORN,NNODE,IDENT)
INIT_DONE = 1
END IF

C-----------------------------------------------------------------------
C use the spring based grid morpher with MpCCI
C-----------------------------------------------------------------------

C start the SBM, move vertices via MpCCI and execute the morpher
CALL STARSBM_START
CALL STARMPCCI_NEWXYZ(VCORN,IUSE_SBM,NMOVED)
CALL STARSBM_EXEC

C-----------------------------------------------------------------------
C use the spring based grid morpher elsewhere
C-----------------------------------------------------------------------
C
C CALL STARSBM_START
C
C PUT ANY CODE TO MOVE SOME OF ALL VERTICES IN HERE
C
C DO I=1,...
C DO J=1,...
C IV = ...
C VCORN(1,IV) = ...

28
C VCORN(2,IV) = ...
C VCORN(3,IV) = ...
C
C AFTER(!) VCORN(x,IV) was modified inform the
C morpher about the displacement of vertex IV
C CALL STARSBM_MOVED(IV)
C END DO
C END DO
C
C stop displacements definition, start the grid morpher
C and receive new vertices
C CALL STARSBM_EXEC

RETURN
END

C*************************************************************************

Within the MpCCI subroutine starmpcci newxyz all the nodal displacements received from the partner
code are stored directly in the corresponding node positions. To avoid negative cell volumeerrors it
is compulsory to care for the grid structure. For most applications a smoothing of the given topology is
sufficient. This can be achieved with several methods:
using ProStar within STARCD to normalise the distribution of nodes along predefined lines,
programming a subroutine which moves the nodes, or
using the MpCCIMorpher which is the most preferable way.
You find a template user subroutine for every coupling quantity in the file
<MpCCI>/adapters/starcd/<version>/ufile/template.f . Activate all needed subroutine within ProStar.
Linking and compiling is done via the MpCCI GUI.

2.4.4 Functionality
A typical application of fluid-structure interaction is the computation of stresses and deformations of
structures:
The CFD code calculates pressure distribution over the coupling surface;
the FEM code calculates stresses and as a reaction the structural deformation on the coupling surface;
MpCCI has to interpolate deformation values from FEM discretisation to CFD discretisation.
CFD has to adjust its mesh model to the new surface definition
Model accuracy may differ on both sides - CFD and FEM. Usually the granularity of CFD meshes is finer
than that of the FEM side (compare figure 1)
There are two ways on how to transport the latest positions of the structural surface from FEM to
CFD:

29
Figure 1: Fine CFD and coarse FEM mesh

by absolute nodal coordinates or

by presenting relative or absolute displacements

30
Working with absolute nodal coordinates however has a general drawback: this method does not pre-
serve the shape of the initial CFD model but - after a few coupling steps - adjusts the CFD shape to that of
the FEM model. Based on the most recent positions of the structural nodes MpCCI interpolates the new
positions of the CFD nodes. This interpolation does not take into account the previous (and potentially
more accurate) geometric definition of the CFD model (compare figure 2)

Figure 2: Absolute coordinates: fine CFD aligns to the coarse FEM model

Using displacements instead of absolute positions solves this problem. In this case the calculation of
the new CFD nodal positions will be based on the previous CFD positions and the relative displacements
as being interpolated from the structural displacements.

31
3 How to prepare a coupled simulation
3.1 Introduction
In the following chapters examples are presented to demonstrate the concepts for starting coupled simula-
tions.

All necessary files to follow the examples are included in the MpCCI distribution. The example files
are located in the <MpCCI>/tutorialdirectory. They are sorted by the number and the name of the
application in a directory. In each directory you will find two seperate directories containing the model
files necessary to start the coupled simulation.

The MpCCI Graphical User Interface (MpCCI GUI) facilitates the work with MpCCI and lets you start
the coupled simulation even on remote systems. This tutorial will show you how easy it is to set up a
coupled simulation with the help of the MpCCI GUI. You no longer need to edit an MpCCI input file since
all parameters can now be set via the MpCCI GUI.

3.2 General Prerequisites


Before setting up a coupled simulation some conditions must be met:
It is necessary that the coupling - interacting - regions of the finite element and the finite volume
model have the same geometric form, though the meshes of both models need not to match. The
more the coupling regions differ, the more unreliable becomes the coupling.
The elements of interacting regions have to be grouped to components so that they can be selected
in the MpCCI GUI. All elements of one component have to be of the same type.
You must guarantee that the simulation programs keep synchronised if you set up a transient simu-
lation. ANSYS for example needs an additional global variable to be used with the time command.
This variable must be coupled with the pendant of the partner program. For further details on the
prerequisites of a simulation program have a look at the related chapters (e.g. ANSYS).

You need to ensure that the quantities that are transferred are compatible to the element type on
both sides of the coupling. That means that the degrees of freedom must match. Unfortunately
there are theoretically matching pairs, not being supported by ANSYS. See the compatibility index
on page ?? for approved element quantity pairs. This index will be constantly added.
The MpCCI GUI generates component list files for each model file, that is scanned. If you have a
model.cas.gz file in FLUENT or model.db in ANSYS the corresponding component list file will
be named model.cpl. Make sure that your .cpl files will not overwrite each other (keep different
prefix names, or store the model files in different directories).

32
3.3 The Elastic Flaps: FLUENT and ANSYS

(a) The elastic flaps (b) The channel

Figure 3:

3.3.1 Introduction
This example presents the basic concepts for starting a coupled simulation between ANSYS and FLUENT.
The coupled transient simulation calculates the behaviour of two small elastic flaps in a small channel (see
fig.3) with constant air flow at the inlet and a passive outlet. FLUENT calculates the distortions in the
air flow. The gravity forces are perpendicular to the channel. The simulation is set up as a 2d simulation.
FLUENT as the CFD simulation code provides the relative wall forces which are the forces resulting from
the gauge pressure. These wall forces are transferred to ANSYS. After ANSYS has computed the solution
of the FEA problem, new nodal positions are sent via MpCCI to the CFD code for updating the grid.
These steps are repeated several times.

3.3.2 Coupling Characteristics


The flow is considered to be transient.
Gravitational acceleration is assumed in the negative Y-direction.
The flow is turbulent and the standard k-epsilon model is used.
The exchanged quantities are relative wall forces and deformations (nodal positions).
ANSYS and FLUENT are used as codes.

3.3.3 Setting Parameters in ANSYS

33
For ANSYS an APDL file needs to be generated, additional cou-
pling elements must be defined and a global variable for synchro-
nisation reasons has to be defined. The APDL script used in this
example is presented on page 8. The global variable PHYSICAL-
TIME is added to the ANSYS database file. BEAM3 elements are
selected as additional coupling elements (see Setting Parameters in
ANSYS).

Figure 4: Additional BEAM3 cou-


pling elements

3.3.4 Setting Parameters in FLUENT


In the FLUENT .cas file all necessary settings are done. In this
chapter we give a survey over all adjustments. You can follow the settings step by step generating your
own fluent.cas file from scratch. You find a basic mesh file fluent.msh in your examples directory
1. Open FLUENT with the parameter 2d
2. Open the mesh file fluent.msh (FileReadCAS...)
3. Reorder the mesh domain for performance reasons (GridReorderDomain)
Now we set the simulation to be transient and define boundary con-
ditions.
1. Set the time to be unsteady. (DefineModelsSolver::Time)
2. Set the material to behave like an ideal gas and press the Create button
(DefineMaterials::Properties::Density)

3. Set the gravity in direction of the y-axis to -9.81m/s2


(DefineOperating Conditions::Gravity::Gravitational Acceleration:y)
4. Define the velocity at the inlet to be 0.2 m/s (DefineBoundary Conditions::Zone choose inlet;
::Type double click on velocity-inlet. Then set Velocity Magnitude to 0.2m/s)
As the mesh is getting deformed meanwhile the simulation, mesh
smoothing and remeshing parameters must be set.
1. Get the minimum and maximum volume of all elements(GridCheck). This will help to set the
remeshing parameters. You will see the following lines

34
...
Volume statistics:
minimum volume (m3): 8.638258e-11
maximum volume (m3): 5.126976e-07
...

2. Now set the mesh to be dynamic (DefineDynamic MeshParameters::Model)


3. Activate smoothing and remeshing in the Mesh Methods panel.
4. Click on the Remeshing tab and set the minimum cell volume to 8.5e-11 and the maximum cell
volume to 5.13e-7. This will trigger a remeshing when one of the limits is crossed after each 10
steps. The number of steps after the trigger is invoked can be set by the Size Remesh Interval in the
Remeshing panel.
The last step is concerned with the coupling process. For the coupling
you need to load and hook some compiled User Defined Functions (UDF). The UDFs are loaded as described
above (DefineUser DefinedFunctionsCompiled...). Now you need to define the coupling regions.
Therefore enter the DefineDynamic MeshZones Panel. There you find a list of Zones.
1. Choose bottom in the Zone Names panel
2. Select User-Defined in the Type panel
3. Select the UDF Grid position function in the Mesh Attributes panel as Mesh Motion UDF.
4. Click on the Create button
Repeat the same for the zone called top. Now hook the Initialize,
Data Read, Data Write and Execute At End function as described above. Finally you are ready to save
all settings. FileWriteCase... This file is now the same as the original file.

35
3.3.5 MpCCI GUI: Setting up a Coupled simulation
Models Step

Figure 5: Start Window

After having started the MpCCI GUI with the command mpcci, choose the simulation Applications that
you want to be coupled and the project files providing the necessary model-information. When coupling
ANSYS with FLUENT, you select ANSYS and FLUENT by clicking on the corresponding fields. When
selecting ANSYS you need to select the release number of your ANSYS version and its ANSYS product
key value. Then open a file browser by clicking on the Browse button and choose the needed database file.

For starting ANSYS on a remote system, choose a database file saved on that system. Then click on
the Connect button of the file-browser to open the connection window. Enter your user name, the host
name, your password and click on the OK button. If you have ssh configured for the use without password
you can pass the Password field untouched. The MpCCI GUI will establish a connection letting you browse
the remote filesystem (fig.7). Select the database file and return to the root window by clicking on the
Select button. Before proceeding with the settings for FLUENT, the ANSYS data needs to be scanned.
This is done by clicking on the Start Scanner button. If you forget to scan the data the MpCCI GUI will

36
Figure 6: Remote Connection

remind you of it. For scanning the data, ANSYS is launched in the background.

The procedure for setting the FLUENT values is similar to the one for ANSYS. First you choose a
FLUENT case file. To start FLUENT on a remote system choose a case file on that system. Then
you need to pick the FLUENT release version and the simulation dimension and floating point precision.
Having scanned the data click on the Next button.

37
Figure 7: Browsing ANSYS Database File

Coupling Step
In the Coupling Step the so-called components of the simulation models are selected. There are basically
two types of components:

Global Variables These components are data structures that are not related to the CFD or FEA grids.
They contain global quantities like e.g. time or time step size. These components can be found in the
Global(0D) panel.

Element Components These components comprise collections of elements. They contain model parts
and the related grid based quantities like e.g. nodal positions, heat values and forces. In the case of cou-
pling, elements should be gathered that are part of the coupling region. The components are automatically
sorted by their element type. Thus a collection of 2D elements will be found in the Face (2D) section
(even if they are presented as 1D like in the example). This is done by the scanner in the Models Step.

In the given example the physical time needs to be synchronised between ANSYS and FLUENT. This
component belongs to the global variables. To simplify matters be eager to name the same things
equally on both coupling sides. In ANSYS you have to define a variable (e.g. PHYSICALTIME ). For
FLUENT the variable is predefined by the adapter (have a look at the mpcci udf template.c file in the
adapters/fluent/<VERSION>/libudf/src directory). The components are selected by a double click on
the particular entry in the component browser. The MpCCI GUI can recognise partial or exact matching
component names. If the similar match option is enabled, picking a global component by double clicking
on it will automatically select the component(s) in the partner list with the most similar name (based on
prefix search). Thus selecting PHYISCALTIME in the ANSYS component list will automatically select
physical-time in the FLUENT component list.

38
Figure 8: Having scanned the ANSYS and FLUENT file

After the components are selected the quantities of the components to be coupled are chosen. In this exam-
ple it is the physical time. FLUENT is the initialising simulation its physical time serves as time base. Thus
it is the sender (fig.10). ANSYS is set to be the initiator with the APDL command mpcci,initialise,initiator.
With the command mpcci,initialise,noinitiator it is set not to be the initiator. FLUENT is set to be the
initiator by setting the initial quantities transfer to sender or exchange. Besides the physical time, the
relative wall forces and nodal positions of the interacting surfaces need to be coupled. These quantities
are so called grid based quantities. As the coupling regions are surfaces-grids - though presented as one
dimensional lines) the coupling takes place between 2D - faces. Thus the corresponding components are
registered in the Face (2D) section. Select this section by clicking on the Face (2D) tab and pick the
components in the same way as the physical time was chosen. Afterwards the quantities are determined.
For each quantity the sender is selected. You also need to specify the interpolation type. MpCCI offers the
two basic interpolation types flux and field. For most quantities the interpolation type is fixed.

39
Figure 9: Select a global component

40
Figure 10: Select the global quantity

41
Figure 11: Select Grid Based Quantity

42
Flux leads to conservative interpolation. The sum of the quantity values over all nodes is preserved if
you set the interpolation type to flux. It is used for quantities like heat flux or forces.

Field is the same as non-conservative interpolation. It is used for quantities like velocity and pressure.
Mesh deformation is also handled as field interpolation. For details of the data transfer schemes see the
MpCCI Technical Reference.

The relative wall forces are computed by the FLUENT process and are sent via MpCCI to ANSYS. ANSYS
calculates the deformations on the structure caused by the forces and sends the deformations as new nodal
positions back to FLUENT. So ANSYS is the sender for the nodal positions and FLUENT is the sender
for the relative wall forces. The relative wall forces must always be transferred conservatively. So the
interpolation type is automatically set to flux (fig. 11). The nodal positions are special as they have an
influence on the mesh geometry. The interpolation type is set to field.

After having selected components, global and grid based quantities, you can proceed by clicking on the
Next button.

43
Edit Step

Figure 12: Survey

In the Edit Step you can set the output level of the MpCCI processes, define assertions concerning
the mesh quality and determine contact parameters for associating the grids. The Edit Step gets impor-
tant if there are non negligible geometric differences between coupling regions, if the distances between
surfaces are big in relation to the element size, or if the element size between the surface grids differs
substantially. Then you have to tune parameters concerning the coupling algorithms. These parameters
are Contact/PreContactSearch/BucketExpansion and Contact/PreContactSearch/BboxExpansion and
should be set to higher values. These values have an influence on the coupling performance. This is the
reason why it is not set to a higher value per default. A detailed discussion is given in the MpCCI Technical
Reference. For the given example the default parameters need not to be altered.

44
Go Step

Figure 13: Setting the port number and the filename stem

In the Go Step you specify the options to run MpCCI, FLUENT and ANSYS.

MpCCI The MpCCI panel lets you specify the communication port for TCP/IP. If the port is in use,
the coupling processes will not be able to interchange their data. The default port should normally be
unused. The Output filename stem is used as prefix to all files generated like mpccirun.inputfile. The
Open Xterm box lets the MpCCI GUI pop up one xterm for each application. Generally you just need to
specify the Output filename stem. Do not click on the Start button before having finished all settings. It
will lock all settings.

ANSYS ANSYS needs an APDL script to start in batch mode (-b Option). This can be selected by
opening a file browser and selecting your .ans file. You will find the APDL script startjob.ans used
for the given example. The choice for Define the initial quantities transfer must correspond to the first
mpcci command in the APDL script. Thus if your first command is mpcci,receive,wait you have to set
the value to receive.

45
Figure 14: Choose the initial transfer from FLUENT to MpCCI

FLUENT The most important part is the Define the initial quantities transfer setting. In this example
FLUENT exchanges the data after each iteration. Thus the value is set to exchange. If FLUENT exchanges
data before or after a solution step, depends on the function hook settings. MpCCI provides a set of UDFs
for this purpose.
ATTENTION For a proper data transfer switch of the auto set MDM zones. This is for avoiding a
redundant data transfer of the physical time.

Launching Having set all parameters you are ready to launch the simulation.
ATTENTION switch off auto set MDM zones
Now click the Start button of the MpCCI Panel. If the Open Xterm option was enabled, three windows
will pop up. Each is associated with one application displaying its journal information. Now you can
start ANSYS and afterwards FLUENT. If everything goes right the FLUENT window will pop up. If not
already done before, set the UDF hooks as described before. Initialise the FLUENT process and start the
iteration.

46
3.4 The Three Dimensional Flap: ABAQUS and FLUENT

Figure 15: Three Dimensional Flap in a Channel Flow

3.4.1 Introduction
In this example, a 3D flap is subjected to an air flow in a channel (see fig.16). Air enters the channel with
a velocity of 6 m/s and leaves at atmospheric conditions. The flap is fixed at the upper wall of the channel
and is kept free to deform at its bottom. The flap deforms because of the air flow. The coupled transient
simulation calculates the deformation of the flap as well as the distortions in the air flow. The simulation
is set up as a three dimensional simulation

3.4.2 Coupling Characteristics


The flow is considered to be transient.
Gravitational acceleration is assumed in the negative Y-direction.
The flow is turbulent and the standard k-epsilon model is used.

47
The exchanged quantities are relative wall forces and deformations (nodal positions).
ABAQUS and FLUENT are used as codes.

3.4.3 Setting Parameters in ABAQUS


The elasic flap 3d/abaqus/flap.inp file contains all necessary model information.

3.4.4 Setting Parameters in FLUENT


The FLUENT file elasic flap 3d/fluent/flap.cas.gz contains all necessary settings. The following as-
sumptions are made:
A three dimensional transient simulation.
Gravitational acceleration is assumed in the negative Y-direction.
The flow is turbulent and the standard k-epsilon model is used.
Air enters the channel with a velocity of 6 m/s and leaves at atmospheric conditions
A time step size of at least 103 is recommended

3.4.5 Models Step


After having started the MpCCI GUI, choose the files providing the necessary model-information.
1. Choose ABAQUS
2. Open the file browser by clicking on browse
3. Load the elasic flap 3d/abaqus/flap.inp file
4. Press the Start Scanner button
If you forget to scan the data the MpCCI GUI will remind you of it.
5. Choose FLUENT
6. Open the file browser and load the elasic flap 3d/fluent/flap.cas.gz file

7. Press the Start Scanner button again.

48
Launching a simulation on a remote system For starting e.g. ABAQUS on a remote system, choose
a database file saved on that system:
1. Open the file browser by clicking on browse
2. Click the connect button
3. Enter the hostname of the remote machine (e.g. simulator.mpcci.com)
4. Enter username and password if different from the one you are logged in with. Otherwise you need
not enter anything.

5. Press the okay button


6. Choose the input file.
When starting the simulation in the GO step, ABAQUS is automatically started on the remote machine.

3.4.6 Coupling Step


In the Coupling Step the two types of components namely global variables and element components are
selected.

Global(0D) ABAQUS and FLUENT synchronized by setting the time step sizes to 0.00025 in FLUENT
and ABAQUS

Face(2D)
1. Choose the Face(2D) panel.
2. Double click on ASSEMBLY BLOCK-1 WALL in the component panel of ABAQUS

3. Double click on wall in the component panel of FLUENT


4. Choose NPosition and RelWallForce in the Quantity box of the Quantities panel
Behind the quantities the default Sender of is mentioned. The relative wall forces are sent by FLUENT
and the nodal positions by ABAQUS .
After having selected the components that shall be coupled and after determining the global and grid
based quantities (here only the grid based (surface) quantities) that need to be transferred you can proceed
by clicking on the Next button.

3.4.7 Edit Step


In the given example the default parameters need not to be altered.

49
3.4.8 Go Step
In the Go Step you specify the options to run MpCCI, FLUENT and ABAQUS .

MpCCI The MpCCI panel lets you specify the communication port for TCP/IP. If the port is in use,
the coupling processes will not be able to interchange their data. The default port should normally be
unused. The Output filename stem is used as prefix to all files generated like mpccirun.log. Generally
you just need to specify the Output filename stem. Do not click on the Start button before having finished
all settings.

ABAQUS Nothing need to be altered here.

FLUENT Nothing need to be altered here.

Having set all parameters you are ready to launch the simulation. Now click the Start button in the
MpCCI panel. If the Open Xterm option was enabled, three windows will pop up. Each is associated with
one application displaying its journal information.

Launching Having set all parameters you are ready to launch the simulation. Now click the Start button
of the MpCCI Panel. If the Open Xterm option was enabled, one window will pop up. Each is associated
with one application displaying its journal information. Now you can start ABAQUS and afterwards
FLUENT. If everything goes right the FLUENT window will pop up.

FLUENT Setup With MpCCI 3.0.4 all UDFs are hooked automatically in a way that the data is
transferred after each iteration (At-End function). Initialise the FLUENT process and start the iteration
with a time step size of 100.00025

50
3.5 The Three Dimensional Flap: ANSYS and FLUENT

Figure 16: Three Dimensional Flap in a Channel Flow

3.5.1 Introduction
In this example, a 3D flap is subjected to an air flow in a channel (see fig.16). Air enters the channel with
a velocity of 6 m/s and leaves at atmospheric conditions. The flap is fixed at the upper wall of the channel
and is kept free to deform at its bottom. The flap deforms because of the air flow. The coupled transient
simulation calculates the deformation of the flap as well as the distortions in the air flow. The simulation
is set up as a three dimensional simulation

3.5.2 Coupling Characteristics


The flow is considered to be transient.
Gravitational acceleration is assumed in the negative Y-direction.
The flow is turbulent and the standard k-epsilon model is used.

51
The exchanged quantities are relative wall forces and deformations (nodal positions).
ANSYS and FLUENT are used as codes.

3.5.3 Setting Parameters in ANSYS


The elasic flap 3d/ansys/flap.db file contains all necessary model information. The file
elasic flap 3d/ansys/flap.ans is used for controlling the simulation and the data transfer. For ANSYS
additional coupling elements were defined and the global variable PHYSICALTIME is added to the ANSYS
database file. SHELL63 elements are selected as additional coupling elements.

3.5.4 Setting Parameters in FLUENT


The FLUENT file elasic flap 3d/fluent/flap.cas.gz contains all necessary settings. The following as-
sumptions are made:
A three dimensional transient simulation.
Gravitational acceleration is assumed in the negative Y-direction.
The flow is turbulent and the standard k-epsilon model is used.
Air enters the channel with a velocity of 6 m/s and leaves at atmospheric conditions
A time step size of at least 103 is recommended

3.5.5 Models Step


After having started the MpCCI GUI, choose the files providing the necessary model-information.
1. Choose ANSYS
2. Open the file browser by clicking on browse
3. Load the elasic flap 3d/ansys/flap.db file
4. Press the Start Scanner button
If you forget to scan the data the MpCCI GUI will remind you of it.
Attention: ANSYS is started for scanning the file.
5. Choose FLUENT
6. Open the file browser and load the elasic flap 3d/fluent/flap.cas.gz file
7. Press the Start Scanner button again.

52
Launching a simulation on a remote system For starting e.g. ANSYS on a remote system, choose
a database file saved on that system:
1. Open the file browser by clicking on browse
2. Click the connect button
3. Enter the hostname of the remote machine (e.g. simulator.mpcci.com)
4. Enter username and password if different from the one you are logged in with. Otherwise you need
not enter anything.
5. Press the okay button
6. Choose the input file.
When starting the simulation in the GO step, ANSYS is automatically started on the remote machine.

3.5.6 Coupling Step


In the Coupling Step the two types of components namely global variables and element components are
selected.

Global(0D) ANSYS and FLUENT are exchanging the timestep size.


1. Choose the Global(0D) panel.
2. Double click on PHYSICALTIME in the component panel of ANSYS
3. Double click on Physical-Time in the component panel of FLUENT
4. Choose PhysicalTime in the Quantity box of the Quantities panel
5. Choose FLUENT to be the Sender of the PhysicalTime

Face(2D)
1. Choose the Face(2D) panel.
2. Double click on WALL in the component panel of ANSYS
3. Double click on wall in the component panel of FLUENT
4. Choose NPosition and RelWallForce in the Quantity box of the Quantities panel
Behind the quantities the default Sender of is mentioned. The relative wall forces are sent by FLUENT
and the nodal positions by ABAQUS .
After having selected the components that shall be coupled and after determining the global and grid
based quantities (here only the grid based (surface) quantities) that need to be transferred you can proceed
by clicking on the Next button.

53
3.5.7 Edit Step
In the given example the default parameters need not to be altered.

3.5.8 Go Step
In the Go Step you specify the options to run MpCCI, FLUENT and ANSYS .

MpCCI The MpCCI panel lets you specify the communication port for TCP/IP. If the port is in use,
the coupling processes will not be able to interchange their data. The default port should normally be
unused. The Output filename stem is used as prefix to all files generated like mpccirun.log. Generally
you just need to specify the Output filename stem. Do not click on the Start button before having finished
all settings.

ANSYS ANSYS needs the harddisk 3d/ansys/hardisk.ans APDL script to start.


1. Click on the Browse Button beside the select APDL input script field.
2. Choose the elasic flap 3d/ansys/flap.ans file
3. Press the select button

FLUENT
Turn of the auto set MDM zones in the FLUENT panel.
Otherwise additional data transfer steps are performed. There would also be an exchange before the first
iteration, resulting in a bad PHYSICALTIME value of 0 in ANSYS .

Having set all parameters you are ready to launch the simulation. Now click the Start button in the
MpCCI panel. If the Open Xterm option was enabled, three windows will pop up. Each is associated with
one application displaying its journal information.

Launching Having set all parameters you are ready to launch the simulation. Now click the Start
button of the MpCCI Panel. If the Open Xterm option was enabled, one window will pop up. Each
is associated with one application displaying its journal information. Now you can start ANSYS and
afterwards FLUENT. If everything goes right the FLUENT window will pop up.

FLUENT Setup With MpCCI 3.0.4 all UDFs are hooked automatically in a way that the data is
transferred after each iteration (At-End function). Initialise the FLUENT process and start the iteration
with a time step size of 100.0025

54
3.6 Exhaust Manifold: ABAQUS and FLUENT

Figure 17: Manifold with four velocity inlets and one pressure outlet

3.6.1 Introduction
Besides the exchange of forces and deformations between a fluid and a structural code the transfer of
temperature and heat transfer coefficients define a major field of application. This example (see fig.17)
illustrates the importance of thermal coupling in the steady state heating of an automotive exhaust manifold
due to flow of the internal hot exhaust gas stream. The internal flow was modeled in FLUENT while the
structural heating simulation is done using ABAQUS. MpCCI provides the transfer of the wall heat flux
from FLUENT to ABAQUS and passes the resulting surface temperature from ABAQUS to FLUENT.
ABAQUS further calculates the thermal stress of the exhaust manifold due to heating.

3.6.2 Coupling Characteristics


This example illustrates a steady state simulation.
The exchanged quantities are temperatures and heat transfer coefficients

55
The meshes have significant geometric differences
The element sizes are similar
ABAQUS and FLUENT are used as codes.

3.6.3 Setting Parameters in ABAQUS


The exhaust manifold 3d/abaqus/exhaust manifold.inp file contains all necessary model information.
The following assumptions and initial conditions are used :
An initial temperature distribution of 300 K on the whole integration domain.
A steady state heat transfer simulation
A Temperature of 500 K on all inlet boundaries.

ATTENTION ABAQUS is generating some big intermediate files. So does MpCCI. Before starting the
simulation MpCCI generates a file cosim < F ILEN AM E >.inp from the < F ILEN AM E >.inp that
also contains all files that are included in the < F ILEN AM E >.inp together with additional coupling
information. This file is left after the simulation. So take care of insufficient memory.

3.6.4 Setting Parameters in FLUENT


The FLUENT file exhaust manifold 3d/fluent/exhaust manifold.inp contains all necessary settings. The
following assumptions are made:
The flow is steady state.
No buoyancy effects are considered.
The flow is considered to be turbulent with the standard k-epsilon model.
At the bottom 4 velocity inlets are set with an inlet velocity of 5 m/s and a temperature of 500 K
is assumed.
The pressure outlet is set at atmospheric pressure.

3.6.5 Models Step


After having started the MpCCI GUI, choose the files providing the necessary model-information.
1. Choose ABAQUS
2. Open the file browser by clicking on browse
3. Load the exhaust manifold 3d/abaqus/exhaust manifold.inp file

56
4. Press the Start Scanner button
If you forget to scan the data the MpCCI GUI will remind you of it.
5. Choose FLUENT
6. Open the file browser and load the exhaust manifold 3d/fluent/exhaust manifold.cas file
7. Press the Start Scanner button again.

Launching a simulation on a remote system For starting e.g. ABAQUS on a remote system, choose
a database file saved on that system:
1. Open the file browser by clicking on browse
2. Click the connect button
3. Enter the hostname of the remote machine (e.g. simulator.mpcci.com)
4. Enter username and password if different from the one you are logged in with. Otherwise you need
not enter anything.
5. Press the okay button
6. Choose the input file.
When starting the simulation in the GO step, ABAQUS is automatically started on the remote machine.

3.6.6 Coupling Step


In the Coupling Step the two types of components namely global variables and element components are
selected. Here only element components are regarded:

Face(2d) The components to be coupled are:


FLUENT : wall
ABAQUS : ASSEMBLY INNER
Afterwards the quantities are determined:
Temperature : WallTemp
Heat flux : WallHeatFlux
Behind the quantities the default sender of is mentioned.The wall temperature is sent by ABAQUS and
the wall heat flux by FLUENT.
After having selected the components that shall be coupled and after determining the global and grid
based quantities (here only the grid based (surface) quantities) that need to be transferred you can proceed
by clicking on the Next button.

57
3.6.7 Edit Step
In the Edit Step you can set the output level, define assertions concerning the mesh quality and determine
contact parameters for associating the grids. For the given example the default parameters must be
changed. The grids do not match very well resulting in orphaned nodes. There are also elements with
angles greater than 45 degrees.
To get rid of the warnings switch off the Control/MeshQuality/CheckMeshQuality
The orphaned nodes result from distances between the meshes. By increasing the rejection threshold
Contact/MatchCriterion/Rejection, less nodes are rejected.
Set the Contact/MatchCriterion/Rejection to 2.
Be carefull of altering these parameters. To the fhey could lead to a datatransfer of areas that shouldnt be
regarded. Please have a look at the MpCCI Technical Reference for more details on the different MatchCri-
terion parameters.

3.6.8 Go Step
In the Go Step you specify the options to run MpCCI, FLUENT and ABAQUS.

MpCCI The MpCCI panel lets you specify the communication port for TCP/IP. If the port is in use,
the coupling processes will not be able to interchange their data. The default port should normally be
unused. The Output filename stem is used as prefix to all files generated like mpccirun.log. Generally
you just need to specify the Output filename stem. Do not click on the Start button before having finished
all settings.

ABAQUS ABAQUS The default settings need not be altered

FLUENT The default settings need not be altered


Having set all parameters you are ready to launch the simulation. Now click the Start button in the
MpCCI panel. If the Open Xterm option was enabled, three windows will pop up. Each is associated with
one application displaying its journal information.

Launching Having set all parameters you are ready to launch the simulation. Now click the Start button
of the MpCCI Panel. If the Open Xterm option was enabled, one window will pop up. Each is associated
with one application displaying its journal information. Now you can start ABAQUS and afterwards
FLUENT. If everything goes right the FLUENT window will pop up.

FLUENT Setup With MpCCI 3.0.4 all UDFs are hooked automatically in a way that the data is
transferred before each iteration (Adjust function). Initialise the FLUENT process and start the iteration.

58
FLUENT Setup-Advanced Initialise FLUENT as usually. Then instead of using the auto hooks use
the MpCCI Control.. Panel in the FLUENT Setup menu. Now you can determine what actions should be
executed automatically and what by hand.
1. Switch off all Automatic Actions
2. Press the On Demand Action: Initialize Button
Now MpCCI communication is initialized
3. Initialize FLUENT : Solve > Initialze > Initialize..
Press the Init Button
4. Now perform some iterations( we recommend 20)
5. Press the exchange button and wait for ABAQUS to return values to FLUENT.
6. Monitor result values (e.g. surface monitor on the wall region for values like temperature and
summerized wall heat flux).
7. continue with iterations and data exchange until the values keep constant (should be about 160
iterations).

59
3.7 Electro-Thermal analysis with Joule heat source term: ANSYS and STARCD

Figure 18: Electro-Thermal Coupling in a three-phase Cable Configuration

3.7.1 Introduction
For the development of electrical components the prediction of thermal behavior is of high performance
(see fig.19). Through ohmic drops the alternating current induces a heating of the system. Usually con-
vection provides enough cooling. However, miniaturization enforces the providers of such components to
optimize heat management in their products.

In electrical systems the thermal behavior of busbar systems is of utmost interest. MpCCI is used to
set up a coupling between a CFD solution with STARCD and a computation in frequency domain with
ANSYS . Temperature-dependent electrical resistivities of the conducting material are transported from
STARCD to ANSYS . Joule heat losses are given back to STARCD as an energy source. Coupling
communication is loose and on demand.

60
3.7.2 Coupling Characteristics
This example illustrates a steady state simulation.

In ANSYS use of element-table ETAB for sending a quantity.


In STARCD add a user function which determine the electrical resistivity as a function of temper-
ature.
The exchanged quantities are electric resistivity and joule heat.

ANSYS and STARCD are used as codes.

3.7.3 Setting Parameters in ANSYS


The cable 2d/ansys directory contains:
a ANSYS database file ansys2starcd.db containing all necessary model information.
an ANSYS APDL script startjob2starcd.ans for starting ANSYS in batch mode.
For ANSYS an APDL file needs to be generated. It sets up the boundary conditions of the ANSYS model
and contains the MpCCI commands using to initialise ANSYS with MpCCI and to process the data transfer.
In this example we use a element-table ETAB for sending a quantity e.g joule heat losses. It is illustrated
in the script by this command:

smult, MPCCI_00,PLOSSD,,1
We copy after the calculation finished the joule heat losses PLOSSD to MPCCI 00 for a MpCCI transfer
call by:
~mpcci, send, wait
Important note:
We use the storage index 0 to send the joule heat losses. As described in the section 2.2 in paragraph Data
access this variable MPCCI <sindex> indicates where we store the value. In our example note that we
use the index 0. The same index has to be used in the MpCCI GUI.

3.7.4 Setting Parameters in STARCD


The cable 2d/starcd directory contains the file:

a model file cable.mdl.


a ufile directory with two files: resistivity.f and sorent.f

61
You need to start prostar to create the file parm.inc and a problem file.
The model file will use the following user subroutines: POSTDAT and SORENT. The POSTDAT subrou-
tine is provided by the MpCCI adapter and for this example we supplie two subroutines: SORENT from
sorent.f and CR ELECTRICAL RESISTIVITY from resistivity.f .
The purpose of the SORENT subroutine is to receive the joule heat value and use it as source term. In this
subroutine we define the storage index to receive the value from MpCCI by the variable IUDM SORENT:
IUDM_SORENT = 1
CALL STARUDM_GET(IUDM_SORENT, IP, S1P)
In this case STARCD will receive the joule heat value at the storage index 1.
Important note:
You have to select the same storage index in the MpCCI GUI on configuring the quantity JouleHeat.

The purpose of the CR ELECTRICAL RESISTIVITY subroutine is to determine the electrical resistivity
as a function of temperature. This electric resistivity is calculated and stored in user defined memory
index before the MpCCI transfer occurs. In our case we store the electric resistivity at the memory index
0 defined by this variable:
INDEX_UMEM1 = 0
After calculating the resistivity the value is store by executing this call:
CALL STARUDM_PUT(INDEX_UMEM1,IC,CR_RHO)
To perform a calculation of the electrical resistivity you have to call this subroutine before the data transfer
happens.
The following steps describe how to install a ufile directory in order to use the STARCD adapter.
From the directory cable 2d/starcd:
1. execute this command:
perl <MpCCI>/gui/tools/starcd install ufile.pl -dp
You create a ufile directory for a STARCD with double precision in default.
2. go to the ufile directory.
3. edit the file posdat.f
4. in the subroutine POSDAT you will find this following string:

C CALL MAKE_DECISIONS_BEFORE_TRANSFER(IXCMODE,...)

5. add after this comments on a new line the call to the CR ELECTRICAL RESISTIVITY subroutine:

CALL CR_ELECTRICAL_RESISTIVITY(T,KEY)

At this point the subroutine will be executed before the data transfer.

62
6. We want to execute a coupling on demand. On the next line you find this variable IXCMODE
which defines how the STARCD adapter will execute a transfer.
To force the data transfer with coupling partner set IXCMODE > 0.
To try the transfer if partner is waiting set IXCMODE = 0.
To NOT transfer now, but complete pending operations set IXCMODE <0.
In our example set the following:

IXCMODE = 0

Now your STARCD job is ready.

3.7.5 Models Step


After having started the MpCCI GUI, choose the files providing the necessary model-information.
1. Choose ANSYS

2. Select the ANSYS release


3. Select the ANSYS product to run
4. Open the file browser by clicking on browse
5. Load the cable 2d/ansys/ansys2starcd.db file
6. Press the Start Scanner button
If you forget to scan the data the MpCCI GUI will remind you of it.
7. Choose STARCD 3.2x

8. Choose the STARCD release


9. Open the file browser and load the cable 2d/starcd/cable.mdl file
10. Press the Start Scanner button again.
Now you can proceed the setup of coupled components by clicking on the next Next.

63
Launching a simulation on a remote system For starting e.g. STARCD on a remote system,
choose a database file saved on that system:
1. Open the file browser by clicking on browse
2. Click the connect button
3. Enter the hostname of the remote machine (e.g. simulator.mpcci.com)
4. Enter username and password if different from the one you are logged in with. Otherwise you need
not enter anything.

5. Press the okay button


6. Choose the input file.
When starting the simulation in the GO step, STARCD is automatically started on the remote machine.

3.7.6 Coupling Step


In the Coupling Step the two types of components namely global variables and element components are
selected. Here only element components are regarded:

Volume(3d) The components to be coupled are:


ANSYS: L1, L2, L3
STARCD: L1, L2, L3

1. Select the Exact option selection on the Component Name Matching field. It will directly select a
pair of component having the same name.
2. Double click on the component name to coupled: L1, L2, L3 from ANSYS . It will add them on the
list of coupled components.

Afterwards the quantities are determined:

Electric resistivity on z : ElectrResZ


Joule heat density : JouleHeat
Behind the quantities the default sender of is mentioned. The electric resistivity is sent by STARCD and
the joule heat density by ANSYS .

1. Select ElectrResZ for the electric resistivity.


2. Choose STARCD as sender.

64
3. Select the storage index 0. It refers to the value of INDEX UMEM1.
4. Select JouleHeat for the joule heat density.
5. Chosse ANSYS as sender.
6. For ANSYS change the location to elem, then select the ETAB send method and choose the storage
index 0. This index corresponds to the value of MPCCI 00.
7. For STARCD select the storage index 1. This index corresponds to the value of IUDM SORENT.

After having selected the components that shall be coupled and after determining the grid based quantities
that need to be transferred you can proceed by clicking on the Next button.

3.7.7 Edit Step


In the Edit Step you can set the output level, define assertions concerning the mesh quality and determine
contact parameters for associating the grids.
For this step the default setting is used. You can proceed by clicking on the Next button.

3.7.8 Go Step
In the Go Step you specify the options to run MpCCI, ANSYS and STARCD .

MpCCI The MpCCI panel lets you specify the communication port for TCP/IP. If the port is in use,
the coupling processes will not be able to interchange their data. The default port should normally be
unused. The Output filename stem is used as prefix to all files generated like mpccirun.log. Generally
you just need to specify the Output filename stem. Do not click on the Start button before having finished
all settings.

ANSYS The ANSYS panel lets you specify a ADPL script to use.
Open the file browser by clicking on browse
Select this file cable 2d/ansys/startjob2starcd.ans
The ANSYS will be set to process a receive data first as it is written in the ADPL script:
~mpcci, init, noinitiator, 3D
The initial quantity transfer value is set to receive and ANSYS will be executed in batch mode by using
the gui option -b.

65
STARCD The STARCD panel lets you configure the STARCD job.
The initial quantity transfer value is set to exchange.
Switch on the rebuild of the shared library.
Switch off the option: overwrite ufile sources.
Switch on the double precision mode.
you may let the default settings for the other options.

Launching Having set all parameters you are ready to launch the simulation. Now click the Start button
of the MpCCI Panel. If the Open Xterm option was enabled, windows will pop up. Each is associated with
one application displaying its journal information. Now you can start ANSYS and afterwards STARCD
. Both application are running in batch mode.

66
3.8 Electro-Thermal analysis with Joule heat source term: ANSYS and FLUENT

Figure 19: Electro-Thermal Coupling in a three-phase Cable Configuration

3.8.1 Introduction
For the development of electrical components the prediction of thermal behavior is of high performance
(see fig.19). Through ohmic drops the alternating current induces a heating of the system. Usually con-
vection provides enough cooling. However, miniaturization enforces the providers of such components to
optimize heat management in their products.

In electrical systems the thermal behavior of busbar systems is of utmost interest. MpCCI is used to
set up a coupling between a CFD solution with FLUENT and a computation in frequency domain with
ANSYS . Temperature-dependent electrical resistivities of the conducting material are transported from
FLUENT to ANSYS . Joule heat losses are given back to FLUENT as an energy source. Coupling
communication is loose and on demand.

67
3.8.2 Coupling Characteristics
This example illustrates a steady state simulation.

In ANSYS use of element-table ETAB for sending a quantity.


In FLUENT customize the mpcci udf template.c.
The exchanged quantities are electric resistivity and joule heat.
ANSYS and FLUENT are used as codes.

3.8.3 Setting Parameters in ANSYS


The cable 2d/ansys directory contains:
a ANSYS database file ansys2fluent.db containing all necessary model information.
an ANSYS APDL script startjob2fluent.ans for starting ANSYS in batch mode.

For ANSYS an APDL file needs to be generated. It sets up the boundary conditions of the ANSYS model
and contains the MpCCI commands using to initialise ANSYS with MpCCI and to process the data transfer.
In this example we use a element-table ETAB for sending a quantity e.g joule heat losses. It is illustrated
in the script by this command:
smult, MPCCI_00,PLOSSD,,1
We copy after the calculation finished the joule heat losses PLOSSD to MPCCI 00 for a MpCCI transfer
call by:
~mpcci, send, wait
Important note:
We use the storage index 0 to send the joule heat losses. As described in the section 2.2 in paragraph Data
access this variable MPCCI <sindex> indicates where we store the value. In our example note that we
use the index 0. The same index has to be used in the MpCCI GUI.

3.8.4 Setting Parameters in FLUENT


The cable 2d/fluent directory contains the file:
a model file fluent.cas.
Gravitional acceleration is assumed in the negative Y-direction.
Air is the working fluid.
All external boundaries of the integration domain are set to atmospheric pressure

68
a modified mpcci udf template.c file in the directory libudf/src.
The boundary conditions of the model file for the solid elements (l1, l2, l3) are configured to receive the
joule heat value as source term on the UDM index 0 on selecting udf UDM00 Source.
Important note:
You have to select the same storage index in the MpCCI GUI on configuring the quantity JouleHeat.

The modified file mpcci udf template.c is a copy from the FLUENT adapter directory. It demonstrates
how to add a function call before a data transfer and how to set a coupling communication on demand.
In the file mpcci udf template.c we add a function calculate RS which determine a temperature depen-
dent resistivity.
Having a look on the function calculate RS the resisitivity is stored on the UDM index 1. This this defined
by the variable UDM INDEX set to 1 and the storage operation is done by calling this function:
C_UDMI(c,thread,UDM_INDEX) = rho;
To perform a calculation of the electrical resistivity you have to call this routine before the data transfer
happens. This routine is added at the begin of each UDF functions: DEFINE EXECUTE AT END, DE-
FINE ADJUST, DEFINE INIT (see file mpcci udf template.c).
Important note:
You have to select the same storage index in the MpCCI GUI on configuring the quantity ElectrResZ.

We want to execute a coupling on demand. This is controlled by this variable gXcMode which defines
how the FLUENT adapter will execute a transfer.
To force the data transfer with coupling partner set gXcMode > 0.
To try the transfer if partner is waiting set gXcMode = 0.
To NOT transfer now, but complete pending operations set gXcMode <0.
In our example you find this setting:
static int gXcMode = 0;

3.8.5 Models Step


After having started the MpCCI GUI, choose the files providing the necessary model-information.
1. Choose ANSYS
2. Select the ANSYS release
3. Select the ANSYS product to run
4. Open the file browser by clicking on browse
5. Load the cable 2d/ansys/ansys2fluent.db file

69
6. Press the Start Scanner button
If you forget to scan the data the MpCCI GUI will remind you of it.
7. Choose FLUENT
8. Choose the FLUENT release 2ddp
9. Open the file browser and load the cable 2d/fluent/fluent.cas file
10. Press the Start Scanner button again.

Now you can proceed the setup of coupled components by clicking on the next Next.

Launching a simulation on a remote system For starting e.g. FLUENT on a remote system, choose
a database file saved on that system:
1. Open the file browser by clicking on browse
2. Click the connect button
3. Enter the hostname of the remote machine (e.g. simulator.mpcci.com)
4. Enter username and password if different from the one you are logged in with. Otherwise you need
not enter anything.
5. Press the okay button
6. Choose the input file.
When starting the simulation in the GO step, FLUENT is automatically started on the remote machine.

3.8.6 Coupling Step


In the Coupling Step the two types of components namely global variables and element components are
selected. Here only element components are regarded:

Volume(3d) The components to be coupled are:


ANSYS: L1, L2, L3

FLUENT: l1, l2, l3

1. Select the Exact option selection on the Component Name Matching field. It will directly select a
pair of component having the same name.
2. Double click on the component name to coupled: L1, L2, L3 from ANSYS . It will add them on the
list of coupled components.

70
Afterwards the quantities are determined:
Electric resistivity on z : ElectrResZ
Joule heat density : JouleHeat
Behind the quantities the default sender of is mentioned. The electric resistivity is sent by FLUENT and
the joule heat density by ANSYS .

1. Select ElectrResZ for the electric resistivity.

2. Choose FLUENT as sender.


3. Select the storage index 1. It refers to the value of UDM INDEX.
4. Select JouleHeat for the joule heat density.

5. Chosse ANSYS as sender.


6. For ANSYS change the location to elem, then select the ETAB send method and choose the storage
index 0. This index corresponds to the value of MPCCI 00.
7. For FLUENT select the storage index 0. This index corresponds to the value of UDM00 Source set
in the boundary conditions.
After having selected the components that shall be coupled and after determining the grid based quantities
that need to be transferred you can proceed by clicking on the Next button.

3.8.7 Edit Step


In the Edit Step you can set the output level, define assertions concerning the mesh quality and determine
contact parameters for associating the grids.
For this step the default setting is used. You can proceed by clicking on the Next button.

3.8.8 Go Step
In the Go Step you specify the options to run MpCCI, ANSYS and FLUENT .

MpCCI The MpCCI panel lets you specify the communication port for TCP/IP. If the port is in use,
the coupling processes will not be able to interchange their data. The default port should normally be
unused. The Output filename stem is used as prefix to all files generated like mpccirun.log. Generally
you just need to specify the Output filename stem. Do not click on the Start button before having finished
all settings.

71
ANSYS The ANSYS panel lets you specify a ADPL script to use.
Open the file browser by clicking on browse
Select this file cable 2d/ansys/startjob2fluent.ans
The ANSYS will be set to process a receive data first as it is written in the ADPL script:
~mpcci, init, noinitiator, 2D
The initial quantity transfer value is set to receive and ANSYS will be executed in batch mode by using
the gui option -b.

FLUENT The FLUENT panel lets you configure the FLUENT job.

The initial quantity transfer value is set to exchange.


you may let the default settings for the auto make libudf, auto hooking functions, etc.

Launching Having set all parameters you are ready to launch the simulation. Now click the Start button
of the MpCCI Panel. If the Open Xterm option was enabled, windows will pop up. Each is associated with
one application displaying its journal information. Now you can start ANSYS and afterwards FLUENT .
ANSYS application is running in batch mode and if everything goes right the FLUENT window will pop
up.

FLUENT Setup With MpCCI 3.0.4 all UDFs are hooked automatically in a way that the data is
transferred before each iteration (Adjust function). Initialise the FLUENT process and start the iteration.

72
3.9 The Rotating Harddisk: ANSYS and FLUENT

Figure 20: The Harddisk

3.9.1 Introduction
In this example a hard disk with a diameter of 10 cm and a height of 1 cm (see fig.20) is subjected to
a rotary motion at its bottom which induces flow. The head of the hard disk deforms because of the
induced flow and vibrates. FLUENT calculates the distortions in the air flow and provides the relative
wall forces which are the forces resulting from the rotary motion. These wall forces are transferred to
ANSYS. After ANSYS has computed the solution of the FEA problem, new nodal positions are sent via
MpCCI to FLUENT for updating the grid. These steps are repeated several times.

3.9.2 Coupling Characteristics


This example illustrates a transient simulation.
The exchanged quantities are relative wall forces and deformations (nodal positions).
ANSYS and FLUENT are used as codes.

73
3.9.3 Setting Parameters in ANSYS
The harddisk 3d/ansys/hardisk.db file contains all necessary model information. The file
harddisk 3d/ansys/hardisk.ans is used for controlling the simulation and the data transfer. For ANSYS
additional coupling elements were defined and the global variable PHYSICALTIME is added to the ANSYS
database file. SHELL63 elements are selected as additional coupling elements.

3.9.4 Setting Parameters in FLUENT


The FLUENT file harddisk 3d/fluent/hardisk.cas contains all necessary settings. The following assump-
tions are made:
A three dimensional transient simulation.
The flow is laminar.
No buoyancy effects are considered.
Air is the working fluid.

The disk is rotating with a frequency of 100/s.


A time step size of at least 105 is recommended

3.9.5 Models Step


After having started the MpCCI GUI, choose the files providing the necessary model-information.
1. Choose ANSYS

2. Open the file browser by clicking on browse


3. Load the harddisk 3d/ansys/hardisk.db file
4. Press the Start Scanner button
If you forget to scan the data the MpCCI GUI will remind you of it.
Attention: ANSYS is started for scanning the file.
5. Choose FLUENT
6. Open the file browser and load the harddisk 3d/fluent/hardisk.cas file

7. Press the Start Scanner button again.

74
Launching a simulation on a remote system For starting e.g. ANSYS on a remote system, choose
a database file saved on that system:
1. Open the file browser by clicking on browse
2. Click the connect button
3. Enter the hostname of the remote machine (e.g. simulator.mpcci.com)
4. Enter username and password if different from the one you are logged in with. Otherwise you need
not enter anything.
5. Press the okay button
6. Choose the input file.
When starting the simulation in the GO step, ANSYS is automatically started on the remote machine.

3.9.6 Coupling Step


In the Coupling Step the two types of components namely global variables and element components are
selected.

Global(0D) ANSYS and FLUENT are exchanging the timestep size.


1. Choose the Global(0D) panel.
2. Double click on PHYSICALTIME in the component panel of ANSYS
3. Double click on Physical-Time in the component panel of FLUENT
4. Choose PhysicalTime in the Quantity box of the Quantities panel
5. Choose FLUENT to be the Sender of the PhysicalTime

Face(2D)
1. Choose the Face(2D) panel.
2. Double click on WALL in the component panel of ANSYS
3. Double click on w-balken in the component panel of FLUENT
4. Choose NPosition and RelWallForce in the Quantity box of the Quantities panel
Behind the quantities the default Sender of is mentioned. The relative wall forces are sent by FLUENT
and the nodal positions by ABAQUS .
After having selected the components that shall be coupled and after determining the global and grid
based quantities (here only the grid based (surface) quantities) that need to be transferred you can proceed
by clicking on the Next button.

75
3.9.7 Edit Step
In the given example the default parameters need not to be altered.

3.9.8 Go Step
In the Go Step you specify the options to run MpCCI, FLUENT and ANSYS .

MpCCI The MpCCI panel lets you specify the communication port for TCP/IP. If the port is in use,
the coupling processes will not be able to interchange their data. The default port should normally be
unused. The Output filename stem is used as prefix to all files generated like mpccirun.log. Generally
you just need to specify the Output filename stem. Do not click on the Start button before having finished
all settings.

ANSYS ANSYS needs the harddisk 3d/ansys/hardisk.ans APDL script to start.


1. Click on the Browse Button beside the select APDL input script field.
2. Choose the harddisk 3d/ansys/hardisk.ans file
3. Press the select button

FLUENT The default settings need to be altered. Turn of the auto set MDM zones in the FLUENT
panel. Otherwise additional data transfer steps are performed. There would also be an exchange before
the first iteration, resulting in a bad PHYSICALTIME value of 0 in ANSYS .

Having set all parameters you are ready to launch the simulation. Now click the Start button in the
MpCCI panel. If the Open Xterm option was enabled, three windows will pop up. Each is associated with
one application displaying its journal information.

Launching Having set all parameters you are ready to launch the simulation. Now click the Start
button of the MpCCI Panel. If the Open Xterm option was enabled, one window will pop up. Each
is associated with one application displaying its journal information. Now you can start ANSYS and
afterwards FLUENT. If everything goes right the FLUENT window will pop up.

FLUENT Setup With MpCCI 3.0.4 all UDFs are hooked automatically in a way that the data is
transferred after each iteration (At-End function). Initialise the FLUENT process and start the iteration
with a time step size of 105

76
List of Figures
1 Fine CFD and coarse FEM mesh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2 Absolute coordinates: fine CFD model aligns to the coarse FEM model . . . . . . . . . . . 29
3 Fluent-Ansys:Elastic Flaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4 Ansys: Additional BEAM3 coupling elements . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5 Model Step: Start Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6 Model Step: Remote Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7 Model Step: File Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8 Model Step: After Scanning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9 Coupling Step: Select Global Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
10 Coupling Step: Select Global Quantity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
11 Coupling Step: Select Grid Based Quantity . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
12 Edit Step: Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
13 Go Step: Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
14 Go Step:Define the initial quantities transfer . . . . . . . . . . . . . . . . . . . . . . . . . . 44
15 Tutorial 3: 3D Flap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
16 Tutorial 3: 3D Flap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
17 Tutorial 4: manifold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
18 electrothermal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
19 electrothermal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
20 Tutorial 5: Harddisk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

77

Potrebbero piacerti anche