Streamer fluid modeling - An overview of ARCoS  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions | Variables
cstream.c File Reference

General initialization/termination functions. More...

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include "cstream.h"
#include "parameters.h"
#include "proto.h"
#include "species.h"
Include dependency graph for cstream.c:

Go to the source code of this file.

Macros

#define ALLOC_PARAMS
 

Functions

void init_parameters (void)
 Initializes the parameters.
 
static void init_gridsizes_a (void)
 Initializes the grid sizes. The parameters dr_root and dz_root specify the grid size at level 0 (dz_root = dz[0], dr_root[0] = dr[0])
 
static void init_wk_a (void)
 Initializes the vector of wk's for the Helmholtz equation.
 
static void free_gridsizes (void)
 Frees the space allocated for dr and dz.
 
static void free_wk (void)
 Frees the allocated space for $ \lambda $.
 
void cstream_init (void)
 Here all the initialization calls.
 
void cstream_end (void)
 Here all the cleaning and finishing calls.
 
void cstream_set_field_at_time (double t)
 When we use a time-varying external field, we update the field components at each timesteps.
 
double e0_r (double r, double z, double theta)
 Functions for a constant external electric field given in (x, y, z) components.
 
double e0_z (double r, double z, double theta)
 Functions for a constant external electric field given in (x, y, z) components.
 
double e0_theta (double r, double z, double theta)
 Functions for a constant external electric field given in (x, y, z) components.
 
 decl_field_comp (r)
 
 decl_field_comp (z)
 
 decl_field_comp (theta)
 

Variables

double E_x
 
double E_y
 
double E_z
 
double pois_inhom_fixed_q_t
 
double * dr
 
double * dz
 
double dtheta
 
double * dr_start
 
double * dz_start
 
double * w2k
 
double * wk
 
char * invok_name = "cstream"
 
const double twopi = 6.283185307179586477L
 
const double invfourpi = 0.079577471545947667884441882L
 
const double invpi32 = 0.179587122125166561689081L
 
int n
 
int i
 

Detailed Description

General initialization/termination functions.

Definition in file cstream.c.

Macro Definition Documentation

#define ALLOC_PARAMS

Definition at line 9 of file cstream.c.

Function Documentation

void init_parameters ( void  )

Initializes the parameters.

The global parameters will get their default values. These values correspond with the values in input/defaults.cfg

Definition at line 54 of file cstream.c.

static void init_gridsizes_a ( void  )
static

Initializes the grid sizes. The parameters dr_root and dz_root specify the grid size at level 0 (dz_root = dz[0], dr_root[0] = dr[0])

Definition at line 276 of file cstream.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void init_wk_a ( void  )
static

Initializes the vector of wk's for the Helmholtz equation.

Definition at line 310 of file cstream.c.

Here is the call graph for this function:

Here is the caller graph for this function:

static void free_gridsizes ( void  )
static

Frees the space allocated for dr and dz.

Definition at line 348 of file cstream.c.

Here is the caller graph for this function:

static void free_wk ( void  )
static

Frees the allocated space for $ \lambda $.

Definition at line 356 of file cstream.c.

Here is the caller graph for this function:

void cstream_init ( void  )

Here all the initialization calls.

Definition at line 364 of file cstream.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void cstream_end ( void  )

Here all the cleaning and finishing calls.

Definition at line 388 of file cstream.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void cstream_set_field_at_time ( double  t)

When we use a time-varying external field, we update the field components at each timesteps.

Definition at line 400 of file cstream.c.

Here is the caller graph for this function:

double e0_r ( double  r,
double  z,
double  theta 
)

Functions for a constant external electric field given in (x, y, z) components.

Definition at line 435 of file cstream.c.

double e0_z ( double  r,
double  z,
double  theta 
)

Functions for a constant external electric field given in (x, y, z) components.

Definition at line 442 of file cstream.c.

double e0_theta ( double  r,
double  z,
double  theta 
)

Functions for a constant external electric field given in (x, y, z) components.

Definition at line 449 of file cstream.c.

decl_field_comp ( )

Initializes the component of the external electric field in $r$-direction.

decl_field_comp ( )

Initializes the component of the external electric field in $z$-direction.

decl_field_comp ( theta  )

Initializes the component of the external electric field in $\theta$-direction.

Variable Documentation

double E_x

Definition at line 16 of file cstream.c.

double E_y

Definition at line 16 of file cstream.c.

double E_z

For time-dependent electric fields E_x, E_y, E_z there is a difference between E0 (the highest field) and E (the field at a given time).

Definition at line 16 of file cstream.c.

double pois_inhom_fixed_q_t

The same is true for time-dependent fixed charges (useful to model the charging of a cloud in modeling sprites.

Time-dependent fixed charge for the inhomogeneous poisson code It is updated in cstream_set_field_at_time acording to the parameter rise_time.

Definition at line 55 of file poisson.c.

double* dr

Definition at line 24 of file cstream.c.

double * dz

Definition at line 24 of file cstream.c.

double dtheta

dr[i] and dz[i] represent the grid size at level i. Note that i can go from -extra_pois_levels...max_levels.

Definition at line 24 of file cstream.c.

double* dr_start

Definition at line 27 of file cstream.c.

double * dz_start

Definition at line 27 of file cstream.c.

double* w2k

Definition at line 29 of file cstream.c.

double * wk

w2k[k] = 2 / dtheta^2 (1 - cos(k dtheta)). This numbers appear due to the finite-differences derivatives of a Fourier transform. If we would make a continuous fourier transform, they will approach k^2.

Definition at line 29 of file cstream.c.

char* invok_name = "cstream"

Name of this program.

Definition at line 36 of file cstream.c.

const double twopi = 6.283185307179586477L

$ 2 \times \pi $.

Definition at line 39 of file cstream.c.

const double invfourpi = 0.079577471545947667884441882L

$ 1 / (4 \pi )$

Definition at line 42 of file cstream.c.

const double invpi32 = 0.179587122125166561689081L

$ 1 / (\pi ^ {3/2} )$

Definition at line 45 of file cstream.c.

int n

Definition at line 271 of file cstream.c.

int i

Definition at line 271 of file cstream.c.