41
CERFACS CFD - Combustion Supervisors : Dr Gabriel Staffelbach - Dr Olivier Vermorel VALIDATION OF A NUMERICAL TOOL: AVBP USE OF AVBP AND SETUP OF AUTOMATIC ELEMENTARY TEST CASES TO VALIDATE NEW DEVELOPMENTS 2 nd year work experience’s report Simon AYACHE From June to September 2007 Ref : WN/CFD/07/84 Fluid Mechanics Department ENSEEIHT

CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

CERFACSCFD - Combustion

Supervisors : Dr Gabriel Staffelbach - Dr Olivier Vermorel

VALIDATION OF A NUMERICAL TOOL: AVBP

USE OF AVBP AND SETUP OF AUTOMATIC ELEMENTARY TEST

CASES TO VALIDATE NEW DEVELOPMENTS

2nd year work experience’s report

Simon AYACHE

From June to September 2007

Ref :

WN/CFD/07/84

Fluid Mechanics Department

ENSEEIHT

Page 2: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,
Page 3: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Abstract

AVBP is a parallel CFD code that solves the three-dimensional compressible Navier-Stokes equations onunstructured and hybrid grids. Initially conceived for steady state flows of aerodynamics, today the mainarea of application is the simulation of unsteady reacting flows in combustor configurations.The main aim of this work experience was to set up a series of automatical tests in order to check andvalidate AVBP’s new developments. This work has been done by writing a code in FORTRAN.Several tutorials have also been processed with AVBP, such as a Poiseuille 2D flow and a 3D cold flow. Theirresults have been analyzed using the software ENSIGHT and some tools associated with AVBP.During the last part of the work experience, an introduction to theoretical combustion has been proceededthanks to CERFACS ressources.

Keywords: CFD, UNIX, CODE VALIDATION, FORTRAN, MATLAB, COMBUSTION,AVBP

Page 4: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,
Page 5: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Contents

List of figures vii

Introduction 1

CERFACS overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Work experience aims . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

A quick glance at Combustion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1 Modelisation of turbulent combustion 5

1.1 Basic Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.2 Computational approaches for turbulent combustion . . . . . . . . . . . . . . . . . . . . . . . 6

2 Use of AVBP 9

2.1 AVBP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.2 A first run: Poiseuille 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.2.1 Presentation of Poiseuille flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.2.2 Analyze of results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.3 A 3D cold flow calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3 Setup of a series of Automatic Elementary Test Cases (CTEA) 15

3.1 CTEA interest and improvements expected during the work experience . . . . . . . . . . . . 15

3.2 User manual of CTEA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.3 The work of avbp ctea code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Conclusion 19

Appendix 20

A An example of a ctea_report.dat document 21

B Part of avbp_ctea code (1) 23

C Part of avbp_ctea code (2) 27

Bibliography 33

v

Page 6: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

vi Table of contents

Page 7: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

List of Figures

1 Two types of flame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Sketch of Turbomachine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1 Numerical simulations examples : on the left DNS (all the scales are resolved), in the middleLES (large scales are resolved and small scales are modeled), on the right RANS (all the scalesare modeled) - [Courtesy of Dr. Laurent Gicquel] . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1 Sketch of the Poiseuille 2D configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.2 Boundary condition: inlet profile versus Y compared with theoretical steady profile . . . . . . 10

