From 99f7d391b1a0be2ab39b5703ee9dc7b333a69485 Mon Sep 17 00:00:00 2001 From: Rapo Date: Thu, 10 Aug 2017 12:58:27 +0300 Subject: [PATCH] Edited theory.md and index.md --- docs/src/index.md | 67 ++++++++++++++-- docs/src/theory.md | 196 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 250 insertions(+), 13 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 24af686..b01ae22 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -3,16 +3,73 @@ ```@contents ``` -ModelReduction.jl is (write here) +ModelReduction.jl is a Julia package to perform model reduction methods for i.e. multibody dynamics problems. The packcage includes model order reduction methods such as the Guyan reduction and the Craig-Bampton method. -## Installing and testing package +Reducing the sizes of stiffness and mass matrices of the model will greatly decrease the computation resources needed when performing dynamic analyses. + +ModelReduction.jl is a part of JuliaFEM. All codes are MIT licensed. + +## Installing and testing the package + +Download and unzip the packge files into your Julia folder and then install the package the same way other Julia packages are installed. + +```julia +julia> Pkg.add("ModelReduction") + +``` + +Test the package with ```Pkg.test``` etc. + +```julia +julia> Pkg.test("ModelReduction") + +``` -( write here how to install and test package ) ## Usage example -( demonstrate here how to use package, simple example ) +This example demonstrates how to use the Craig-Bampton method function. + +Problem setup: + +```julia +K = +[2 -1 0 0; +-1 2 -1 0; + 0 -1 2 -1; + 0 0 -1 1] + +M = +[2 0 0 0; + 0 2 0 0; + 0 0 2 0; + 0 0 0 1] + +r = [4] +l = [1, 2, 3] +n = 1 + +``` +K = original stiffness matrix, M = original mass matrix, r = retained DOF:s, l = internal DOF:s, n = the number of the internal modes to keep. +Calculate the reduced mass and stiffness matrices Mred and Kred. + +```julia +craig_bampton(K, M, r, l, n) + +# output + +Mred, Kred = ([2.75 -1.20711; -1.20711 1.0], [0.25 0.0; 0.0 0.292893]) + +``` + ## Contributing -( write here how to contribute to package ) + + +Have a new great idea and want to share it with the open source community? +From [here](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md) +and [here](https://juliadocs.github.io/Documenter.jl/stable/man/contributing/) +you can look for coding styles. [Here](https://docs.julialang.org/en/stable/manual/packages/#Making-changes-to-an-existing-package-1) it is explained how to contribute to +open source project, in general. + diff --git a/docs/src/theory.md b/docs/src/theory.md index 14caff2..300a005 100644 --- a/docs/src/theory.md +++ b/docs/src/theory.md @@ -1,13 +1,193 @@ # Theory -( write here what is the theory behing package ) +The Craig-Bampton method is a dynamic reduction technique that reduces +the mass and stiffness matrices of the model by expressing the boundary +modes in physical coordinates and the elastic modes in modal coordinates. -# References +The equation of motion is: + +```math +\begin{equation} +\boldsymbol{M}\ddot{\boldsymbol{u}}+\boldsymbol{K}\boldsymbol{u}=\boldsymbol{f} +\end{equation} +``` + +The matrices are partitioned into boundary nodes R and the independent +elastic nodes L: + +```math +\begin{equation} +\boldsymbol{u}=\begin{bmatrix}\boldsymbol{u}_{\mathrm{R}}\\ +\boldsymbol{u}_{\mathrm{L}} +\end{bmatrix} +\end{equation} +``` + +Equation (1) becomes: + +```math +\begin{equation} +\begin{bmatrix}\boldsymbol{M}_{\mathrm{RR}} & \boldsymbol{M}_{\mathrm{\mathrm{R}L}}\\ +\boldsymbol{M}_{\mathrm{RR}} & \boldsymbol{M}_{\mathrm{LL}} +\end{bmatrix}\begin{bmatrix}\ddot{\boldsymbol{u}}_{\mathrm{R}}\\ +\ddot{\boldsymbol{u}}_{\mathrm{L}} +\end{bmatrix}+\begin{bmatrix}\boldsymbol{K}_{\mathrm{RR}} & \boldsymbol{K}_{\mathrm{RL}}\\ +\boldsymbol{K}_{\mathrm{LR}} & \boldsymbol{K}_{\mathrm{LL}} +\end{bmatrix}\begin{bmatrix}\boldsymbol{u}_{\mathrm{R}}\\ +\boldsymbol{u}_{\mathrm{L}} +\end{bmatrix}=\boldsymbol{f} +\end{equation} +``` + +The degrees of freedom are are transformed to hybrid coordinates + +```math +\begin{equation} +\begin{bmatrix}\boldsymbol{u}_{\mathrm{R}}\\ +\boldsymbol{u}_{\mathrm{L}} +\end{bmatrix}=\begin{bmatrix}\boldsymbol{I} & \boldsymbol{0}\\ +\boldsymbol{X}_{\mathrm{R}} & \boldsymbol{X}_{\mathrm{L}} +\end{bmatrix}\begin{bmatrix}\boldsymbol{u}_{\mathrm{R}}\\ +\boldsymbol{q}_{\mathrm{m}} +\end{bmatrix} +\end{equation} +``` + +Equation (1) can be rewritten as + +```math +\begin{equation} +\begin{bmatrix}\boldsymbol{M}_{\mathrm{RR}} & \boldsymbol{M}_{\mathrm{\mathrm{R}L}}\\ +\boldsymbol{M}_{\mathrm{RR}} & \boldsymbol{M}_{\mathrm{LL}} +\end{bmatrix}\begin{bmatrix}\boldsymbol{I} & \boldsymbol{0}\\ +\boldsymbol{X}_{\mathrm{R}} & \boldsymbol{X}_{\mathrm{L}} +\end{bmatrix}\begin{bmatrix}\ddot{\boldsymbol{u}}_{\mathrm{R}}\\ +\ddot{\boldsymbol{q}}_{\mathrm{m}} +\end{bmatrix}+\begin{bmatrix}\boldsymbol{K}_{\mathrm{RR}} & \boldsymbol{K}_{\mathrm{RL}}\\ +\boldsymbol{K}_{\mathrm{LR}} & \boldsymbol{K}_{\mathrm{LL}} +\end{bmatrix}\begin{bmatrix}\boldsymbol{I} & \boldsymbol{0}\\ +\boldsymbol{X}_{\mathrm{R}} & \boldsymbol{X}_{\mathrm{L}} +\end{bmatrix}\begin{bmatrix}\boldsymbol{u}_{\mathrm{R}}\\ +\boldsymbol{q}_{\mathrm{m}} +\end{bmatrix}=\begin{bmatrix}\boldsymbol{f}_{\mathrm{R}}\\ +\boldsymbol{0} +\end{bmatrix} +\end{equation} +``` +Equation (1) reduces to + +```math +\begin{equation} +\boldsymbol{K}_{\mathrm{LR}}\boldsymbol{K}_{\mathrm{LR}}\boldsymbol{u}_{\mathrm{R}}+\boldsymbol{K}_{\mathrm{LL}}\boldsymbol{u}_{\mathrm{L}} +\end{equation} +``` + +The internal degrees of freedom can be expressed as + +```math +\begin{equation} +\boldsymbol{u}_{\mathrm{L}}=-\boldsymbol{K}_{\mathrm{LL}}^{-1}\boldsymbol{K}_{\mathrm{LR}}\boldsymbol{u}_{\mathrm{R}}=\boldsymbol{X}_{\mathrm{R}}\boldsymbol{u}_{\mathrm{R}} +\end{equation} +``` + +where + +```math +\begin{equation} +\boldsymbol{X}_{\mathrm{R}}=-\boldsymbol{K}_{\mathrm{LL}}^{-1}\boldsymbol{K}_{\mathrm{LR}} +\end{equation} +``` -( add here the list of references, if any, I leave the list below as example ) +To determine \mathit{\boldsymbol{X}}_{\mathrm{L}} the retained degrees of freedom are fixed. The equation of motion reduces to + +```math +\begin{equation} +\boldsymbol{M}_{\mathrm{LL}}\ddot{\boldsymbol{u}}_{\mathrm{L}}+\boldsymbol{K}_{\mathrm{LL}}\boldsymbol{u}_{\mathrm{L}}=0 +\end{equation} +``` + +By assuming harmonic response and substituting the coordinate transformation (4) + +```math +\begin{equation} +(-\omega^{2}\boldsymbol{M}_{\mathrm{LL}}+\boldsymbol{K}_{\mathrm{LL}})\boldsymbol{X}_{\mathrm{L}}\boldsymbol{q}_{\mathrm{m}}e^{i\omega t}=0 +\end{equation} +``` + +The eigenvectors can be normalized: + +```math +\begin{equation} +\boldsymbol{X}_{\mathrm{L}}^{\mathrm{T}}\boldsymbol{M}_{\mathrm{LL}}\boldsymbol{X}_{\mathrm{L}}=\boldsymbol{I} +\end{equation} +``` + +```math +\begin{equation} +\boldsymbol{X}_{\mathrm{L}}^{\mathrm{T}}\boldsymbol{K}_{\mathrm{LL}}\boldsymbol{X}_{\mathrm{L}}=\boldsymbol{\Lambda} +\end{equation} +``` + +Since $\boldsymbol{X}$$_{\mathrm{R}}$ in (9) contains $\boldsymbol{K}$$_{\mathrm{LL}}^{-1}$, +an inverse of $\boldsymbol{K}$$_{\mathrm{LL}}$, determining it will +require lots of computing resources. This can be avoided by determining +the $\boldsymbol{K}$$_{\mathrm{LL}}$ inverse as follows. + +```math +\begin{equation} +-\boldsymbol{K}_{\mathrm{LL}}^{-1}=\boldsymbol{X}_{\mathrm{L}}\boldsymbol{\Lambda}^{-1}\boldsymbol{X}_{\mathrm{L}}^{\mathrm{T}} +\end{equation} +``` + +In order to get the dynamic equations of the system, equation (6) is multiplied with the coordination transformation matrix. + +```math +\begin{multline} +\begin{bmatrix}\boldsymbol{I} & \boldsymbol{X}_{\mathrm{R}}^{\mathrm{T}}\\ +\boldsymbol{0} & \boldsymbol{X}_{\mathrm{L}}^{\mathrm{T}} +\end{bmatrix}\begin{bmatrix}\boldsymbol{M}_{\mathrm{RR}} & \boldsymbol{M}_{\mathrm{\mathrm{R}L}}\\ +\boldsymbol{M}_{\mathrm{LR}} & \boldsymbol{M}_{\mathrm{LL}} +\end{bmatrix}\begin{bmatrix}\boldsymbol{I} & \boldsymbol{0}\\ +\boldsymbol{X}_{\mathrm{R}} & \boldsymbol{X}_{\mathrm{L}} +\end{bmatrix}\begin{bmatrix}\ddot{\boldsymbol{u}}_{\mathrm{R}}\\ +\ddot{\boldsymbol{q}}_{\mathrm{m}} +\end{bmatrix}\\ ++\begin{bmatrix}\boldsymbol{I} & \boldsymbol{X}_{\mathrm{R}}^{\mathrm{T}}\\ +\boldsymbol{0} & \boldsymbol{X}_{\mathrm{L}}^{\mathrm{T}} +\end{bmatrix}\begin{bmatrix}\boldsymbol{K}_{\mathrm{RR}} & \boldsymbol{K}_{\mathrm{RL}}\\ +\boldsymbol{K}_{\mathrm{LR}} & \boldsymbol{K}_{\mathrm{LL}} +\end{bmatrix}\begin{bmatrix}\boldsymbol{I} & \boldsymbol{0}\\ +\boldsymbol{X}_{\mathrm{R}} & \boldsymbol{X}_{\mathrm{L}} +\end{bmatrix}\begin{bmatrix}\mathbf{\mathit{\boldsymbol{u}}}_{\mathrm{R}}\\ +\boldsymbol{q}_{\mathrm{m}} +\end{bmatrix}=\begin{bmatrix}\boldsymbol{I} & \boldsymbol{X}_{\mathrm{R}}^{\mathrm{T}}\\ +\boldsymbol{0} & \boldsymbol{X}_{\mathrm{L}}^{\mathrm{T}} +\end{bmatrix}\begin{bmatrix}\boldsymbol{f}_{\mathrm{R}}\\ +\boldsymbol{0} +\end{bmatrix} +\end{multline} +``` + +By simplifying the equation of motion (1) becomes + +```math +\begin{multline} +\begin{bmatrix}\boldsymbol{M}_{\mathrm{RR}}+\boldsymbol{X}_{\mathrm{R}}^{\mathrm{T}}\boldsymbol{M}_{\mathrm{LR}}+\boldsymbol{X}_{\mathrm{R}}^{\mathrm{T}}\boldsymbol{M}_{\mathrm{LL}}\boldsymbol{X}_{\mathrm{R}} & \boldsymbol{M}_{\mathrm{\mathrm{R}L}}\boldsymbol{X}_{\mathrm{L}}+\boldsymbol{X}_{\mathrm{R}}^{\mathrm{T}}\boldsymbol{M}_{\mathrm{LL}}\boldsymbol{X}_{\mathrm{L}}\\ +\boldsymbol{X}_{\mathrm{L}}^{\mathrm{T}}\boldsymbol{M}_{\mathrm{LR}}+\boldsymbol{X}_{\mathrm{L}}^{\mathrm{T}}\boldsymbol{M}_{\mathrm{LL}}\boldsymbol{X}_{\mathrm{R}} & \boldsymbol{I} +\end{bmatrix}\begin{bmatrix}\ddot{\boldsymbol{u}}_{\mathrm{R}}\\ +\ddot{\boldsymbol{q}}_{\mathrm{m}} +\end{bmatrix}\\ ++\begin{bmatrix}\boldsymbol{K}_{\mathrm{RR}}+\boldsymbol{K}_{\mathrm{RL}}\boldsymbol{X}_{\mathrm{R}} & \boldsymbol{0}\\ +\boldsymbol{0} & \boldsymbol{\Lambda} +\end{bmatrix}\begin{bmatrix}\boldsymbol{u}_{\mathrm{R}}\\ +\boldsymbol{q}_{\mathrm{m}} +\end{bmatrix}=\begin{bmatrix}\boldsymbol{f}_{\mathrm{R}}\\ +\boldsymbol{0} +\end{bmatrix} +\end{multline} +``` + +# References -- Wikipedia contributors. "Mortar methods." Wikipedia, The Free Encyclopedia. Wikipedia, The Free Encyclopedia. -- Maday, Yvon, Cathy Mavriplis, and Anthony Patera. "Nonconforming mortar element methods: Application to spectral discretizations." (1988). -- Yang, Bin, Tod A. Laursen, and Xiaonong Meng. "Two dimensional mortar contact methods for large deformation frictional sliding." International journal for numerical methods in engineering 62.9 (2005): 1183-1225. -- Yang, Bin, and Tod A. Laursen. "A contact searching algorithm including bounding volume trees applied to finite sliding mortar formulations." Computational Mechanics 41.2 (2008): 189-205. -- Wohlmuth, Barbara I. "A mortar finite element method using dual spaces for the Lagrange multiplier." SIAM journal on numerical analysis 38.3 (2000): 989-1012. +- Qu, Zu-Qing. Model Order Reduction Techniques (2004). p. 322 - 329. +- Young, John T. Prime on the Craig-Bampton Method (2000). p. 5 - 17. \ No newline at end of file