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

co2eq.c File Reference

Equation of state routines (equilibrium conditions). More...

#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "../../util/source/compiler.h"
#include "../../util/source/useful.h"
#include "co2eq.h"

Defines

#define CDIM   (132)
#define EXTRAP_LIM   (1000)

Functions

int interp_init (void)
int interp_eos (double e[], double rho[], double p[], double a[], double T[], int first, int last)
int species_init (void)
int species_eqbm (double e[], double rho[], double co_[], double co2_[], double o_[], double o2_[], double c_[], int first, int last)
void getheader (FILE *somefile, int check, int caller)
void quit (void)
void extrapmsg (double e, double rho)

Variables

char tfilename [] = "terlog.dat"
char pfilename [] = "perlog.dat"
char afilename [] = "aerlog.dat"
char co_filename [] = "co_log.dat"
char co2_filename [] = "co2_log.dat"
char o_filename [] = "o_log.dat"
char o2_filename [] = "o2_log.dat"
char c_filename [] = "c_log.dat"


Detailed Description

Equation of state routines (equilibrium conditions).

Supplies Temperature, Pressure, Sound Speed and Species Concentrations as functions of e, rho. Uses bilinear interpolation on tabulated data.

Author:
Ian Johnston, based on form of existing code "mbb.c" by Peter Jacobs
Version...
 * 1.0    : 30-Jul-94 : Pressure as a function of density and energy
 *                      Temperature as a function of density and energy
 *			Sound Speed as a function of density and energy
 * 2.0    : 10-Aug-94 : Code generalized for multiple compilers.
 *                      Bugs fixed for pressure interpolation code.
 * 3.0    : 15-Aug-94 : Memory allocation technique improved.
 *			getheader() function added.
 * 3.1    : 16-Aug-94 : HUGE_PTR used in place of huge.
 *                      process.h alloc.h string.h are for turbo-C only.
 * 4.0    : 18-Aug-94 : Extrapolation code added.
 *			extrapmsg() function added.
 * 5.0    : 20-Aug-94 : Bundled species.c in same file
 * 6.0    : 21-Jun-95 : Now has dynamic upper energy limit.
 *                      Support for non-density-log-axis revoked.
 * 7.0    : 08-Mar-96 : Bug fix for carbon.  Increased to 15000K
 * 8.0    : 12-Jul-01 : Swapped limits on loops reading table data. PJ
 *                      This would have been a problem only for DSTEPS != ESTEPS.
 *                      Also, do EHI mapping in linear rho (not log_rho)
 *                      to match meqs.c.
 *

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