2.3 Velocity magnitude versus X (Y=0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.4 Velocity versus Y in the middle of the section . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.5 Differences between analytical and numerical results (X-velocity) in the middle of the section 12

2.6 3D cold flow configuration: the injector is on the left and the box on the right simulates theatmosphere . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.7 Mesh of the 3D cold flow configuration (injector + atmosphere) . . . . . . . . . . . . . . . . . 13

2.8 Velocity fields from t=60 ms to t=75 ms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.1 An example of a run.dat file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

A.1 An example of a ctea_report.dat file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

vii

Page 8: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

viii List of figures

Page 9: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Introduction

1. CERFACS overview

CERFACS is a research organization that aims to develop advanced methods for the numerical simulationand algorithmic solutions of large scientific and technological problems of interest for research as well asindustry, and that requires access to powerful computers. Thus, the laboratory has recently received a newsupercomputer: IBM Blue Gene (2048 processors rack).

CERFACS has six shareholders (CNES, the French Space Agency; EADS France, European Aeronauticand Defence Space Company; EDF, Electricite de France; Meteo-France, the French meteorological service;ONERA, the French Aerospace Lab; SAFRAN, Societe Nationale d’Etude et de Construction de Moteursd’Aviation).

CERFACS hosts interdisciplinary teams, both for research and advanced training that are comprised ofphysicists, applied mathematicians, numerical analysts, and software engineers. Approximately 100 peoplework at CERFACS, including about 90 researchers and engineers, coming from 10 differents countries.Several interns can also be found in the laboratory .

CERFACS researchers work on specific projects in six main research areas:

• Parallel Algorithms ;

• Electromagnetism ;

• Aviation and Environment ;

• Climate Modelling And Global Change ;

• Computational Fluid Dynamics.

This last area is divided into two teams: the Aeronautics team and the Combustion team, where mywork experience took place.

2. Work experience aims

The main aim of my CERFACS work experience has been to improve my knowledge in informatics, especiallyin UNIX and FORTRAN. It has also allowed me to have an introduction to CFD, both in theory and practice.Here is the progress of my internship:

• Rediscovery of UNIX ;

• Discovery of CERFACS combustion code: AVBP. First runs (Poiseuille 2D...) ;

• Detailed use of AVBP thanks to tutorials (3D cold flow, 1D flame) ;

• Analysis of results using the software ENSIGHT and AVBP’s tools ;

• Setup of a series of automatic tests in order to check and validate AVBP new developments. Develop-ment of a FORTRAN code called avbp_ctea ;

1

Page 10: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

2 Introduction

• Validation of the FORTRAN code avbp_ctea. Run of series of calculations on one of CERFACS’ssupercomputers ;

• Writing the user manual for the FORTRAN code avbp_ctea ;

• Learning LATEX2ε for the intership report [Oetiker et al., 2001] and [D. and Charpentier, 2006] ;

• Documentation on combustion’s basic principles [Poinsot and Veynante, 2001] and [Champion andBorghi, 2000] ;

3. A quick glance at Combustion

The Combustion side of the CFD team develops new methods to compute turbulent reactive flows. Com-bustion is a sequence of chemical reactions, globally exothermic, between a fuel and an oxidizer. Thephenomenon productes heat but also light in the form of either a glow or flames. The fuel is in a gas formbut it can be stored in solid or liquid form and evaporated for the reactions. Most of the time, the reaction’soxidizer is the oxygen (O2) in air. The reaction is ignited after the threshold energy has been attained,coming from an ignite (spark plug, laser depots...).

Combustion can lead to a flame’s formation, which can be either a premixed flame or a diffusion flame:

• In a diffusion flame, oxidizer and fuel are separated by the flame front. A common example is thecandle’s flame which is a diffusion flame. The wax, which corresponds to the fuel, goes up along thewick by capillarity then vaporises. It is well separated from the oxidizer, the air. Another example isgiven on the figure 1a. It describes a diffusion flame between two flows. Fuel and oxidizer are injectedseparately. The flame is located at the flows’ border.

• In a premixed flame (cf figure 1b), fuel and oxidizer are mixed before igniting. The flame moves fromburned gas to cold gas.

(a) Diffusion flame

(b) Premixed flame

Figure 1: Two types of flame

Page 11: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

3

These two kinds of flames can be found in both turbulent and laminar flows. Thus, the study ofcombustion can be divided into four fields according to the flame type (premixed or diffusion flame) and theflow type (laminar or turbulent).

However, most practical combustion systems are turbulent. For instance, turbulent combustion is en-countered in rockets, internal combustion or aircraft engines, and industrial burner (figure 2). In such cases,an interaction appears between turbulence and combustion. Vortices tend to wrinkle the flame front and toincrease the flame surface. Consequently, the combustion rate is increased.

Figure 2: Sketch of Turbomachine

Page 12: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

4 Introduction

Page 13: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Chapter 1

Modelisation of turbulent combustion

1.1 Basic Equations

The set of conservation equations for reacting flows in the case of an irreversible chemical reaction:

reactants︸ ︷︷ ︸

fuel+oxidizer

−→ products

are:

• Mass

∂ρ

∂t+

∂xi

(ρui) = 0 (1.1)

• Species

∂ (ρYk)

∂t+

∂xi

(ρYkui) =∂

∂xj

(

ρDk

∂Yk

∂xj

)

+ ω̇k (1.2)

• Momentum (with i = 1, 2, 3)

∂ρui

∂t+

∂xj

(ρuiuj) +∂p

∂xi

=∂τij

∂xj

(1.3)

• Total Energy

∂ρet

∂t+

∂xi

[(ρet + p)ui] =∂

∂xj

(ui · τij) −∂qi

∂xi

+ Q + ω̇ (1.4)

with : ρ the volumic mass, Yk the mass fraction of the kth species, ρui the momentum in the i direction andet the total energy, sum of kinetic and internal energy:

et =1

3∑

k=1

u2k + e (1.5)

The internal energy is relied to the pression thanks to e =∫

CpdT −pρ

[Poinsot and Veynante, 2001]. Thanksto perfect gas hypothesis P = ρRT , Cp can be written Cp = γr

γ−1so internal energy becomes:

e =P

ρ(1 − γ)(1.6)

5

Page 14: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

6 1. MODELISATION OF TURBULENT COMBUSTION

τij is the tensor of viscous strains:

τij = µ ·

(∂ui

∂xj

+∂uj

∂xi

−2

3δij

∂uk

∂xk

)

(1.7)

The term Dk∂Yk

∂xjof equation (1.2) is obtained thanks to the Fick’s law, which is written with Vk,j , the

diffusion velocity of species k in the direction j:

Vk,jYk = −Dk

∂Yk

∂xj

(1.8)

Q in equation (1.4) is the external heat source term. ω̇ is the Fuel reaction rate. The heat flux density qi inthe direction xi is given by the Fourier’s law:

qi = −λ∂T

∂xi

(1.9)

1.2 Computational approaches for turbulent combustion

Three levels of turbulent reacting flow computations are distinguished [Poinsot and Veynante, 2001] :

• RANS (Reynolds Averaged Navier Stokes): RANS techniques solve the mean values of all quantities.The balance equations for Reynolds averaged quantities are obtained by averaging the instantaneousbalance equations. However, the averaged equations require closure rules. Consequently, a turbulencemodel to deal with the flow dynamics and a turbulent combustion model (TCM) to describe chemicalspecies conversion and heat release are used. The results obtained correspond to averages over time forstationary mean flows or averages over different realizations (or cycles) for periodic flows (for examplepiston engines).

• LES (Large Eddy Simulation): at this level, the turbulent large scales are explicitly calculated whereasthe effects of smaller ones are modeled using subgrid closure rules. The balance equations for LargeEddy Simulations are obtained by filtering the instantaneous balance equations. A subgrid model isrequired to take into account the effects of small turbulent scales on combustion.

• DNS (Direct Numerical Simulation): at this last level, the full instantaneous Navier-Stokes equationsare solved. All turbulence scales are explicitly determined and their effects on combustion are capturedby the simulations.

The table 1.1 compares the avantages and drawbacks of RANS, LES and DNS approaches for numericalsimulations of turbulent combustion [Poinsot and Veynante, 2001].

Approach Avantages Drawbacks

- "coarse" numerical grid - only mean flow fieldRANS - geometrical simplification - models required

(2D flows, symmetry...)- "reduced" numerical costs

- unsteady features - models requiredLES - reduced modeling impact - 3D simulations required

(compared to RANS) - needs precise codes- numerical costs

- no models needed for - prohibitive numerical costsDNS turbulence/combustion interaction (fine grids, precise codes)

- tool to study models - limited to academic problems

Table 1.1: Comparison between RANS, LES and DNS approaches for numerical simulations of turbulentcombustion. [Poinsot and Veynante, 2001]

Figure 1.1 presents three simulations obtained thanks to the three methods:

Page 15: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

7

• Using RANS method, the predicted temperature for a given point of the jet corresponds to the meantemperature at this point.

• LES can capture only the low-frequency variations of temperature.

• DNS predicts all temperature time variations of the jet flame.

Figure 1.1: Numerical simulations examples : on the left DNS (all the scales are resolved), in the middleLES (large scales are resolved and small scales are modeled), on the right RANS (all the scales are modeled)- [Courtesy of Dr. Laurent Gicquel]

Page 16: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

8 Chapter 1

Page 17: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Chapter 2

Use of AVBP

2.1 AVBP

The AVBP project started in 1993. Since then, under the leadership of Thierry Poinsot, the project grewrapidly. Today, AVBP represents an advanced CFD tools for the numerical simulation of unsteady turbulentreacting flows. AVBP is used both for research and industry.

AVBP is a parallel CFD code that solves the three-dimensional compressible Navier-Stokes equationson unstructured and hybrid (both structured and unstructured) grids. Initially conceived for steady stateflows of aerodynamics, today it is mostly used for the simulation of unsteady reacting flows in combustorconfigurations. The prediction of these unsteady turbulent flows is based on the Large Eddy Simulation (LES)approach. An Arrhenius law (2.1) is used to model chemistry (with k: Velocity constant ; Ea: Thresholdenergy ; R: Gas constant ; T: Temperature):

k = A × exp (−Ea

RT ). (2.1)

2.2 A first run: Poiseuille 2D

2.2.1 Presentation of Poiseuille flow

This study presents a simulation of Poiseuille flow with one species (N2), in 2 dimensions. N2 flows betweentwo plane plates. Figure (2.1) represents the set up.

Figure 2.1: Sketch of the Poiseuille 2D configuration

When the flow becomes steady, the pressure gradient is in the (Ox) direction. Thus, velocity direction is

9

Page 18: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

10 2. USE OF AVBP

(Ox):

−→V = V −→ux (2.2)

Consequently, after solving the Navier-Stockes equations, the equation of velocity found is [Chassaing, 2000](with h: the channel width) :

V (x, y, z) = V (y) = Vmax × (1 −4 × y2

h2) (2.3)

The curve on figure (2.2) represents the theoretical plot of velocity obtained using Matlab. The well knowparabolic profil of Poiseuille flow can be recognized.

2.2.2 Analyze of results

On the same figure (2.2), some values of inlet velocity profile used by AVBP have been ploted ("+"). Herethe inlet velocity condition is:

V (y) = V0 × cos(Pi

2× (

2 × y

h− 1)) (2.4)

−1.5 −1 −0.5 0 0.5 1 1.5

x 10−4

0

0.5

1

1.5Velocity vs Y (transverse section X=0)

Y (m)

Vel

ocity

(m

/s)

initial conditionparabolic profile

Figure 2.2: Boundary condition: inlet profile versus Y compared with theoretical steady profile

Step by step, the velocity profile transforms itself into parabolic profile. This process is showed on thefigure (2.3), which represents the velocity magnitude versus X-coordinate. Consequently, it can be admittedthat the flow becomes steady after X=0,9.10e-3.

Figure (2.4) shows the velocity profile at X=2,43.10e-3 m. It can be checked that the values obtained thanksto AVBP fit in well with the theoretical profile.

Figure (2.5) presents the differences between theoretical and AVBP values. This curve shows that thedifferences between analytic solution for Poiseuille 2D and results obtained with AVBP remains below10 e-2 m/s. These differences are due to the domain discretization (i.e the mesh).

2.3 A 3D cold flow calculation

This calculation aims to perform a three dimensional LES for a turbulent non-reactive flow (so called coldflow). The mesh on the figure (2.7) represents an injector. The athmosphere has been taken into account.

Page 19: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

11

0 1 2 3 4 5 6

x 10−3

1.1

1.15

1.2

1.25

1.3

1.35

1.4

1.45

1.5Velocity magnitude vs X (Y=0)

X (m)

Vel

ocity

(m

/s)

AVBP

Figure 2.3: Velocity magnitude versus X (Y=0)

−1.5 −1 −0.5 0 0.5 1 1.5

x 10−4

0

0.2

0.4

0.6

0.8

1

1.2

1.4Velocity vs Y (transverse section X=2.43e−03)

Y (m)

Vel

ocity

(m

/s)

AVBPTheory

Figure 2.4: Velocity versus Y in the middle of the section

Thus, the burner exit is encapsulated in a box which represents the atmosphere (figure 2.6). The idea is tohave a stable flow on the outlet boundary.

All the walls are set as adiabatic impermeable walls with a zero tangential velocity at the wall. Theimposed boundary conditions for the calculation are given in table 2.1.

Figure (2.8) presents results obtained during the process of this tutorial. This experiment is observedduring a period of 15 ms.

Page 20: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

12 Chapter 2

−1.5 −1 −0.5 0 0.5 1 1.5

x 10−4

−6

−5

−4

−3

−2

−1

0x 10

−3 Velocity discrepancies vs Y (X=2.43e−03)

Y (m)

Vel

ocity

dis

crep

anci

es

Figure 2.5: Differences between analytical and numerical results (X-velocity) in the middle of the section

Figure 2.6: 3D cold flow configuration: the injector is on the left and the box on the right simulates theatmosphere

- Axial velocity: 26.15 m/sINLET - Temperature: 300 K

- Nitrogen mass fraction: 1.0

OUTLET - Pressure: 101 325 Pa

Table 2.1: Boundary conditions of the 3D cold flow calculation

Page 21: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

13

Figure 2.7: Mesh of the 3D cold flow configuration (injector + atmosphere)

Page 22: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

14 Chapter 2

(a) 60 ms

(b) 65 ms

(c) 75 ms

Figure 2.8: Velocity fields from t=60 ms to t=75 ms

Page 23: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Chapter 3

Setup of a series of AutomaticElementary Test Cases (CTEA)

3.1 CTEA interest and improvements expected during the work

experience

CTEA are elementary test cases used to ensure the non-regression of the code i.e to validate the AVBP newdevelopments. The CPU time required to process all the CTEA, i.e to check a new AVBP version, needs tobe limited. That is why CTEA are really simple tests.

Before my work experience at CERFACS, a FORTRAN code already existed to compare two instan-taneous solution files. Nevertheless, it must be known that AVBP is designed to save many solution’s fileduring a run, both instantaneous and average solutions. Consequently, the code must be improved in orderto compare a series of solutions (both instantaneous and average solutions). In addition, the expected codemust check that the compared solution files have been obtained from the same numerical case (which ismainly determined by an input file named run.dat). In order to do it, it must compare the two run.dat filesof the two runs. An example of a run.dat is given on figure 3.1. Nevertheless, other checks are done suchas the reading of input_premix.dat files. In this way, the code checks that the same chemical species havebeen used during the two runs. The last improvement expected was to develop new CTEA.

First, the procedures to run CTEA by using the new code are described. Second, it is explained howthis code works.

3.2 User manual of CTEA

The next paragraph is a CTEA user manual. It describes the procedure to use CTEA thanks to the newcode avbp_ctea. Here are the steps that users have to follow in order to valid the lastest developments ofAVBP. Note that users must know AVBP to totally understand this manual.

• Indicate the properties for the CTEA computations (number of processors, batch queue...) in therun_batch file. It is located in a main CTEA folder (i.e a folder containing all the CTEA that mustbe computed). This run_batch file is machine dependent and is used to launch the jobs ;

• Run the script launch_ctea, which must be located in a main CTEA folder. Computations correspond-ing to all the run.dat files in the main folder will be performed. The run_batch file of the main folderis copied and used by all the CTEA located in the main folder ;

• When calculations have been performed, use the script make_complete_list_all. It can be found inthe CTEA folder, which is located in the parent directory of main folders. This script creates theavbp_ctea.choices file which is the input file for the FORTRAN program avbp_ctea. This file contains

15

Page 24: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

16 3. SETUP OF A SERIES OF AUTOMATIC ELEMENTARY TEST CASES (CT EA)

'../MESH/mesh' ! Mesh file

'../MESH/mesh.asciiBound' ! Ascii Boundary file

'./dummy.asciiBound' ! TPF Ascii Boundary file

'./solut_bnd_file_neqbnd=0' ! Boundary solution file

'./sol_0000000' ! inital solution

'./SOLUT/sol' ! output files

'./SOLUT/' ! temporal evolution directory

1.0d0 ! Reference length | scales coordinates X by X/reflen

10000 ! Number of iterations

100 ! Number of elements per group (typically of order 100)

1 ! Preprocessor: skip (0), use (1) & write (2) & stop (3)

1 ! Interactive details of convergence (1) or not (0)

5 ! Prints convergence every x iterations

2 ! Stores solution in separate files (1) or not (0)

1.d-3 ! Final physical time

1.0d-3 ! storage time interval

1 ! Euler (0) or Navier-Stokes (1) calculation

0 ! RANS

1 ! Chemistry

0 ! LES

0 ! TPF

1 ! Artificial viscosity

1 ! Steady state (0) or unsteady (1) calculation

1 0 0 0 0 ! Scheme specification |

1 ! Number of Runge-Kutta stages |

1.0d0 0.49d0 ! Runge-Kutta coefficients | type 'avbphelp'

0.7d0 ! CFL parameter for complete update

0.005d0 ! 4th order artificial viscosity coeff.

0.01d0 ! 2nd order artificial viscosity coeff.

0.1d0 ! Fourier parameter for viscous time-step

Figure 3.1: An example of a run.dat file

the list of CTEA that have to be checked. To perform it, type the instruction:

> make complete list all CTEA V 60 proc 2 CTEA V 60 proc 3︸ ︷︷ ︸

Two main folders′ nouns which contain the runs that must be compared

• In the CTEA folder (where there is the avbp_ctea.choices file), run the avbp_ctea program by typingthe command avbp_ctea in the shell (if the alias is installed) ;

• The code avbp_ctea creates three files:

– ctea_output.dat saves the informations displayed on the screen during the program process.

– ctea_solution_diff_report.dat is the report of the solution_diff subroutine execution. This sub-routine is used by the main program avbp_ctea.

– ctea_report.dat is the main report of the avbp_ctea code. In this file, there is the list of checkedCTEA. For each test, it is displayed whether the test is validated or not. If some test’s resultsare negative, the discrepancies observed during each test are displayed.

The two avbp_ctea outputs (ctea_output.dat and ctea_solution_diff_report.dat) must be used only if prob-lems appear during the program run. If the run of avbp_ctea seems normal, the document ctea_report.datis the only one that must be used. It contains all useful data.

An example of such a document is given in the Appendix A.

Page 25: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

3.3. THE WORK OF AVBP CTEA CODE 17

3.3 The work of avbp ctea code

The FORTRAN code avbp_ctea is divided into four files:

• avbp_ctea.f : it contains the main program avbp_ctea and two subroutines which are find_and_com-pare_solutionfiles and find_and_compare_averages.

• solution_diff_ctea.f : it contains the subroutines solution_diff_ctea and compare, then the subroutinessolution_diff_print and compare_print.

• solution_diff_ctea_average.f : it contains the subroutines solution_diff_average and solution_diff_pr-int_average.

• makefile: the makefile is used to create the executable file from the source files.

The full avbp_ctea.f code contains 3339 lines. Due to its size, only small parts have been copied inAppendix B and Appendix C:

• In Appendix B, it is checked that the run.dat files used during the two computations are the sameones, i.e that the two solution files compared come from the same numerical experiment. In particular,these lines check that the numerical schemes used during the two runs are the same ones.

• In Appendix C, the copied part of avbp_ctea code is the subroutine find_and_compare_solutionfiles.It is used by the code to find all the instantaneous solution files created by AVBP during the run, byusing informations of run.dat file. Then, this subroutine launches the subroutine solution_diff_instantin order to compare the solution files of two different AVBP versions. If discrepancies are detected,the avbp_ctea program will launch the subroutine solution_diff_print to display the differences onthe output files.

Here is the role of each subroutine of the code:

• avbp_ctea: the main program checks that the two runs which are compared compute the same numer-ical experiment.

• find_and_compare_solutionfiles and find_and_compare_averages : these two subroutines are used bythe main program in order to find the solution files, respectively instantaneous and average solutions.Then, each subroutine launches respectively the subroutines solution_diff_instant and solution_diff_a-verage to begin the comparison of all the solution files.

• solution_diff_instant and solution_diff_average: by using the subroutine compare, these two sub-routines are able to proceed the comparison between each solution file and check whether there arediscrepancies between the two runs.

• solution_diff_print and solution_diff_print_average are used by the main program in order to writein the output files the discrepancies between two solution files (only if discrepancies are detected).They both use the subroutine compare_print.

Page 26: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

18 Chapter 3

Page 27: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Conclusion

My three months work experience at CERFACS has allowed me to prepare myself for keeping on studyingon CFD (Computational Fluid Dynamics) field.

I have been able to understand how a CFD code works then use it. In fact, during my work experience, Ihave been allowed to use the combustion code of CERFACS. AVBP is a powerful CFD tool for the numericalsimulation of unsteady turbulent reacting flows. Thanks to tutorials, I have performed a 1D flame and a3D cold flow. In addition, my work experience required that I performed some elementary computationssuch as Poiseuille 2D and Elementary Test Cases (CTEA). Thus, I enjoyed runing several computations ona supercomputer. However, runing a computation is not as simple as a click on a button. You have to definethe boundary conditions, choose the numerical scheme, the number of iterations, the number of processorswhich will compute your calculation... I have also improved my knowledge in computing. Indeed, duringmy work experience, I have no choice but to use UNIX. Consequently, I have reached a good level in thisOperating System. Even though UNIX can appear more difficult to use than Windows, it begins quickly apowerful Operating System, much stable than Windows. Besides, my work experience subject required thatI write a large FORTRAN code in order to check the non-regression of AVBP after each new development.Thus, I have improved my computer skills by learning new methods of programing. I have also learnedsome combustion theoretical basis by using CERFACS resources and by asking CERFACS people questions.In this way, I have improved my knowledge in the combustion field. Furthermore, my work experience atCERFACS has allowed me to discover life in a laboratory. Thanks to several seminars and PhD presentations,I have been able to develop a better understanding of the research world as well as improving knowledge inthe Computational Fluid Dynamics field.

Consequently, I enjoyed my three months internship at CERFACS. It has convinced myself to keep on studingin the Computational Fluid Dynamics field. In fact, it seems to me that it is a good way to combine myknowledge in both Computer Programming and Fluid Mechanics. Furthermore, I am especially attractedby numerical simulation in turbulent reactive flows.

19

Page 28: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

20 Conclusion

Page 29: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Appendix A

An example of a ctea_report.dat

document

ctea_report.dat is the main report of the avbp_ctea code. In this file, there is the list of checked CTEA.For each test, it is displayed whether the test is validated or not. If some test results are negative, thediscrepancies observed during each test are displayed. On the next page, a part of such a document has beenreproduced.

21

Page 30: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

22 A. AN EXAMPLE OF A CTEA_REPORT.DAT DOCUMENT+++SNAPSHOT CHECK+++

CTEA family CTEA name run.dat files Solution file Check

CTEA_THI RUN1 ./CTEA_V60_proc_3/./CTEA_THI/RUN1/ _0000001.h5 Pb

./CTEA_V60_proc_4/./CTEA_THI/RUN1/

Parameters: niter1= 982 dtsum1=0.300080673756490E+00 Differences: < rho>

niter2= 982 dtsum2=0.300080673756491E+00 ABS: 0.148769885299771E-13

REL: 0.654835480361766E-14

<rhou>

ABS: 0.385469434149854E-12

REL: 0.379395587733726E-11

<rhov>

ABS: 0.223820961764432E-12

REL: 0.174430265949890E-11

<rhow>

ABS: 0.170308211977499E-12

REL: 0.620650386321792E-11

<rhoE>

ABS: 0.116415321826935E-09

REL: 0.229126297980879E-15

< N2>

ABS: 0.148769885299771E-13

REL: 0.654835480361766E-14

CTEA_THI RUN1 ./CTEA_V60_proc_3/./CTEA_THI/RUN1/ _0000002.h5 Pb

./CTEA_V60_proc_4/./CTEA_THI/RUN1/

Parameters: niter1= 1945 dtsum1=0.600247213562983E+00 Differences: < rho>

niter2= 1945 dtsum2=0.600247213562983E+00 ABS: 0.295319324550292E-13

REL: 0.132377622062228E-13

<rhou>

ABS: 0.689226453687297E-12

REL: 0.159397259381878E-09

<rhov>

ABS: 0.442312853010662E-12

REL: 0.307230071236171E-10

<rhow>

ABS: 0.246025422256935E-12

REL: 0.109316432199261E-10

<rhoE>

ABS: 0.145519152283669E-09

REL: 0.285956029974127E-15

< N2>

Figure A.1: An example of a ctea_report.dat file

Page 31: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Appendix B

Part of avbp_ctea code (1)

avbp_ctea code contains 3339 lines. Due to its size, only a small part has been copied in Appendix B. Thispart allows to check that the run.dat files used during the two computations are the same ones, i.e that thetwo compared solution files describe the same numerical experiments. In particular, these lines check thatthe numerical schemes used for the two runs are the sames ones.

c--------------------------------------CHECK : RUN.DAT

write(*,*)

write(*,*) ’----------CHECK SCHEME : RUN.DAT---------- ’

write(*,*)

write(*,*) ’ Looking for the first file : ’

write(*,*)

write(446,*)

write(446,*) ’----------CHECK SCHEME : RUN.DAT---------- ’

write(446,*)

write(446,*) ’ Looking for the first file : ’

write(446,*)

rundatfile=rundatfile1 ! Inpout of readrundat

call readrundat

rundat_solutfile1=rundat_solutfile

rundat_ischeme1=rundat_ischeme ! Output of readrundat

if (rundat_itexists) then

else

write(*,*) ’File ’//rundatfile1//’ not found’

write(446,*) ’File ’//rundatfile1//’ not found’

write(445,300) ctea_family,ctea_name,rundatfile1

+ (1:len_trim(rundatfile1)-7)

300 format(’*’,1x,A15,2x,A15,2x,A61,2x,15x,14x,’File run.dat 1’

23

Page 32: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

24 B. PART OF AVBP_CTEA CODE (1)

+ ’ not found’)

goto 100

endif

c------------

write(*,*)

write(*,*) ’ Looking for the second file : ’

write(*,*)

write(446,*)

write(446,*) ’ Looking for the second file : ’

write(446,*)

rundatfile=rundatfile2 ! Input of readrundat

call readrundat

rundat_solutfile2=rundat_solutfile

rundat_ischeme2=rundat_ischeme ! Output of readrundat

if (rundat_itexists) then

else

write(*,*) ’File ’, rundatfile2, ’ not found’

write(446,*) ’File ’, rundatfile2, ’ not found’

write(445,301) ctea_family,ctea_name,rundatfile2

+ (1:len_trim(rundatfile1)-7)

301 format(’*’,1x,A15,2x,A15,2x,A61,2x,15x,14x,’File run.dat 2’

+ ’ not found’)

goto 100

endif

c------------CONCLUSION

if (rundat_ischeme1(1).ne.rundat_ischeme2(1) .or.

+ rundat_ischeme1(2).ne.rundat_ischeme2(2) .or.

+ rundat_ischeme1(2).ne.rundat_ischeme2(2) .or.

+ rundat_ischeme1(2).ne.rundat_ischeme2(2) ) then

write(*,*)

write(*,*) ’ WARNING : results from different schemes !!! ’

write(*,*)

write(*,*) ’ ischeme file 1 = ’, (rundat_ischeme1(n),b=1,5)

write(*,*) ’ ischeme file 2 = ’, (rundat_ischeme2(n),b=1,5)

write(446,*)

write(446,*) ’ WARNING : results from different schemes !!! ’

write(446,*)

Page 33: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

25

write(446,*) ’ ischeme file 1 = ’, (rundat_ischeme1(n),b=1,5)

write(446,*) ’ ischeme file 2 = ’, (rundat_ischeme2(n),b=1,5)

write(445,302) ctea_family,ctea_name,rundatfile1

+ (1:len_trim(rundatfile1)-7)

302 format(’*’,1x,A15,2x,A15,2x,A61,2x,15x,14x,

+ ’Different schemes !!!’)

write(445,350) rundatfile2

+ (1:len_trim(rundatfile2)-7)

350 format(36x,A61)

goto 100

else

write(*,*)

write(*,*) ’ Schemes OK... ’

write(*,*)

write(*,*) ’ ischeme ’,(rundat_ischeme(b),b=1,5)

write(446,*)

write(446,*) ’ Schemes OK... ’

write(446,*)

write(446,*) ’ ischeme ’,(rundat_ischeme(b),b=1,5)

endif

c--------------------------------------END CHECK : RUN.DAT

Page 34: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

26 B. PART OF AVBP_CTEA CODE (1)

Page 35: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Appendix C

Part of avbp_ctea code (2)

avbp_ctea code contains 3339 lines. Due to its size, only a small part has been copied in Appendix C. Thispart of avbp_ctea code is the subroutine find_and_compare_solutionfiles. It is used by the code to find allthe instantaneous solution files created by AVBP during the run, by using informations of run.dat file. Then,this subroutine launches the subroutine solution_diff_instant in order to compare the solution files of twodifferent AVBP versions. If discrepancies are detected, the avbp_ctea program will launch the subroutinesolution_diff_print to display the differences on the output files.

c+++++++++++++++++++++++++++!!! FOR INSTANTANEOUS SOLUTIONS !!!++++++++++++++++

c+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

subroutine find_and_compare_solutionfiles( ctea_family_sub,

+ ctea_name_sub,suffixe_sub,

+ rundatfile_sub1,rundatfile_sub2,rundat_solutfile_sub1,

+ rundat_solutfile_sub2,solut_print_sub )

use avbp_rundat

use avbp_premix

use solution_diff_ctea

character(len=80) :: ctea_family_sub, ctea_name_sub

integer ctea_number_sub, h, p, wd1, wd2

integer suffixe_sub

character(len=8) :: char8

character(len=7) :: char7

character(len=6) :: char6

character(len=5) :: char5

character(len=4) :: char4

character(len=3) :: char3

character(len=2) :: char2

character(len=1) :: char1

character(len=80) :: rundatfile_sub1

character(len=80) :: rundatfile_sub2

character(len=80) :: solutionfile_sub1

character(len=80) :: solutionfile_sub2

character(len=80) :: solut_print_sub

character*80 rundat_solutfile_sub1

character*80 rundat_solutfile_sub2

character*180 :: solutfile_sub1

character*180 :: solutfile_sub2

27

Page 36: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

28 C. PART OF AVBP_CTEA CODE (2)

h = len_trim(rundatfile_sub1)

p = len_trim(rundatfile_sub2)

solutionfile_sub1 = rundat_solutfile_sub1

+ (3:len_trim(rundat_solutfile_sub1))

solutionfile_sub2 = rundat_solutfile_sub2

+ (3:len_trim(rundat_solutfile_sub2))

wd1 = len_trim(solutionfile_sub1)

wd2 = len_trim(solutionfile_sub2)

if (suffixe_sub.lt.10) then

solutfile_sub1(1:h-7) = rundatfile_sub1(1:h-7)

solutfile_sub1(h-6:h-6+wd1-1) = solutionfile_sub1

solutfile_sub1(h-6+wd1:h-6+wd1+6) = ’_000000’

write(char1,’(1i1)’) suffixe_sub

solutfile_sub1(h-6+wd1+7:h-6+wd1+7) = char1

solutfile_sub1(h-6+wd1+8:) = ’.h5’

solutfile_sub2(1:p-7) = rundatfile_sub2(1:p-7)

solutfile_sub2(p-6:p-6+wd2-1) = solutionfile_sub2

solutfile_sub2(p-6+wd2:p-6+wd2+6) = ’_000000’

write(char1,’(1i1)’) suffixe_sub

solutfile_sub2(p-6+wd2+7:p-6+wd2+7) = char1

solutfile_sub2(p-6+wd2+8:) = ’.h5’

else

if (suffixe_sub.lt.100) then

solutfile_sub1(1:h-7) = rundatfile_sub1(1:h-7)

solutfile_sub1(h-6:h-6+wd1-1) = solutionfile_sub1

solutfile_sub1(h-6+wd1:h-6+wd1+5) = ’_00000’

write(char2,’(1i2)’) suffixe_sub

solutfile_sub1(h-6+wd1+6:h-6+wd1+7) = char2

solutfile_sub1(h-6+wd1+8:) = ’.h5’

solutfile_sub2(1:p-7) = rundatfile_sub2(1:p-7)

solutfile_sub2(p-6:p-6+wd2-1) = solutionfile_sub2

solutfile_sub2(p-6+wd2:p-6+wd2+5) = ’_00000’

write(char2,’(1i2)’) suffixe_sub

solutfile_sub2(p-6+wd2+6:p-6+wd2+7) = char2

solutfile_sub2(p-6+wd2+8:) = ’.h5’

else

if (suffixe_sub.lt.1000) then

solutfile_sub1(1:h-7) = rundatfile_sub1(1:h-7)

solutfile_sub1(h-6:h-6+wd1-1) = solutionfile_sub1

solutfile_sub1(h-6+wd1:h-6+wd1+4) = ’_0000’

write(char3,’(1i3)’) suffixe_sub

solutfile_sub1(h-6+wd1+5:h-6+wd1+7) = char3

solutfile_sub1(h-6+wd1+8:) = ’.h5’

Page 37: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

29

solutfile_sub2(1:p-7) = rundatfile_sub2(1:p-7)

solutfile_sub2(p-6:p-6+wd2-1) = solutionfile_sub2

solutfile_sub2(p-6+wd2:p-6+wd2+4) = ’_0000’

write(char3,’(1i3)’) suffixe_sub

solutfile_sub2(p-6+wd2+5:p-6+wd2+7) = char3

solutfile_sub2(p-6+wd2+8:) = ’.h5’

else

if (suffixe_sub.lt.10000) then

solutfile_sub1(1:h-7) = rundatfile_sub1(1:h-7)

solutfile_sub1(h-6:h-6+wd1-1) = solutionfile_sub1

solutfile_sub1(h-6+wd1:h-6+wd1+3) = ’_000’

write(char4,’(1i4)’) suffixe_sub

solutfile_sub1(h-6+wd1+4:h-6+wd1+7) = char4

solutfile_sub1(h-6+wd1+8:) =’.h5’

solutfile_sub2(1:p-7) = rundatfile_sub2(1:p-7)

solutfile_sub2(p-6:p-6+wd2-1) = solutionfile_sub2

solutfile_sub2(p-6+wd2:p-6+wd2+3) = ’_000’

write(char4,’(1i4)’) suffixe_sub

solutfile_sub2(p-6+wd2+4:p-6+wd2+7) = char4

solutfile_sub2(p-6+wd2+8:) =’.h5’

else

if (suffixe_sub.lt.100000) then

solutfile_sub1(1:h-7) = rundatfile_sub1(1:h-7)

solutfile_sub1(h-6:h-6+wd1-1) = solutionfile_sub1

solutfile_sub1(h-6+wd1:h-6+wd1+2) = ’_00’

write(char5,’(1i5)’) suffixe_sub

solutfile_sub1(h-6+wd1+3:h-6+wd1+7) = char5

solutfile_sub1(h-6+wd1+8:) =’.h5’

solutfile_sub2(1:p-7) = rundatfile_sub2(1:p-7)

solutfile_sub2(p-6:p-6+wd2-1) = solutionfile_sub2

solutfile_sub2(p-6+wd2:p-6+wd2+2) = ’_00’

write(char5,’(1i5)’) suffixe_sub

solutfile_sub2(p-6+wd2+3:p-6+wd2+7) = char5

solutfile_sub2(p-6+wd2+8:) = ’.h5’

else

if (suffixe_sub.lt.1000000) then

solutfile_sub1(1:h-7) = rundatfile_sub1(1:h-7)

solutfile_sub1(h-6:h-6+wd1-1) = solutionfile_sub1

solutfile_sub1(h-6+wd1:h-6+wd1+1) = ’_0’

write(char6,’(1i6)’) suffixe_sub

solutfile_sub1(h-6+wd1+2:h-6+wd1+7) = char6

solutfile_sub1(h-6+wd1+8:) = ’.h5’

solutfile_sub2(1:p-7) = rundatfile_sub2(1:p-7)

solutfile_sub2(p-6:p-6+wd2-1) = solutionfile_sub2

Page 38: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

30 C. PART OF AVBP_CTEA CODE (2)

solutfile_sub2(p-6+wd2:p-6+wd2+1) = ’_0’

write(char6,’(1i6)’) suffixe_sub

solutfile_sub2(p-6+wd2+2:p-6+wd2+7) = char6

solutfile_sub2(p-6+wd2+8:) = ’.h5’

else

if (suffixe_sub.lt.10000000) then

solutfile_sub1(1:h-7) = rundatfile_sub1(1:h-7)

solutfile_sub1(h-6:h-6+wd1-1)=solutionfile_sub1

solutfile_sub1(h-6+wd1:h-6+wd1) = ’_’

write(char7,’(1i7)’) suffixe_sub

solutfile_sub1(h-6+wd1+1:h-6+wd1+7) = char7

solutfile_sub1(h-6+wd1+8:) = ’.h5’

solutfile_sub2(1:p-7) = rundatfile_sub2(1:p-7)

solutfile_sub2(p-6:p-6+wd2-1)=solutionfile_sub2

solutfile_sub2(p-6+wd2:p-6+wd2) = ’_’

write(char7,’(1i7)’) suffixe_sub

solutfile_sub2(p-6+wd2+1:p-6+wd2+7) = char7

solutfile_sub2(p-6+wd2+8:) = ’.h5’

endif

endif

endif

endif

endif

endif

endif

solutfile1=solutfile_sub1

solutfile2=solutfile_sub2

solut_print_sub=solutfile1(h-6+wd1:h-6+wd1+10)

write(*,*) ’ Looking for solution files...’

write(*,*)

write(446,*) ’ Looking for solution files...’

write(446,*)

write(*,11) solutfile1(1:len_trim(solutfile1))

11 format(/,’ Solutfile1 : ’,80A)

write(*,12) solutfile2(1:len_trim(solutfile2))

12 format(/,’ Solutfile2 : ’,80A)

write(*,*)

Page 39: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

31

write(446,*)

call solution_diff_instant

write(*,*) ctea_family_sub(1:len_trim(ctea_family_sub))

write(*,*) ctea_name_sub(1:len_trim(ctea_name_sub))

write(*,*) solutfile1(h-6:h-6+wd1+10)

write(*,*)

if ( nnode_diff ) then

else

write(*,*)’...at this iteration or time’

write(*,*)

write(*,*) ’ ***’

write(*,*)

endif

write(446,*) ctea_family_sub(1:len_trim(ctea_family_sub))

write(446,*) ctea_name_sub(1:len_trim(ctea_name_sub))

write(446,*) solutfile1(h-6:h-6+wd1+10)

write(446,*)

if ( nnode_diff ) then

else

write(446,*)’...at this iteration or time’

write(446,*)

write(446,*) ’ ***’

write(446,*)

endif

end subroutine find_and_compare_solutionfiles

Page 40: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,
Page 41: CERFACS CFD - Combustioncfdbib/repository/WN_CFD_07_84.pdf• Computational Fluid Dynamics. This last area is divided into two teams: the Aeronautics team and the Combustion team,

Bibliography

M. Champion and R. Borghi. Modélisation et théorie des flammes. 2000.

P. Chassaing. Mécanique des fluides, Éléments d’un premier parcours. Cépaduès-Éditions, 2000.

Bitouzé D. and J-C. Charpentier. LaTeX, 2006.

T. Oetiker, H. Partl, I. Hyna, and E. Schlegl. Une courte (?) introduction à LATEX2ε.http://www.laas.fr/ matthieu/cours/latex2e/, Novembre 2001.

T. Poinsot and D. Veynante. Theoretical and Numerical Combustion. Edwards, 2001.

33