Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
model::ParametricCurve< Derived, dim > Class Template Reference

Class template that computes tangent, curvature and torsion of a parametric curve \(\mathbf{r}(u)\) in arbitrary dimension. More...

#include <ParametricCurve.h>

Collaboration diagram for model::ParametricCurve< Derived, dim >:

Public Member Functions

double get_j (const double &u) const
double get_jSquare (const double &u) const
VectorDim get_rl (const double &u) const
double get_ju (const double &u) const
VectorDim get_rll (const double &u) const
double get_kappa (const double &u) const
 the scalar curvature
template<short unsigned int qOrder, template< short unsigned int, size_t > class QuadratureRule>
double arcLength () const
template<short unsigned int qOrder, template< short unsigned int, size_t > class QuadratureRule>
VectorDim rm () const
VectorDim rm_integrand (const double &u) const

Detailed Description

template<typename Derived, short unsigned int dim>
class model::ParametricCurve< Derived, dim >

Class template that computes tangent, curvature and torsion of a parametric curve \(\mathbf{r}(u)\) in arbitrary dimension.

Let \(u\in[0,1]\) and \(\mathbf{r}(u): [0,1]\rightarrow \mathbb{R}^d\) a parametric curve. The first derivative \(\mathbf{r}_{,u}\) with respect to the parameter \(u\) represents the (non unitary) parametric tangent to the curve. The arc length \(l\) along the curve can be calculated as: of the parameter \(u\) at each time \(t\):

\[ l(u)=\int_0^u\sqrt{\mathbf{r}_{,v}\cdot\mathbf{r}_{,v}}dv \]

The length of the curve is therefore:

\[ L=\int_0^1\sqrt{\mathbf{r}_{,u}\cdot\mathbf{r}_{,u}}du \]

The kernel of the integral above represents the jacobian of the transformation between \( u \) and \( l \):

\[ \begin{eqnarray} J&=\frac{d l}{d u}=\sqrt{\mathbf{r}_{,u}\cdot\mathbf{r}_{,u}} \\ J_{,u}&=\frac{\mathbf{r}_{,u}\cdot\mathbf{r}_{,uu}}{J}\\ J_{,uu}&=\frac{\mathbf{r}_{,uu}\cdot\mathbf{r}_{,uu}+\mathbf{r}_{,u}\cdot\mathbf{r}_{uuu}-J^2_{,u}}{J} \end{eqnarray} \]

Derivatives with respect to the arc length are obtained by chain rule:

\[ \begin{eqnarray} \mathbf{r}_{,l}&=\frac{\mathbf{r}_{,u}}{J}\\ \mathbf{r}_{,ll}&=\frac{\mathbf{r}_{,uu}}{J^2}-J_{,u}\frac{\mathbf{r}_{,u}}{J^3}\\ \mathbf{r}_{,lll}&=\frac{\mathbf{r}_{,uuu}}{J^3}-\frac{\mathbf{r}_{,u}J_{,uu}}{J^4}-3\frac{J_{,u}}{J^2}\left(\frac{\mathbf{r}_{,uu}}{J^2}-J_{,u}\frac{\mathbf{r}_{,u}}{J^3}\right) \end{eqnarray} \]

In matrix form

\[ \left[ \begin{array}{c} \mathbf{r}\\ \mathbf{r}_{,u}\\ \mathbf{r}_{,uu}\\ \end{array}\right]= \left[ \begin{array}{ccc} 1&0&0\\ 0&J&0\\ 0&J_{,u}&J^2 \end{array}\right] \left[ \begin{array}{c} \mathbf{r}\\ \mathbf{r}_{,l}\\ \mathbf{r}_{,ll}\\ \end{array}\right] \]

Notice that tangent and curvature are orthogonal:

\[\mathbf{r}_{,l}\cdot\mathbf{r}_{,ll}=\frac{1}{J^3}\left(\mathbf{r}_{u}\cdot\mathbf{r}_{,uu}-J_{,u}\frac{\mathbf{r}_{,u}\cdot\mathbf{r}_{,u}}{J}\right)= \frac{1}{J^3}\left(\mathbf{r}_{u}\cdot\mathbf{r}_{,uu}-\frac{\mathbf{r}_{,u}\cdot\mathbf{r}_{,uu}}{J}\frac{J^2}{J}\right)=0 \]

The Frenet-Serret frame (TNB) frame is defined as:

