VERB4D
Functions
Convection_2D.h File Reference

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

#include "Matrix.h"
#include "MatrixSolver.h"
#include "Convection_1D_ULTIMATE_QUICKEST6.h"

Go to the source code of this file.

Functions

bool Convection_2D (Matrix2D< double > &PSD_PR, Matrix2D< double > P, Matrix2D< double > R, int P_size, int R_size, Matrix1D< double > P_LBC, Matrix1D< double > P_UBC, Matrix1D< double > R_LBC, Matrix1D< double > R_UBC, string P_LBC_type, string P_UBC_type, string R_LBC_type, string R_UBC_type, Matrix2D< double > DP, Matrix2D< double > DR, Matrix2D< double > Sources, Matrix2D< double > Losses, double dt, double min_PSD, double min_V)
 

Detailed Description

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

Using the Convection_1D_Ultimate_QUICKEST6() for calculating P and R. 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

Created on: Aug 22, 2011 Author: subbotin

Function Documentation

bool Convection_2D ( Matrix2D< double > &  PSD_PR,
Matrix2D< double >  P,
Matrix2D< double >  R,
int  P_size,
int  R_size,
Matrix1D< double >  P_LBC,
Matrix1D< double >  P_UBC,
Matrix1D< double >  R_LBC,
Matrix1D< double >  R_UBC,
string  P_LBC_type,
string  P_UBC_type,
string  R_LBC_type,
string  R_UBC_type,
Matrix2D< double >  VP,
Matrix2D< double >  VR,
Matrix2D< double >  Sources,
Matrix2D< double >  Losses,
double  dt_total,
double  min_PSD,
double  min_V 
)

Function that creates a 2D Convection matrix and returns a bool upon completion

Calculation of 2D convection

Uses Convection_1D_Ultimate_QUICKEST6.h for calculating P and R if either are of size > 3.

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. Refer to the equations/function in Convection_1D_Ultimate_QUICKEST6.h

Parameters
PSD_PR- Phase Space Density - P and R held constant
P- Time (magnetic local time) based on phi
R- radial distance
P_size- dimension of P
R_size- dimension of R
P_LBC- P lower boundary
P_UBC- P upper boundary
R_LBC- R lower boundary
R_UBC- R upper boundary
P_LBC_type- Type of boundary for p lower
P_UBC_type- Type of boundary for p upper
R_LBC_type- Type of boundary for r lower
R_UBC_type- Type of boundary for r upper
VP- Matrix of energy and time(phi)
VR- Matrix of energy and radial distance
Sources- Sources matrix
Losses- Losses matrix (loss cone)
dt_total- total time change
min_PSD- minimum value from the PSD matrix
min_V- minimum value for V from the