A simple is the most basic linear polytope in a
In these derivations the right-hand rule is used, as well as a right-handed coordinate system.
Then general form for the volume of a simple in
$vol({\vec{x}_{j\in [1,d]}})=\frac{1}{d!}det(\begin{bmatrix}(\vec{x}_2-\vec{x}_1) & .. & (\vec{x}_d-\vec{x}_1)\end{bmatrix})$
In 1D, the volume is derived geometrically as the length of line segment:
In 2D, the volume is derived geometrically as 1/2 base times height:
$vol({\vec{x}_1,\vec{x}_1)=\frac{1}{2}(\vec{x}1-\vec{x}2)\cdot\vec{n}(\vec{x}{j\in[2,3]})vol({\vec{x}{j\in [2,3]}})$
In 3D, the volume is derived geometrically as 1/2 base times height:
$vol({\vec{x}_{j\in [1,4]}})=\frac{1}{3}(\vec{x}1-\vec{x}2)\cdot\vec{n}({\vec{x}{j\in [2,4]}})vol({\vec{x}{j\in [2,4]}})$
In ND, noting that pattern from above, this extends to:
$vol({\vec{x}_{j\in [1,d]}})=\frac{1}{d}(\vec{x}1-\vec{x}2)\cdot\vec{n}({\vec{x}{j\in [2,d]}})vol({\vec{x}{j\in [2,d]}})$
In 1D, we rotate the basis vector by
$\vec{n}({\vec{x}_{j\in[1,2]}})=\begin{bmatrix}0 & -1 \ 1 & 0\end{bmatrix}\frac{\vec{x}_1-\vec{x}_2}{|\vec{x}_1-\vec{x}_2|}$
In 3D, we use the cross product of the 2 basis vectors.
From the Matrix Cookbook we have one way to compute the gradient. However, this requires extensive algebra to work through.
Instead, it's simpler to derive it geometrically. The volume can also be defined as (using vertex
$vol({\vec{x}{j\in [1,d]}},i)=\frac{1}{d}(\vec{x}i-\vec{x}{i%d+1})\cdot\vec{n}({\vec{x}\jni}) vol({\vec{x}_\jni})$
At this point we can easily take the derivative of the volume with respect to
$a_i(\vec{x})=\frac {\frac{1}{3}(\vec{x}-\vec{x}\ipo)\cdot\vec{n}({\vec{x}\jni}) vol({\vec{x}\jni})} {\frac{1}{3}(\vec{x}1-\vec{x}\ipo)\cdot\vec{n}({\vec{x}\jni}) vol({\vec{x}_\jni})}$
$a_i(\vec{x})=\frac {(\vec{x}-\vec{x}\ipo)\cdot\vec{n}({\vec{x}\jni})} {(\vec{x}i-\vec{x}\ipo)\cdot\vec{n}({\vec{x}_\jni})}$
$\nabla\alpha_i(\vec{x})=\frac {\vec{n}({\vec{x}\jni})} {(\vec{x}i-\vec{x}\ipo)\cdot\vec{n}({\vec{x}\jni})}$
There are the vertex orders that create inward facing normals (reverse to get outward face normals):
- 4: 1,2,3
- 1: 2,4,3
- 2: 3,4,1
- 3: 4,2,1
In vector form:
Sympy code for verification:
X=sympy.matrices.MatrixSymbol("X",3,1)
(X/(X.T*X)**(1/2)).as_explicit().jacobian(X)
In this case we construct a volume around each node using the centers of adjacent simplexes (edges and cell centers in 2D; edges, face centers and cell centers in 3D) to form a face between each node and its neighbors.
In this case we use the Voronoi cell for the node as its volume. Note that this only non-degenerate for Delaunay triangulations. It is simpler to use in a finite volume discretization than the median dual mesh due to the orthogonality of the faces with their corresponding node-node edges. However, it is more complicated to construct and potentially less well conditioned if the mesh is close to non-Delaunay.
https://en.wikipedia.org/wiki/Catenary
Assumptions needed for solution based upon force balance:
- Vertical force between support and center decreases linearly. This is due to each support bearing half the load imposed by gravity. Then given the static shape, the load at intermediate points needs to bear half the load of the section below them.
- Horizontal force is constant. This is due to the fact that there is no other source of horizontal force other than the end points, so each point must transfer the horizontal force.
So we end up with the following force term:
So the curve direction at any point is given by
Integrating this function gives us the position at any point along the curve. This can be used to solve for various parameters such as the width of the span, or the dip in the center given other parameters are fixed.