PICurv
0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
Loading...
Searching...
No Matches
Filter.h
Go to the documentation of this file.
1
#ifndef FILTER_H
2
#define FILTER_H
3
4
#include "
variables.h
"
5
#include "
logging.h
"
6
/**
7
* @brief Applies a numerical "test filter" to a 3x3x3 stencil of data points.
8
*
9
* EXPLANATION of "Test Filter":
10
* In the dynamic Smagorinsky LES model, the model coefficient (Cs) is not constant.
11
* It is calculated "dynamically" by sampling the turbulent energy cascade at two
12
* different scales. The first scale is the grid filter itself (implicit in the discretization).
13
* The second, larger scale is this explicit "test filter". By comparing the behavior
14
* of the resolved flow at these two scales, the model can determine the appropriate
15
* amount of dissipation needed, and thus calculate the Smagorinsky coefficient.
16
*
17
* This function is the primary interface for this process. It selects the appropriate
18
* filtering algorithm based on simulation settings.
19
*
20
* @param simCtx The global simulation context, containing flags like `testfilter_ik`.
21
* @param values The 3x3x3 array of scalar values at the stencil points.
22
* @param weights The 3x3x3 array of weights (typically 1/cell volume) for averaging.
23
* @return The resulting scalar value after applying the test filter.
24
*/
25
double
ApplyLESTestFilter
(
const
SimCtx
*simCtx,
double
values[3][3][3],
double
weights[3][3][3]);
26
#endif
// FILTER_H
ApplyLESTestFilter
double ApplyLESTestFilter(const SimCtx *simCtx, double values[3][3][3], double weights[3][3][3])
Applies a numerical "test filter" to a 3x3x3 stencil of data points.
Definition
Filter.c:145
logging.h
Logging utilities and macros for PETSc-based applications.
variables.h
Main header file for a complex fluid dynamics solver.
SimCtx
The master context for the entire simulation.
Definition
variables.h:538
include
Filter.h
Generated by
1.9.8