#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include "../../util/source/useful.h"
#include "../../util/source/compiler.h"
#include "../../util/source/logfile.h"
#include "../../gas_models/source/gas.h"
#include "../../flux_calc/source/flux_calc.h"
#include "../../mb_cns/source/cns_case_id.h"
#include "../../mb_cns/source/cns_work_vector.h"
#include "../../mb_cns/source/cns_debug_level.h"
#include "../../mb_cns/source/cns_cell.h"
#include "../../mb_cns/source/cns_echo.h"
#include "../../mb_cns/source/cns_bc_defs.h"
#include "../../mb_cns/source/mb_cfg.h"
#include "./e_block.h"
#include "../../mb_cns/source/interpolate.h"
#include "./e_filter.h"
Functions | |
| int | initfilter (struct block_data_3D *A) |
| Computes the filter coefficients. | |
| int | filtcentered (double dmm, double dm, double dp, double dpp, double cutoff, double gew1[], double gew2[], double i3mom) |
| Computes the actual filter coefficients based on grid sizes. | |
| int | filt1wall (double dm, double dp, double d2, double d3, double cutoff, double gew1[], double gew2[], double i3mom) |
| Computes the actual filter coefficients based on grid sizes for cell one away from the wall. | |
| int | filter (struct block_data_3D *A) |
| Delegates work for filtering to explicit filtering routines. | |
| int | yexp3io (struct block_data_3D *A, double ****work2, double ****work) |
| Explicit filtering in j direction. | |
| int | xexp3io (struct block_data_3D *A, double ****work2, double ****work) |
| Explicit filtering in i direction. | |
| int | zexp3io (struct block_data_3D *A, double ****work2, double ****work) |
| Explicit filtering in k direction. | |
| int | A2ijk (struct block_data_3D *A, double ****work) |
| int | ijk2kji (struct block_data_3D *A, double ****work) |
| int | ijk2A (struct block_data_3D *A, double ****work) |
| int | ijk2ijk (struct block_data_3D *A, double ****work) |
| int | deconv (struct block_data_3D *A) |
| Deconvolves conserved quantities. | |
| double **** | allocate_work (int nnx, int nny, int nnz) |
| int | initialise_filter_memory (int nnx, int nny, int nnz) |
Variables | |
| double **** | work_deconv |
| int | filter_memory_alloc = 0 |
| double **** | work |
| double **** | work2 |
1) Stolz S, Adams NA, Kleiser L An approximate deconvolution model for large-eddy simulation with application to incompressible wall-bounded flows PHYS FLUIDS 13 (4): 997-1015 APR 2001
2) Stolz S, Adams NA An approximate deconvolution procedure for large-eddy simulation PHYS FLUIDS 11 (7): 1699-1701 JUL 1999
The implementation assumes, that the y-direction is perpendicular to the x-z plane => xrechen and zrechen does not depend on j (index in y-direction).
Steffen Stolz, 2003
Please inform/ask me before handing the subroutines to others. Thanks!
###################################################################### ######################################################################
Translate to C by Andrew Denman, 2004
###################################################################### ######################################################################
some global flags: * common /steuer/ cyber cyber: logical field*25 cyber(3) = true => periodic bc in x-direction cyber(4) = true => periodic bc in y-direction cyber(5) = true => periodic bc in z-direction * common /cartesianx/ cartesian,equiy cartesian = true => grid is cartesian equiy = true => y-direct. is equi-distant
###################################################################### ######################################################################
|
|
Deconvolves conserved quantities.
Revised: 31/7/98 Purpose: computes the deconvolved quantities, according to eq. (6) Stolz&Adams, 1999, PoF, pp 1699ff Usage: Arguments: fl=input-field = output Calls: filter Storage: Comments: Author: St. Stolz ----------------------------------------------------------------------- |
|
||||||||||||||||||||||||||||||||||||
|
Computes the actual filter coefficients based on grid sizes for cell one away from the wall.
Name: filtcentered Computer: Revised: April 28, 1998 Purpose: computes the coefficient of the explicit part (gew1) and the implicit part (gew2) of the discrete filter. gew1=alpha in eq. (19) and (34) of Stolz et al., 2001 Phys. Fluids, pp. 997ff gew2=beta in eq. (34) Usage: for centered stencils, NOT used for 1st point off the wall Arguments: * dmm,dm,dp,dpp are the distances of the grid point i-2, i-1 i+1 and i+2 from grid point i, respectively. * cutoff [0..1] is the desired cutoff wavenumber e.g. cutoff=0.5 => omega_c=pi/2 * gew1 & gew2 output, see above * i3mom is a switch if 5th condition is
Calls: Storage: Comments: Author: St.Stolz ----------------------------------------------------------------------- |
|
||||||||||||||||||||||||||||||||||||
|
Computes the actual filter coefficients based on grid sizes.
Name: filtcentered Computer: Revised: April 28, 1998 Purpose: computes the coefficient of the explicit part (gew1) and the implicit part (gew2) of the discrete filter. gew1=alpha in eq. (19) and (34) of Stolz et al., 2001 Phys. Fluids, pp. 997ff gew2=beta in eq. (34) Usage: for centered stencils, NOT used for 1st point off the wall Arguments: * dmm,dm,dp,dpp are the distances of the grid point i-2, i-1 i+1 and i+2 from grid point i, respectively. * cutoff [0..1] is the desired cutoff wavenumber e.g. cutoff=0.5 => omega_c=pi/2 * gew1 & gew2 output, see above * i3mom is a switch if 5th condition is
Calls: Storage: Comments: Author: St.Stolz ----------------------------------------------------------------------- |
|
|
Delegates work for filtering to explicit filtering routines.
Computer: Revised: April 28, 1998 Purpose: discrete filter, eq. (19) in Stolz et al, 2001, PoF, pp 997ff Usage: call filter (work) Arguments: A: block data structure Calls: Storage: Comments: Author: St.Stolz ----------------------------------------------------------------------- |
|
|
Computes the filter coefficients.
Computer: Revised: April 28, 1998 Purpose: discrete filter Usage: call initfilter Arguments: block data structure, --output in commonblocks: gewx1, gewx2 - filter weights for x filtering gewy1, gewy2 - filter weights for y filtering gewz1, gewz2 - filter weights for z filtering gewy1_ne, gewy2_ne - filter weights for non-equidistant y filtering * gew1 = alpha of eq. (19), (34) * gew2 = beta of eq. (34) (Stolz et al., 2001, pof, pp 997ff) * for x,y,z direction. y_ne for non-equidistant y-direct. --input in common blocks: xrechen, yrechen, zrechen (,,1) contains the x-, y- and z- coordinate of the grid points Calls: filtcentered, filtl1r3, filtl1r2 Storage: Comments: Author: St.Stolz ----------------------------------------------------------------------- |
|
||||||||||||||||
|
Explicit filtering in i direction.
Computer: Revised: April 28, 1998 Purpose: explicit filter, computes eq. (19) for x-direct. Usage: call xexp3io (work) Arguments: work/work2: input/output data Calls: Storage: Comments: ----------------------------------------------------------------------- |
|
||||||||||||||||
|
Explicit filtering in j direction.
Computer: Revised: April 28, 1998 Purpose: explicit filter, computes eq. (19) for y-direct. ONLY FOR EQUIDISTANT MESHES!!! THIS IS THE SPANWISE DIRECTION!!! Usage: call yexp3io (work) Arguments: work/work2: input/output data Calls: Storage: Comments: |
|
||||||||||||||||
|
Explicit filtering in k direction.
Computer: Revised: April 28, 1998 Purpose: explicit filter, computes eq. (19) for z-direct. Usage: call zexp3io (work) Arguments: work/work2: input/output data Calls: Storage: Comments: ----------------------------------------------------------------------- |
1.4.4