9.0
general documentation
Loading...
Searching...
No Matches
cs_combustion_read_data.cpp File Reference

Combustion combustion model: setup data from input. More...

#include "base/cs_defs.h"
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bft/bft_mem.h"
#include "bft/bft_printf.h"
#include "base/cs_assert.h"
#include "base/cs_field.h"
#include "base/cs_file.h"
#include "base/cs_log.h"
#include "base/cs_math.h"
#include "base/cs_parall.h"
#include "base/cs_physical_constants.h"
#include "base/cs_prototypes.h"
#include "gui/cs_gui_specific_physics.h"
#include "pprt/cs_physical_model.h"
#include "pprt/cs_combustion_model.h"
#include "cogz/cs_combustion_gas.h"
#include "cogz/cs_combustion_bsh.h"
#include "cogz/cs_combustion_ht_convert.h"
#include "cogz/cs_combustion_read_data.h"
Include dependency graph for cs_combustion_read_data.cpp:

Functions

static void _next_line (const char *name, int &line_num, char *&s, char *last, bool allow_end)
 Point to next line in text buffer.
static char * _extract_token (const char *buffer_name, const char *token_name, char *&next, char *last, int line_num, int idx)
 Extract i-th token from buffer.
static void _solve_ax_b_gauss (int n, double a[], double *restrict b, double *restrict x)
void cs_combustion_read_data (void)
 Read gas combustion thermochemistry data.

Detailed Description

Combustion combustion model: setup data from input.

Function Documentation

◆ _extract_token()

char * _extract_token ( const char * buffer_name,
const char * token_name,
char *& next,
char * last,
int line_num,
int idx )
static

Extract i-th token from buffer.

A null-termination character is added to to end of the token unless the end of line has been reached, so the buffer values are modified. The pointer to the next portion of the string is set just after this null character.

Parameters
[in]buffer_namebuffer name (for error logging)
[in]token_nametoken type name (for error logging)
[in,out]nextpointer to next part of buffer
[in]lastpointer to last byte of buffer
[in]line_numline number (for error logging)
[in]idxtoken index in line (for error logging)

◆ _next_line()

void _next_line ( const char * name,
int & line_num,
char *& s,
char * last,
bool allow_end )
static

Point to next line in text buffer.

Parameters
[in]namename of associated file (for error logging)
[in,out]line_numline number counter
[in,out]startany position in current line before line break in, pointer to start of line out
[in]lastlast possible position in buffer
[in]allow_endif true, return null if last position in buffer is reached; otherwise, this is considered a premature end
Returns
pointer to start of next line, or null if end reached

◆ _solve_ax_b_gauss()

void _solve_ax_b_gauss ( int n,
double a[],
double *restrict b,
double *restrict x )
static

◆ cs_combustion_read_data()

void cs_combustion_read_data ( void )

Read gas combustion thermochemistry data.

Number of global reactions: we can only balance one reaction.