VERB4D
Macros | Functions
Convection_1D_ULTIMATE_QUICKEST6.cpp File Reference

Calculates the convection in 1D given a 1D matrix of Phase Space Densities, boundary conditions, diffusion, sources and losses. More...

#include "Convection_1D_ULTIMATE_QUICKEST6.h"

Macros

#define gst   5
 
#define uw_n   5
 
#define dw_n   4
 

Functions

bool Convection_1D_ULTIMATE_QUICKEST6 (Matrix1D< double > &PSD, Matrix1D< double > x, int x_size, double x_LBC, double x_UBC, string x_LBC_type, string x_UBC_type, Matrix1D< double > Ux, Matrix1D< double > Sources, Matrix1D< double > Losses, double dt_total)
 

Detailed Description

Calculates the convection in 1D given a 1D matrix of Phase Space Densities, boundary conditions, diffusion, sources and losses.

Leonard, 1991; Leonard and Niknafs, 1991;

Leonard BP (1988) Universal Limiter for transient interpolation modeling of the advective transport equations: the ULTIMATE conservative difference scheme, NASA technical Memorandum 100916 ICOMP-88-11

It works somehow, edit with a great care!

All equations and formulas for these calculations can be found at http://www.hadian.ir/teaching/CompHydr/3.pdf . Mostly coming from 3.5 Simplified Ultimate Quickest strategy from B.P Leonard the Ultimate conservative difference scheme. In the source code mathematical equations are numbered corresponding to the numbering of equations found in the paper

Function Documentation

bool Convection_1D_ULTIMATE_QUICKEST6 ( Matrix1D< double > &  PSD,
Matrix1D< double >  x,
int  x_size,
double  x_LBC,
double  x_UBC,
string  x_LBC_type,
string  x_UBC_type,
Matrix1D< double >  Ux,
Matrix1D< double >  Sources,
Matrix1D< double >  Losses,
double  dt 
)

Function that implements 1D Convection Quickest and returns a bool upon completion as referenced in the following publication

All equations and formulas for this function can be found at http://www.hadian.ir/teaching/CompHydr/3.pdf Mostly coming from 3.5 Simplified Ultimate Quickest strategy from B.P Leonard the Ultimate conservative difference scheme. In the source code mathematical equations are numbered corresponding to the numbering of equations found in the paper

$ c = u*dt/dx $ where c = Courant number

$ \phi_{i}^{n+1} - \phi_{i}^{n} = -c(\phi_{r}*\phi_{l}) $ where $ \phi_{r} $ and $ \phi_{l} $ refer to the right and left faces (between (i and i-1), and (i and i+1)) for PSD

Parameters
PSD- 1D matrix of phase space densities
x- matrix for determining step size dx = x[1] - x[0]
x_size- size of matrix x
x_LBC,x_UBC,_type- The upper and lower boundary conditions including the type of boundary condition
Ux- diffusion matrix
Sources- Sources matrix
Losses- Losses (loss cone)