#include <time.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "../../util/source/compiler.h"
#include "../../util/source/useful.h"
#include "../../util/source/logfile.h"
#include "mb_cns.h"
#include "mb_cfg.h"
#include "cns_bc_defs.h"
#include "cns_bc.h"
#include "mb_init.h"
Defines | |
| #define | NCHAR 132 |
| #define | NCHAR 132 |
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. | |
* 11-Feb-96: These functions were transferred from mb_misc.c * and cns_misc.c. * 03-Nov-96: Updated multi-species code. * * 07-Jul-97 * Moved nghost to the header file mb_cns.h and introduced a flag for * the turbulence model into each cell rather than as a global flag. * * 22-Sep-97: Updated the input format. * * 21-Aug-98: Replaced malloc's with calloc's so that memory will * be initialised. This should allow memory to be distributed * around the node boards on the Origin. *
|
|
Allocate memory for the internal arrays of the block. Returns 0 if successful, 1 otherwise.
|
|
||||||||||||
|
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.
|
|
|
Fill the flow field for this block with initial conditions. These are interpolated from the corner gas_states.
|
|
|
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.
|
|
||||||||||||||||
|
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.
|
|
||||||||||||
|
Read a few parameters for the current block from parameter file and set a few more useful parameters from these.
|
|
||||||||||||
|
Read global parameters from the beginning of the parameterfile.
|
1.4.4