\[\begin{eqnarray} \hat{\mathbf{t}}&=\mathbf{r}_{,l}&\text{tangent unit vector}\\ \hat{\mathbf{n}}&=\frac{\mathbf{r}_{,ll}}{\left|\mathbf{r}_{,ll}\right|}=\frac{\mathbf{r}_{,ll}}{\kappa}&\text{principal unit normal}\\ \hat{\mathbf{b}}&=\hat{\mathbf{t}}\times\hat{\mathbf{n}}=\frac{\mathbf{r}_{,u}\times\mathbf{r}_{,uu}}{J^3\kappa}&\text{binormal unit vector}\\ \end{eqnarray} \]

The curvature

\[ \kappa=\left|\mathbf{r}_{,ll}\right| = \frac{1}{J^2}\sqrt{\left|\mathbf{r}_{,uu}\right|^2-J_{,u}^2} \]

\[ \begin{eqnarray} \kappa_{,u}&= -2\frac{J_{,u}}{J^3}\sqrt{\left|\mathbf{r}_{,uu}\right|^2-J_{,u}^2}+\frac{1}{J^2}\frac{\mathbf{r}_{,uu}\cdot\mathbf{r}_{uuu}-J_{,u}J_{,uu}}{\sqrt{\left|\mathbf{r}_{,uu}\right|^2-J_{,u}^2}}\\ &=-2\frac{J_{,u}}{J}\kappa+\frac{\mathbf{r}_{,uu}\cdot\mathbf{r}_{uuu}-J_{,u}J_{,uu}}{J^4\kappa} \end{eqnarray} \]

Torsion measures the deviation from a planar curve:

\[ \tau=\frac{\mathbf{r}_{,u}\cdot\left(\mathbf{r}_{uu}\times\mathbf{r}_{uuu}\right)}{J^6\kappa^2} \]

Definition at line 108 of file ParametricCurve.h.

Member Function Documentation

◆ arcLength()

template<typename Derived, short unsigned int dim>
template<short unsigned int qOrder, template< short unsigned int, size_t > class QuadratureRule>
double model::ParametricCurve< Derived, dim >::arcLength ( ) const
inline

Definition at line 182 of file ParametricCurve.h.

◆ get_j()

template<typename Derived, short unsigned int dim>
double model::ParametricCurve< Derived, dim >::get_j ( const double & u) const
inline

The jacobian of the transformation r(u)->r(l):

\[J=\frac{d l}{d u}=\sqrt{\mathbf{r}_{,u}\cdot\mathbf{r}_{,u}} \]

Definition at line 124 of file ParametricCurve.h.

◆ get_jSquare()

template<typename Derived, short unsigned int dim>
double model::ParametricCurve< Derived, dim >::get_jSquare ( const double & u) const
inline

Definition at line 134 of file ParametricCurve.h.

◆ get_ju()

template<typename Derived, short unsigned int dim>
double model::ParametricCurve< Derived, dim >::get_ju ( const double & u) const
inline

The first derivative of the jacobian:

\[J_{,u}=\frac{\mathbf{r}_{,u}\cdot\mathbf{r}_{,uu}}{J} \]

Definition at line 144 of file ParametricCurve.h.

◆ get_kappa()

template<typename Derived, short unsigned int dim>
double model::ParametricCurve< Derived, dim >::get_kappa ( const double & u) const
inline

the scalar curvature

The scalar curvature at u:

\[\kappa=\left|\mathbf{r}_{,ll}\right| \]

Definition at line 170 of file ParametricCurve.h.

◆ get_rl()

template<typename Derived, short unsigned int dim>
VectorDim model::ParametricCurve< Derived, dim >::get_rl ( const double & u) const
inline

Definition at line 139 of file ParametricCurve.h.

◆ get_rll()

template<typename Derived, short unsigned int dim>
VectorDim model::ParametricCurve< Derived, dim >::get_rll ( const double & u) const
inline

The curvature vector at u:

\[\mathbf{r}_{,ll}=\frac{\mathbf{r}_{,uu}}{J^2}-J_{,u}\frac{\mathbf{r}_{,u}}{J^3} \]

Definition at line 155 of file ParametricCurve.h.

◆ rm()

template<typename Derived, short unsigned int dim>
template<short unsigned int qOrder, template< short unsigned int, size_t > class QuadratureRule>
VectorDim model::ParametricCurve< Derived, dim >::rm ( ) const
inline

Definition at line 190 of file ParametricCurve.h.

◆ rm_integrand()

template<typename Derived, short unsigned int dim>
VectorDim model::ParametricCurve< Derived, dim >::rm_integrand ( const double & u) const
inline

Definition at line 196 of file ParametricCurve.h.


The documentation for this class was generated from the following file: