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

e_filtered_deriv.c File Reference

Functions to compute filtered velocity derivatives for Elmer. 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_filtered_deriv.h"

Functions

int filtered_derivatives (struct block_data_3D *A)
 Compute the derivatives of velocity and temperature at primary cell vertices.
int filtered_derivatives_east (struct block_data_3D *A)
 Computes east boundary derivatives.
int filtered_derivatives_west (struct block_data_3D *A)
 Computes west boundary derivatives.
int filtered_derivatives_north (struct block_data_3D *A)
 Computes north boundary derivatives.
int filtered_derivatives_south (struct block_data_3D *A)
 Computes south boundary derivatives.
int filtered_derivatives_top (struct block_data_3D *A)
 Computes top boundary derivatives.
int filtered_derivatives_bottom (struct block_data_3D *A)
 Computes bottom boundary derivatives.
int filtered_derivatives_corners (struct block_data_3D *A)
 Computes corner cell derivatives.
int filtered_derivatives_edge (struct block_data_3D *A)
 Computes edge (non-corner) cell derivatives.
int copy_filtered_to_edge (struct cell_vertex *a, struct cell_vertex *b)
int copy_filtered_to_corner (struct cell_vertex *a, struct cell_vertex *b)
int copy_2_filtered_to_corner (struct cell_vertex *a, struct cell_vertex *b, struct cell_vertex *c)
int copy_3_filtered_to_corner (struct cell_vertex *a, struct cell_vertex *b, struct cell_vertex *c, struct cell_vertex *d)


Detailed Description

Functions to compute filtered velocity derivatives for Elmer.

Author:
AD
Version:
April 2005.

Function Documentation

int copy_2_filtered_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_filtered_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_filtered_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_filtered_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 filtered_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 filtered_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 filtered_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 filtered_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 filtered_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 filtered_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.

Ghost cell and cell centered values are averaged to obtain an approximation of the filtered interface values.

int filtered_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.

Ghost cell and cell centered values are averaged to obtain an approximation of the filtered interface values.

int filtered_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 filtered_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.


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