Geometrically exact string model¶
Continuous model¶
We consider the arc length of a stress-free reference configuration \(s \in [0, L] \subseteq \mathbb{R}\) and time \(t \in [0, T] \subseteq \mathbb{R}\). The deformation of the string is then described by \(r(s, t): [0, L] \times [0, T] \mapsto \mathbb{R}^3\). Its velocity is \(v(s,t) = \frac{\partial r(s, t)}{\partial t}\). The stretch is defined as \(\nu(s,t) = \left\Vert \frac{\partial r(s,t)}{\partial s} \right\Vert\).
The kinetic energy density is \(T(v) = \frac{1}{2} v^T \rho A v\) with the mass density \(\rho\) and the area of the cross-section in reference configuration \(A\).
- GeometricallyExactString.geometricallyExactStringGES.kineticEnergy(q_k, q_kp1, M, time_step)¶
Define the discrete kinetic eergy.
- Parameters:
q_k (jnp.ndarray) – configuration at node k in time.
q_kp1 (jnp.ndarray) – configuration at node k+1 in time.
M (jnp.ndarray) – mass density of the string.
time_step (flaot) – time step length.
- Returns:
T – discrete kinetic energy.
- Return type:
jnp.ndarray
The inner potential energy assumes a compressible Neo-Hookean material model that is adapted to the string kinematics thus only the tangential stretch is considered. The determinant of the deformation gradient is therefore the stretch. The inner potential energy density is \(U_{int}(\nu) = \frac{1}{2} C (\nu^2 - \text{ln}(\nu) - 1)\) with the material constant \(C\).
- GeometricallyExactString.geometricallyExactStringGES.internalPotentialEnergy(q_n, q_np1, C, step)¶
Define the discrete internal potential energy.
- Parameters:
q_n (jnp.ndarray) – configuration at node n in space.
q_np1 (float) – cinfiguration at node n+1 in space.
C (jnp.ndarray) – stiffness of the string.
step (float) – step size in space.
- Returns:
V_int – discrete internal potential energy.
- Return type:
jnp.ndarray
The external potential energy density only considers gravity in this code, \(U_{ext}(r) = \rho A g r\) with the gravitational acceleration vector \(g\).
- GeometricallyExactString.geometricallyExactStringGES.externalPotentialEnergy(q_n, step, M, g_)¶
Discrete external potential energy.
- Parameters:
q_n (jnp.ndarray) – discrete configuration at node n in space.
step (float) – step size in space.
M (jnp.ndarray) – mass density of the string.
g (float) – gravitaional acceleration.
- Returns:
V_ext – discrete external potential energy.
- Return type:
jnp.ndarray
The Lagranian density is thus \(L(r, v, \nu) = T(v) - U_{int}(\nu) - U_{ext}(r)\). Only fixed-free boundary conditions in space are considered.
- GeometricallyExactString.geometricallyExactStringGES.dynamicLagrangian(q_n_k, q_np1_k, q_n_kp1, q_np1_kp1, C, M, g_, step, time_step)¶
Calculate the discrete Lagrangian of the string.
- Parameters:
q_n_k (jnp.ndarray) – discrete configuration at node n in space and k in time.
q_np1_k (jnp.ndarray) – discrete configuration at node n+1 in space and k in time.
q_n_kp1 (jnp.ndarray) – discrete configuration at node n in space and k+1 in time.
q_np1_kp1 (jnp.ndarray) – discrete configuration at node n+1 in space and k+1 in time.
C (jnp.ndarray) – stiffness of crosssection.
M (jnp.ndarray) – mass density of string.
g (float) – graviational acceleration.
step (float) – step size in space.
time_step (float) – time step size.
- Returns:
L – discrete Lagrangian.
- Return type:
jnp.ndarray
Discrete Model¶
The action
is approximated by the trapezoidal rule in space and time. Further explanations on this method, applied to the 1D wave equation can be found here. Mind, that the string under consideration has hyperelastic material and gravitation is also considered. The discrete variation of this discrete approximation of the action leads to the discrete Euler-Lagrange field equations for the geometrically exact string. The discrete variations are calculated in
- GeometricallyExactString.geometricallyExactStringGES.D1dynamicLagrangian(q_n_k, q_np1_k, q_n_kp1, q_np1_kp1, C, M, g_, step, time_step)¶
Differentiate the discrete Lagrangian w.r.t. the first argument.
- Parameters:
q_n_k (jnp.ndarray) – discrete configuration at node n in space and k in time.
q_np1_k (jnp.ndarray) – discrete configuration at node n+1 in space and k in time.
q_n_kp1 (jnp.ndarray) – discrete configuration at node n in space and k+1 in time.
q_np1_kp1 (jnp.ndarray) – discrete configuration at node n+1 in space and k+1 in time.
C (jnp.ndarray) – stiffness of crosssection.
M (jnp.ndarray) – mass density of string.
g (float) – graviational acceleration.
step (float) – step size in space.
time_step (float) – time step size.
- Returns:
D_1L_d – Derivative of the discrete Lagrangian w.r.t the first argument.
- Return type:
jnp.ndarray
as well as in other functions for different nodes in space and time. The equations of the string with its hard coded boundary conditions are assembled in:
- GeometricallyExactString.assembleSystem(x_kp1, x_k, x_km1, string, time_step, g_)¶
Assemble the equations for the dynamic simulation of the GES.
- Parameters:
x_kp1 (jnp.ndarray) – vector of unknows at time step k+1.
x_k (jnp.ndarray) – vector of unknows at time step k.
x_km1 (jnp.ndarray) – vector of unknows at time step k-1.
string (dict) – parameters geometrically exact string.
time_step (float) – stime step size.
g (float) – graviational acceleration.
- Returns:
del_eq – discrete Euler-Lagrange equations.
- Return type:
jnp.ndarray
The jacobian of those equations is required for the efficient solution of these equations. It is derived via automatic differentiation in:
- GeometricallyExactString.jacobianAssembleSystem(q_kp1, q_k, q_km1, string, time_step, g_)¶
Calculate the jacobian of the DEL w.r.t. the conifugration at k+1.
- Parameters:
q_kp1 (jnp.ndarrray) – configuration at node k+1 in time.
q_k (jnp.ndarrray) – configuration at node k in time.
q_km1 (jnp.ndarrray) – configuration at node k-1 in time.
string (dict) – parameters geomtrically exact string.
time_step (float) – time step size.
g (float) – graviational acceleration.
- Returns:
jacobian of the DEL.
- Return type:
jnp.ndarray
The latter two function also have versions for the first time step that use the Legendre transformation to apply consistent initial conditions for position and velocity.
Time stepping¶
The time stepping routine is
- GeometricallyExactString.simulate(string, nt, dt, g_)¶
Simulate the string.
- Parameters:
string (GES) – geometrically exact string.
nt (int) – number of time steps.
dt (float) – time step size.
g (float) – gravitational acceleration.
- Returns:
x – solution of the dynamic simulation
- Return type:
jnp.ndarray