HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
NavierStokes2DFunctions.c File Reference

Miscellaneous functions for the 2D Navier Stokes equations. More...

#include <math.h>
#include <basic.h>
#include <physicalmodels/navierstokes2d.h>

Go to the source code of this file.

Functions

int NavierStokes2DRoeAverage (double *uavg, double *uL, double *uR, void *p)
 

Detailed Description

Miscellaneous functions for the 2D Navier Stokes equations.

Author
Debojyoti Ghosh

Definition in file NavierStokes2DFunctions.c.

Function Documentation

◆ NavierStokes2DRoeAverage()

int NavierStokes2DRoeAverage ( double *  uavg,
double *  uL,
double *  uR,
void *  p 
)

Compute the Roe-averaged state for the 2D Navier Stokes equations. This function just calls the macro _NavierStokes2DRoeAverage_ and is not used by any functions within the 2D Navier Stokes module. However, it's necessary to define it and provide it to the the solver object (HyPar) so that it can then send it to interpolation functions for a characteristic-based reconstruction.

Parameters
uavgThe computed Roe-averaged state
uLLeft state (conserved variables)
uRRight state (conserved variables)
pObject of type NavierStokes2D with physics-related variables

Definition at line 15 of file NavierStokes2DFunctions.c.

21 {
22  NavierStokes2D *param = (NavierStokes2D*) p;
23  _NavierStokes2DRoeAverage_(uavg,uL,uR,param->gamma);
24  return(0);
25 }
#define _NavierStokes2DRoeAverage_(uavg, uL, uR, gamma)
Structure containing variables and parameters specific to the 2D Navier Stokes equations. This structure contains the physical parameters, variables, and function pointers specific to the 2D Navier-Stokes equations.