vault backup: 2025-03-12 14:13:42
This commit is contained in:
parent
51f9b533b5
commit
b3878b1532
8
多体+耦合求解器/yaml 解析.md
Normal file
8
多体+耦合求解器/yaml 解析.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
# 问题
|
||||||
|
|
||||||
|
## 水动 joints 个数未知、airfoils个数未知 vec
|
||||||
|
|
||||||
|
## 材料个数位置,材料结构是否相同?vec
|
||||||
|
|
||||||
|
## reference_axis 直接引用之前的坐标系 没问题
|
@ -256,7 +256,7 @@
|
|||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Turtle",
|
"display_name": "TagUIFocus5",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python3"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
@ -270,7 +270,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.11.8"
|
"version": "3.12.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
File diff suppressed because it is too large
Load Diff
76
补课/多体动力学/13_mass_distribution.ipynb
Normal file
76
补课/多体动力学/13_mass_distribution.ipynb
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 1,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import sympy as sm\n",
|
||||||
|
"import sympy.physics.mechanics as me\n",
|
||||||
|
"me.init_vprinting()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 2,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"m1, m2, m3, m4 = sm.symbols('m1, m2, m3, m4')\n",
|
||||||
|
"N = me.ReferenceFrame('N')"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 3,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"r1 = 3*N.x + 4*N.y\n",
|
||||||
|
"r2 = 3*N.y + 4*N.z\n",
|
||||||
|
"r3 = 4*N.x + 4*N.z\n",
|
||||||
|
"r4 = 3*N.y + 4*N.z"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 4,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"first_moment = m1*r1 + m2*r2 + m3*r3 + m4*r4"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 5,
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"zeroth_moment = m1 + m2 + m3 + m4"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "MinerU",
|
||||||
|
"language": "python",
|
||||||
|
"name": "python3"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"codemirror_mode": {
|
||||||
|
"name": "ipython",
|
||||||
|
"version": 3
|
||||||
|
},
|
||||||
|
"file_extension": ".py",
|
||||||
|
"mimetype": "text/x-python",
|
||||||
|
"name": "python",
|
||||||
|
"nbconvert_exporter": "python",
|
||||||
|
"pygments_lexer": "ipython3",
|
||||||
|
"version": "3.10.16"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 2
|
||||||
|
}
|
25
补课/多体动力学/13_mass_distribution.py
Normal file
25
补课/多体动力学/13_mass_distribution.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import sympy as sm
|
||||||
|
import sympy.physics.mechanics as me
|
||||||
|
me.init_vprinting()
|
||||||
|
|
||||||
|
m1, m2, m3, m4 = sm.symbols('m1, m2, m3, m4')
|
||||||
|
N = me.ReferenceFrame('N')
|
||||||
|
|
||||||
|
r1 = 3*N.x + 4*N.y
|
||||||
|
r2 = 3*N.y + 4*N.z
|
||||||
|
r3 = 4*N.x + 4*N.z
|
||||||
|
r4 = 3*N.y + 4*N.z
|
||||||
|
|
||||||
|
first_moment = m1*r1 + m2*r2 + m3*r3 + m4*r4
|
||||||
|
|
||||||
|
zeroth_moment = m1 + m2 + m3 + m4
|
||||||
|
|
||||||
|
mass_center = first_moment / zeroth_moment
|
||||||
|
print(mass_center)
|
||||||
|
|
||||||
|
Ix = (m1 * me.cross(r1, me.cross(N.x, r1))
|
||||||
|
+ m2 * me.cross(r2, me.cross(N.x, r2))
|
||||||
|
+ m3 * me.cross(r3, me.cross(N.x, r3))
|
||||||
|
+ m4 * me.cross(r4, me.cross(N.x, r4)))
|
||||||
|
|
||||||
|
print(Ix)
|
Loading…
x
Reference in New Issue
Block a user