calcBKBline_quad

| main | Tutorials | Functions | website |

Computes the product B' x K x B for 1D quadratic elements in vectorized manner This is used internally from calcBKB.

Version : 1.0

Author : George Kourakos

email: giorgk@gmail.com

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

Date 28-Mar-2014

Department of Land Air and Water

University of California Davis

Contents

Usage

BKB = calcBKBline_quad(B, K, ii)

Input

B: [Nel x N_sh^2] contains the contributions of each element to the final conductance matrix

K : [Nel x Nanis] Hydraulic conductiviy element values. The number of columns is defined by the anisotropy. Maximum number is 3.

ii : In case of nested assembly this indicates the iteration. In vectorized assembly this is not used

Output

BKB: the product B'*K*B

How to compute

In mSim we avoid by hand computations at all costs, therefore we used the symbolic toolbox to perform the vectorized computations. The following code show how we computed the products.

syms b1 b2 b3
syms kx
B=[b1 b2 b3];
BT = [b1; b2; b3];
BKB = BT*kx*B
 
BKB =
 
[  b1^2*kx, b1*b2*kx, b1*b3*kx]
[ b1*b2*kx,  b2^2*kx, b2*b3*kx]
[ b1*b3*kx, b2*b3*kx,  b3^2*kx]
 

| main | Tutorials | Functions | website |