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

cns_tstp.h File Reference

Prototypes for the time-stepping functions. More...

Go to the source code of this file.

Functions

int record_conserved (struct block_data *A)
 Record the values of the conserved variables.
int restore_conserved (struct block_data *A)
 Restore the values of the conserved variables.
int encode_conserved (struct block_data *A)
 Compute the conserved quantities in each cell.
int decode_conserved (struct block_data *A)
 Compute the primary variables from the conserved quantities.
int count_invalid_cells (struct block_data *A)
 Returns the number of cells that contain invalid data.
int source_vector (struct block_data *A)
 Compute the components of the source vector, Q.
int time_derivatives (struct block_data *A, int time_level)
 Compute the time derivatives for the conserved quantities.
int check_residual (struct block_data *A)
 Check the residual (based on the density field).
int predictor_step (struct block_data *A)
 Predictor stage for the gas dynamic time step.
int corrector_step (struct block_data *A)
 Corrector stage for the gas dynamic time step.
int chemical_increment (struct block_data *A)
 Take a time step for the finite-rate chemistry.
int thermal_increment (struct block_data *A)
 Take a time step for the nonequilibrium energy evolution.
int check_cfl (struct block_data *A)
 Compute the local time step limit for each cell.
int impose_global_timestep (struct block_data *A, double dt)
 Impose a specified timestep over the whole block.
int detect_shock_points (struct block_data *A)
 Detects shocks as by looking for compression between adjacent cells.
int impose_chemistry_timestep (struct block_data *A, double dt)
 Impose a specified chemistry timestep over the whole block.
int impose_thermal_timestep (struct block_data *A, double dt)
 Impose a specified thermal timestep over the whole block.
int apply_spatial_filter (struct block_data *A, double alpha, int npass)
 Filter the cell-centred primary variables.


Detailed Description

Prototypes for the time-stepping functions.


Function Documentation

int apply_spatial_filter struct block_data A,
double  alpha,
int  npass
 

Filter the cell-centred primary variables.

This filtering is done on a block-by-block basis. Valid flow data are needed in the ghost cells at the edges.

Parameters:
A : a pointer to the single-block data structure
alpha : filter coefficient (closer to 1.0, more fudging)
npass : this many passes of the simple averager

int check_cfl struct block_data A  ) 
 

Compute the local time step limit for each cell.

The North and East faces are taken as the representative lengths the cells. The overall time step is limited by the worst-case cell.

Local time-stepping is attributed to C. P. Li (1973).

Version:
25-Nov-92 : some lines split to simplify compilation for the TopSpeed compiler.

07-Jul-97 : eliminate (unused) option to initialise t-step and clean up the code.

10-Sep-97 : use L_min previously computed by the calc_volumes() function at startup. This new value of minimum length should account for skew cells more carefully.

Parameters:
A : pointer to the single-block data structure
Returns:
0 on success, DT_SEARCH_FAILED otherwise.
 * Some Definitions...
 * ----------------
 * dt       : global time step for the block
 * cfl_target : desired CFL number
 * cfl_min  : approximate minimum CFL number in the block
 * cfl_max  : approximate maximum CFL number in the block
 * dt_allow : allowable time step (i.e. the maximum dt that
 *            satisfies both the CFL target and the viscous
 *            time step limit)
 * 

int check_residual struct block_data A  ) 
 

Check the residual (based on the density field).

An estimate of the maximum density residual is stored in the block_data structure.

Parameters:
A : pointer to the single-block data structure

int chemical_increment struct block_data A  ) 
 

Take a time step for the finite-rate chemistry.

Use the finite-rate chemistry module to update the species fractions and the other thermochemical properties for every cell in a specified block.

Parameters:
A : pointer to the single-block data structure

int corrector_step struct block_data A  ) 
 

Corrector stage for the gas dynamic time step.

Parameters:
A : pointer to the single-block data structure

int count_invalid_cells struct block_data A  ) 
 

Returns the number of cells that contain invalid data.

This data can be identified by the density of internal energy being on the minimum limit or the velocity being very large.

Parameters:
A : a pointer to the single-block data structure
Version:
24-Jun-97: extracted from decode_conserved()

int decode_conserved struct block_data A  ) 
 

Compute the primary variables from the conserved quantities.

Parameters:
A : a pointer to the single-block data structure

int detect_shock_points struct block_data A  ) 
 

Detects shocks as by looking for compression between adjacent cells.

The velocity component normal to the cell interfaces is used as the indicating variable.

Parameters:
A : pointer to the single block_data structure

int encode_conserved struct block_data A  ) 
 

Compute the conserved quantities in each cell.

Values for the conserved variables are computed from the primary variables.

Parameters:
A : a pointer to the single-block data structure

int impose_chemistry_timestep struct block_data A,
double  dt
 

Impose a specified chemistry timestep over the whole block.

Parameters:
A : pointer to the single block_data structure
dt : the specified timestep

int impose_global_timestep struct block_data A,
double  dt
 

Impose a specified timestep over the whole block.

Parameters:
A : pointer to the single block_data structure
dt : the specified timestep

int impose_thermal_timestep struct block_data A,
double  dt
 

Impose a specified thermal timestep over the whole block.

Parameters:
A : pointer to the single block_data structure
dt : the specified timestep

int predictor_step struct block_data A  ) 
 

Predictor stage for the gas dynamic time step.

Parameters:
A : pointer to the single-block data structure

int record_conserved struct block_data A  ) 
 

Record the values of the conserved variables.

Just in case they need to be reinstated later in the time step.

Parameters:
A : pointer to the single-block data structure

int restore_conserved struct block_data A  ) 
 

Restore the values of the conserved variables.

In case of time-step failure, conserved-variable data may need to be restired to what they were when last recorded.

Parameters:
A : pointer to the single-block data structure

int source_vector struct block_data A  ) 
 

Compute the components of the source vector, Q.

Currently, the axisymmetric equations include the pressure contribution to the y-momentum equation here rather than in the boundary fluxes.

This routine will become useful later for reacting flows.

Parameters:
A : pointer to the single-block data structure

int thermal_increment struct block_data A  ) 
 

Take a time step for the nonequilibrium energy evolution.

Use the multi-temperature module to update the energy modes and the other thermochemical properties for every cell in a specified block.

Parameters:
A : pointer to the single-block data structure

int time_derivatives struct block_data A,
int  time_level
 

Compute the time derivatives for the conserved quantities.

These are the spatial (RHS) terms in the semi-discrete governing equations.

Version:
25-Nov-92 : a number of lines have been simplified by breaking them into two stages with the intermediate result stored in the variable "integral" (This modification was made to suit the TopSpeed compiler.)

01-May-96 : Change the integrals to suit the new flux storage. Fluxes are now stored as F.n (dot product).

Parameters:
A : pointer to the single-block data structure
time_level : specifies where the computed derivatives are to be stored.


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