Finite Element Method in FEniCS: 1D Transient Heat Diffusion in detail
10.3 هزار بار بازدید -
2 سال پیش
-
FEM problems can be easily
FEM problems can be easily solved in Python by providing the weak form of the PDE as well as the Boundary Condition and Initial Condition to Fenics. In this video, we will go over all steps in detail, incl. Function Spaces and deriving weak forms. Here are the notes: github.com/Ceyron/machine-learning-and-simulation/…
This video is an in-detail extension of a previous video, in which we just did a quick and simple demo. Feel free to check this one out first: • Fenics Tutorial: 1D Heat Conduction
You can find the source-code as written in the video (with slightly more explaining comments): github.com/Ceyron/machine-learning-and-simulation/…
Fenics is a software that allows to easily solve Partial Differential Equations in Python. PDEs arise in many disciplines, e.g., in Continuum Mechanics for fluid and solid simulations.
-------
📝 : Check out the GitHub Repository of the channel, where I upload all the handwritten notes and source-code files (contributions are very welcome): github.com/Ceyron/machine-learning-and-simulation
📢 : Follow me on LinkedIn or Twitter for updates on the channel and other cool Machine Learning & Simulation stuff: www.linkedin.com/in/felix-koehler and twitter.com/felix_m_koehler
💸 : If you want to support my work on the channel, you can become a Patreon here: www.patreon.com/MLsim
-------
Timestamps:
00:00 Intro
00:48 Initial-Boundary Value Problem
03:48 Initial Condition & Expected Behavior
05:12 Discretization into Finite Elements
06:14 Ansatz/Shape Function
08:16 Discrete PDE solution
11:41 Function Spaces (Lagrange Polynomials)
12:38 Code: Overview
12:51 Code: Mesh Discretization
13:34 Code: Function Space
14:59 Code: Translate IC & BC
19:40 Code Recap
20:02 Why we need the weak form?
21:06 (1) Multiply with test function
21:41 (2) Integrate over domain
22:10 (3) Integration by parts
23:13 What is the test function?
25:21 Vanishing Boundary Evaluation
25:47 Discussing the weak form
26:16 Weak form in residuum form
26:50 Discretization in time
30:27 Fenics wants multi-dim weak form
30:51 Weak form in high dim case
34:08 Multi dimensional integration by parts (divergence theorem)
40:30 Comparison with 1D case
41:25 Summary of high-dim weak form
41:59 Temporal Discretization in high-dim case
42:35 Final Weak Form for Fenics
43:36 Code: Defining Test & Trial Functions
44:38 Code: Weak Form Residuum
47:05 Code: Separate into lhs & rhs
47:49 Code: Time Loop & Simulation
50:20 Code: Adjusting Plot Visuals
51:08 Code: Running & Discussion
51:57 Ou
2 سال پیش
در تاریخ 1401/02/22 منتشر شده
است.
10,335
بـار بازدید شده