Hamiltonian, Lagrangian things
Graph Lagrangian for C and Benzene to compute vibrational spectra (fully coded)
O
2
Part2-β2.1
Dara O Shayda
dara@compclassnotes.com
dara@compclassnotes.com
In[]:=
DateObject[]
Out[]=
Abstract
In part 2-β2.1 of the Hamiltonian, Lagrangian things we developed a new innovative operator glyph language to hugely simplify the calculus and algebra of Lagrangian mechanics specially if the dimensions are large and if detailed final solutions are the sincere goal at each deployment. These Lagrangian things are suitable for mentation and exploration by a freshman or by a trained post doctorate researcher! The technical note starts by a leap of imagination to envisage Lagrangian dynamical systems as graphs, Kinetic graph and potential graph, thus extracting the familiar graph matrices and apply them to construct multiple functional and operator spaces with very little programming at the side of the reader. The purpose of this Lagrangian thing is to solve each problem in every detail and to the very final conclusion without missing a detail. To test the new language we derived and solved preliminary Subscript[CO, 2] and Benzene partial vibrational spectra. Only then can we hope to deploy these things to discover something de novo. The new operator language is strongly based upon Term Rewriting and full application of generalized Eigensystems. Another major goal of the language is for universal solutions in an algorithmic fashion as opposed to yet-another-one-of-kludge-solution!
Live notebook:https://www.wolframcloud.com/obj/ccn2/Published/graph_lagrangian.nb In case of bugs in the code or the theory please make contact to fix ASAP. Keywords: Hamiltonian mechanics, Lagrangian mechanics, Poisson bracket, Lagrangian linear operator, CO2 carbon dioxide, Benzene, Raman Spectroscopy, Vibrational Spectra, Graph Laplacian, coupled oscillatory systems, normal modes, generalized eigenvalue problem.
100% Fat Free Mathematics
Software
Release: β2.1
Scripts: Symbolic computations performed in Wolfram Mathematica 14.3 .Notebook: https://www.wolframcloud.com/obj/ccn2/Published/graph_lagrangian.nb Support: Contact the author for additional code, bugs, correction in maths and algebraic/mathematical mistakes or invalid inferences.Nomenclature: Most functions and most identifiers start with lower case letters, all native vendor identifiers start with upper case. No Packaging: There is no software engineering applied to the code here nor elsewhere in the author’s technical notes to reduce the difficulties and version mismatches in future. The eager readers can simply copy paste the code or download and run the notebook. TODO: 1. Resolve and reprogram the Benzene Lagrangian to match the which is more universal and modern with no special case hacks. 2. ASAP To move most of the new code into the cloud to reduce the document size and programming 3. Full vibrational spectra of Benzene see (1948!!!!) Wilson, Decius, Cross, Molecular Vibrations [3]4. Match the Normal Modes and the Eigen Functions behaviours to the observed Raman vibrational spectra of the corresponding moleculesTOLEARN:1. Raman vibrational spectroscopy’s theoretical computations 2. Reference [3]’s theoretical treatment of the vibrational spectra3. Match the vibrational spectra to the emitted electro magnetic radiations and specially to the observed photon frequencies in Raman spectroscopy Structural Conjectures 1. Conjecture: Is there a Category theoretical formalism for the proposed Lagrangian graphs? My answer is yes!2. Conjecture: Are these graphs subgraphs of a more general super-graph ? My conjecture’s answer is yes!Structural Statements: These are statements or formal expressions in a language or Formal System or a programming language that verbalizes where a given algebraic expression e.g. Lagrangian actually resides as an abstract formalism? Known Issues:1. After 100 ball-springs the performance degrades.
CO
2
Initialization
In[]:=
Δmatrice[graph_]:=DiagonalMatrix@VertexDegree[graph]-AdjacencyMatrix[graph];Notation`AutoLoadNotationPalette=False;Needs["Notation`"];ClearNotations[];CloudGet["https://wolfr.am/1xEVtfjBx"];ℋinit[];
version: β1.0
Motivation
● I like to create a graph theory based algebra for modelling dynamical systems, for now based upon Lagrangian and Hamilton mechanics ● While there are matrix based formulations for such applications, matrices are quickly transformed into quadratics e.g. MX:
T
X
=(1/2)-
n
∑
i=1
n
∑
j=1
m
ij
x
i
x
j
k
ij
x
i
x
j
Which can be written in Matrix notation as follows for a generalized coordinate X The Lagrange equations then become and assuming the solutions are of oscillatory form, where a is a vectorthen the Lagrange equations establish the identity which requires this determinant to be set to 0, and the resulting system of equations is called Secular equations!?and so on ...● In all that holy glory one fundamental entity is missing namely the Graphs! I like to first define certain graphs and later their associated matrices naturally fit into the dynamical equations. Why 1? Often the dynamical system already has a meaningful and powerful shape e.g. molecular and polymer connectivity. As you will see below we start with those graphs then their matrices guide us to the Lagrangian(s) of the molecules. Why 2? Many natural and living systems are way too large to model to simulate, yet their geometry is easily discernible and programmable, in particular their connectivity networks are often well known. We like to isolate a much smaller subgraph of the larger ensemble and work that out, and quite frequently such opportunities present themselves.
=(1/2)(..-..X)
T
x
X
T
x
.+.X=0
¨
X
X=aSin(ωt)
(-+).a=0
2
ω
|-+|=0
2
ω
1. Energy Graphs : Experimental Ideation
To my eyes, many dynamical systems exhibit symbolic patterns often seen in the Graph measurement algorithms. The best example is the Path graph’s Laplacian matrix which is found in linear coupled oscillatory systems, while most of the authors flash these matrices like a magician , nonetheless the linear oscillators have a connectivity graph of a chain or a ring and hence the observed symbolic algebraic patterns.
1.1 Kinetic Graph
Squared Kinetic graph or Kinetic Graph in short, in some cases called Mass Tensor is a graph with vertices that are only looping back to themselves and connect to no other vertices.
Semantics of this graph indicates that these vertices know only about their own entities and have no knowledges of their surroundings.
This knowledge is encoded in a corresponding matrix of integers.
1.1.1 Remark: Per Lagrangian formalism the Kinetic energy need not exclusively be quadratic, it could have cross terms e.g.++ , however for sake of advancing the new concepts, without any limitations on the code nor the Graph theory part, we assume only the squared Kinetic polynomials.
Semantics of this graph indicates that these vertices know only about their own entities and have no knowledges of their surroundings.
This knowledge is encoded in a corresponding matrix of integers.
1.1.1 Remark: Per Lagrangian formalism the Kinetic energy need not exclusively be quadratic, it could have cross terms e.g.
2
x
1
2
x
2
x
1
x
3
In[]:=
Tgraph=Graph[{x1,x2,x3},{x1x1,x2x2,x3x3},VertexLabels->"Name",ImageSize->200]
Out[]=
Compute a subscripted array:
TODO: Non-square Kinetic graph
In this live code notebook we strictly compute with squared kinematic graphs.
Potential Graph
Potential Graph is a graph that connects a vertex to all its nearest neighbour vertices.
Semantics of this graph indicate that these vertices know about who else they are connected to.
This knowledge is encoded in a corresponding matrix of integers.
Semantics of this graph indicate that these vertices know about who else they are connected to.
This knowledge is encoded in a corresponding matrix of integers.
2. Molecular coupled oscillator systems
There are many examples of coupled oscillations in atomic and molecular physics most of which involve nearest-neighbor coupling. The following two examples are for molecular coupled oscillators. The triatomic molecule is a typical linearly-coupled molecular oscillator. The Benzene molecule is an elementary example of a ring structure coupled oscillator.
Graphics and corresponding matrices
NEW: ⋱
NEW: ⋰
Helpful operator ⋰ :
Mass tensor or matrix forms a Kinetic graph
Potential graph computes differences!
Updated Typeset operator: §
Kinetic energy tensor or matrix is again a Kinetic graph!
Potential energy tensor or matrix
Lagrangian tensor or matrix
Q: What multiplicand does the ℒmat Lagrangian matrix multiply with?
A. ℒmat requires a multiplicand array with composite elements that form the amplitudes (coordinates from generalized eigenvectors) for wave functions with arbitrary symbols as multiplicands of their own to construct systems of equations.
2.2 Generalized Eigensystem
Q: Check again if the lagrangian or ℒmat matrix and the eigenvectors and the eigenvalues hold their identity?
A: Why do you ask me? Compute for yourself and see:
A: Why do you ask me? Compute for yourself and see:
This η index identified by All computes all Normal Coordinates and the required functional spaces.
2.2 Term ReWrite the Generalized coordinates in terms of Normal Coordinates
2.3 Term ReWrite the Normal coordinates in terms of Generalized Coordinates
Normal Coordinates corresponding to normal frequencies expressed in qi or the xi the generalized coordinates
TODO: TEST ME MORE!!!
2.4 Normal coordinates ⟶ Generalized coordinates
2.7 Condition for full solutions
2.8 Graph ⟶ Matrix ⟶ Lagrangian ⟶ Generalized Eigenvectors ⟶ Normal Modes
2.8.1 Normal Modes
To be added shortly
2.8.2 Eigen Frequencies
To be added shortly
2.8.3 Term Rewriting: Generalized coordinates ⟷ Normal coordinates
Note that the tabulated Eigenvectors above are not normalized in order to make the table compact and for ease of explanation.
Codexplanation of the glyphs from Reference [1]:
2.9 Are these Eigenvectors velocity directions at t=0 ?!
Since now eigenvalue appears in the final velocity computations, we simply conclude this is a pure translation.
Simplify to obtain a sort of normalization for the directions and magnitudes:
Simplify to obtain a sort of normalization for the directions and magnitudes:
Again we got exactly the corresponding eigenvector!
2.10 Alternatives: The generalized characteristic polynomial
2.10 Alternatives: The generalized characteristic polynomial
Not redundant at all:
1. Focus on the Lagrangian and its solutions
2. Solve exactly for the required atomic measurements and properties
1. Focus on the Lagrangian and its solutions
2. Solve exactly for the required atomic measurements and properties
Order for FullSimplify[ ] matters
This might take a bit of time to simplify
This might take a bit of time to simplify
0-drift rules
Test 0-drift rules
Test for reasonable numerals
Test 0-drift rules AGAIN!
4 Benzene
Reference [1] Example 12.10.
The benzene ring comprises six carbon atoms bound in a plane hexagonal ring. A classical analog of the Benzene ring comprises 6 identical masses m on a frictionless ring bound by 6 identical springs with linear spring constant K as illustrated in the adjacent figure above.
4.1 Graph ⟶ Matrix
4.3 Graph ⟶ Matrix ⟶ Lagrangian
Lagrangian in matrix form:
4.4 Graph ⟶ Matrix ⟶ Lagrangian ⟶ Eigensystem
4.5 Graph ⟶ Matrix ⟶ Lagrangian ⟶ Eigensystem ⟶ 0 ⟶ Normal Modes
4.6 Normal Modes
In general, a normal mode of a dynamical system is a pattern of motion in which all parts of the system move sinusoidally with the same frequency and with a fixed phase relation. The free motion described by the normal modes takes place at fixed frequencies.
In the study of signals and systems: an eigenfunction of a system is a signal f(t) that, when input into the system, produces a response y(t) = λf(t), where λ is an eigenvalue.
4.7 Properties of the Normal Modes
4.8 Alternative route
4.9 Start fresh again!
4.10 0-drift rules
4.11 Test 0-drift rules
Test for reasonable numerals
Test for reasonable plots
4.12 Benzene molecular values and geometry
The ring is the first 6 coordinates, origin is {0,0,0}
Proof that the ring is the first 6 coordinates and the radius computed:
4.13 3D Interactive Animations
4.14 2D Interactive Animations
References
[1] [1] Douglas Cline, VARIATIONAL PRINCIPLES IN CLASSICAL MECHANICS, University of Rochester
[2] https://www.chem.purdue.edu/jmol/vibs/c6h6.html
[3] Wilson, Decius, Cross, Molecular Vibrations: The theory of infrared and Raman Vibrational Spectra
[2] https://www.chem.purdue.edu/jmol/vibs/c6h6.html
[3] Wilson, Decius, Cross, Molecular Vibrations: The theory of infrared and Raman Vibrational Spectra