diff --git a/工作OKRs/25.2-5 OKR.canvas b/工作OKRs/25.2-5 OKR.canvas index aff2e9f..347cc36 100644 --- a/工作OKRs/25.2-5 OKR.canvas +++ b/工作OKRs/25.2-5 OKR.canvas @@ -1,7 +1,7 @@ { "nodes":[ {"id":"b698e88ca5fb9c51","type":"text","text":"状态指标:\n推进OKR的时候也要关注这些事情,它们是完成OKR的保障。\n\n\n","x":-96,"y":80,"width":456,"height":347}, - {"id":"58be7961ae7275a7","type":"text","text":"# 计划\n这周要做的3~5件重要的事情,这些事情能有效推进实现OKR。\n\nP1 必须做。P2 应该做\n\nP1 多体原理学习 YouTube课程\nP1 根据HEROWind数据结构更新多体模块结构体\nP1 公共模块整理与探讨\nP1 气动模块联合调试,跑通\n","x":-620,"y":-307,"width":450,"height":347}, + {"id":"58be7961ae7275a7","type":"text","text":"# 计划\n这周要做的3~5件重要的事情,这些事情能有效推进实现OKR。\n\nP1 必须做。P2 应该做\n\nP1 多体原理学习 YouTube课程\nP1 根据HEROWind数据结构更新多体模块结构体\nP1 公共模块整理与探讨\nP1 气动模块联合调试,跑通\nP1 多体动力学节点细化\n","x":-620,"y":-307,"width":450,"height":347}, {"id":"2b068bfe5df15a72","type":"text","text":"# 目标:多体动力学模块完善\n### 每周盘点一下它们\n\n\n关键结果:建模原理、建模方法掌握 (5/10)\n\n关键结果:对标Bladed模块完成 (5/10)\n\n关键结果:风机多体动力学文献调研情况完成 (5/10)","x":-96,"y":-307,"width":456,"height":347}, {"id":"01ee5c157d0deeae","type":"text","text":"# 推进计划\n未来四周计划推进的重要事情\n\n文献调研启动\n\n建模重新推导\n\n\n","x":-620,"y":80,"width":456,"height":347} ], diff --git a/工作总结/周报/25.2.21汇总/一体化仿真软件组周报(第六十五期).pptx b/工作总结/周报/25.2.21汇总/一体化仿真软件组周报(第六十五期).pptx index 06a21ea..7ad6021 100644 Binary files a/工作总结/周报/25.2.21汇总/一体化仿真软件组周报(第六十五期).pptx and b/工作总结/周报/25.2.21汇总/一体化仿真软件组周报(第六十五期).pptx differ diff --git a/工作总结/团队周例会/25.2.25.md b/工作总结/团队周例会/25.2.25.md new file mode 100644 index 0000000..3595de9 --- /dev/null +++ b/工作总结/团队周例会/25.2.25.md @@ -0,0 +1,40 @@ + +推进设计流程编写,明确团队在设计流程中的位置,区分工作范围。20MW模型、设计好好规划一下。 + +跟曹老师再谈谈整机设计的 + +根据工作进展可以提前提报采购申请,团队的证据链清楚,申报时间,审批时间都很清楚,点到为止 + +培训计划,多次优化后断崖式领先其他团队,还是没被职能满意, + +2025年任务分得比较清楚,还都在做,这个星期集中审查一次,两个半天, + +软件组是标志性软件,比较重视软件,对科研来讲好开展,只要需求方参与,测试反馈,脑力要求比较高,基本功还是在专业上,规划的软件功能要清晰,界面友好,进度要有规划,尽可能早点,支撑科研任务,通过科研成果反馈校核迭代。软件工作要做规划,规划评审一下,开发者手册,框架、功能,早点评审,早点吸取建议 + +联培博士工作要重视,再找教授,看研究生部的要求,检查作业,学生向职业的转换过程中,确保能毕业 + +两重:要求全力以赴,全员参与,三个月了,可研报告有几稿了,是一个历练,知道可研工作怎么做,方案探讨工程,总结教训,能力不够,做的工作,科创部没法拍板,总结经验1 可研报告还没做完,就花大精力做ppt,不如把可研工作做扎实,有点投机取巧心理,不是踏踏实实做事情;2 可研报告大量注水,说的不痛不痒,通读不下去,主要内容看不到了,投机取巧心理;3 综合打捆,多个合一。失败损失的是信誉,以后做正确的也不会被相信。做什么事都要踏踏实实,投机取巧,害人害己。批下来后,怎么建设,怎么深化,招标方案,招标设计,招标设计,设计联络会,确定方案。 + +实验室月度例会:风电机组团队建设要加快,瞄准百人规模前进,今年计划83人;科创部指导下,可研要挖到根,追到底-变压器的;风机团队两重项目是重点,核心区平台也不要放松,材料经不经得起评审,怎么操作怎么执行,详细设计的问题,我们做还是招标后请别人做,招标完厂家要做详细设计,根据我们的方案是不是可操作,接下来分几个步骤,提前考虑,提前采购的 + +文档用AI + +边建设边科研边出成果,试验场地,利用总平台的左右,带动高质量参与,强调团队,不要担心来了没事干, + +碳捕集,每周一学习,学习实验室的制度,碳捕集内控责任书以及签了。利用体制机制优势开展科研工作,成果有益, + +对双聘人员,有些顾虑,回去后跟不上,实验室正在研究,新的做法再说,新员工培训形成常态机制 + +电缆团队,材料研究数字化开发探讨,汤,改变科研范式,赋予AI新的应用场景,大量使用博士生开展模型研究,大量重复性工作用AI做 + +2027年内预算可下达到团队,今年采购量特别大18个亿,如果有卡点尽快反馈,加快审批流程,被山西的院士从头骂到尾。采购提前,加强综合计划的分析,团队汇报要汇报相关内容,综合计划是什么,综合部留意一下 + +王书记,两会期间实验室安排要到位,303楼3楼理化实验室,单位较多,管理可能空缺 + +汤:1 签订责任书的单位根据责任书执行,要凝练科技问题,要善于报央企大腿,三不要,不要自大,不要当包工头,负责人们不要沽名钓誉,每周至少四天在实验室干活,半天一天到外面当专家 + +2 管理,二级院怎么管,还在探讨中,共建二级院,难度更大,尽快形成成熟管理模式,比较推崇南网管理模式,共建规则协议,三峡想拷贝,实验室不同意,核心是1配资1比1,南网下设自办机构,归南网管,借助实验室平台扩展一下科研渠道,智能电网2030给了13个项目。三峡认可实验室模式,资金支撑,人员支撑,落地示范支撑。管理没有放权到二级院,防止二级院把科研模式带回央企模式,知识产权布局要加快,结合试验平台,配置试验专责 + +3 实验室职能调整,成立采购处,知识产权分立,二级单位超过200人可以增设人事部,明确实验室总人数921人,职能部门加强服务,加强对两重的服务,团队不强是科创部不能拍板的主要原因。 + +4 启动内部审计,用权要自立,支持招标采购工作,团队权力很大,双聘人员不能成为潜伏人员,规范花钱,近五年要花150亿,今年总人数要达到2000人 \ No newline at end of file diff --git a/补课/多体动力学/04_orientation.ipynb b/补课/多体动力学/04_orientation.ipynb new file mode 100644 index 0000000..9b2143b --- /dev/null +++ b/补课/多体动力学/04_orientation.ipynb @@ -0,0 +1,348 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "import sympy as sm" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "sm.init_printing()" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "theta, alpha = sm.symbols(\"theta, alpha\")" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle \\left[\\begin{matrix}\\cos{\\left(\\theta \\right)} & \\sin{\\left(\\theta \\right)} & 0\\\\- \\sin{\\left(\\theta \\right)} & \\cos{\\left(\\theta \\right)} & 0\\\\0 & 0 & 1\\end{matrix}\\right]$" + ], + "text/plain": [ + "⎡cos(θ) sin(θ) 0⎤\n", + "⎢ ⎥\n", + "⎢-sin(θ) cos(θ) 0⎥\n", + "⎢ ⎥\n", + "⎣ 0 0 1⎦" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "B_C_A = sm.Matrix([[sm.cos(theta), sm.sin(theta), 0],\n", + " [-sm.sin(theta), sm.cos(theta), 0],\n", + " [0, 0, 1]])\n", + "B_C_A" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle \\left[\\begin{matrix}1 & 0 & 0\\\\0 & \\cos{\\left(\\alpha \\right)} & \\sin{\\left(\\alpha \\right)}\\\\0 & - \\sin{\\left(\\alpha \\right)} & \\cos{\\left(\\alpha \\right)}\\end{matrix}\\right]$" + ], + "text/plain": [ + "⎡1 0 0 ⎤\n", + "⎢ ⎥\n", + "⎢0 cos(α) sin(α)⎥\n", + "⎢ ⎥\n", + "⎣0 -sin(α) cos(α)⎦" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "C_C_B = sm.Matrix([[1, 0, 0],\n", + " [0, sm.cos(alpha), sm.sin(alpha)],\n", + " [0, -sm.sin(alpha), sm.cos(alpha)]])\n", + "C_C_B" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle \\left[\\begin{matrix}\\cos{\\left(\\theta \\right)} & \\sin{\\left(\\theta \\right)} & 0\\\\- \\sin{\\left(\\theta \\right)} \\cos{\\left(\\alpha \\right)} & \\cos{\\left(\\alpha \\right)} \\cos{\\left(\\theta \\right)} & \\sin{\\left(\\alpha \\right)}\\\\\\sin{\\left(\\alpha \\right)} \\sin{\\left(\\theta \\right)} & - \\sin{\\left(\\alpha \\right)} \\cos{\\left(\\theta \\right)} & \\cos{\\left(\\alpha \\right)}\\end{matrix}\\right]$" + ], + "text/plain": [ + "⎡ cos(θ) sin(θ) 0 ⎤\n", + "⎢ ⎥\n", + "⎢-sin(θ)⋅cos(α) cos(α)⋅cos(θ) sin(α)⎥\n", + "⎢ ⎥\n", + "⎣sin(α)⋅sin(θ) -sin(α)⋅cos(θ) cos(α)⎦" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "C_C_A = C_C_B * B_C_A\n", + "C_C_A" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "import sympy.physics.mechanics as me" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [], + "source": [ + "A = me.ReferenceFrame('A')\n", + "B = me.ReferenceFrame('B')\n", + "C = me.ReferenceFrame('C')" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [], + "source": [ + "B.orient_axis(A, theta, A.z)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAABcAAAAVCAYAAACt4nWrAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAABJ0AAASdAHeZh94AAAB4UlEQVR4nM3UTYhOcRTH8c+DCJGZhLBASiQ1E8lCCNmNDVITdmQxJfKyUMfZWGDJQhIbKRbyUhZkUlYsKDUoslASC5JoYmYs7v9hvDzTvFg4q/u/95zvOf9fv3tqfX19GkVmtmBjOV6KiK6GyX+JWiN4Zk7CI8xFDV1YGhFfBgsfNcC3U5iHPTiERTgxWDANJs/MrbiIIxGR5d0x7EdbRFwfNvxfxUCy/N/wMfWHzGzGQbRiPpoxAR/xDFdwcrhumYkDWIc5mFyaN2MFjuFeZk4c8uToxVPcxxu8x1gsxKaS24rdBmnJP9ySmbOwrNxkvOoH2oHFJeVORKwd0uSZ2YRzaCvARjF7MOBf4Djr5x4ZKMYNCZ6ZE1QT16MTO/EyInoy8xI29y/MzDZcLcf1EXE7M1eV2hq21N0yBaP71d6IiOcFPA1rfp8qIq7hdDmeycwZKllrOB8Rl+uyvMWH0gQOZ+Z09GEbpja4+V6sxgLVBp2OF+ig+DwivuFov6ImlecPlga3/kaOiM9oR08B96I9Ij79gJfE49iFJ/iKd7iA5XjdYHIq99QlHaXa/xjhViw6P1bJ9hAtKnmXRMSrYcMzs4ab2IAHWIm7qpt2Yt1ItmJHAXdjR0R0Yzs+q9y17zu2Cpf87xXnRgAAAABJRU5ErkJggg==", + "text/latex": [ + "$\\displaystyle \\mathbf{\\hat{a}_x}$" + ], + "text/plain": [ + "a_x" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "A.x" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle \\left[\\begin{matrix}\\cos{\\left(\\theta \\right)} & \\sin{\\left(\\theta \\right)} & 0\\\\- \\sin{\\left(\\theta \\right)} & \\cos{\\left(\\theta \\right)} & 0\\\\0 & 0 & 1\\end{matrix}\\right]$" + ], + "text/plain": [ + "⎡cos(θ) sin(θ) 0⎤\n", + "⎢ ⎥\n", + "⎢-sin(θ) cos(θ) 0⎥\n", + "⎢ ⎥\n", + "⎣ 0 0 1⎦" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "B.dcm(A)" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [], + "source": [ + "C.orient_axis(B, alpha, B.x)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle \\left[\\begin{matrix}1 & 0 & 0\\\\0 & \\cos{\\left(\\alpha \\right)} & \\sin{\\left(\\alpha \\right)}\\\\0 & - \\sin{\\left(\\alpha \\right)} & \\cos{\\left(\\alpha \\right)}\\end{matrix}\\right]$" + ], + "text/plain": [ + "⎡1 0 0 ⎤\n", + "⎢ ⎥\n", + "⎢0 cos(α) sin(α)⎥\n", + "⎢ ⎥\n", + "⎣0 -sin(α) cos(α)⎦" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "C.dcm(B)" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle \\left[\\begin{matrix}\\cos{\\left(\\theta \\right)} & \\sin{\\left(\\theta \\right)} & 0\\\\- \\sin{\\left(\\theta \\right)} \\cos{\\left(\\alpha \\right)} & \\cos{\\left(\\alpha \\right)} \\cos{\\left(\\theta \\right)} & \\sin{\\left(\\alpha \\right)}\\\\\\sin{\\left(\\alpha \\right)} \\sin{\\left(\\theta \\right)} & - \\sin{\\left(\\alpha \\right)} \\cos{\\left(\\theta \\right)} & \\cos{\\left(\\alpha \\right)}\\end{matrix}\\right]$" + ], + "text/plain": [ + "⎡ cos(θ) sin(θ) 0 ⎤\n", + "⎢ ⎥\n", + "⎢-sin(θ)⋅cos(α) cos(α)⋅cos(θ) sin(α)⎥\n", + "⎢ ⎥\n", + "⎣sin(α)⋅sin(θ) -sin(α)⋅cos(θ) cos(α)⎦" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "C.dcm(A)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "A = me.ReferenceFrame(\"A\")\n", + "C = me.ReferenceFrame(\"C\")" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [], + "source": [ + "psi, theta, phi = sm.symbols('psi, theta, varphi')" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "C.orient_body_fixed(A, (phi, theta, phi), 'ZXZ')" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle \\left[\\begin{matrix}- \\sin^{2}{\\left(\\varphi \\right)} \\cos{\\left(\\theta \\right)} + \\cos^{2}{\\left(\\varphi \\right)} & \\sin{\\left(\\varphi \\right)} \\cos{\\left(\\theta \\right)} \\cos{\\left(\\varphi \\right)} + \\sin{\\left(\\varphi \\right)} \\cos{\\left(\\varphi \\right)} & \\sin{\\left(\\theta \\right)} \\sin{\\left(\\varphi \\right)}\\\\- \\sin{\\left(\\varphi \\right)} \\cos{\\left(\\theta \\right)} \\cos{\\left(\\varphi \\right)} - \\sin{\\left(\\varphi \\right)} \\cos{\\left(\\varphi \\right)} & - \\sin^{2}{\\left(\\varphi \\right)} + \\cos{\\left(\\theta \\right)} \\cos^{2}{\\left(\\varphi \\right)} & \\sin{\\left(\\theta \\right)} \\cos{\\left(\\varphi \\right)}\\\\\\sin{\\left(\\theta \\right)} \\sin{\\left(\\varphi \\right)} & - \\sin{\\left(\\theta \\right)} \\cos{\\left(\\varphi \\right)} & \\cos{\\left(\\theta \\right)}\\end{matrix}\\right]$" + ], + "text/plain": [ + "⎡ 2 2 ↪\n", + "⎢ - sin (varphi)⋅cos(θ) + cos (varphi) sin(varphi)⋅cos(θ) ↪\n", + "⎢ ↪\n", + "⎢ 2 ↪\n", + "⎢-sin(varphi)⋅cos(θ)⋅cos(varphi) - sin(varphi)⋅cos(varphi) - sin (v ↪\n", + "⎢ ↪\n", + "⎣ sin(θ)⋅sin(varphi) ↪\n", + "\n", + "↪ ⎤\n", + "↪ ⋅cos(varphi) + sin(varphi)⋅cos(varphi) sin(θ)⋅sin(varphi)⎥\n", + "↪ ⎥\n", + "↪ 2 ⎥\n", + "↪ arphi) + cos(θ)⋅cos (varphi) sin(θ)⋅cos(varphi)⎥\n", + "↪ ⎥\n", + "↪ -sin(θ)⋅cos(varphi) cos(θ) ⎦" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "C.dcm(A)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Turtle", + "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.11.8" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/补课/多体动力学/04_orientations_of_ref_frames.md b/补课/多体动力学/04_orientations_of_ref_frames.md new file mode 100644 index 0000000..e0eb66f --- /dev/null +++ b/补课/多体动力学/04_orientations_of_ref_frames.md @@ -0,0 +1,39 @@ +Vectors +- magnitude 大小 +- direction 方向 +- sense 正负 + + +Unit vectors 模=1 + +Reference Frames +Euclidean 3D Space:all points in some 3D space + +Observer of position + motion + +motion is a function of the obsersiver's orientation + +Frame of reference "reference frame" is a set of all Euclidean points fixed to the observer. An abstraction to understand motion + +We will fix 3 right-handed mutually perpendiculur unit vectors to a reference frame and use them to determine orientation among reference frames + +互相垂直,右手坐标系,满足叉乘规律 + +Simple 2D orientation + +B关于A的的变换矩阵 ---- 方向余弦矩阵 direct cosine matrix or 旋转矩阵 rotation matrix of B with respect to A + +或者称之为 +Right handed rotation of B with respect to A about the shared Z unit vector through the angle theta + + +Successive Rotations + +C^[C]^A = C^[C]^B * B^[C]^A + + +Euler Angles +3 successive simple rotations about shared axes that allows for arbitrary orientation of two reference frames with two additional or auxiliary reference frames + + + diff --git a/补课/多体动力学/05_vectors.ipynb b/补课/多体动力学/05_vectors.ipynb new file mode 100644 index 0000000..e69de29 diff --git a/补课/多体动力学/05_vectors.md b/补课/多体动力学/05_vectors.md new file mode 100644 index 0000000..e69de29 diff --git a/补课/多体动力学/sympy_start.ipynb b/补课/多体动力学/sympy_start.ipynb index d343dbe..6c2b697 100644 --- a/补课/多体动力学/sympy_start.ipynb +++ b/补课/多体动力学/sympy_start.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 16, "metadata": {}, "outputs": [], "source": [ @@ -12,7 +12,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 17, "metadata": {}, "outputs": [ { @@ -21,7 +21,7 @@ "(a, b, theta, gamma, x, t, y, z)" ] }, - "execution_count": 2, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -32,7 +32,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 18, "metadata": {}, "outputs": [ { @@ -41,7 +41,7 @@ "f" ] }, - "execution_count": 5, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -53,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -65,7 +65,7 @@ "sin(f(t)) - tan(a/b)/log(gamma)" ] }, - "execution_count": 4, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -77,7 +77,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 20, "metadata": {}, "outputs": [ { @@ -89,7 +89,7 @@ "2*a*(tan(a/b)**2 + 1)*tan(a/b)/(b**3*log(gamma)) + (tan(a/b)**2 + 1)/(b**2*log(gamma))" ] }, - "execution_count": 6, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -99,11 +99,197 @@ "part2 = sm.diff(part1, b)\n", "part2" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Matrices & Linear Algebra" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle \\left[\\begin{matrix}1 & 2\\\\3 & 4\\end{matrix}\\right]$" + ], + "text/plain": [ + "Matrix([\n", + "[1, 2],\n", + "[3, 4]])" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mat1 = sm.Matrix([[1, 2],[3, 4]])\n", + "mat1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Linear systems" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "lin_expr_1 = a * x +b**2*y + sm.sin(gama) *z" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle x \\sin{\\left(f{\\left(t \\right)} \\right)} + z \\log{\\left(f{\\left(t \\right)} \\right)}$" + ], + "text/plain": [ + "x*sin(f(t)) + z*log(f(t))" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "lin_expr_2 = sm.sin(f(t)) *x + sm.log(f(t)) * z\n", + "lin_expr_2" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle a x + b^{2} y + z \\sin{\\left(\\gamma \\right)} = 0$" + ], + "text/plain": [ + "Eq(a*x + b**2*y + z*sin(gamma), 0)" + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sm.Eq(lin_expr_1, 0)" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle x \\sin{\\left(f{\\left(t \\right)} \\right)} + z \\log{\\left(f{\\left(t \\right)} \\right)} = 0$" + ], + "text/plain": [ + "Eq(x*sin(f(t)) + z*log(f(t)), 0)" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sm.Eq(lin_expr_2, 0)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[{x: -b**2*y*log(f(t))/(a*log(f(t)) - sin(gamma)*sin(f(t))),\n", + " z: b**2*y*sin(f(t))/(a*log(f(t)) - sin(gamma)*sin(f(t)))}]" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "res = sm.solve([lin_expr_1, lin_expr_2], x, z, dict = True)\n", + "res" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{x: -b**2*y*log(f(t))/(a*log(f(t)) - sin(gamma)*sin(f(t))),\n", + " z: b**2*y*sin(f(t))/(a*log(f(t)) - sin(gamma)*sin(f(t)))}" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "res_dict = res[0]\n", + "res_dict" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/latex": [ + "$\\displaystyle x = - \\frac{b^{2} y \\log{\\left(f{\\left(t \\right)} \\right)}}{a \\log{\\left(f{\\left(t \\right)} \\right)} - \\sin{\\left(\\gamma \\right)} \\sin{\\left(f{\\left(t \\right)} \\right)}}$" + ], + "text/plain": [ + "Eq(x, -b**2*y*log(f(t))/(a*log(f(t)) - sin(gamma)*sin(f(t))))" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sm.Eq(x, res_dict[x])" + ] } ], "metadata": { "kernelspec": { - "display_name": "blade", + "display_name": "Turtle", "language": "python", "name": "python3" }, @@ -117,7 +303,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.16" + "version": "3.11.8" } }, "nbformat": 4,