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

mb_init.h File Reference

Prototypes for the initialisation functions. More...

Go to the source code of this file.

Functions

int read_global_parameters (struct global_data *G, FILE *pf)
 Read global parameters from the beginning of the parameterfile.
int read_block_parameters (struct block_data *A, FILE *pf)
 Read a few parameters for the current block from parameter file and set a few more useful parameters from these.
int impose_global_parameters (struct global_data *G, struct block_data *A, int id)
 Copy some of the global parameter values into the block parameters such as the time step, etc.
int array_alloc (struct block_data *A)
 Allocate memory for the internal arrays of the block. Returns 0 if successful, 1 otherwise.
int fill_block_data (struct block_data *A)
 Fill the flow field for this block with initial conditions.
int fill_block_with_static_profile (struct block_data *A)
 Fill the flow field for this block with desired static profile.
int check_connectivity (struct global_data *G, struct block_data bd[])
 Check that the blocks are reasonably connected.


Detailed Description

Prototypes for the initialisation functions.


Function Documentation

int array_alloc struct block_data A  ) 
 

Allocate memory for the internal arrays of the block. Returns 0 if successful, 1 otherwise.

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

int check_connectivity struct global_data G,
struct block_data  bd[]
 

Check that the blocks are reasonably connected.

Each boundary should be connected to a maximum of one other boundary. Each connection should have two entries in the table. (One each way.) This routine actually steps through each connection and makes sure that the converse connection is present and correct. The number of cells along connected boundaries should match.

Parameters:
G : pointer to the global_data structure
bd : pointer to the array of block_data structures

int fill_block_data struct block_data A  ) 
 

Fill the flow field for this block with initial conditions.

These are interpolated from the corner gas_states.

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

int fill_block_with_static_profile struct block_data A  ) 
 

Fill the flow field for this block with desired static profile.

This function, adapted from init_profile_data, reads the flow state data from a previously written profile file. The format expected of this file is that space-separated values are expected for p, u, v, T, f0, f1 ... for each cell with an extra line at the top to specify the number of cells in the profile. If there is only one species, just supplying values for p, u, v, T is adequate.

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

int impose_global_parameters struct global_data G,
struct block_data A,
int  id
 

Copy some of the global parameter values into the block parameters such as the time step, etc.

Also, Label the block with an integer (usually block number) so that log-file messages can be labelled and special code can be implemented for particular blocks.

Parameters:
G : pointer to the global_data structure
A : pointer to the block_data structure
id : (integer) block identity
Version:
22-Sep-97 : copy over the gas_state data

int read_block_parameters struct block_data A,
FILE *  pf
 

Read a few parameters for the current block from parameter file and set a few more useful parameters from these.

Parameters:
A : pointer to the block_data structure
pf : file handle
NOTE : The routines read_global_parameters() and impose_global_parameters() must have been previously called.

Version:
07-Jul-97 : Added iturb flag (in the place of nghost)

22-Sep-97 : Updated the input format.

int read_global_parameters struct global_data G,
FILE *  pf
 

Read global parameters from the beginning of the parameterfile.

Parameters:
G : pointer to the global_data structure
pf : pointer to the parameter file
Version:
 * 28-Jan-96 : Some gas properties that were MACRO definitions in
 *             physics.h are now global variables and are set in
 *             this routine.
 * 11-Feb-96 : Some of the value checking and echoing delegated to
 *             the new configuration module mb_cfg.c.
 * 30-Apr-96 : Flux calculator option read from parameter file.
 * 07-Jul-97 : Removed iturb flag (to the block data)
 * 22-Sep-97 : Updated the input format.
 * 28-Oct-97 : save the case title in the global_data structure
 * 27-Jan-99 : Read p,u,v,T instead of rho,u,v,e for the gas states
 * 


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