#include "../../util/source/useful.h"
Go to the source code of this file.
Data Structures | |
| struct | gas_data |
| Thermodynamic state of the gas. More... | |
| struct | ideal_gas_property_data |
Defines | |
| #define | PERF_AIR_14 0 |
| #define | LOWT_AIR_14 1 |
| #define | PERF_AIR_13 2 |
| #define | PERF_HE_167 3 |
| #define | EQ_AIR_1SP 4 |
| #define | WEIRD_167 5 |
| #define | PERF_AR_167 6 |
| #define | EQ_N2 7 |
| #define | PERF_N2 8 |
| #define | EQ_CO2 9 |
| #define | PERF_CO2 10 |
| #define | PERF_HE_N2 11 |
| #define | PERF_HE_AIR 12 |
| #define | VIBEQ_N2 13 |
| #define | VIBEQ_N2_HE 14 |
| #define | PERF_AR_AIR 15 |
| #define | IONIZE_AR_N2 16 |
| #define | PERF_N2_LOWG 17 |
| #define | NIT0 18 |
| #define | NIT1 19 |
| #define | NIT2 20 |
| #define | PERF_R22_AIR 21 |
| #define | PERF_GAS_MIX 22 |
| #define | ARGON_POWERV 23 |
| #define | PERF_NE_H2 24 |
| #define | PERF_NE_H 25 |
| #define | MULTI_T_GAS 26 |
| #define | ARGON_LJ 27 |
| #define | LUT_MIX 96 |
| #define | LUTN 97 |
| #define | LUT2 98 |
| #define | LUT 99 |
| #define | NSPECD 12 |
| Maximum number of species >= 0. | |
| #define | NVIBD 3 |
| Maximum number of species that have separate vibrational energies. | |
| #define | GAS_HEADER_ALREADY_INCLUDED |
Typedefs | |
| typedef int | eosfn (struct gas_data *, int, int) |
Functions | |
| int | copy_gas_data (struct gas_data *src, struct gas_data *dest) |
| Make a complete copy of the gas data. | |
| int | accumulate_gas_data (struct gas_data *src, struct gas_data *dest, double alpha) |
| Accumulative copy of the gas data. | |
| int | print_gas_data (struct gas_data *src) |
| Print all gas_state data to stdout. | |
| double * | copy_gas_data_to_buffer (struct gas_data *src, double *buf) |
| Copy the abbreviated gas_data into a linear data buffer. | |
| double * | copy_buffer_to_gas_data (struct gas_data *dest, double *buf) |
| Copy the abbreviated gas_data from a linear data buffer. | |
| int | number_of_values_in_gas_data_copy (void) |
| Returns the number of double elements in each gas data copy. | |
| int | set_ideal_gas_properties (int i, double R, double Gamma, double Prandtl, double Lewis, double mu_ref, double T_ref, double S) |
| int | set_type_of_gas (int gas_index) |
| Selects the gas model. | |
| eosfn * | get_EOS_function_pointer (void) |
| Returns the pointer to the current equation of state function. | |
| int | gas_type (void) |
| int | get_number_of_species (void) |
| int | get_number_of_vibrational_species (void) |
| int | separate_electron_energy (void) |
| double | gas_rhomin (void) |
| double | gas_pmin (void) |
| double | gas_amin (void) |
| double | gas_Tmin (void) |
| double | gas_Tmax (void) |
| gas_data * | new_gas_data_struct (void) |
| int | set_massf (struct gas_data *Q, int isp, double mf) |
| Set the mass fraction for a particular species. | |
| double | get_massf (struct gas_data *Q, int isp) |
| Get the mass fraction for a particular species. | |
| double | get_conc (struct gas_data *Q, int isp) |
| Get the molar concentration for a particular species. | |
| int | set_Tvib (struct gas_data *Q, int isp, double Tvib) |
| Set the vibrational temperature for a particular species. | |
| double | get_Tvib (struct gas_data *Q, int isp) |
| Get the vibrational temperature for a particular species. | |
| int | set_evib (struct gas_data *Q, int isp, double evib) |
| Set the vibrational energy for a particular species. | |
| double | get_evib (struct gas_data *Q, int isp) |
| Get the vibrational energy for a particular species. | |
| double | fill_in_concentrations (int first_sp, int last_sp, double rho, double *f, double *mol_w, double *c) |
| double | fill_in_mass_fractions (int first_sp, int last_sp, double rho, double *c, double *mol_w, double *f) |
| int | EOS_rhoe (struct gas_data *Q, int use_T_guess, int evaluate_visc_coeff) |
| Evaluate thermodynamic state from given density and specific internal energy. | |
| int | EOS_pT (struct gas_data *Q, int evaluate_visc_coeff) |
| Compute the density, specific internal energy and local speed of sound from the pressure and temperature. | |
| int | EOS_rhoT (struct gas_data *Q, int evaluate_visc_coeff) |
| Compute the gas properties from given density and temperature. | |
| int | EOS_rhop (struct gas_data *Q, int evaluate_visc_coeff) |
| Compute the gas properties from given density and pressure. | |
| double | dTdp_const_rho (struct gas_data *Q) |
| Compute the derivative of temperature wrt pressure. | |
| double | dTdrho_const_p (struct gas_data *Q) |
| Compute the derivative of temperature wrt density. | |
| int | eos_ideal_gas_one_species (struct gas_data *, int, int) |
| Compute the pressure, temperature and local speed of sound from the density and the specific internal energy for a single-species ideal gas. | |
| int | eos_weird_167 (struct gas_data *, int, int) |
| A strange nitrogen model to match DSMC calculations. | |
| int | eos_argon_power_law (struct gas_data *, int, int) |
| An argon model with power-law viscosity to match DSMC calculations. | |
| int | eos_argon_lennard_jones (struct gas_data *, int, int) |
| An argon model with Lennard-Jones viscosity and constants fitted to Chapman and Cowling's figure 10. | |
| int | eos_lut_one_species (struct gas_data *, int, int) |
| A single-species gas using the look-up-table for properties. | |
| int | eos_lut_n_species (struct gas_data *, int, int) |
| Multiple-species mix where all properties come from a number of look-up-tables. | |
| int | eos_equil_air_tannehill (struct gas_data *, int, int) |
| Single-species mixture model for air. | |
| int | eos_equil_n2_paj (struct gas_data *, int, int) |
| Nitrogen in chemical equilibrium. | |
| int | eos_equil_co2_iaj (struct gas_data *, int, int) |
| Carbon-dioxide in chemical equilibrium. | |
| int | eos_equil_vib_n2 (struct gas_data *, int, int) |
| Nonreaction nitrogen but with vibrational energy in thermodynamic equilibrium. | |
| int | eos_ideal_gas_binary_mix (struct gas_data *, int, int) |
| Mix of two ideal gases. | |
| int | eos_equil_vib_n2_he_mix (struct gas_data *, int, int) |
| Mix of nitrogen (species 0) with equilibrium vibrational energy with ideal helium (species 1). | |
| int | eos_ionize_ar_n2_mix (struct gas_data *, int, int) |
| Mix of ideal nitrogen (species 0) with ionizing argon (species 1). | |
| int | eos_lut_mix (struct gas_data *, int, int) |
| Look-Up-Table for one species plus mix of perfect gases. | |
| int | eos_null_function (struct gas_data *, int, int) |
| Dummy function. | |
|
|
* The following are the available gas types... * * PERF_AIR_14 : Perfect gas, air, GAMMA = 1.4 * LOWT_AIR_14 : Low temperature air, GAMMA = 1.4, fudged Sutherland * constants. * PERF_AIR_13 : Perfect gas, air, GAMMA = 1.3 * PERF_HE_167 : Perfect gas, Helium, GAMMA = 1.667 * EQ_AIR_1SP : Equilibrium Air, 1-specie, Tannehill EOS * WEIRD_167 : Weird air with GAMMA = 1.667 to match the * DSMC satellite simulations * PERF_AR_167 : Perfect gas Argon with GAMMA = 1.667 * EQ_N2 : Nitrogen in chemical equilibrium (see n2eq.c) * PERF_N2 : Nitrogen -- perfect gas * EQ_CO2 : Carbon-dioxide in chemical equilibrium * PERF_CO2 : Carbon-dioxide -- perfect gas * PERF_HE_N2 : perfect gas mix of helium and nitrogen * PERF_HE_AIR : perfect gas mix of helium and air * VIBEQ_N2 : nitrogen molecules with vibrational equilibrium * VIBEQ_N2_HE : mix of helium with nitrogen in vib. equilibrium * PERF_AR_AIR : mix of argon and air (perfect gases) * IONIZE_AR_N2: mix of ionizing argon and inert nitrogen (vib eq) * PERF_N2_LOWG: perfect gas nitrogen with low GAMMA to simulate high T * NIT0,1,2 : three other nitrogen models for MNM * PERF_R22_AIR: perfect gas mix of R22 and air * PERF_GAS_MIX: perfect gas mix of species defined in "species.dat" * ARGON_POWERV: Argon with power-law viscosity for MNM * PERF_NE_H2 : perfect gas mix of neon atoms and hydrogen molecules * PERF_NE_H : perfect gas mix of neon atoms and hydrogen atoms * MULTI_T_GAS : Rowan's gas mixture with multiple temperatures * translational+vibrational+electrons * ARGON_LJ : Ideal argon with Lennard-Jones viscosity * * LUT : Look up table for thermodynamic and transport properties. * LUT2 : Two species gas with Look up tables for thermodynamic and * transport properties. * LUTN : Multiple-species gas with look-up tables. * LUT_MIX : LUT with ideal gas mix. See lut_mix(). * |
|
||||||||||||||||
|
Accumulative copy of the gas data. Typically used in the CFD code to replace bad-cell data. |
|
||||||||||||
|
Copy the abbreviated gas_data from a linear data buffer.
|
|
||||||||||||
|
Make a complete copy of the gas data. Typically used in the CFD code to make ghost-cell copies. |
|
||||||||||||
|
Copy the abbreviated gas_data into a linear data buffer.
|
|
|
Compute the derivative of temperature wrt pressure.
|
|
|
Compute the derivative of temperature wrt density.
|
|
||||||||||||||||
|
Compute the pressure, temperature and local speed of sound from the density and the specific internal energy for a single-species ideal gas.
* Also, the following elements of the gas state are updated... * p : pressure in Pa * T : absolute temperature, degrees K * a : sound speed, m/s * * ...and, if the viscous_flag is set... * mu : molecular viscosity in Pa.s * lmbda : second viscosity coefficient, Pa.s * k : thermal conductivity coefficient *
|
|
||||||||||||||||
|
Look-Up-Table for one species plus mix of perfect gases.
* The so-called-species are: * 0 LUT * 1 argon * 2 helium * 3 nitrogen * 4 air * This arrangement (of having LUT as species 0) allows us * to drop back to using the eos_lut_one_species() function * when the LUT gas is the only significant component. * |
|
||||||||||||||||
|
Multiple-species mix where all properties come from a number of look-up-tables. Note that only one table at a time provides the gas-mix properties. This table is determined by the dominant species (as measured by mass fraction). |
|
||||||||||||||||
|
A single-species gas using the look-up-table for properties. Note that a mix of gases in chemical equilibrium is handled by this model. Use the Chemical Equilibrium Analysis program from NASA Glenn to generate the table. The programs cea_driver.tcl and cea_to_binary.c are provided to automate the table generation process. |
|
||||||||||||
|
Compute the density, specific internal energy and local speed of sound from the pressure and temperature. The process used is going to be a bit slow but this function is not intended for use within the inner loops of the simulation code.
|
|
||||||||||||||||
|
Evaluate thermodynamic state from given density and specific internal energy. This is a convenience function so that we don't always have to deal with function pointers. The real work is delegated to the specialized EOS functions, one for each gas model.
|
|
||||||||||||
|
Compute the gas properties from given density and pressure. The process used is going to be a bit slow but this function is not intended for use within the inner loops of the simulation code.
|
|
||||||||||||
|
Compute the gas properties from given density and temperature. The process used is going to be a bit slow but this function is not intended for use within the inner loops of the simulation code.
|
|
||||||||||||
|
Get the molar concentration for a particular species. This function is mainly to allow convenient access from the SWIG interface. |
|
|
Returns the pointer to the current equation of state function. The CFD functions can then invoke the appropriate EOS for the gas model. |
|
||||||||||||
|
Get the vibrational energy for a particular species. This function is mainly to allow convenient access from the SWIG interface. |
|
||||||||||||
|
Get the mass fraction for a particular species. This function is mainly to allow convenient access from the SWIG interface. |
|
||||||||||||
|
Get the vibrational temperature for a particular species. This function is mainly to allow convenient access from the SWIG interface. |
|
|
Returns the number of double elements in each gas data copy. We need this to work out where we should be in the buffer for each copy. |
|
||||||||||||||||
|
Set the vibrational energy for a particular species. This function is mainly to allow convenient access from the SWIG interface. |
|
||||||||||||||||
|
Set the mass fraction for a particular species. This function is mainly to allow convenient access from the SWIG interface. |
|
||||||||||||||||
|
Set the vibrational temperature for a particular species. This function is mainly to allow convenient access from the SWIG interface. |
|
|
Selects the gas model. This is done by setting the gas model equation-of-state pointer and a few other gas-model specific constants.
|
1.4.4