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#include "Boundaries.h"
10
11/**
12 * @brief Computes the dynamic Smagorinsky constant (Cs) for the LES model.
13 *
14 * This function implements the dynamic procedure for calculating the Smagorinsky
15 * constant at each grid point. It involves test-filtering the velocity field and
16 * strain rate tensor to determine the constant locally. The calculation can be
17 * computationally expensive and is typically run less frequently than every
18 * time step, controlled by `simCtx->dynamic_freq`.
19 *
20 *
21 * @param user The user context for a single computational block.
22 * @return PetscErrorCode 0 on success.
23 */
24PetscErrorCode ComputeSmagorinskyConstant(UserCtx *user);
25
26/**
27 * @brief Computes the turbulent eddy viscosity (Nu_t) for the LES model.
28 *
29 * Using the Smagorinsky constant (Cs) computed by `ComputeSmagorinskyConstant`,
30 * this function calculates the eddy viscosity at each grid point based on the
31 * local strain rate magnitude and filter width.
32 *
33 * nu_t = (Cs * filter_width)^2 * |S|*
34 *
35 * @param user The user context for a single computational block.
36 * @return PetscErrorCode 0 on success.
37 */
38PetscErrorCode ComputeEddyViscosityLES(UserCtx *user);
39#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:728