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

e_visc.c File Reference

Functions to compute inflow boundary layers for Elmer using RRM. More...

#include <stdio.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_visc.h"

Functions

int viscous_flux (struct block_data_3D *A)
 Compute the viscous contribution to the cell interface fluxes.
int viscous_derivatives (struct block_data_3D *A)
 Compute the derivatives of velocity and temperature at primary cell vertices.
int viscous_derivatives_east (struct block_data_3D *A)
 Computes east boundary derivatives.
int viscous_derivatives_west (struct block_data_3D *A)
 Computes west boundary derivatives.
int viscous_derivatives_north (struct block_data_3D *A)
 Computes north boundary derivatives.
int viscous_derivatives_south (struct block_data_3D *A)
 Computes south boundary derivatives.
int viscous_derivatives_top (struct block_data_3D *A)
 Computes top boundary derivatives.
int viscous_derivatives_bottom (struct block_data_3D *A)
 Computes bottom boundary derivatives.
int viscous_derivatives_corners (struct block_data_3D *A)
 Computes corner cell derivatives.
int viscous_derivatives_edge (struct block_data_3D *A)
 Computes edge (non-corner) cell derivatives.
int copy_to_edge (struct cell_vertex *a, struct cell_vertex *b)
int copy_to_corner (struct cell_vertex *a, struct cell_vertex *b)
int copy_2_to_corner (struct cell_vertex *a, struct cell_vertex *b, struct cell_vertex *c)
int copy_3_to_corner (struct cell_vertex *a, struct cell_vertex *b, struct cell_vertex *c, struct cell_vertex *d)


Detailed Description

Functions to compute inflow boundary layers for Elmer using RRM.

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

Function Documentation

int copy_2_to_corner struct cell_vertex a,
struct cell_vertex b,
struct cell_vertex c
 

Copies the average contents of state a and state b to state c.

Parameters:
*a : pointer to state a
*b : pointer to state b
*c : pointer to state c

int copy_3_to_corner struct cell_vertex a,
struct cell_vertex b,
struct cell_vertex c,
struct cell_vertex d
 

Copies the average contents of state a ,state b and state c to state d.

Parameters:
*a : pointer to state a
*b : pointer to state b
*c : pointer to state c
*d : pointer to state d

int copy_to_corner struct cell_vertex a,
struct cell_vertex b
 

Copies the contents of state a into state b.

Parameters:
*a : pointer to state a
*b : pointer to state b

int copy_to_edge struct cell_vertex a,
struct cell_vertex b
 

Copies the contents of state a to state b.

Parameters:
*a : pointer to state a
*b : pointer to state b

int viscous_derivatives struct block_data_3D A  ) 
 

Compute the derivatives of velocity and temperature at primary cell vertices.

Parameters:
A : a pointer to the single-block data structure
This is done by applying the divergence theorem around the perimeters of SECONDARY cells. The secondary cells are centred on the vertices of the primary cells and have primary cell centres as their corners.

Currently it is assumed that for secondary cells, the west, south and bottom interface area vectors are in the opposite direction to unit vectors i, j, k.

int viscous_derivatives_bottom struct block_data_3D A  ) 
 

Computes bottom boundary derivatives.

Parameters:
A : a pointer to the single-block data structure
Compute the derivatives of velocity and temperature at primary cell vertices along the BOTTOM boundary. This is done by applying the divergence theorem around the perimeters of SECONDARY cells. The secondary cells are centred on the vertices of the primary cells and have primary cell centres as their corners.

int viscous_derivatives_corners struct block_data_3D A  ) 
 

Computes corner cell derivatives.

Parameters:
A : a pointer to the single-block data structure
Compute the derivatives of velocity and temperature at primary cell vertices at the corners of the block. This is done by averaging near-by values.

It may be better to... (1) include logic to check if walls are present and pick the appropriate near-by values of derivatives. (2) include a proper exchange of ghost-cell data so that the calculation of the half-cell derivatives may extend right to the corners. These things are left for another day.

Revisions... --------- 1.0 : initial code 1.1 : take into account boundary conditions

int viscous_derivatives_east struct block_data_3D A  ) 
 

Computes east boundary derivatives.

Parameters:
A : a pointer to the single-block data structure
Compute the derivatives of velocity and temperature at primary cell vertices along the EAST boundary. This is done by applying the divergence theorem around the perimeters of SECONDARY cells. The secondary cells are centred on the vertices of the primary cells and have primary cell centres as their corners.

int viscous_derivatives_edge struct block_data_3D A  ) 
 

Computes edge (non-corner) cell derivatives.

Parameters:
A : a pointer to the single-block data structure
Compute the derivatives of velocity and temperature at primary cell vertices at the corners of the block. This is done by averaging near-by values.

It may be better to... (1) include logic to check if walls are present and pick the appropriate near-by values of derivatives. (2) include a proper exchange of ghost-cell data so that the calculation of the half-cell derivatives may extend right to the corners. These things are left for another day.

Revisions... --------- 1.0 : initial code 1.1 : take into account boundary conditions

int viscous_derivatives_north struct block_data_3D A  ) 
 

Computes north boundary derivatives.

Parameters:
A : a pointer to the single-block data structure
Compute the derivatives of velocity and temperature at primary cell vertices along the NORTH boundary. This is done by applying the divergence theorem around the perimeters of SECONDARY cells. The secondary cells are centred on the vertices of the primary cells and have primary cell centres as their corners.

int viscous_derivatives_south struct block_data_3D A  ) 
 

Computes south boundary derivatives.

Parameters:
A : a pointer to the single-block data structure
Compute the derivatives of velocity and temperature at primary cell vertices along the SOUTH boundary. This is done by applying the divergence theorem around the perimeters of SECONDARY cells. The secondary cells are centred on the vertices of the primary cells and have primary cell centres as their corners.

int viscous_derivatives_top struct block_data_3D A  ) 
 

Computes top boundary derivatives.

Parameters:
A : a pointer to the single-block data structure
Compute the derivatives of velocity and temperature at primary cell vertices along the TOP boundary. This is done by applying the divergence theorem around the perimeters of SECONDARY cells. The secondary cells are centred on the vertices of the primary cells and have primary cell centres as their corners.

int viscous_derivatives_west struct block_data_3D A  ) 
 

Computes west boundary derivatives.

Parameters:
A : a pointer to the single-block data structure
Compute the derivatives of velocity and temperature at primary cell vertices along the WEST boundary. This is done by applying the divergence theorem around the perimeters of SECONDARY cells. The secondary cells are centred on the vertices of the primary cells and have primary cell centres as their corners.

int viscous_flux struct block_data_3D A  ) 
 

Compute the viscous contribution to the cell interface fluxes.

Parameters:
A : pointer to the single-block data structure
Compute the viscous contribution to the cell interface fluxes. This contribution is added to the flux variables so make sure that the inviscid (Euler) contributions have already been computed and stored in the flux variables.


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