9.2
general documentation
cs_les_mu_t.h
Go to the documentation of this file.
1#ifndef CS_TURBULENCE_VIS_LES_H
2#define CS_TURBULENCE_VIS_LES_H
3
4/*============================================================================
5 * Turbulent viscosity for LES models.
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2026 EDF S.A.
12
13 This program is free software; you can redistribute it and/or modify it under
14 the terms of the GNU General Public License as published by the Free Software
15 Foundation; either version 2 of the License, or (at your option) any later
16 version.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 details.
22
23 You should have received a copy of the GNU General Public License along with
24 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25 Street, Fifth Floor, Boston, MA 02110-1301, USA.
26*/
27
28/*----------------------------------------------------------------------------*/
29
30/*----------------------------------------------------------------------------
31 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "base/cs_base.h"
35
36/*=============================================================================
37 * Local Macro definitions
38 *============================================================================*/
39
40/*============================================================================
41 * Type definition
42 *============================================================================*/
43
44/*=============================================================================
45 * Public function prototypes
46 *============================================================================*/
47
48/*----------------------------------------------------------------------------*/
49/*
50 * \brief Calculation of Mij:Mij and Mij:Lij for dynamic Smagorinsky model
51 *
52 * Please refer to the
53 * <a href="../../theory.pdf#dynsmago"><b>dynamic Smagorinsky model</b></a>
54 * section of the theory guide for more informations.
55 *
56 * \param[out] s_n strain rate (sqrt(2SijSij))
57 * \param[out] sf_n filtered strain rate
58 * \param[out] f_vel filtered velocity
59 * \param[out] mijmij Mij:Mij
60 * \param[out] mijlij Mij:Lij
61 *
62 !*/
63/*----------------------------------------------------------------------------*/
64
65extern "C" void
67 cs_real_t sf_n[],
68 cs_real_3_t *f_vel,
69 cs_real_t mijmij[],
70 cs_real_t mijlij[]);
71
72/*----------------------------------------------------------------------------*/
73/*
74 * \brief Calculation of turbulent viscosity for
75 * a dynamic Smagorinsky LES model
76 *
77 * \f[ smago = \dfrac{L_{ij}M_{ij}}{M_{ij}M_{ij}} \f]
78 *
79 * \f[ \mu_T = \rho smago L^2 \sqrt{2 S_{ij}S_{ij}} \f]
80 * \f[ S_{ij} = \dfrac{\der{u_i}{x_j} + \der{u_j}{x_i}}{2}\f]
81 *
82 *
83 !*/
84/*----------------------------------------------------------------------------*/
85
86extern "C" void
88
89/*----------------------------------------------------------------------------*/
90/*
91 * \brief Calculation of the turbulent viscosity for a Smagorinsky LES model
92 *
93 * \f[ \mu_T = \rho (C_{S} l)^2 \sqrt{2 S_{ij}S_{ij}} \f]
94 * \f[ S_{ij} = \dfrac{\der{u_i}{x_j} + \der{u_j}{x_i}}{2}\f]
95 *
96 !*/
97/*----------------------------------------------------------------------------*/
98
99extern "C" void
101
102/*----------------------------------------------------------------------------*/
103/*
104 * \brief Compute the turbulent viscosity for the WALE LES model.
105 *
106 * The turbulent viscosity is:
107 * \f$ \mu_T = \rho (C_{wale} L)^2 * \dfrac{(\tens{S}:\tens{Sd})^{3/2}}
108 * {(\tens{S} :\tens{S})^(5/2)
109 * +(\tens{Sd}:\tens{Sd})^(5/4)} \f$
110 * with \f$ \tens{S} = \frac{1}{2}(\gradt \vect{u} + \transpose{\gradt \vect{u}})\f$
111 * and \f$ \tens{Sd} = \deviator{(\symmetric{(\tens{S}^2)})}\f$
112 *
113 !*/
114/*----------------------------------------------------------------------------*/
115
116extern "C" void
117cs_les_mu_t_wale(void);
118
119/*----------------------------------------------------------------------------*/
120/*
121 * \brief Calculation of turbulent viscosity for
122 * a k-SGS LES model
123 !*/
124/*----------------------------------------------------------------------------*/
125
126extern "C" void
127cs_les_mu_t_ksgs(void);
128
129/*----------------------------------------------------------------------------*/
130/*
131 * \brief Calculation of turbulent viscosity for
132 * a tau-SGS LES model
133 !*/
134/*----------------------------------------------------------------------------*/
135
136extern "C" void
138
139/*----------------------------------------------------------------------------*/
140
141#endif /* CS_LES_MU_T_H */
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:349
void cs_les_mu_t_smago_dyn(void)
Computation of the turbulent viscosity for a dynamic Smagorinsky LES model.
Definition: cs_les_mu_t.cpp:316
void cs_les_mu_t_tausgs(void)
Computation of turbulent viscosity for a tau-SGS LES model !
Definition: cs_les_mu_t.cpp:989
void cs_les_mu_t_ksgs(void)
Computation of turbulent viscosity for a k-SGS LES model !
Definition: cs_les_mu_t.cpp:951
void cs_les_mu_t_smago_dyn_prepare(cs_real_t s_n[], cs_real_t sf_n[], cs_real_3_t *f_vel, cs_real_t mijmij[], cs_real_t mijlij[])
void cs_les_mu_t_wale(void)
Compute the turbulent viscosity for the WALE LES model.
Definition: cs_les_mu_t.cpp:800
void cs_les_mu_t_smago_const(void)
Computation of turbulent viscosity for a Smagorinsky LES model.
Definition: cs_les_mu_t.cpp:706