Triangle class for Diffusion

Coordinate-free formulation for a bi-linear diffusion triangle.

Theory

Coordinate mapping:

\[\mathbf{X}=\mathbf{X}_i \xi^i \quad i=1,2,3 \quad \xi^i \geqslant 0 ~\&~ \xi^1+\xi^2+\xi^3 \leq 1\]

Definition of covariant and dual base vectors:

\[d\mathbf{X}=\mathbf{G}_i d \xi^i \rightarrow d \xi^i=\mathbf{G}^i \cdot d \mathbf{X} \quad w/ ~~ \mathbf{G}^i \mathbf{G}_j=\delta_j^i\]

The dual base for the 0-direction of the triangle coordinates:

\[\mathbf{G}^u = -\mathbf{G}^s - \mathbf{G}^t\]

Leads to the following expression for the gradient of the scalar potential function:

\[\nabla \phi = \phi_0 \, \mathbf{G}^u + \phi_1 \, \mathbf{G}^s + \phi_2 \, \mathbf{G}^t\]

Nodal forces

\[\mathbf{F}_I = A t \lambda \, \mathbf{G}^I\cdot\nabla\phi \qquad\text{with}\quad I=u,s,t\]

Nodal tangent stiffness

\[ \left({K}_{t}\right)^{IJ} = A t \lambda \, \mathbf{G}^I\cdot\mathbf{G}^J \qquad\text{with}\quad I,J=u,s,t\]
\[\begin{split}[\mathbf{K}_{t}] = \left[ \begin{array}{ccc} \left({K}_{t}\right)^{uu} & \left({K}_{t}\right)^{us} & \left({K}_{t}\right)^{ut} \\ \left({K}_{t}\right)^{su} & \left({K}_{t}\right)^{ss} & \left({K}_{t}\right)^{st} \\ \left({K}_{t}\right)^{tu} & \left({K}_{t}\right)^{ts} & \left({K}_{t}\right)^{tt} \end{array} \right] = A t \lambda \left[ \begin{array}{ccc} \mathbf{G}^u\cdot\mathbf{G}^u & \mathbf{G}^u\cdot\mathbf{G}^s & \mathbf{G}^u\cdot\mathbf{G}^t \\ \mathbf{G}^s\cdot\mathbf{G}^u & \mathbf{G}^s\cdot\mathbf{G}^s & \mathbf{G}^s\cdot\mathbf{G}^t \\ \mathbf{G}^t\cdot\mathbf{G}^u & \mathbf{G}^t\cdot\mathbf{G}^s & \mathbf{G}^t\cdot\mathbf{G}^t \end{array} \right]\end{split}\]

Parent class

See also

Class doc

class femedu.elements.diffusion.Triangle.Triangle(node0, node1, node2, material)

class: representing a 3-node triangle for diffusion problems

computeSurfaceLoads()

compute surface loads using faces

This method should be called during updateState() by every element supporting surface loads

mapGaussPoints(var)

Initiate mapping of Gauss-point values to nodes. This method is an internal method and should not be called by the user. Calling that method explicitly will cause faulty nodal values.

Parameters:

var – variable code for a variable to be mapped from Gauss-points to nodes

resetLoads()

default implementation for resetting element loads.

setSurfaceLoad(face, qn)

face ID

nodes defining that face

0

node 0 to node 1

1

node 1 to node 2

2

node 2 to node 0

Parameters:
  • face – face ID for the loaded face

  • qn – magnitude of distributed heat flux \(q_n\). Influx on a surface is positive.

updateState()