VERB4D
Functions
Convection_1D_ULTIMATE_QUICKEST6.h File Reference

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

#include "Matrix.h"
#include "MatrixSolver.h"
#include "Logger.h"

Go to the source code of this file.

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)
 

Detailed Description

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

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)