BatheTwoStep

Starting from version 2.7, customisation of spectral radius (hoho_\infty) and sub-step size (γ\gamma) is supported.

The algorithm is known to be able to conserve energy and momentum.

References:

The implementation follows the original algorithm. The only difference is the step size defined in suanPan is the mean step size of two sub-step sizes, that is Δt/2\Delta{}t/2 in the references.

For further discussions on this type of algorithm, one can check the following references.

Syntax

integrator BatheTwoStep (1) [2] [3]
# (1) int, unique integrator tag
# [2] double, spectral radius, \rho_\infty, default: 0
# [2] double, sub-step size, gamma, default: 0.5

Using integrator BatheTwoStep (1) with two optional parameters omitted gives the same results as in versions prior to version 2.7.

The spectral radius hoho_\infty ranges from 0 to 1, both ends inclusive.

The sub-step size γ\gamma ranges from 0 to 1, both ends exclusive.

Theory

The First Sub-step

For trapezoidal rule,

vn+1=vn+γΔt2(an+an+1),v_{n+1}=v_n+\dfrac{\gamma\Delta{}t}{2}\left(a_n+a_{n+1}\right),
un+1=un+γΔt2(vn+vn+1).u_{n+1}=u_n+\dfrac{\gamma\Delta{}t}{2}\left(v_n+v_{n+1}\right).

Then,

un+1=un+γΔt2(vn+vn+γΔt2(an+an+1)),u_{n+1}=u_n+\dfrac{\gamma\Delta{}t}{2}\left(v_n+v_n+\dfrac{\gamma\Delta{}t}{2}\left(a_n+a_{n+1}\right)\right),
Δu=γΔtvn+γ2Δt24an+γ2Δt24an+1.\Delta{}u=\gamma\Delta{}tv_n+\dfrac{\gamma^2\Delta{}t^2}{4}a_n+\dfrac{\gamma^2\Delta{}t^2}{4}a_{n+1}.

One could obtain

an+1=4γ2Δt2Δu4γΔtvnan,Δa=4γ2Δt2Δu4γΔtvn2an,a_{n+1}=\dfrac{4}{\gamma^2\Delta{}t^2}\Delta{}u-\dfrac{4}{\gamma\Delta{}t}v_n-a_n,\qquad \Delta{}a=\dfrac{4}{\gamma^2\Delta{}t^2}\Delta{}u-\dfrac{4}{\gamma\Delta{}t}v_n-2a_n,
vn+1=2γΔtΔuvn,Δv=2γΔtΔu2vn.v_{n+1}=\dfrac{2}{\gamma\Delta{}t}\Delta{}u-v_n,\qquad \Delta{}v=\dfrac{2}{\gamma\Delta{}t}\Delta{}u-2v_n.

The effective stiffness is then

Kˉ=K+2γΔtC+4γ2Δt2M.\bar{K}=K+\dfrac{2}{\gamma\Delta{}t}C+\dfrac{4}{\gamma^2\Delta{}t^2}M.

The Second Sub-step

The second step is computed by

vn+2=vn+Δt(q0an+q1an+1+q2an+2),v_{n+2}=v_n+\Delta{}t\left(q_0a_n+q_1a_{n+1}+q_2a_{n+2}\right),
un+2=un+Δt(q0vn+q1vn+1+q2vn+2).u_{n+2}=u_n+\Delta{}t\left(q_0v_n+q_1v_{n+1}+q_2v_{n+2}\right).

The parameters satisfy q0+q1+q2=1q_0+q_1+q_2=1, and

q1=ρ+12γ(ρ1)+4,q2=0.5γq1.q_1=\dfrac{\rho_\infty+1}{2\gamma\left(\rho_\infty-1\right)+4},\qquad q_2=0.5-\gamma{}q_1.

Hence,

an+2=vn+2vnq2Δtq0q2anq1q2an+1,a_{n+2}=\dfrac{v_{n+2}-v_n}{q_2\Delta{}t}-\dfrac{q_0}{q_2}a_n-\dfrac{q_1}{q_2}a_{n+1},
vn+2=un+2unq2Δtq0q2vnq1q2vn+1.v_{n+2}=\dfrac{u_{n+2}-u_n}{q_2\Delta{}t}-\dfrac{q_0}{q_2}v_n-\dfrac{q_1}{q_2}v_{n+1}.

The effective stiffness is then

Kˉ=K+1q2ΔtC+1q22Δt2M.\bar{K}=K+\dfrac{1}{q_2\Delta{}t}C+\dfrac{1}{q_2^2\Delta{}t^2}M.

Last updated