UCFD_SPARSE  v1.1
Documentation
Loading...
Searching...
No Matches
flux.c File Reference

Computes numerical flux from conservative variables. More...

#include "flux.h"
Include dependency graph for flux.c:

Go to the source code of this file.

Macros

#define max(a, b)   (((a) > (b)) ? (a) : (b))
 

Functions

void ns_flux_container (UCFD_FLOAT *u, UCFD_FLOAT *nf, UCFD_FLOAT *f)
 Computes flux for Navier-Stokes equations. More...
 
void rans_flux_container (UCFD_FLOAT *u, UCFD_FLOAT *nf, UCFD_FLOAT *f)
 Computes flux for RANS equations. More...
 
ucfd_status_t rans_source_jacobian (UCFD_FLOAT *uf, UCFD_FLOAT tmat[NTURBVARS][NTURBVARS], UCFD_FLOAT *dsrc)
 Computes source term Jacobian matrix for RANS equations. More...
 

Detailed Description

Computes numerical flux from conservative variables.

======================================================================================================================

Non-physical value correction included.

Author
Date
July 2024
Version
1.0
Copyright
Copyright (c) 2024, Namhyoung Kim and Jin Seok Park, Inha University, All rights reserved.
License
This project is release under the terms of the MIT License (see LICENSE file).

Definition in file flux.c.

Macro Definition Documentation

◆ max

#define max (   a,
 
)    (((a) > (b)) ? (a) : (b))

Definition at line 21 of file flux.c.

Function Documentation

◆ ns_flux_container()

void ns_flux_container ( UCFD_FLOAT u,
UCFD_FLOAT nf,
UCFD_FLOAT f 
)

Computes flux for Navier-Stokes equations.

Computes Euler/Navier-Stokes flux vector.
Jacobian matrix is replaced by first-order flux function, typically Rusanov flux is implemented.
Therefore, only convective flux is used.

Variable description :
rho : Density
et : Total Energy
temp : \(\rho^2 \times (u^2 + v^2)\)
contrav : Contravariant velocity

Definition at line 29 of file flux.c.

Here is the caller graph for this function:

◆ rans_flux_container()

void rans_flux_container ( UCFD_FLOAT u,
UCFD_FLOAT nf,
UCFD_FLOAT f 
)

Computes flux for RANS equations.

Computes convective flux for RANS one- or two-equations.
Similar to the Navier-Stokes equations, RANS equations can be reformulated into the finite-volume framework.
It contains conservative variables, convective/viscous flux, and source term. Convective flux in RANS equations is computed simply by multiplying conservative variables and contravariant velocity.

Definition at line 77 of file flux.c.

Here is the caller graph for this function:

◆ rans_source_jacobian()

ucfd_status_t rans_source_jacobian ( UCFD_FLOAT uf,
UCFD_FLOAT  tmat[NTURBVARS][NTURBVARS],
UCFD_FLOAT dsrc 
)

Computes source term Jacobian matrix for RANS equations.

Parameters
betastbeta* value for kw-SST RANS model
ufConservative vector
tmatTurbulence Jacobian matrix
dsrcSource term derivatives vector

Definition at line 93 of file flux.c.

Here is the caller graph for this function: