==== Focus Manuals: Programing Guide: Building matrices and vectors: Available construction of Vectors ==== links from [[:programing_guide|Programing Guide]] and from [[Programing Guide:Building matrices and vectors|Building matrices and vectors]] \\ \\ \\ === FORMULs of SUBROUTINE VECTOR === == MASMAS == __FORMUL = 'MASMAS '__ (subroutines with names which start with VC00) Integrals of the bases, or product of a mass matrix by a vector with the value of 1 everywhere. $$ VEC(i) = XMUL \int_\Omega \psi_i \,d\Omega $$ == MASVEC == __FORMUL = 'MASVEC '__ (subroutines with names which start with VC01) Product of a mass matrix by a vector F. $$ VEC(i) = XMUL \int_\Omega F \psi_i \,d\Omega $$ == SUPG == __FORMUL = 'SUPG '__ (subroutines with names which start with VC03) $$ VEC(i) = XMUL \int_\Omega \big( \overrightarrow{K}.\overrightarrow{grad}(\psi_i) \overrightarrow{U}.\overrightarrow{grad}(F) \big) \,d\Omega $$ * $ \overrightarrow{K} $ is a vector with the components ''**G**'' and ''**H**''. (this would have to be modified in dimension 3). * $ \overrightarrow{U} $ is a vector with the components ''**U**'', ''**V**'' and ''**W**''. == VGRADP and VGRADP2 == __FORMUL = 'VGRADP '__ or __'VGRADP2 '__ (used in 3D only) (subroutines with names which start with VC04) $$ VEC(i) = XMUL \int_\Omega \overrightarrow{U_2_D}.\overrightarrow{grad}(\psi_i) \,d\Omega $$ * $ \overrightarrow{U_2_D} $ is a vector with the components ''**U**'' and ''**V**''. ''**VGRADP**'' is the same formula, with corrections when the generalised sigma transformation is used. == FLUBOR == __FORMUL = 'FLUBOR '__ (subroutines with names which start with VC05) $$ VEC(i) = XMUL \int_\Gamma \big( \psi_i \overrightarrow{U}.\overrightarrow{n} \big) \,d\Gamma $$ * $ \overrightarrow{U} $ is a vector with the components ''**U**'', ''**V**'' and ''**W**''. * $ \overrightarrow{n} $ is the normal outer vector. == FLUBOR2 == __FORMUL = 'FLUBOR2 '__ In 3D only, ''**FLUBOR2**'' is like ''**FLUBOR**'', but in the case of a generalised sigma transformation. == VGRADF == __FORMUL = 'VGRADF '__ (subroutines with names which start with VC08) $$ VEC(i) = XMUL \int_\Omega \big( \psi_j \overrightarrow{U}.\overrightarrow{grad}(F) \big) \,d\Omega $$ * $ \overrightarrow{U} $ is a vector with the components ''**U**'', ''**V**'' and ''**W**''. == QGRADF == __FORMUL = 'QGRADF '__ (subroutines with names which start with VC09) $$ VEC(i) = XMUL \int_\Omega \big( \psi_i G \overrightarrow{U}.\overrightarrow{grad}(F) \big) \,d\Omega $$ * $ \overrightarrow{U} $ is a vector with the components ''**U**'', ''**V**'' and ''**W**''. == FLUBDF == __FORMUL = 'FLUBDF '__ (subroutines with names which start with VC10) $$ VEC(i) = XMUL \int_\Gamma \big( \psi_i F \overrightarrow{U}.\overrightarrow{n} \big) \,d\Gamma $$ * $ \overrightarrow{U} $ is a vector with the components ''**U**'', ''**V**'' and ''**W**''. * $ \overrightarrow{n} $ is the normal outer vector. == GGRADF == __FORMUL = 'GGRADF X'__ (subroutines with names which start with VC11) $$ VEC(i) = XMUL \int_\Omega \big( \psi_j G \overrightarrow{grad}(F) \big) \,d\Omega $$ 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. == GRADF == __FORMUL = 'GRADF X'__ (subroutines with names which start with VC13) $$ VEC(i) = XMUL \int_\Omega \big( \psi_i \overrightarrow{grad}(F) \big) \,d\Omega $$ If ''**FORMUL(16:16)**'' is equal to''** 'Y' **''or''** 'Z' **''instead of''** 'X' **'', the derivatives will be obtained according to y or z. In 3 dimensions, variants are available: * ''**GRADF(X,Y) X**'' and ''**GRADF(X,Y) Y**'' will consider only the gradient of a function which does not depend on '''Z'''. * ''**GRADF2**'' will take care of hydrostatic inconsistencies. == PRODF == __FORMUL = 'PRODF'__ (subroutines with names which start with VC14) $$ VEC(i) = XMUL \int_\Omega \psi_i F \big( 2(\frac{\partial U}{\partial x})^2 + 2(\frac{\partial V}{\partial x})^2 + (\frac{\partial U}{\partial y}+\frac{\partial V}{\partial x})^2 \big) \,d\Omega $$ This vector is used in the calculation of the turbulent production with the model k-epsilon. == DIVQ == __FORMUL = 'DIVQ '__ (subroutines with names which start with VC15) $$ VEC(i) = XMUL \int_\Omega \big( \psi_i div(F \overrightarrow{U} \big) \,d\Omega $$ * $ \overrightarrow{U} $ is a vector with the components ''**U**'', ''**V**'' and ''**W**''. == SUPGDIVU == __FORMUL = 'SUPGDIVU '__ (subroutines with names which start with VC16) $$ VEC(i) = XMUL \int_\Omega \big( \overrightarrow{K} \overrightarrow{grad}(\psi_i).div(\overrightarrow{U}) \big) \,d\Omega $$ * $ \overrightarrow{U} $ is a vector with the components ''**U**'', ''**V**'' and ''**W**''. * $ \overrightarrow{K} $ is a vector with the components ''**F**'', ''**G**'' and ''**H**''. == FLUDIF == __FORMUL = 'FLUDIF '__ (subroutines with names which start with VC17) $$ VEC(i) = XMUL \int_\Omega \big( \psi_i U \overrightarrow{grad}(F).\overrightarrow{n} \big) \,d\Omega $$ This is not currently used nor implemented. == VGRADF2 == __FORMUL = 'VGRADF2 '__ (subroutines with names which start with VC18) $$ VEC(i) = XMUL \int_\Omega \big( \psi_i U \overrightarrow{grad}(F) \big) \,d\Omega $$ This is specifically for 3D computations with prisms, and unlike ''**VGRADF**'', the test function $ \psi_i $ is here a 2-dimensional test function (no dependency on z). This is used by Telemac-3D in subroutine ''**WSTARW**''. == HUGRADP == __FORMUL = 'HUGRADP '__ (subroutines with names which start with VC19) $$ VEC(i) = XMUL \int_\Omega \big( F \overrightarrow{U} \overrightarrow{grad}(\psi_i) \big) \,d\Omega $$ This is used in 2D, mostly for computing fluxes. ''**H**'' in ''**HUGRADP**'' stands for the depth denoted h, which can be misleading as it does not refer to the function H which is an argument of subroutine ''**VC19AA**''. A variant ''**HUGRADP2**'' exists, in this case the velocity is not only $ \overrightarrow{U} $ of components ''**(U,V)**'', but $ U + G \overrightarrow{grad}(H) $. This is a way of treating the gradient of the free surface elevation as a piecewise constant function, which it is in reality when the depth is linear. === SUBROUTINE BY NAMES === The existing subroutines building vectors in version 6.+ are the following, their function can be deduced from the explanations above: vc00aa.f vc00bb.f vc00cc.f vc00pp.f vc00pp2.f vc00ft.f vc00ff.f vc00tt.f vc01aa.f vc01bb.f vc01ff.f vc01ft.f vc01oo.f vc01pp.f vc01tt.f vc01tt0.f vc03aa.f vc03bb.f vc04aa.f vc04pp.f vc05oo.f vc05aa.f vc04tt.f vc05ff.f vc05ft.f vc08aa.f vc08bb.f vc08cc.f vc08pp.f vc08tt.f vc09aa.f vc10oo.f vc11aa.f vc11aa2.f vc11bb.f vc11pp.f vc11tt.f vc11tt0.f vc13aa.f vc13bb.f vc13cc.f vc13pp.f vc13pp2.f vc13tt.f vc14aa.f vc15aa.f vc16aa.f vc18pp.f vc19aa.f