PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
Loading...
Searching...
No Matches
les.h
Go to the documentation of this file.
1#ifndef LES_H
2#define LES_H
3
4#include "variables.h"
5#include "logging.h"
6#include "Metric.h"
7#include "setup.h"
8#include "Filter.h"
9
10/**
11 * @brief Computes the dynamic Smagorinsky constant (Cs) for the LES model.
12 *
13 * This function implements the dynamic procedure for calculating the Smagorinsky
14 * constant at each grid point. It involves test-filtering the velocity field and
15 * strain rate tensor to determine the constant locally. The calculation can be
16 * computationally expensive and is typically run less frequently than every
17 * time step, controlled by `simCtx->dynamic_freq`.
18 *
19 *
20 * @param user The user context for a single computational block.
21 * @return PetscErrorCode 0 on success.
22 */
23PetscErrorCode ComputeSmagorinskyConstant(UserCtx *user);
24
25/**
26 * @brief Computes the turbulent eddy viscosity (Nu_t) for the LES model.
27 *
28 * Using the Smagorinsky constant (Cs) computed by `ComputeSmagorinskyConstant`,
29 * this function calculates the eddy viscosity at each grid point based on the
30 * local strain rate magnitude and filter width.
31 *
32 * nu_t = (Cs * filter_width)^2 * |S|*
33 *
34 * @param user The user context for a single computational block.
35 * @return PetscErrorCode 0 on success.
36 */
37PetscErrorCode ComputeEddyViscosityLES(UserCtx *user);
38#endif // LES_H
PetscErrorCode ComputeEddyViscosityLES(UserCtx *user)
Computes the turbulent eddy viscosity (Nu_t) for the LES model.
Definition les.c:301
PetscErrorCode ComputeSmagorinskyConstant(UserCtx *user)
Computes the dynamic Smagorinsky constant (Cs) for the LES model.
Definition les.c:23
Logging utilities and macros for PETSc-based applications.
Main header file for a complex fluid dynamics solver.
User-defined context containing data specific to a single computational grid level.
Definition variables.h:661