Assemble_LHS

| main | Tutorials | Functions | website |

Assembles the conductance matrix

Version : 1.0

Author : George Kourakos

email: giorgk@gmail.com

web : http://groundwater.ucdavis.edu/msim

Date 18-Mar-2014

Department of Land Air and Water

University of California Davis

Contents

Usage

[Kglo H]= Assemble_LHS(p, MSH, K, CH, GHB, opt)

Input

p: [Np x 3] Coodrinates of nodes [x1 y1 z1; x2 y2 z2;...xn yn zn], where Np is the number of nodes

MSH: [Nel x Np_el] id of elements. Each row correspond to an element. Nel is the number of elements and Np_el is the number of dofs per element

K : Hydraulic Conductivity defined on nodes or elements, If size(K,1)==Np then K is defined on nodes. If size(K,1)=Nel then K is defined on elements. If size(K,2)==1 then aquifer is isotropic Kx=Ky=Kz. If size(K,2)==2 then aquifer is anisotropic Kx=Ky~=Kz. If size(K,2)==3 then aquifer is anisotropic Kx~=Ky~=Kz.

CH: [nx2] the first column contains the id of the nodes with constant head boundary conditions. The second contains the values

GHB: [nx3] : id of node connected with a GHB, head, conductance

opt : Simulation options with the following fields: dim: Dimension of the problem : 1, 2 or 3. el_type: type of element e.g. triangle, prism etc... el_order: order of the element: linear or quadratic assemblemode: 'vect', 'nested','serial'(Use always vect)

Output

Kglo: Global conductance matrix (sparse) H : vector with nan values for the unknowns and scalar for the dirichlet nodes

| main | Tutorials | Functions | website |