Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

e_rrm.h File Reference

Prototypes for functions to compute boundary layer inflow. More...

#include <stdio.h>
#include <stdlib.h>
#include "../../util/source/useful.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 "./e_block.h"

Go to the source code of this file.

Functions

double get_rrm_data (struct block_data_3D *A, int rrm_block, double u_rrm_read[], double v_rrm_read[], double w_rrm_read[], double T_rrm_read[], double rho_rrm_read[], double u_read[], double v_read[], double w_read[], double T_read[], double rho_read[])
 Apply Recycling and Rescaling Method of Stolz (2003) to inlet ghost cells.
int rrm (struct block_data_3D *A, struct flow_state *freestream, double u_rrm_read[], double v_rrm_read[], double w_rrm_read[], double T_rrm_read[], double rho_rrm_read[], double u_read[], double v_read[], double w_read[], double T_read[], double rho_read[], double delta)
double delta_calc (struct block_data_3D *A, int i_r)
 Calculate boundary layer thickness at x_r.
double interpolate (double y_want, struct block_data_3D *A, int *loc, int i_r, int k)
 Calculate required cell j by linear interpolation.
double weight (double eta)
 Calculates weighting fuction for supplied eta.
double spanwise_average (struct block_data_3D *A, int i_r, double u[], double v[], double w[], double T[], double rho[])
 Calculate spanwise average of u, v, w, rho and T at x_r.
double spanwise_time_average (struct block_data_3D *A, int i_r, double u[], double v[], double w[], double T[], double rho[], double mu[])
 Calculate spanwise average of u, v, w, rho and T at x_r.
double ** allocate_array (int nny, int nnz)
 Routine for allocation of memory for arrays used in rrm().
int initialise_rrm_memory (int nny, int nnz)
 Routine to call allocate_array() for desired arrays.
int free_rrm_memory (void)
 Routine to call free_array() for desired arrays.


Detailed Description

Prototypes for functions to compute boundary layer inflow.

Author:
AD
Version:
August 2004 bring code over from mb_cns.

Function Documentation

double** allocate_array int  nny,
int  nnz
 

Routine for allocation of memory for arrays used in rrm().

Parameters:
nny : length of arrays

double delta_calc struct block_data_3D A,
int  i_r
 

Calculate boundary layer thickness at x_r.

Parameters:
A : pointer to the single-block data structure
i_r : x index of recycle station cell

double get_rrm_data struct block_data_3D A,
int  rrm_block,
double  u_rrm_read[],
double  v_rrm_read[],
double  w_rrm_read[],
double  T_rrm_read[],
double  rho_rrm_read[],
double  u_read[],
double  v_read[],
double  w_read[],
double  T_read[],
double  rho_read[]
 

Apply Recycling and Rescaling Method of Stolz (2003) to inlet ghost cells.

Parameters:
A : pointer to the single-block data structure
Todo:
Allow arrays to be allocated using calloc. Currently they are set to an arbitrary size

int initialise_rrm_memory int  nny,
int  nnz
 

Routine to call allocate_array() for desired arrays.

Parameters:
nny : length of arrays

double interpolate double  z_want,
struct block_data_3D A,
int *  loc,
int  i_r,
int  j
 

Calculate required cell j by linear interpolation.

Parameters:
z_want : desired z location
A : pointer to the single-block data structure
loc : pointer to the variable for identified cell
i_r : x index of recycle station cell
j : y index of current boundary layer slice

double spanwise_average struct block_data_3D A,
int  i_r,
double  u[],
double  v[],
double  w[],
double  T[],
double  rho[]
 

Calculate spanwise average of u, v, w, rho and T at x_r.

Parameters:
A : pointer to the single-block data structure
i_r : x index of recycle station cell
u : array for storage of spanwise average of u
v : array for storage of spanwise average of v
w : array for storage of spanwise average of w
T : array for storage of spanwise average of T
rho : array for storage of spanwise average of rho

\[ \frac{1}{L_y}\int^{L_y}_{0} \tilde{u}(x,y,z,t) dy \]

double spanwise_time_average struct block_data_3D A,
int  i_r,
double  u[],
double  v[],
double  w[],
double  T[],
double  rho[],
double  mu[]
 

Calculate spanwise average of u, v, w, rho and T at x_r.

Parameters:
A : pointer to the single-block data structure
i_r : x index of recycle station cell
u : array for storage of spanwise average of u
v : array for storage of spanwise average of v
w : array for storage of spanwise average of w
T : array for storage of spanwise average of T
rho : array for storage of spanwise average of rho

\[ \frac{1}{L_y}\int^{L_y}_{0} \tilde{u}(x,y,z,t) dy \]

double weight double  eta  ) 
 

Calculates weighting fuction for supplied eta.

Parameters:
eta : location within weighting function

\[ W(\eta) = \frac{1}{2} + \frac{1}{2} \frac{tanh\left(\frac{a(\eta-b)}{(1-2b)\eta+b}\right)}{tanh(a)} \]


Generated on Tue Oct 25 10:24:12 2005 for CFCFD by  doxygen 1.4.4