Documentation 6b54b78464
Loading...
Searching...
No Matches
sgs_model.hpp
Go to the documentation of this file.
1/*!
2 * \file sgs_model.hpp
3 * \brief Headers of the LES subgrid scale models of the SU2 solvers.
4 * \author E. van der Weide, T. Economon, P. Urbanczyk
5 * \version 8.5.0 "Harrier"
6 *
7 * SU2 Project Website: https://su2code.github.io
8 *
9 * The SU2 Project is maintained by the SU2 Foundation
10 * (http://su2foundation.org)
11 *
12 * Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
13 *
14 * SU2 is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Lesser General Public
16 * License as published by the Free Software Foundation; either
17 * version 2.1 of the License, or (at your option) any later version.
18 *
19 * SU2 is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 * Lesser General Public License for more details.
23 *
24 * You should have received a copy of the GNU Lesser General Public
25 * License along with SU2. If not, see <http://www.gnu.org/licenses/>.
26 */
27
28#pragma once
29
30#include "../../Common/include/parallelization/mpi_structure.hpp"
31
32#include <iostream>
33#include <cmath>
34
35using namespace std;
36
37/*!
38 * \class CSGSModel
39 * \brief Base class for defining the LES subgrid scale model.
40 * \author: E. van der Weide, T. Economon, P. Urbanczyk
41 * \version 8.5.0 "Harrier"
42 */
43class CSGSModel {
44
45public:
46 /*!
47 * \brief Constructor of the class.
48 */
49 CSGSModel(void);
50
51 /*!
52 * \brief Destructor of the class.
53 */
54 virtual ~CSGSModel(void);
55
56 /*!
57 * \brief Virtual function to determine the eddy viscosity
58 for the given function arguments for a 2D simulation.
59 * \param[in] rho - Density
60 * \param[in] dudx - x-derivative of the u-velocity.
61 * \param[in] dudy - y-derivative of the u-velocity.
62 * \param[in] dvdx - x-derivative of the v-velocity.
63 * \param[in] dvdy - y-derivative of the v-velocity.
64 * \param[in] lenScale - Length scale of the corresponding element.
65 * \param[in] distToWall - Distance to the nearest wall.
66 * \return Value of the dynamic eddy viscosity. For the base class 0 is returned.
67 */
69 const su2double dudx,
70 const su2double dudy,
71 const su2double dvdx,
72 const su2double dvdy,
73 const su2double lenScale,
74 const su2double distToWall);
75
76 /*!
77 * \brief Virtual function to determine the eddy viscosity
78 for the given function arguments for a 3D simulation.
79 * \param[in] rho - Density
80 * \param[in] dudx - x-derivative of the u-velocity.
81 * \param[in] dudy - y-derivative of the u-velocity.
82 * \param[in] dudz - z-derivative of the u-velocity.
83 * \param[in] dvdx - x-derivative of the v-velocity.
84 * \param[in] dvdy - y-derivative of the v-velocity.
85 * \param[in] dvdz - z-derivative of the v-velocity.
86 * \param[in] dwdx - x-derivative of the w-velocity.
87 * \param[in] dwdy - y-derivative of the w-velocity.
88 * \param[in] dwdz - z-derivative of the w-velocity.
89 * \param[in] lenScale - Length scale of the corresponding element.
90 * \param[in] distToWall - Distance to the nearest wall.
91 * \return Value of the dynamic eddy viscosity. For the base class 0 is returned.
92 */
94 const su2double dudx,
95 const su2double dudy,
96 const su2double dudz,
97 const su2double dvdx,
98 const su2double dvdy,
99 const su2double dvdz,
100 const su2double dwdx,
101 const su2double dwdy,
102 const su2double dwdz,
103 const su2double lenScale,
104 const su2double distToWall);
105
106 /*!
107 * \brief Virtual function to determine the gradients of the eddy viscosity
108 for the given function arguments for a 2D simulation.
109 * \param[in] rho - Density.
110 * \param[in] drhodx - x-derivative of the density.
111 * \param[in] drhody - y-derivative of the density.
112 * \param[in] dudx - x-derivative of the u-velocity.
113 * \param[in] dudy - y-derivative of the u-velocity.
114 * \param[in] dvdx - x-derivative of the v-velocity.
115 * \param[in] dvdy - y-derivative of the v-velocity.
116 * \param[in] d2udx2 - 2nd x-derivative of the u-velocity.
117 * \param[in] d2udy2 - 2nd y-derivative of the u-velocity.
118 * \param[in] d2udxdy - x-y cross-derivative of the u-velocity.
119 * \param[in] d2vdx2 - 2nd x-derivative of the v-velocity.
120 * \param[in] d2vdy2 - 2nd y-derivative of the v-velocity.
121 * \param[in] d2vdxdy - x-y cross-derivative of the v-velocity.
122 * \param[in] lenScale - Length scale of the corresponding element.
123 * \param[in] distToWall - Distance to the nearest wall.
124 * \param[out] dMuTdx - x-derivative of the turbulent viscosity.
125 * \param[out] dMuTdy - y-derivative of the turbulent viscosity.
126 */
127 virtual void ComputeGradEddyViscosity_2D(const su2double rho,
128 const su2double drhodx,
129 const su2double drhody,
130 const su2double dudx,
131 const su2double dudy,
132 const su2double dvdx,
133 const su2double dvdy,
134 const su2double d2udx2,
135 const su2double d2udy2,
136 const su2double d2udxdy,
137 const su2double d2vdx2,
138 const su2double d2vdy2,
139 const su2double d2vdxdy,
140 const su2double lenScale,
141 const su2double distToWall,
142 su2double &dMuTdx,
143 su2double &dMuTdy);
144
145 /*!
146 * \brief Virtual function to determine the gradients of the eddy viscosity
147 for the given function arguments for a 3D simulation.
148 * \param[in] rho - Density.
149 * \param[in] drhodx - x-derivative of the density.
150 * \param[in] drhody - y-derivative of the density.
151 * \param[in] drhodz - z-derivative of the density.
152 * \param[in] dudx - x-derivative of the u-velocity.
153 * \param[in] dudy - y-derivative of the u-velocity.
154 * \param[in] dudz - z-derivative of the u-velocity.
155 * \param[in] dvdx - x-derivative of the v-velocity.
156 * \param[in] dvdy - y-derivative of the v-velocity.
157 * \param[in] dvdz - z-derivative of the v-velocity.
158 * \param[in] dwdx - x-derivative of the w-velocity.
159 * \param[in] dwdy - y-derivative of the w-velocity.
160 * \param[in] dwdz - z-derivative of the w-velocity.
161 * \param[in] d2udx2 - 2nd x-derivative of the u-velocity.
162 * \param[in] d2udy2 - 2nd y-derivative of the u-velocity.
163 * \param[in] d2udz2 - 2nd z-derivative of the u-velocity.
164 * \param[in] d2udxdy - x-y cross-derivative of the u-velocity.
165 * \param[in] d2udxdz - x-z cross-derivative of the u-velocity.
166 * \param[in] d2udydz - y-z cross-derivative of the u-velocity.
167 * \param[in] d2vdx2 - 2nd x-derivative of the v-velocity.
168 * \param[in] d2vdy2 - 2nd y-derivative of the v-velocity.
169 * \param[in] d2vdz2 - 2nd z-derivative of the v-velocity.
170 * \param[in] d2vdxdy - x-y cross-derivative of the v-velocity.
171 * \param[in] d2vdxdz - x-z cross-derivative of the v-velocity.
172 * \param[in] d2vdydz - y-z cross-derivative of the v-velocity.
173 * \param[in] d2wdx2 - 2nd x-derivative of the w-velocity.
174 * \param[in] d2wdy2 - 2nd y-derivative of the w-velocity.
175 * \param[in] d2wdz2 - 2nd z-derivative of the w-velocity.
176 * \param[in] d2wdxdy - x-y cross-derivative of the w-velocity.
177 * \param[in] d2wdxdz - x-z cross-derivative of the w-velocity.
178 * \param[in] d2wdydz - y-z cross-derivative of the w-velocity.
179 * \param[in] lenScale - Length scale of the corresponding element.
180 * \param[in] distToWall - Distance to the nearest wall.
181 * \param[out] dMuTdx - x-derivative of the turbulent viscosity.
182 * \param[out] dMuTdy - y-derivative of the turbulent viscosity.
183 * \param[out] dMuTdz - z-derivative of the turbulent viscosity.
184 */
185 virtual void ComputeGradEddyViscosity_3D(const su2double rho,
186 const su2double drhodx,
187 const su2double drhody,
188 const su2double drhodz,
189 const su2double dudx,
190 const su2double dudy,
191 const su2double dudz,
192 const su2double dvdx,
193 const su2double dvdy,
194 const su2double dvdz,
195 const su2double dwdx,
196 const su2double dwdy,
197 const su2double dwdz,
198 const su2double d2udx2,
199 const su2double d2udy2,
200 const su2double d2udz2,
201 const su2double d2udxdy,
202 const su2double d2udxdz,
203 const su2double d2udydz,
204 const su2double d2vdx2,
205 const su2double d2vdy2,
206 const su2double d2vdz2,
207 const su2double d2vdxdy,
208 const su2double d2vdxdz,
209 const su2double d2vdydz,
210 const su2double d2wdx2,
211 const su2double d2wdy2,
212 const su2double d2wdz2,
213 const su2double d2wdxdy,
214 const su2double d2wdxdz,
215 const su2double d2wdydz,
216 const su2double lenScale,
217 const su2double distToWall,
218 su2double &dMuTdx,
219 su2double &dMuTdy,
220 su2double &dMuTdz);
221};
222
223/*!
224 * \class CSmagorinskyModel
225 * \brief Derived class for defining the Smagorinsky SGS model.
226 * \author: E. van der Weide, T. Economon, P. Urbanczyk
227 * \version 8.5.0 "Harrier"
228 */
230
231public:
232
233 su2double const_smag; /*!< \brief Smagorinsky Constant C_s. */
234 su2double filter_mult; /*!< \brief Multiplier to get filter width from grid length scale. */
235 /*!
236 * \brief Constructor of the class.
237 */
238 CSmagorinskyModel(void);
239
240 /*!
241 * \brief Destructor of the class.
242 */
243 ~CSmagorinskyModel(void) override;
244
245 /*!
246 * \brief Function to determine the eddy viscosity for
247 the given function arguments for a 2D simulation.
248 * \param[in] rho - Density
249 * \param[in] dudx - x-derivative of the u-velocity.
250 * \param[in] dudy - y-derivative of the u-velocity.
251 * \param[in] dvdx - x-derivative of the v-velocity.
252 * \param[in] dvdy - y-derivative of the v-velocity.
253 * \param[in] lenScale - Length scale of the corresponding element.
254 * \param[in] distToWall - Distance to the nearest wall.
255 * \return Value of the dynamic eddy viscosity for the Smagorinsky model.
256 */
258 const su2double dudx,
259 const su2double dudy,
260 const su2double dvdx,
261 const su2double dvdy,
262 const su2double lenScale,
263 const su2double distToWall) override;
264
265/*!
266 * \brief Function to determine the eddy viscosity for
267 the given function arguments for a 3D simulation.
268 * \param[in] rho - Density
269 * \param[in] dudx - x-derivative of the u-velocity.
270 * \param[in] dudy - y-derivative of the u-velocity.
271 * \param[in] dudz - z-derivative of the u-velocity.
272 * \param[in] dvdx - x-derivative of the v-velocity.
273 * \param[in] dvdy - y-derivative of the v-velocity.
274 * \param[in] dvdz - z-derivative of the v-velocity.
275 * \param[in] dwdx - x-derivative of the w-velocity.
276 * \param[in] dwdy - y-derivative of the w-velocity.
277 * \param[in] dwdz - z-derivative of the w-velocity.
278 * \param[in] lenScale - Length scale of the corresponding element.
279 * \param[in] distToWall - Distance to the nearest wall.
280 * \return Value of the dynamic eddy viscosity for the Smagorinsky model.
281 */
283 const su2double dudx,
284 const su2double dudy,
285 const su2double dudz,
286 const su2double dvdx,
287 const su2double dvdy,
288 const su2double dvdz,
289 const su2double dwdx,
290 const su2double dwdy,
291 const su2double dwdz,
292 const su2double lenScale,
293 const su2double distToWall) override;
294
295 /*!
296 * \brief Function to determine the gradients of the eddy viscosity
297 for the given function arguments for a 2D simulation.
298 * \param[in] rho - Density.
299 * \param[in] drhodx - x-derivative of the density.
300 * \param[in] drhody - y-derivative of the density.
301 * \param[in] dudx - x-derivative of the u-velocity.
302 * \param[in] dudy - y-derivative of the u-velocity.
303 * \param[in] dvdx - x-derivative of the v-velocity.
304 * \param[in] dvdy - y-derivative of the v-velocity.
305 * \param[in] d2udx2 - 2nd x-derivative of the u-velocity.
306 * \param[in] d2udy2 - 2nd y-derivative of the u-velocity.
307 * \param[in] d2udxdy - x-y cross-derivative of the u-velocity.
308 * \param[in] d2vdx2 - 2nd x-derivative of the v-velocity.
309 * \param[in] d2vdy2 - 2nd y-derivative of the v-velocity.
310 * \param[in] d2vdxdy - x-y cross-derivative of the v-velocity.
311 * \param[in] lenScale - Length scale of the corresponding element.
312 * \param[in] distToWall - Distance to the nearest wall.
313 * \param[out] dMuTdx - x-derivative of the turbulent viscosity.
314 * \param[out] dMuTdy - y-derivative of the turbulent viscosity.
315 */
317 const su2double drhodx,
318 const su2double drhody,
319 const su2double dudx,
320 const su2double dudy,
321 const su2double dvdx,
322 const su2double dvdy,
323 const su2double d2udx2,
324 const su2double d2udy2,
325 const su2double d2udxdy,
326 const su2double d2vdx2,
327 const su2double d2vdy2,
328 const su2double d2vdxdy,
329 const su2double lenScale,
330 const su2double distToWall,
331 su2double &dMuTdx,
332 su2double &dMuTdy) override;
333
334 /*!
335 * \brief function to determine the gradients of the eddy viscosity
336 for the given function arguments for a 3D simulation.
337 * \param[in] rho - Density.
338 * \param[in] drhodx - x-derivative of the density.
339 * \param[in] drhody - y-derivative of the density.
340 * \param[in] drhodz - z-derivative of the density.
341 * \param[in] dudx - x-derivative of the u-velocity.
342 * \param[in] dudy - y-derivative of the u-velocity.
343 * \param[in] dudz - z-derivative of the u-velocity.
344 * \param[in] dvdx - x-derivative of the v-velocity.
345 * \param[in] dvdy - y-derivative of the v-velocity.
346 * \param[in] dvdz - z-derivative of the v-velocity.
347 * \param[in] dwdx - x-derivative of the w-velocity.
348 * \param[in] dwdy - y-derivative of the w-velocity.
349 * \param[in] dwdz - z-derivative of the w-velocity.
350 * \param[in] d2udx2 - 2nd x-derivative of the u-velocity.
351 * \param[in] d2udy2 - 2nd y-derivative of the u-velocity.
352 * \param[in] d2udz2 - 2nd z-derivative of the u-velocity.
353 * \param[in] d2udxdy - x-y cross-derivative of the u-velocity.
354 * \param[in] d2udxdz - x-z cross-derivative of the u-velocity.
355 * \param[in] d2udydz - y-z cross-derivative of the u-velocity.
356 * \param[in] d2vdx2 - 2nd x-derivative of the v-velocity.
357 * \param[in] d2vdy2 - 2nd y-derivative of the v-velocity.
358 * \param[in] d2vdz2 - 2nd z-derivative of the v-velocity.
359 * \param[in] d2vdxdy - x-y cross-derivative of the v-velocity.
360 * \param[in] d2vdxdz - x-z cross-derivative of the v-velocity.
361 * \param[in] d2vdydz - y-z cross-derivative of the v-velocity.
362 * \param[in] d2wdx2 - 2nd x-derivative of the w-velocity.
363 * \param[in] d2wdy2 - 2nd y-derivative of the w-velocity.
364 * \param[in] d2wdz2 - 2nd z-derivative of the w-velocity.
365 * \param[in] d2wdxdy - x-y cross-derivative of the w-velocity.
366 * \param[in] d2wdxdz - x-z cross-derivative of the w-velocity.
367 * \param[in] d2wdydz - y-z cross-derivative of the w-velocity.
368 * \param[in] lenScale - Length scale of the corresponding element.
369 * \param[in] distToWall - Distance to the nearest wall.
370 * \param[out] dMuTdx - x-derivative of the turbulent viscosity.
371 * \param[out] dMuTdy - y-derivative of the turbulent viscosity.
372 * \param[out] dMuTdz - z-derivative of the turbulent viscosity.
373 */
375 const su2double drhodx,
376 const su2double drhody,
377 const su2double drhodz,
378 const su2double dudx,
379 const su2double dudy,
380 const su2double dudz,
381 const su2double dvdx,
382 const su2double dvdy,
383 const su2double dvdz,
384 const su2double dwdx,
385 const su2double dwdy,
386 const su2double dwdz,
387 const su2double d2udx2,
388 const su2double d2udy2,
389 const su2double d2udz2,
390 const su2double d2udxdy,
391 const su2double d2udxdz,
392 const su2double d2udydz,
393 const su2double d2vdx2,
394 const su2double d2vdy2,
395 const su2double d2vdz2,
396 const su2double d2vdxdy,
397 const su2double d2vdxdz,
398 const su2double d2vdydz,
399 const su2double d2wdx2,
400 const su2double d2wdy2,
401 const su2double d2wdz2,
402 const su2double d2wdxdy,
403 const su2double d2wdxdz,
404 const su2double d2wdydz,
405 const su2double lenScale,
406 const su2double distToWall,
407 su2double &dMuTdx,
408 su2double &dMuTdy,
409 su2double &dMuTdz) override;
410};
411
412/*!
413 * \class CWALEModel
414 * \brief Derived class for defining the WALE SGS model.
415 * \author: E. van der Weide, T. Economon, P. Urbanczyk
416 * \version 8.5.0 "Harrier"
417 */
418class CWALEModel : public CSGSModel {
419
420public:
421 su2double const_WALE; /*!< \brief WALE Constant Cw. */
422
423 /*!
424 * \brief Constructor of the class.
425 */
426 CWALEModel(void);
427
428 /*!
429 * \brief Destructor of the class.
430 */
431 ~CWALEModel(void) override;
432
433 /*!
434 * \brief Function to determine the eddy viscosity for
435 the given function arguments for a 2D simulation.
436 * \param[in] rho - Density
437 * \param[in] dudx - x-derivative of the u-velocity.
438 * \param[in] dudy - y-derivative of the u-velocity.
439 * \param[in] dvdx - x-derivative of the v-velocity.
440 * \param[in] dvdy - y-derivative of the v-velocity.
441 * \param[in] lenScale - Length scale of the corresponding element.
442 * \param[in] distToWall - Distance to the nearest wall.
443 * \return Value of the dynamic eddy viscosity for the WALE model.
444 */
446 const su2double dudx,
447 const su2double dudy,
448 const su2double dvdx,
449 const su2double dvdy,
450 const su2double lenScale,
451 const su2double distToWall) override;
452
453/*!
454 * \brief Function to determine the eddy viscosity for
455 the given function arguments for a 3D simulation.
456 * \param[in] rho - Density
457 * \param[in] dudx - x-derivative of the u-velocity.
458 * \param[in] dudy - y-derivative of the u-velocity.
459 * \param[in] dudz - z-derivative of the u-velocity.
460 * \param[in] dvdx - x-derivative of the v-velocity.
461 * \param[in] dvdy - y-derivative of the v-velocity.
462 * \param[in] dvdz - z-derivative of the v-velocity.
463 * \param[in] dwdx - x-derivative of the w-velocity.
464 * \param[in] dwdy - y-derivative of the w-velocity.
465 * \param[in] dwdz - z-derivative of the w-velocity.
466 * \param[in] lenScale - Length scale of the corresponding element.
467 * \param[in] distToWall - Distance to the nearest wall.
468 * \return Value of the dynamic eddy viscosity for the WALE model.
469 */
471 const su2double dudx,
472 const su2double dudy,
473 const su2double dudz,
474 const su2double dvdx,
475 const su2double dvdy,
476 const su2double dvdz,
477 const su2double dwdx,
478 const su2double dwdy,
479 const su2double dwdz,
480 const su2double lenScale,
481 const su2double distToWall) override;
482
483 /*!
484 * \brief Function to determine the gradients of the eddy viscosity
485 for the given function arguments for a 2D simulation.
486 * \param[in] rho - Density.
487 * \param[in] drhodx - x-derivative of the density.
488 * \param[in] drhody - y-derivative of the density.
489 * \param[in] dudx - x-derivative of the u-velocity.
490 * \param[in] dudy - y-derivative of the u-velocity.
491 * \param[in] dvdx - x-derivative of the v-velocity.
492 * \param[in] dvdy - y-derivative of the v-velocity.
493 * \param[in] d2udx2 - 2nd x-derivative of the u-velocity.
494 * \param[in] d2udy2 - 2nd y-derivative of the u-velocity.
495 * \param[in] d2udxdy - x-y cross-derivative of the u-velocity.
496 * \param[in] d2vdx2 - 2nd x-derivative of the v-velocity.
497 * \param[in] d2vdy2 - 2nd y-derivative of the v-velocity.
498 * \param[in] d2vdxdy - x-y cross-derivative of the v-velocity.
499 * \param[in] lenScale - Length scale of the corresponding element.
500 * \param[in] distToWall - Distance to the nearest wall.
501 * \param[out] dMuTdx - x-derivative of the turbulent viscosity.
502 * \param[out] dMuTdy - y-derivative of the turbulent viscosity.
503 */
505 const su2double drhodx,
506 const su2double drhody,
507 const su2double dudx,
508 const su2double dudy,
509 const su2double dvdx,
510 const su2double dvdy,
511 const su2double d2udx2,
512 const su2double d2udy2,
513 const su2double d2udxdy,
514 const su2double d2vdx2,
515 const su2double d2vdy2,
516 const su2double d2vdxdy,
517 const su2double lenScale,
518 const su2double distToWall,
519 su2double &dMuTdx,
520 su2double &dMuTdy) override;
521
522 /*!
523 * \brief function to determine the gradients of the eddy viscosity
524 for the given function arguments for a 3D simulation.
525 * \param[in] rho - Density.
526 * \param[in] drhodx - x-derivative of the density.
527 * \param[in] drhody - y-derivative of the density.
528 * \param[in] drhodz - z-derivative of the density.
529 * \param[in] dudx - x-derivative of the u-velocity.
530 * \param[in] dudy - y-derivative of the u-velocity.
531 * \param[in] dudz - z-derivative of the u-velocity.
532 * \param[in] dvdx - x-derivative of the v-velocity.
533 * \param[in] dvdy - y-derivative of the v-velocity.
534 * \param[in] dvdz - z-derivative of the v-velocity.
535 * \param[in] dwdx - x-derivative of the w-velocity.
536 * \param[in] dwdy - y-derivative of the w-velocity.
537 * \param[in] dwdz - z-derivative of the w-velocity.
538 * \param[in] d2udx2 - 2nd x-derivative of the u-velocity.
539 * \param[in] d2udy2 - 2nd y-derivative of the u-velocity.
540 * \param[in] d2udz2 - 2nd z-derivative of the u-velocity.
541 * \param[in] d2udxdy - x-y cross-derivative of the u-velocity.
542 * \param[in] d2udxdz - x-z cross-derivative of the u-velocity.
543 * \param[in] d2udydz - y-z cross-derivative of the u-velocity.
544 * \param[in] d2vdx2 - 2nd x-derivative of the v-velocity.
545 * \param[in] d2vdy2 - 2nd y-derivative of the v-velocity.
546 * \param[in] d2vdz2 - 2nd z-derivative of the v-velocity.
547 * \param[in] d2vdxdy - x-y cross-derivative of the v-velocity.
548 * \param[in] d2vdxdz - x-z cross-derivative of the v-velocity.
549 * \param[in] d2vdydz - y-z cross-derivative of the v-velocity.
550 * \param[in] d2wdx2 - 2nd x-derivative of the w-velocity.
551 * \param[in] d2wdy2 - 2nd y-derivative of the w-velocity.
552 * \param[in] d2wdz2 - 2nd z-derivative of the w-velocity.
553 * \param[in] d2wdxdy - x-y cross-derivative of the w-velocity.
554 * \param[in] d2wdxdz - x-z cross-derivative of the w-velocity.
555 * \param[in] d2wdydz - y-z cross-derivative of the w-velocity.
556 * \param[in] lenScale - Length scale of the corresponding element.
557 * \param[in] distToWall - Distance to the nearest wall.
558 * \param[out] dMuTdx - x-derivative of the turbulent viscosity.
559 * \param[out] dMuTdy - y-derivative of the turbulent viscosity.
560 * \param[out] dMuTdz - z-derivative of the turbulent viscosity.
561 */
563 const su2double drhodx,
564 const su2double drhody,
565 const su2double drhodz,
566 const su2double dudx,
567 const su2double dudy,
568 const su2double dudz,
569 const su2double dvdx,
570 const su2double dvdy,
571 const su2double dvdz,
572 const su2double dwdx,
573 const su2double dwdy,
574 const su2double dwdz,
575 const su2double d2udx2,
576 const su2double d2udy2,
577 const su2double d2udz2,
578 const su2double d2udxdy,
579 const su2double d2udxdz,
580 const su2double d2udydz,
581 const su2double d2vdx2,
582 const su2double d2vdy2,
583 const su2double d2vdz2,
584 const su2double d2vdxdy,
585 const su2double d2vdxdz,
586 const su2double d2vdydz,
587 const su2double d2wdx2,
588 const su2double d2wdy2,
589 const su2double d2wdz2,
590 const su2double d2wdxdy,
591 const su2double d2wdxdz,
592 const su2double d2wdydz,
593 const su2double lenScale,
594 const su2double distToWall,
595 su2double &dMuTdx,
596 su2double &dMuTdy,
597 su2double &dMuTdz) override;
598};
599
600/*!
601 * \class CVremanModel
602 * \brief Derived class for defining the WALE SGS model.
603 * \author: E. van der Weide, T. Economon, P. Urbanczyk, E. Molina
604 * \version 8.5.0 "Harrier"
605 */
606class CVremanModel : public CSGSModel {
607
608public:
609 su2double const_Vreman; /*!< \brief Vreman Constant c=2.5*Cs*Cs. */
610
611 /*!
612 * \brief Constructor of the class.
613 */
614 CVremanModel(void);
615
616 /*!
617 * \brief Destructor of the class.
618 */
619 ~CVremanModel(void) override;
620
621 /*!
622 * \brief Function to determine the eddy viscosity for
623 the given function arguments for a 2D simulation.
624 * \param[in] rho - Density
625 * \param[in] dudx - x-derivative of the u-velocity.
626 * \param[in] dudy - y-derivative of the u-velocity.
627 * \param[in] dvdx - x-derivative of the v-velocity.
628 * \param[in] dvdy - y-derivative of the v-velocity.
629 * \param[in] lenScale - Length scale of the corresponding element.
630 * \param[in] distToWall - Distance to the nearest wall.
631 * \return Value of the dynamic eddy viscosity for the WALE model.
632 */
634 const su2double dudx,
635 const su2double dudy,
636 const su2double dvdx,
637 const su2double dvdy,
638 const su2double lenScale,
639 const su2double distToWall) override;
640
641 /*!
642 * \brief Function to determine the eddy viscosity for
643 the given function arguments for a 3D simulation.
644 * \param[in] rho - Density
645 * \param[in] dudx - x-derivative of the u-velocity.
646 * \param[in] dudy - y-derivative of the u-velocity.
647 * \param[in] dudz - z-derivative of the u-velocity.
648 * \param[in] dvdx - x-derivative of the v-velocity.
649 * \param[in] dvdy - y-derivative of the v-velocity.
650 * \param[in] dvdz - z-derivative of the v-velocity.
651 * \param[in] dwdx - x-derivative of the w-velocity.
652 * \param[in] dwdy - y-derivative of the w-velocity.
653 * \param[in] dwdz - z-derivative of the w-velocity.
654 * \param[in] lenScale - Length scale of the corresponding element.
655 * \param[in] distToWall - Distance to the nearest wall.
656 * \return Value of the dynamic eddy viscosity for the WALE model.
657 */
659 const su2double dudx,
660 const su2double dudy,
661 const su2double dudz,
662 const su2double dvdx,
663 const su2double dvdy,
664 const su2double dvdz,
665 const su2double dwdx,
666 const su2double dwdy,
667 const su2double dwdz,
668 const su2double lenScale,
669 const su2double distToWall) override;
670
671 /*!
672 * \brief Function to determine the gradients of the eddy viscosity
673 for the given function arguments for a 2D simulation.
674 * \param[in] rho - Density.
675 * \param[in] drhodx - x-derivative of the density.
676 * \param[in] drhody - y-derivative of the density.
677 * \param[in] dudx - x-derivative of the u-velocity.
678 * \param[in] dudy - y-derivative of the u-velocity.
679 * \param[in] dvdx - x-derivative of the v-velocity.
680 * \param[in] dvdy - y-derivative of the v-velocity.
681 * \param[in] d2udx2 - 2nd x-derivative of the u-velocity.
682 * \param[in] d2udy2 - 2nd y-derivative of the u-velocity.
683 * \param[in] d2udxdy - x-y cross-derivative of the u-velocity.
684 * \param[in] d2vdx2 - 2nd x-derivative of the v-velocity.
685 * \param[in] d2vdy2 - 2nd y-derivative of the v-velocity.
686 * \param[in] d2vdxdy - x-y cross-derivative of the v-velocity.
687 * \param[in] lenScale - Length scale of the corresponding element.
688 * \param[in] distToWall - Distance to the nearest wall.
689 * \param[out] dMuTdx - x-derivative of the turbulent viscosity.
690 * \param[out] dMuTdy - y-derivative of the turbulent viscosity.
691 */
693 const su2double drhodx,
694 const su2double drhody,
695 const su2double dudx,
696 const su2double dudy,
697 const su2double dvdx,
698 const su2double dvdy,
699 const su2double d2udx2,
700 const su2double d2udy2,
701 const su2double d2udxdy,
702 const su2double d2vdx2,
703 const su2double d2vdy2,
704 const su2double d2vdxdy,
705 const su2double lenScale,
706 const su2double distToWall,
707 su2double &dMuTdx,
708 su2double &dMuTdy) override;
709
710 /*!
711 * \brief function to determine the gradients of the eddy viscosity
712 for the given function arguments for a 3D simulation.
713 * \param[in] rho - Density.
714 * \param[in] drhodx - x-derivative of the density.
715 * \param[in] drhody - y-derivative of the density.
716 * \param[in] drhodz - z-derivative of the density.
717 * \param[in] dudx - x-derivative of the u-velocity.
718 * \param[in] dudy - y-derivative of the u-velocity.
719 * \param[in] dudz - z-derivative of the u-velocity.
720 * \param[in] dvdx - x-derivative of the v-velocity.
721 * \param[in] dvdy - y-derivative of the v-velocity.
722 * \param[in] dvdz - z-derivative of the v-velocity.
723 * \param[in] dwdx - x-derivative of the w-velocity.
724 * \param[in] dwdy - y-derivative of the w-velocity.
725 * \param[in] dwdz - z-derivative of the w-velocity.
726 * \param[in] d2udx2 - 2nd x-derivative of the u-velocity.
727 * \param[in] d2udy2 - 2nd y-derivative of the u-velocity.
728 * \param[in] d2udz2 - 2nd z-derivative of the u-velocity.
729 * \param[in] d2udxdy - x-y cross-derivative of the u-velocity.
730 * \param[in] d2udxdz - x-z cross-derivative of the u-velocity.
731 * \param[in] d2udydz - y-z cross-derivative of the u-velocity.
732 * \param[in] d2vdx2 - 2nd x-derivative of the v-velocity.
733 * \param[in] d2vdy2 - 2nd y-derivative of the v-velocity.
734 * \param[in] d2vdz2 - 2nd z-derivative of the v-velocity.
735 * \param[in] d2vdxdy - x-y cross-derivative of the v-velocity.
736 * \param[in] d2vdxdz - x-z cross-derivative of the v-velocity.
737 * \param[in] d2vdydz - y-z cross-derivative of the v-velocity.
738 * \param[in] d2wdx2 - 2nd x-derivative of the w-velocity.
739 * \param[in] d2wdy2 - 2nd y-derivative of the w-velocity.
740 * \param[in] d2wdz2 - 2nd z-derivative of the w-velocity.
741 * \param[in] d2wdxdy - x-y cross-derivative of the w-velocity.
742 * \param[in] d2wdxdz - x-z cross-derivative of the w-velocity.
743 * \param[in] d2wdydz - y-z cross-derivative of the w-velocity.
744 * \param[in] lenScale - Length scale of the corresponding element.
745 * \param[in] distToWall - Distance to the nearest wall.
746 * \param[out] dMuTdx - x-derivative of the turbulent viscosity.
747 * \param[out] dMuTdy - y-derivative of the turbulent viscosity.
748 * \param[out] dMuTdz - z-derivative of the turbulent viscosity.
749 */
751 const su2double drhodx,
752 const su2double drhody,
753 const su2double drhodz,
754 const su2double dudx,
755 const su2double dudy,
756 const su2double dudz,
757 const su2double dvdx,
758 const su2double dvdy,
759 const su2double dvdz,
760 const su2double dwdx,
761 const su2double dwdy,
762 const su2double dwdz,
763 const su2double d2udx2,
764 const su2double d2udy2,
765 const su2double d2udz2,
766 const su2double d2udxdy,
767 const su2double d2udxdz,
768 const su2double d2udydz,
769 const su2double d2vdx2,
770 const su2double d2vdy2,
771 const su2double d2vdz2,
772 const su2double d2vdxdy,
773 const su2double d2vdxdz,
774 const su2double d2vdydz,
775 const su2double d2wdx2,
776 const su2double d2wdy2,
777 const su2double d2wdz2,
778 const su2double d2wdxdy,
779 const su2double d2wdxdz,
780 const su2double d2wdydz,
781 const su2double lenScale,
782 const su2double distToWall,
783 su2double &dMuTdx,
784 su2double &dMuTdy,
785 su2double &dMuTdz) override;
786};
787#include "sgs_model.inl"
Base class for defining the LES subgrid scale model.
Definition sgs_model.hpp:43
CSGSModel(void)
Constructor of the class.
Definition sgs_model.inl:30
virtual void ComputeGradEddyViscosity_3D(const su2double rho, const su2double drhodx, const su2double drhody, const su2double drhodz, const su2double dudx, const su2double dudy, const su2double dudz, const su2double dvdx, const su2double dvdy, const su2double dvdz, const su2double dwdx, const su2double dwdy, const su2double dwdz, const su2double d2udx2, const su2double d2udy2, const su2double d2udz2, const su2double d2udxdy, const su2double d2udxdz, const su2double d2udydz, const su2double d2vdx2, const su2double d2vdy2, const su2double d2vdz2, const su2double d2vdxdy, const su2double d2vdxdz, const su2double d2vdydz, const su2double d2wdx2, const su2double d2wdy2, const su2double d2wdz2, const su2double d2wdxdy, const su2double d2wdxdz, const su2double d2wdydz, const su2double lenScale, const su2double distToWall, su2double &dMuTdx, su2double &dMuTdy, su2double &dMuTdz)
Virtual function to determine the gradients of the eddy viscosity for the given function arguments fo...
Definition sgs_model.inl:78
virtual void ComputeGradEddyViscosity_2D(const su2double rho, const su2double drhodx, const su2double drhody, const su2double dudx, const su2double dudy, const su2double dvdx, const su2double dvdy, const su2double d2udx2, const su2double d2udy2, const su2double d2udxdy, const su2double d2vdx2, const su2double d2vdy2, const su2double d2vdxdy, const su2double lenScale, const su2double distToWall, su2double &dMuTdx, su2double &dMuTdy)
Virtual function to determine the gradients of the eddy viscosity for the given function arguments fo...
Definition sgs_model.inl:58
virtual su2double ComputeEddyViscosity_3D(const su2double rho, const su2double dudx, const su2double dudy, const su2double dudz, const su2double dvdx, const su2double dvdy, const su2double dvdz, const su2double dwdx, const su2double dwdy, const su2double dwdz, const su2double lenScale, const su2double distToWall)
Virtual function to determine the eddy viscosity for the given function arguments for a 3D simulation...
Definition sgs_model.inl:43
virtual su2double ComputeEddyViscosity_2D(const su2double rho, const su2double dudx, const su2double dudy, const su2double dvdx, const su2double dvdy, const su2double lenScale, const su2double distToWall)
Virtual function to determine the eddy viscosity for the given function arguments for a 2D simulation...
Definition sgs_model.inl:33
virtual ~CSGSModel(void)
Destructor of the class.
Definition sgs_model.inl:31
Derived class for defining the Smagorinsky SGS model.
Definition sgs_model.hpp:229
su2double filter_mult
Multiplier to get filter width from grid length scale.
Definition sgs_model.hpp:234
~CSmagorinskyModel(void) override
Destructor of the class.
Definition sgs_model.inl:122
CSmagorinskyModel(void)
Constructor of the class.
Definition sgs_model.inl:117
void ComputeGradEddyViscosity_3D(const su2double rho, const su2double drhodx, const su2double drhody, const su2double drhodz, const su2double dudx, const su2double dudy, const su2double dudz, const su2double dvdx, const su2double dvdy, const su2double dvdz, const su2double dwdx, const su2double dwdy, const su2double dwdz, const su2double d2udx2, const su2double d2udy2, const su2double d2udz2, const su2double d2udxdy, const su2double d2udxdz, const su2double d2udydz, const su2double d2vdx2, const su2double d2vdy2, const su2double d2vdz2, const su2double d2vdxdy, const su2double d2vdxdz, const su2double d2vdydz, const su2double d2wdx2, const su2double d2wdy2, const su2double d2wdz2, const su2double d2wdxdy, const su2double d2wdxdz, const su2double d2wdydz, const su2double lenScale, const su2double distToWall, su2double &dMuTdx, su2double &dMuTdy, su2double &dMuTdz) override
function to determine the gradients of the eddy viscosity for the given function arguments for a 3D s...
Definition sgs_model.inl:197
su2double ComputeEddyViscosity_2D(const su2double rho, const su2double dudx, const su2double dudy, const su2double dvdx, const su2double dvdy, const su2double lenScale, const su2double distToWall) override
Function to determine the eddy viscosity for the given function arguments for a 2D simulation.
Definition sgs_model.inl:124
su2double const_smag
Smagorinsky Constant C_s.
Definition sgs_model.hpp:233
su2double ComputeEddyViscosity_3D(const su2double rho, const su2double dudx, const su2double dudy, const su2double dudz, const su2double dvdx, const su2double dvdy, const su2double dvdz, const su2double dwdx, const su2double dwdy, const su2double dwdz, const su2double lenScale, const su2double distToWall) override
Function to determine the eddy viscosity for the given function arguments for a 3D simulation.
Definition sgs_model.inl:146
void ComputeGradEddyViscosity_2D(const su2double rho, const su2double drhodx, const su2double drhody, const su2double dudx, const su2double dudy, const su2double dvdx, const su2double dvdy, const su2double d2udx2, const su2double d2udy2, const su2double d2udxdy, const su2double d2vdx2, const su2double d2vdy2, const su2double d2vdxdy, const su2double lenScale, const su2double distToWall, su2double &dMuTdx, su2double &dMuTdy) override
Function to determine the gradients of the eddy viscosity for the given function arguments for a 2D s...
Definition sgs_model.inl:177
Derived class for defining the WALE SGS model.
Definition sgs_model.hpp:606
void ComputeGradEddyViscosity_3D(const su2double rho, const su2double drhodx, const su2double drhody, const su2double drhodz, const su2double dudx, const su2double dudy, const su2double dudz, const su2double dvdx, const su2double dvdy, const su2double dvdz, const su2double dwdx, const su2double dwdy, const su2double dwdz, const su2double d2udx2, const su2double d2udy2, const su2double d2udz2, const su2double d2udxdy, const su2double d2udxdz, const su2double d2udydz, const su2double d2vdx2, const su2double d2vdy2, const su2double d2vdz2, const su2double d2vdxdy, const su2double d2vdxdz, const su2double d2vdydz, const su2double d2wdx2, const su2double d2wdy2, const su2double d2wdz2, const su2double d2wdxdy, const su2double d2wdxdz, const su2double d2wdydz, const su2double lenScale, const su2double distToWall, su2double &dMuTdx, su2double &dMuTdy, su2double &dMuTdz) override
function to determine the gradients of the eddy viscosity for the given function arguments for a 3D s...
Definition sgs_model.inl:497
void ComputeGradEddyViscosity_2D(const su2double rho, const su2double drhodx, const su2double drhody, const su2double dudx, const su2double dudy, const su2double dvdx, const su2double dvdy, const su2double d2udx2, const su2double d2udy2, const su2double d2udxdy, const su2double d2vdx2, const su2double d2vdy2, const su2double d2vdxdy, const su2double lenScale, const su2double distToWall, su2double &dMuTdx, su2double &dMuTdy) override
Function to determine the gradients of the eddy viscosity for the given function arguments for a 2D s...
Definition sgs_model.inl:477
su2double ComputeEddyViscosity_3D(const su2double rho, const su2double dudx, const su2double dudy, const su2double dudz, const su2double dvdx, const su2double dvdy, const su2double dvdz, const su2double dwdx, const su2double dwdy, const su2double dwdz, const su2double lenScale, const su2double distToWall) override
Function to determine the eddy viscosity for the given function arguments for a 3D simulation.
Definition sgs_model.inl:425
su2double ComputeEddyViscosity_2D(const su2double rho, const su2double dudx, const su2double dudy, const su2double dvdx, const su2double dvdy, const su2double lenScale, const su2double distToWall) override
Function to determine the eddy viscosity for the given function arguments for a 2D simulation.
Definition sgs_model.inl:414
CVremanModel(void)
Constructor of the class.
Definition sgs_model.inl:406
su2double const_Vreman
Vreman Constant c=2.5*Cs*Cs.
Definition sgs_model.hpp:609
~CVremanModel(void) override
Destructor of the class.
Definition sgs_model.inl:412
Derived class for defining the WALE SGS model.
Definition sgs_model.hpp:418
su2double const_WALE
WALE Constant Cw.
Definition sgs_model.hpp:421
su2double ComputeEddyViscosity_3D(const su2double rho, const su2double dudx, const su2double dudy, const su2double dudz, const su2double dvdx, const su2double dvdy, const su2double dvdz, const su2double dwdx, const su2double dwdy, const su2double dwdz, const su2double lenScale, const su2double distToWall) override
Function to determine the eddy viscosity for the given function arguments for a 3D simulation.
Definition sgs_model.inl:287
CWALEModel(void)
Constructor of the class.
Definition sgs_model.inl:236
su2double ComputeEddyViscosity_2D(const su2double rho, const su2double dudx, const su2double dudy, const su2double dvdx, const su2double dvdy, const su2double lenScale, const su2double distToWall) override
Function to determine the eddy viscosity for the given function arguments for a 2D simulation.
Definition sgs_model.inl:242
void ComputeGradEddyViscosity_3D(const su2double rho, const su2double drhodx, const su2double drhody, const su2double drhodz, const su2double dudx, const su2double dudy, const su2double dudz, const su2double dvdx, const su2double dvdy, const su2double dvdz, const su2double dwdx, const su2double dwdy, const su2double dwdz, const su2double d2udx2, const su2double d2udy2, const su2double d2udz2, const su2double d2udxdy, const su2double d2udxdz, const su2double d2udydz, const su2double d2vdx2, const su2double d2vdy2, const su2double d2vdz2, const su2double d2vdxdy, const su2double d2vdxdz, const su2double d2vdydz, const su2double d2wdx2, const su2double d2wdy2, const su2double d2wdz2, const su2double d2wdxdy, const su2double d2wdxdz, const su2double d2wdydz, const su2double lenScale, const su2double distToWall, su2double &dMuTdx, su2double &dMuTdy, su2double &dMuTdz) override
function to determine the gradients of the eddy viscosity for the given function arguments for a 3D s...
Definition sgs_model.inl:367
void ComputeGradEddyViscosity_2D(const su2double rho, const su2double drhodx, const su2double drhody, const su2double dudx, const su2double dudy, const su2double dvdx, const su2double dvdy, const su2double d2udx2, const su2double d2udy2, const su2double d2udxdy, const su2double d2vdx2, const su2double d2vdy2, const su2double d2vdxdy, const su2double lenScale, const su2double distToWall, su2double &dMuTdx, su2double &dMuTdy) override
Function to determine the gradients of the eddy viscosity for the given function arguments for a 2D s...
Definition sgs_model.inl:347
~CWALEModel(void) override
Destructor of the class.
Definition sgs_model.inl:240
passivedouble su2double
Definition code_config.hpp:181
In-Line subroutines of the sgs_model.hpp file.