File: cs_user_postprocess_var.h

package info (click to toggle)
code-saturne 4.3.3%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 77,992 kB
  • sloc: ansic: 281,257; f90: 122,305; python: 56,490; makefile: 3,915; xml: 3,285; cpp: 3,183; sh: 1,139; lex: 176; yacc: 101; sed: 16
file content (115 lines) | stat: -rw-r--r-- 4,882 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/*============================================================================
 * Code_Saturne documentation page
 *============================================================================*/

/*
  This file is part of Code_Saturne, a general-purpose CFD tool.

  Copyright (C) 1998-2016 EDF S.A.

  This program 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.

  This program 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.

  You should have received a copy of the GNU General Public License along with
  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
  Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

/*----------------------------------------------------------------------------*/

/*!
  \page cs_user_postprocess_var Output additional variables on a post-processing mesh (cs_user_postprocess_var.f90)

  \section cs_user_postprocess_var_h_intro Introduction

  The \ref usvpst user subroutine allows one to output additional variables
  on a post-processing mesh. Several "automatic" post-processing meshes may be
  defined :
    - The volume mesh (\c ipart=-1)
    - The boundary mesh (\c ipart=-2)
    - SYRTHES coupling surface (\c ipart < -2)
    - Cooling tower exchange zone meshes (\c ipart < -2) if \c ichrze = 1

   Additional meshes (cells or faces) may also be defined through the GUI or
   using the \ref cs_user_postprocess_meshes function from the
   cs_user_postprocess.c file.

   The examples of post-processing given below are using the meshes defined
   \ref cs_user_postprocess "here".

  \section cs_user_postprocess_var_h_volume_mesh Output on the volume mesh (ipart = -1)

  \subsection cs_user_postprocess_var_h_volume_mesh_tke Output of the turbulent kinetic energy for the Rij-Epsilon model on the volume mesh

  One can define, compute and post-process the turbulent kinetic energy for the Rij-Epsilon
  as shown in the following example.

  \snippet cs_user_postprocess_var.f90 postprocess_var_ex_1

  \subsection cs_user_postprocess_var_h_volume_mesh_mom Output of a combination of moments

  A combination of moments can also be post-processed using the \ref usvpst subroutine.

  \snippet cs_user_postprocess_var.f90 postprocess_var_ex_2

  \section cs_user_postprocess_var_h_boundary_mesh Output on the boundary mesh (ipart = -2)

  Variables can be post-processed on the boundary mesh even if they are orignally
  define at cell centers. The following code block illustrates the post-processing
  of the density on the boundary mesh.

  \snippet cs_user_postprocess_var.f90 postprocess_var_ex_3

  \section cs_user_postprocess_var_h_user_mesh_1_2 Output on user meshes 1 or 2

  User meshes appearing in the examples are defined \ref cs_user_postprocess "here".

  \subsection cs_user_postprocess_var_h_user_mesh_1_2_vel Output of an interpolated velocity on user meshes

  An interpolated velocity is computed on both interior and boundary faces using a simple linear
  interpolation on user meshes 1 or 2.

  \snippet cs_user_postprocess_var.f90 postprocess_var_ex_4

  \subsection cs_user_postprocess_var_h_user_mesh_1_2_pr Output of the pressure on user meshes

  Similarly, the pressure is computed on both interior and boundary faces and then post-processed on user meshes
  1 or 2.

  \snippet cs_user_postprocess_var.f90 postprocess_var_ex_5

  \subsection cs_user_postprocess_var_h_user_mesh_cdg Output of the centers of gravity in different ways

  The examples below illustrate how to output a same variable in different
  ways (interlaced or not, using an indirection or not).

  \subsubsection cs_user_postprocess_var_h_user_mesh_cdg1 Output of the centers of gravity, interleaved

  \snippet cs_user_postprocess_var.f90 postprocess_var_ex_6

  \subsubsection cs_user_postprocess_var_h_user_mesh_cdg2 Output of the centers of gravity, non-interleaved, time-dependant

  \snippet cs_user_postprocess_var.f90 postprocess_var_ex_7

  \subsubsection cs_user_postprocess_var_h_user_mesh_cdg3 Output of the centers of gravity, with indirection (parent-based)

  \snippet cs_user_postprocess_var.f90 postprocess_var_ex_8

  \section cs_user_postprocess_var_h_user_mesh_3_4 Output on user meshes 3 or 4

  \subsection cs_user_postprocess_var_h_user_mesh_3_4_vel Output of an interpolated velocity on user meshes

  \snippet cs_user_postprocess_var.f90 postprocess_var_ex_9

  \subsection cs_user_postprocess_var_h_user_mesh_3_4_pr Output of the pressure on user meshes

  \snippet cs_user_postprocess_var.f90 postprocess_var_ex_10

*/