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

e_tstep.c File Reference

Functions to time-step flow solutions for Elmer. More...

#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "../../util/source/useful.h"
#include "../../util/source/logfile.h"
#include "../../util/source/compiler.h"
#include "../../geometry/source/geom.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 "./e_kernel.h"
#include "./e_exch.h"
#include "./e_bc.h"
#include "./e_io.h"
#include "./e_tstep.h"
#include "./e_invs.h"
#include "./e_visc.h"
#include "./e_tavg.h"
#include "./e_turb.h"

Defines

#define COMPRESSION_TOLERANCE   -0.05
 Change in normalised velocity to indicate a shock.

Functions

int record_conserved_for_block (struct block_data_3D *bp)
 Record the values of the conserved variables.
int restore_conserved_for_block (struct block_data_3D *bp)
 Restore the values of the conserved variables.
int encode_conserved_for_block (struct block_data_3D *bp)
 Compute the conserved quantities in each cell.
int decode_conserved_for_block (struct block_data_3D *bp)
 Compute the primary variables from the conserved quantities.
int count_invalid_cells_for_block (struct block_data_3D *bp)
 Returns the number of invalid cells in a block.
int prepare_to_integrate_for_the_first_time (void)
 Fills in some of the data by exchanging boundary data and evaluating derivatives, etc.
double minv (double v[], int first, int last)
double maxv (double v[], int first, int last)
int integrate_in_time (double target_time)
 Takes as many steps as necessary to reach the target time.
int take_a_step (void)
 Take a single predictor-corrector step.
int source_vector_3D (struct block_data_3D *bp)
 Compute the components of the source vector, Q.
int time_derivatives_3D (struct block_data_3D *bp, int time_level)
 Compute the time derivatives for the conserved quantities.
int predictor_step_for_block (struct block_data_3D *bp)
 Predictor stage for the gas dynamic time step.
int corrector_step_for_block (struct block_data_3D *bp)
 Corrector stage for the gas dynamic time step.
int rk3_step_for_block (struct block_data_3D *bp)
 Corrector stage for the gas dynamic time step.
int chemical_increment_for_block (struct block_data_3D *bp)
 Take a time step for the finite-rate chemistry.
int check_cfl_for_block (struct block_data_3D *bp)
 Compute the local time step limit for each cell.
int detect_shock_points_for_block (struct block_data_3D *bp)
 Detects shocks as by looking for compression between adjacent cells.
char * time_update (int current_step, int max_steps, double current_dt, double current_t, double final_t)
int set_start_time (void)
char * elmer_time_to_go (time_t start_wall_clock, time_t current_wall_clock, int current_step, int max_steps, double current_dt, double current_t, double final_t)


Detailed Description

Functions to time-step flow solutions for Elmer.

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

Define Documentation

#define COMPRESSION_TOLERANCE   -0.05
 

Change in normalised velocity to indicate a shock.

This value of -0.05 has been selected to detect the levels of shock compression observed in the "sod" and "cone20" test cases. It may need to be tuned for other situations.


Function Documentation

int check_cfl_for_block struct block_data_3D bp  ) 
 

Compute the local time step limit for each cell.

Parameters:
bp : pointer to the block_data_3D structure

int chemical_increment_for_block struct block_data_3D bp  ) 
 

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:
bp : pointer to the block_data_3D structure

int corrector_step_for_block struct block_data_3D bp  ) 
 

Corrector stage for the gas dynamic time step.

Parameters:
bp : pointer to the block_data_3D structure

int count_invalid_cells_for_block struct block_data_3D bp  ) 
 

Returns the number of invalid cells in a block.

Parameters:
A : a pointer to the block_data_3D structure

int decode_conserved_for_block struct block_data_3D bp  ) 
 

Compute the primary variables from the conserved quantities.

Parameters:
A : a pointer to the block_data_3D structure

int detect_shock_points_for_block struct block_data_3D bp  ) 
 

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 block_data_3D structure

int encode_conserved_for_block struct block_data_3D bp  ) 
 

Compute the conserved quantities in each cell.

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

Parameters:
bp : a pointer to the block_data_3D structure

int integrate_in_time double  target_time  ) 
 

Takes as many steps as necessary to reach the target time.

If target_time is given as a negative value, will attempt to reach max_time as stored in the global_data_3d structure.

double maxv double  v[],
int  first,
int  last
 

Returns the maximum value in a double vector.

double minv double  v[],
int  first,
int  last
 

Returns the minimum value in a double vector.

int predictor_step_for_block struct block_data_3D bp  ) 
 

Predictor stage for the gas dynamic time step.

Parameters:
bp : pointer to the block_data_3D structure

int record_conserved_for_block struct block_data_3D bp  ) 
 

Record the values of the conserved variables.

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

Parameters:
bp : pointer to the block_data_3D data structure

int restore_conserved_for_block struct block_data_3D bp  ) 
 

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:
bp : pointer to the block_data_3D structure

int rk3_step_for_block struct block_data_3D bp  ) 
 

Corrector stage for the gas dynamic time step.

Parameters:
bp : pointer to the block_data_3D structure

int source_vector_3D struct block_data_3D bp  ) 
 

Compute the components of the source vector, Q.

Parameters:
A : a pointer to the block_data_3D structure

int time_derivatives_3D struct block_data_3D bp,
int  time_level
 

Compute the time derivatives for the conserved quantities.

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

Parameters:
bp : pointer to the block_data_3D structure
time_level : specifies where the computed derivatives are to be stored 0 or 1, presently.


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