Advection

Name

Advection -- 

Synopsis


#include <gfs.h>


void        gfs_set_merged                  (GfsDomain *domain);
void        (*GfsMergedTraverseFunc)        (GSList *merged,
                                             gpointer data);
void        gfs_domain_traverse_merged      (GfsDomain *domain,
                                             GfsMergedTraverseFunc func,
                                             gpointer data);
void        gfs_domain_stats_merged         (GfsDomain *domain,
                                             GtsRange *solid,
                                             GtsRange *number);
void        gfs_advection_update            (GSList *merged,
                                             const GfsAdvectionParams *par);
void        gfs_centered_velocity_advection_diffusion
                                            (GfsDomain *domain,
                                             guint dimension,
                                             GfsAdvectionParams *apar,
                                             GfsVariable **g,
                                             GfsFunction *alpha);
void        gfs_tracer_advection_diffusion  (GfsDomain *domain,
                                             GfsAdvectionParams *par,
                                             GfsVariable *half);

void        gfs_predicted_face_velocities   (GfsDomain *domain,
                                             guint d,
                                             GfsAdvectionParams *par);

Description

Details

gfs_set_merged ()

void        gfs_set_merged                  (GfsDomain *domain);

Sets the merged field of the mixed cells of the domain defined by domain.

domain :

the domain to traverse.


GfsMergedTraverseFunc ()

void        (*GfsMergedTraverseFunc)        (GSList *merged,
                                             gpointer data);

merged :

data :


gfs_domain_traverse_merged ()

void        gfs_domain_traverse_merged      (GfsDomain *domain,
                                             GfsMergedTraverseFunc func,
                                             gpointer data);

Traverses the merged leaf cells of the domain defined by domain. A list of merged cells is passed to func. No cell belongs to more than one merged list.

domain :

the domain to traverse.

func :

the function to call for each visited merged cells.

data :

user data to pass to func.


gfs_domain_stats_merged ()

void        gfs_domain_stats_merged         (GfsDomain *domain,
                                             GtsRange *solid,
                                             GtsRange *number);

Traverses the domain defined by domain using gfs_domain_traverse_merged() and gathers statistics about the total solid volume fraction of merged cells and the number of cells used per merged cell.

domain :

the domain to obtain statistics from.

solid :

GtsRange in which to return stats for the total solid volume fraction of merged cells.

number :

GtsRange in which to return stats for the number of cells used per merged cell.


gfs_advection_update ()

void        gfs_advection_update            (GSList *merged,
                                             const GfsAdvectionParams *par);

Updates the v variable of par for the merged cells of merged using the fv update of each merged cell.

The v variable in each cell of the merged list is set to its average updated value over the composite cell defined by all the cells in merged.

merged :

a list of merged FttCell.

par :

the advection parameters.


gfs_centered_velocity_advection_diffusion ()

void        gfs_centered_velocity_advection_diffusion
                                            (GfsDomain *domain,
                                             guint dimension,
                                             GfsAdvectionParams *apar,
                                             GfsVariable **g,
                                             GfsFunction *alpha);

Advects the (centered) velocity field using the current face-centered (MAC) velocity field and par->flux to compute the velocity flux through the faces of each cell.

For each component of the velocity, before calling the par->flux function the face values are first defined (at time t + dt/2) and can then be used within the par->flux function.

"Small" cut cells are treated using a cell-merging approach to avoid any restrictive CFL stability condition.

The g[] variables are freed by this function.

domain :

a GfsDomain.

dimension :

the number of dimensions (2 or 3).

apar :

the advection parameters.

g :

the pressure gradient.

alpha :

the inverse of density or NULL.


gfs_tracer_advection_diffusion ()

void        gfs_tracer_advection_diffusion  (GfsDomain *domain,
                                             GfsAdvectionParams *par,
                                             GfsVariable *half);

Advects the v field of par using the current face-centered (MAC) velocity field.

If half is not NULL, the half-timestep value of par->v is stored in the corresponding variable.

domain :

a GfsDomain.

par :

the advection parameters.

half :

a GfsVariable or NULL.


gfs_predicted_face_velocities ()

void        gfs_predicted_face_velocities   (GfsDomain *domain,
                                             guint d,
                                             GfsAdvectionParams *par);

Fills the face (MAC) normal velocities of each leaf cell of domain with the predicted values at time t + dt/2 using a godunov type advection scheme.

domain :

a GfsDomain.

d :

the number of dimensions (2 or 3).

par :

the advection parameters.