Focus Manuals: Programing Guide: Building matrices and vectors: Available construction of Matrices
links from Programing Guide and from Building matrices and vectors
FORMULs of SUBROUTINE MATRIX
MATMAS
FORMUL = 'MATMAS '
(in library BIEF subroutines with names which start with MT01)
Mass-matrix.
MATDIF
FORMUL = 'MATDIF '
(in library BIEF subroutines with names which start with MT02)
Diffusion matrix with different coefficients according to the directions x, y and z.
In 2 dimensions – isotropic:
The case of an isotropic viscosity is given above. But the viscosity may also be tensorial. In this case U
(a BIEF_OBJ
structure) must have a second dimension, for example 3- in 2-dimensional applications. U
will have the general form:
but the tensor is symmetric and .
Elements of the tensor must be stored in U
as follows:
- in
U(*,1)
- in
U(*,2)
- in
U(*,3)
In a 2 dimensions – non isotropic:
When a transversal K_t
and longitudinal K_l
dispersion are used (case of Elder's turbulence model), the formula giving the tensor U
is:
In 3 dimensions (beware, F
, G
and H
are used in this case, unlike in 2D where U
, V
and W
are used):
MATDIF2
FORMUL = 'MATDIF2 '
In 3D only, formula MATDIF2 is like MATDIF, but the hydrostatic inconsistencies are dealt with.
MATDIF3
FORMUL = 'MATDIF3 '
In 2D only so far, diffusion matrix with diffusion coefficients which are piece-wise linear or constant, but may be discontinuous between elements (this is used in groundwater flows).
Here one must have :
- U%ELM=10, U%DIM2=3, U%DIMDISC=11
- V%ELM=10, V%DIM2=3, V%DIMDISC=11
MASUPG
FORMUL = 'MASUPG '
(subroutines with names which start with MT03)
Matrix used for the convection term with method SUPG option 1.
- here is a vector with the components
F
,G
andH
. - is a vector with the components
U
,V
andW
.
MAUGUG
FORMUL = 'MAUGUG '
(subroutines with names which start with MT04)
Matrix used for the convection term with method SUPG option 2.
- is a vector with the components
U
,V
andW
.
MATVGR
FORMUL = 'MATVGR '
(subroutines with names which start with MT05)
Matrix used for the convection term with centred discretisation.
- is a vector with the components
U
,V
andW
.
FMATMA
FORMUL = 'FMATMA '
(subroutines with names which start with MT06)
Matrix used for conservative smoothing.
MSLUMP
FORMUL = 'MSLUMP '
(subroutines with names which start with MT07)
Mass matrix with local mass-lumping.
Here, F
must be a P0
function, that is, constant for each element. If the value of F
is locally 0, the mass-matrix will be locally lumped into a diagonal.
MATFGR
FORMUL = 'MATFGR X'
(subroutines with names which start with MT08)
Beware the minus sign !!!!
If FORMUL(16:16)
is equal to 'Y'
or 'Z'
instead of 'X'
, the derivatives will be obtained according to y or z.
MATQGR
FORMUL = 'MATQGR ' (not programmed yet)
(subroutines with names which start with MT09)
Subroutines with names which start with MT10 are not yet programmed.
MATGRF
FORMUL = 'MATGRF X'
(subroutines with names which start with MT11)
Beware the minus sign !!!!
If FORMUL(16:16)
is equal to 'Y'
or 'Z'
instead of 'X'
, the derivatives will be obtained according to y or z.
MATUGH
FORMUL = 'MATUGH X'
(subroutines with names which start with MT12)
Matrix used for the method SUPG, options 1 and 2.
If FORMUL(16:16)
is equal to 'Y'
or 'Z'
instead of 'X'
, the derivatives will be obtained according to y or z.
- is a vector with the components
U
,V
andW
.
MATGRA
FORMUL = 'MATGRA X'
(subroutines with names which start with MT13)
Gradient matrix.
If FORMUL(16:16)
is equal to 'Y'
or 'Z'
instead of 'X'
, the derivatives will be obtained according to y or z.
MAMURD PSI and MAMURD2 PSI
FORMUL = 'MAMURD PSI'</u> or <u>FORMUL = 'MAMURD2 PSI'
(subroutines with names which start with MT14)
Distribution matrix in case of use of the Multidimensional Upwind Residual Distribution scheme in 3D. See reference [4] for more details.
If FORMUL(14:16)
is equal to ' N'
instead of 'PSI' the matrix will be assembled.
FFBT
FORMUL = 'FFBT '
(subroutines with names which start with MT99)
This is in fact a series of different matrices and the string FORMUL(8:16)
is also used for defining the formula. For example if FORMUL(8:16)=' 0XX0'
, the matrix will be:
Explanation: the term in the integral is a product of 4 terms based, for the first 2, on the vector F
, and then on the Basis function called here B
and the test function called T
.
- If the first character is
0
, the first term will beF
. - If the first character is
X
, the first term will be - * If the first character is
Y
, the first term will be
Then we proceed to second character and again function F, to third character and function , to fourth character and function
The combinations 0XX0
, 0YY0
, XX00
, 0X0Y
, XY00
, YY00
, 0Y0X
have so far been implemented. The formula FORMUL(8:16)='00XX+00YY'
is also available. Note that missing combinations can be obtained because the first two characters can be exchanged. Moreover exchanging the last two characters gives the transposed matrix of the previous formula.
SUBROUTINE by names
The existing subroutines building matrices in version 6.+ are the following, their function can be deduced from the explanations above:
mt01aa.f mt01bb.f mt01cc.f mt01oo.f mt01pp.f mt01tt.f mt02aa.f mt02aa_2.f mt02bb.f mt02cc.f mt02pp.f mt02pt.f mt02tt.f mt03aa.f mt03bb.f mt03cc.f mt04aa.f mt04bb.f mt04cc.f mt04pp.f mt04tt.f mt05aa.f mt05bb.f mt05cc.f mt05pp.f mt05tt.f mt06aa.f mt06bb.f mt06cc.f mt06ff.f mt06ft.f mt06ft2.f mt06oo.f mt06oc.f mt06pp.f mt06tt.f mt07aa.f mt07bb.f mt07cc.f mt08aa.f mt08ab.f mt08ac.f mt08ba.f mt08bb.f mt08pp.f mt08tt.f mt11aa.f mt11ab.f mt11ac.f mt11ba.f mt11bb.f mt12aa.f mt12ab.f mt12ac.f mt12ba.f mt12bb.f mt13aa.f mt13ab.f mt13ba.f mt13bb.f mt13cc.f mt13ca.f mt14pp.f mt99aa.f