choose an example in the book

力学模型

symbol table

$${w_x}\quad是 12$$

编程实现 1.建立力学模型

流体模型是什么?

w_x指节点的运动速度

x是物理空间的坐标。

kexi是不变网格空间的坐标。

数学模型

structure dyanmics equation

$$m{{{d^2}u} \over {d{t^2}}} + k{{du} \over {dx}} = \delta (x - {x_0})$$$${m_p}\ddot u + {k_p}u(t) = A(p(t) - {p_0})$$$$u = {u^0},\dot u(0) = 0$$

fluid equation

$${\partial \over {\partial t}}\{ U\} + {\partial \over {\partial x}}\{ F\} = \{ 0\} $$$$\{ U\} = \left\{ {\matrix{ \rho \cr {\rho v} \cr {\rho e} \cr } } \right\}$$$$\left\{ F \right\}{\rm{ = }}\left\{ {\begin{array}{*{20}{c}} {\rho v}\\ {\rho {v^2} + p}\\ {(\rho e + p)v} \end{array}} \right\}$$

ALE form of equation $${\partial \over {\partial t}}(J{U_i}) + J{\partial \over {\partial x}}({F_i} - {w_x}{U_i}) = 0 $$ for i = 1,2,3

Boundary condition $$\eqalign{ & {\rm{v(0,t) = 0}} \cr & {\rm{v(L(t),t) = \dot u(t)}} \cr} $$

interaction equation

list the governing equation and the analytical solution

discretize them

structure solver $${u^{n + 1}} = {u^n} + \Delta t{{\dot u}^n} + {{\Delta {t^2}} \over 4}({{\ddot u}^n} + {{\ddot u}^{n + 1}})$$ $${{\dot u}^{n + 1}} = {{\dot u}^n} + {{\Delta t} \over 2}({{\ddot u}^n} + {{\ddot u}^{n + 1}})$$ $${{\ddot u}^{n + 1}} = {4 \over {\Delta {t^2}}}\Delta u - {4 \over {\Delta t}}{{\dot u}^n} - {{\ddot u}^n}$$

algorithm

data structure

mesh deformation technique


In [2]:
#structure part is a ordinatry differential equation
#initial condition:
#the stiffness of the spring is k
#x
#disecritization scheme
dn=0.1
dt=0.1

In [ ]:
#solid element equation
#def springElementMatrix(E,rou)

#reading mesh
mesh的数据结构
点的坐标编号由点的连接性定义线并对其编号;由线的连接性定义面并编号
#输入材料属性
定义应力应变关系

#