Codesaturne Practical User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
EDF R&D Fluid Dynamics, Power Generation and Environment Department Single Phase Thermal-Hydraulics Group 6, quai Watier F-78401 Chatou Cedex Tel: 33 1 30 87 75 40 Fax: 33 1 30 87 79 16 MARCH 2013 Code Saturne documentation Code Saturne version 2.0.7 practical user's guide contact: [email protected] http://www.code-saturne.org/ c EDF 2013 Code Saturne EDF R&D Code Saturne version 2.0.7 practical user's documentation guide Page 2/185 ABSTRACT Code Saturne is a system designed to solve the Navier-Stokes equations in the cases of 2D, 2D axisym- metric or 3D flows. Its main module is designed for the simulation of flows which may be steady or unsteady, laminar or turbulent, incompressible or potentially dilatable, isothermal or not. Scalars and turbulent fluctuations of scalars can be taken into account. The code includes specific modules, referred to as \specific physics", for the treatment of lagrangian particle tracking, semi-transparent radiative transfer, gas combustion, pulverised coal combustion, electricity effects (Joule effect and electric arcs) and compressible flows. The code also includes an engineering module, Matisse, for the simulation of nuclear waste surface storage. Code Saturne relies on a finite volume discretisation and allows the use of various mesh types which may be hybrid (containing several kinds of elements) and may have structural non-conformities (hanging nodes). The present document is a practical user's guide for Code Saturne version 2.0.7. It is the result of the joint effort of all the members in the development team. It presents all the necessary elements to run a calculation with Code Saturne version 2.0.7. It then lists all the variables of the code which may be useful for more advanced utilisation. The user subroutines of all the modules within the code are then documented. Eventually, for each key word and user-modifiable parameter in the code, their definition, allowed values, default values and conditions for use are given. These key words and parameters are grouped under headings based on their function. An alphabetical index list is also given at the end of the document for easier consultation. Code Saturne is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Code Saturne is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Code Saturne EDF R&D Code Saturne version 2.0.7 practical user's documentation guide Page 3/185 TABLE OF CONTENTS 1 Introduction......................................... 9 2 Practical information about Code Saturne ....................... 10 2.1 System Environment for Code Saturne ......................... 10 2.1.1 Preliminary settings.................................... 10 2.1.2 Standard directory hierarchy................................ 10 2.1.3 Code Saturne Kernel library files............................. 13 2.2 Setting up and running of a calculation....................... 13 2.2.1 Step by step calculation.................................. 13 2.2.2 Temporary execution directory.............................. 15 2.2.3 Execution modes...................................... 16 2.2.4 Interactive modification of the target time step...................... 16 2.3 Case preparer....................................... 16 2.4 Supported mesh and post-processing output formats............... 17 2.4.1 Formats supported for input................................ 18 2.4.2 Formats supported for input or output.......................... 21 2.4.3 Mesh meta-files...................................... 24 2.4.4 Meshing tools and associated formats........................... 24 2.4.5 Meshing remarks...................................... 25 2.5 Preprocessor command line options.......................... 25 2.6 Kernel command line options.............................. 26 2.7 Parameters in the launch script............................ 27 2.8 Graphical User Interface................................ 30 2.9 Face and cell mesh-defined properties and selection............... 31 3 Preprocessing........................................ 33 3.1 Preprocessor options and sub-options........................ 34 3.1.1 Option files......................................... 34 3.1.2 Mesh selection....................................... 34 3.1.3 Post-processing output................................... 35 3.1.4 Faces selection....................................... 35 3.1.5 Joining of non-conforming meshes............................ 36 3.1.6 Periodicity......................................... 37 3.1.7 Element orientation correction.............................. 38 3.2 Environment variables.................................. 38 3.2.1 System environment variables............................... 39 3.3 Optional functionality................................. 39 Code Saturne EDF R&D Code Saturne version 2.0.7 practical user's documentation guide Page 4/185 3.4 General remarks..................................... 39 3.5 Files passed to the Kernel............................... 39 4 Partitioning for parallel runs............................... 40 4.1 Options........................................... 40 4.1.1 Ignore periodicity..................................... 40 4.1.2 Partitioner choice..................................... 40 4.1.3 Simulation mode...................................... 40 4.1.4 Environment variables................................... 40 5 Main variables....................................... 41 5.1 Array sizes......................................... 41 5.2 Geometric variables................................... 43 5.3 Physical variables..................................... 44 5.4 Variables related to the numerical methods.................... 49 5.5 User arrays......................................... 52 5.6 Developer arrays..................................... 52 5.7 Parallelism and periodicity............................... 53 5.8 Geometry and particule arrays related to Lagrangian modeling....... 56 5.9 Variables saved to allow calculation restarts................... 59 6 User subroutines...................................... 61 6.1 Preliminary comments.................................. 61 6.2 Using selection criteria in user subroutines.................... 61 6.3 Initialisation of the main key words: usini1 .................... 63 6.4 Management of boundary conditions: usclim .................... 63 6.4.1 Coding of standard boundary conditions......................... 64 6.4.2 Coding of non-standard boundary conditions....................... 66 6.4.3 Checking of the boundary conditions........................... 68 6.4.4 Sorting of the boundary faces............................... 68 6.5 Management of the boundary conditions with LES: usvort ............ 68 6.6 Management of the variable physical properties: usphyv ............. 70 6.7 Non-default variables initialisation: usiniv ..................... 71 6.8 Non-standard management of the chronological record files: ushist .... 72 6.9 User source terms in Navier-Stokes: ustsns ..................... 73 6.10 User source terms for k and ": ustske ........................ 74 6.11 User source terms for Rij and ": ustsri ....................... 74 6.12 User source terms for ' and f: ustsv2 ........................ 75 6.13 User source terms for k and !: ustskw ........................ 75 6.14 User source terms for the user scalars: ustssc .................. 75 Code Saturne EDF R&D Code Saturne version 2.0.7 practical user's documentation guide Page 5/185 6.15 Management of the pressure drops: uskpdc ..................... 75 6.16 Management of the mass sources: ustsma ....................... 76 6.17 Thermal module in a 1D wall.............................. 77 6.18 Initialization of the options of the variables related to the ale module: usalin and usstr1 ..................................... 78 6.19 Management of the boundary conditions of velocity mesh related to the ale module: usalcl .................................... 79 6.20 Management of the structure property: usstr2 .................. 80 6.21 Modification of the turbulent viscosity: usvist .................. 80 6.22 Modification of the variable C of the dynamic LES model: ussmag ....... 81 6.23 Temperature-enthalpy and enthalpy-temperature conversions: usthht .... 81 6.24 Modification of the mesh geometry: usmodg ..................... 82 6.25 Management of the post-processing intermediate outputs: usnpst ....... 82 6.26 Definition of post-processing and mesh zones: usdpst ............... 83 6.27 Modification of the mesh zones to post-process: usmpst ............. 85 6.28 Definition of the variables to post-process: usvpst ................ 85 6.29 Modification of the variables at the end of a time step: usproj ........ 86 6.30 Radiative thermal transfers in semi-transparent gray media.......... 87 6.30.1 Initialisation of the radiation main key words: usray1 ................. 87 6.30.2 Management of the radiation boundary conditions: usray2 ............... 87 6.30.3 Absorption coefficient of the medium, boundary conditions for the luminance and cal- cualtion of the net radiative flux: usray3 ......................... 88 6.30.4 Encapsulation of the temperature-enthalpy conversion: usray4 ............. 89 6.31 Utilisation of a specific physics: usppmo ......................