Difference between revisions of "Hamza Khamis Kombo"
Hamza.khamis (talk | contribs) |
Hamza.khamis (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | Profile | ||
+ | Name: Hamza Khamis Kombo | ||
+ | NPM: 2306259553 | ||
+ | Mechanical Engineering- S2 | ||
− | |||
− | |||
The First class Notes 1 (29/10/2024) | The First class Notes 1 (29/10/2024) | ||
Line 20: | Line 22: | ||
Conclusion | Conclusion | ||
− | These five variables, Initiator, Intention, Initial Thinking, Idealization, and Instruction are interrelated and form a structured conscious thinking process. DAI5 Conscious Thinking aims to create a thought pattern that is in harmony between the heart and brain, resulting in effective, meaningful and responsible actions. This approach is highly relevant for increasing self-awareness and decision quality, especially in personal and professional development | + | These five variables, Initiator, Intention, Initial Thinking, Idealization, and Instruction are interrelated and form a structured conscious thinking process. DAI5 Conscious Thinking aims to create a thought pattern that is in harmony between the heart and brain, resulting in effective, meaningful and responsible actions. This approach is highly relevant for increasing self-awareness and decision quality, especially in personal and professional development. |
+ | |||
+ | Let's go through the derivation of the finite element equation for a 1D Partial Differential Equation (PDE) using the Weighted Residual (WR) method, step-by- | ||
+ | step. We’ll use the following PDE as our example: | ||
+ | |||
+ | |||
+ | 𝑑 | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | ( | ||
+ | 𝑘 | ||
+ | 𝑑 | ||
+ | 𝑢 | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | ) | ||
+ | = | ||
+ | 𝑓 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | in | ||
+ | ( | ||
+ | 0 | ||
+ | , | ||
+ | 𝐿 | ||
+ | ) | ||
+ | − | ||
+ | dx | ||
+ | d | ||
+ | | ||
+ | (k | ||
+ | dx | ||
+ | du | ||
+ | | ||
+ | )=f(x)in (0,L) | ||
+ | where: | ||
+ | |||
+ | 𝑢 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | u(x) is the unknown function (solution), | ||
+ | 𝑘 | ||
+ | k is the coefficient (e.g., thermal conductivity in heat conduction problems), | ||
+ | 𝑓 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | f(x) is the source term. | ||
+ | The problem can also have boundary conditions such as: | ||
+ | |||
+ | Dirichlet Boundary Condition (fixed value of | ||
+ | 𝑢 | ||
+ | u at the boundary). | ||
+ | Neumann Boundary Condition (specified derivative of | ||
+ | 𝑢 | ||
+ | u at the boundary). | ||
+ | |||
+ | Step 1: Formulate the Weak Form using Weighted Residual Method | ||
+ | Multiply both sides by a test function | ||
+ | 𝑤 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | w(x) and integrate over the domain: | ||
+ | |||
+ | ∫ | ||
+ | 0 | ||
+ | 𝐿 | ||
+ | 𝑤 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | ( | ||
+ | − | ||
+ | 𝑑 | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | ( | ||
+ | 𝑘 | ||
+ | 𝑑 | ||
+ | 𝑢 | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | ) | ||
+ | − | ||
+ | 𝑓 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | ) | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | = | ||
+ | 0 | ||
+ | ∫ | ||
+ | 0 | ||
+ | L | ||
+ | | ||
+ | w(x)(− | ||
+ | dx | ||
+ | d | ||
+ | | ||
+ | (k | ||
+ | dx | ||
+ | du | ||
+ | | ||
+ | )−f(x))dx=0 | ||
+ | Apply integration by parts to move the derivative off | ||
+ | 𝑢 | ||
+ | u: | ||
+ | |||
+ | This gives: | ||
+ | |||
+ | ∫ | ||
+ | 0 | ||
+ | 𝐿 | ||
+ | 𝑘 | ||
+ | 𝑑 | ||
+ | 𝑢 | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | 𝑑 | ||
+ | 𝑤 | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | |||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | − | ||
+ | ∫ | ||
+ | 0 | ||
+ | 𝐿 | ||
+ | 𝑤 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | 𝑓 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | |||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | = | ||
+ | 0 | ||
+ | ∫ | ||
+ | 0 | ||
+ | L | ||
+ | | ||
+ | k | ||
+ | dx | ||
+ | du | ||
+ | | ||
+ | |||
+ | dx | ||
+ | dw | ||
+ | | ||
+ | dx−∫ | ||
+ | 0 | ||
+ | L | ||
+ | | ||
+ | w(x)f(x)dx=0 | ||
+ | Here, we assume | ||
+ | 𝑤 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | = | ||
+ | 0 | ||
+ | w(x)=0 at the boundary if Dirichlet boundary conditions are imposed. | ||
+ | |||
+ | Step 2: Discretize the Domain | ||
+ | Divide the domain into elements (e.g., | ||
+ | 𝑒 | ||
+ | 1 | ||
+ | , | ||
+ | 𝑒 | ||
+ | 2 | ||
+ | , | ||
+ | … | ||
+ | , | ||
+ | 𝑒 | ||
+ | 𝑛 | ||
+ | e | ||
+ | 1 | ||
+ | | ||
+ | ,e | ||
+ | 2 | ||
+ | | ||
+ | ,…,e | ||
+ | n | ||
+ | | ||
+ | ) and approximate | ||
+ | 𝑢 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | u(x) by a linear combination of shape functions | ||
+ | 𝑁 | ||
+ | 𝑖 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | N | ||
+ | i | ||
+ | | ||
+ | (x): | ||
+ | |||
+ | 𝑢 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | ≈ | ||
+ | ∑ | ||
+ | 𝑗 | ||
+ | = | ||
+ | 1 | ||
+ | 𝑁 | ||
+ | 𝑁 | ||
+ | 𝑗 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | 𝑢 | ||
+ | 𝑗 | ||
+ | u(x)≈ | ||
+ | j=1 | ||
+ | ∑ | ||
+ | N | ||
+ | | ||
+ | N | ||
+ | j | ||
+ | | ||
+ | (x)u | ||
+ | j | ||
+ | | ||
+ | |||
+ | where | ||
+ | 𝑁 | ||
+ | 𝑗 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | N | ||
+ | j | ||
+ | | ||
+ | (x) are shape functions, and | ||
+ | 𝑢 | ||
+ | 𝑗 | ||
+ | u | ||
+ | j | ||
+ | | ||
+ | are the nodal values of | ||
+ | 𝑢 | ||
+ | u. | ||
+ | |||
+ | Step 3: Substitute and Assemble the Element Equations | ||
+ | For each element, substitute | ||
+ | 𝑢 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | ≈ | ||
+ | ∑ | ||
+ | 𝑁 | ||
+ | 𝑗 | ||
+ | 𝑢 | ||
+ | 𝑗 | ||
+ | u(x)≈∑N | ||
+ | j | ||
+ | | ||
+ | u | ||
+ | j | ||
+ | | ||
+ | into the weak form: | ||
+ | |||
+ | ∫ | ||
+ | 𝑒 | ||
+ | 𝑖 | ||
+ | 𝑘 | ||
+ | 𝑑 | ||
+ | 𝑁 | ||
+ | 𝑖 | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | 𝑑 | ||
+ | 𝑁 | ||
+ | 𝑗 | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | |||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | ⋅ | ||
+ | 𝑢 | ||
+ | 𝑗 | ||
+ | − | ||
+ | ∫ | ||
+ | 𝑒 | ||
+ | 𝑖 | ||
+ | 𝑁 | ||
+ | 𝑖 | ||
+ | 𝑓 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | |||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | = | ||
+ | 0 | ||
+ | ∫ | ||
+ | e | ||
+ | i | ||
+ | | ||
+ | |||
+ | | ||
+ | k | ||
+ | dx | ||
+ | dN | ||
+ | i | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | dx | ||
+ | dN | ||
+ | j | ||
+ | | ||
+ | |||
+ | | ||
+ | dx⋅u | ||
+ | j | ||
+ | | ||
+ | −∫ | ||
+ | e | ||
+ | i | ||
+ | | ||
+ | |||
+ | | ||
+ | N | ||
+ | i | ||
+ | | ||
+ | f(x)dx=0 | ||
+ | Formulate the local stiffness matrix | ||
+ | 𝐾 | ||
+ | 𝑖 | ||
+ | 𝑗 | ||
+ | K | ||
+ | ij | ||
+ | | ||
+ | and force vector | ||
+ | 𝐹 | ||
+ | 𝑖 | ||
+ | F | ||
+ | i | ||
+ | | ||
+ | : | ||
+ | |||
+ | Stiffness matrix: | ||
+ | 𝐾 | ||
+ | 𝑖 | ||
+ | 𝑗 | ||
+ | = | ||
+ | ∫ | ||
+ | 𝑒 | ||
+ | 𝑖 | ||
+ | 𝑘 | ||
+ | 𝑑 | ||
+ | 𝑁 | ||
+ | 𝑖 | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | 𝑑 | ||
+ | 𝑁 | ||
+ | 𝑗 | ||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | |||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | K | ||
+ | ij | ||
+ | | ||
+ | =∫ | ||
+ | e | ||
+ | i | ||
+ | | ||
+ | |||
+ | | ||
+ | k | ||
+ | dx | ||
+ | dN | ||
+ | i | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | dx | ||
+ | dN | ||
+ | j | ||
+ | | ||
+ | |||
+ | | ||
+ | dx | ||
+ | Force vector: | ||
+ | 𝐹 | ||
+ | 𝑖 | ||
+ | = | ||
+ | ∫ | ||
+ | 𝑒 | ||
+ | 𝑖 | ||
+ | 𝑁 | ||
+ | 𝑖 | ||
+ | 𝑓 | ||
+ | ( | ||
+ | 𝑥 | ||
+ | ) | ||
+ | |||
+ | 𝑑 | ||
+ | 𝑥 | ||
+ | F | ||
+ | i | ||
+ | | ||
+ | =∫ | ||
+ | e | ||
+ | i | ||
+ | | ||
+ | |||
+ | | ||
+ | N | ||
+ | i | ||
+ | | ||
+ | f(x)dx | ||
+ | Assemble the global system by adding up all elements' contributions: | ||
+ | |||
+ | 𝐾 | ||
+ | 𝑈 | ||
+ | = | ||
+ | 𝐹 | ||
+ | KU=F | ||
+ | where | ||
+ | 𝐾 | ||
+ | K is the global stiffness matrix, | ||
+ | 𝑈 | ||
+ | U is the vector of unknowns, and | ||
+ | 𝐹 | ||
+ | F is the global force vector. | ||
+ | |||
+ | Step 4: Algorithm | ||
+ | Define the problem parameters, domain, and mesh. | ||
+ | Initialize the global stiffness matrix and force vector. | ||
+ | Loop over each element: | ||
+ | Calculate local stiffness matrix and force vector. | ||
+ | Add local contributions to the global matrix/vector. | ||
+ | Apply boundary conditions. | ||
+ | Solve the linear system | ||
+ | 𝐾 | ||
+ | 𝑈 | ||
+ | = | ||
+ | 𝐹 | ||
+ | KU=F for | ||
+ | 𝑈 | ||
+ | U. | ||
+ | Flowchart | ||
+ | sql | ||
+ | Copy code | ||
+ | Start | ||
+ | | | ||
+ | Define parameters | ||
+ | | | ||
+ | Initialize global K and F | ||
+ | | | ||
+ | Loop over elements | ||
+ | / \ | ||
+ | Calculate Calculate | ||
+ | local stiffness local force | ||
+ | matrix (K) vector (F) | ||
+ | \ / | ||
+ | Assemble global K, F | ||
+ | | | ||
+ | Apply boundary conditions | ||
+ | | | ||
+ | Solve KU = F | ||
+ | | | ||
+ | End | ||
+ | Python Code | ||
+ | Here’s a basic Python implementation for a simple linear finite element in 1D: | ||
+ | |||
+ | python | ||
+ | Copy code | ||
+ | import numpy as np | ||
+ | |||
+ | # Problem parameters | ||
+ | L = 1.0 # Length of the domain | ||
+ | k = 1.0 # Coefficient | ||
+ | num_elements = 10 | ||
+ | num_nodes = num_elements + 1 | ||
+ | f = 1.0 # Source term | ||
+ | |||
+ | # Generate mesh | ||
+ | x = np.linspace(0, L, num_nodes) | ||
+ | dx = x[1] - x[0] | ||
+ | |||
+ | # Initialize global stiffness matrix and force vector | ||
+ | K = np.zeros((num_nodes, num_nodes)) | ||
+ | F = np.zeros(num_nodes) | ||
+ | |||
+ | # Element stiffness and force contributions | ||
+ | for i in range(num_elements): | ||
+ | # Local stiffness matrix for element i | ||
+ | K_local = (k / dx) * np.array([[1, -1], [-1, 1]]) | ||
+ | F_local = (f * dx / 2) * np.array([1, 1]) | ||
+ | |||
+ | # Assemble global K and F | ||
+ | K[i:i+2, i:i+2] += K_local | ||
+ | F[i:i+2] += F_local | ||
+ | |||
+ | # Apply boundary conditions (e.g., u(0) = 0) | ||
+ | K[0, :] = 0 | ||
+ | K[0, 0] = 1 | ||
+ | F[0] = 0 | ||
+ | |||
+ | # Solve for nodal values | ||
+ | U = np.linalg.solve(K, F) | ||
+ | |||
+ | print("Nodal displacements (U):", U) | ||
+ | This code calculates the nodal displacements for a simple 1D problem using the finite element method and assumes Dirichlet boundary conditions at | ||
+ | 𝑥 | ||
+ | = | ||
+ | 0 | ||
+ | x=0. Modify it as needed for different boundary conditions or problem specifics. |
Revision as of 14:02, 4 November 2024
Profile Name: Hamza Khamis Kombo NPM: 2306259553 Mechanical Engineering- S2
The First class Notes 1 (29/10/2024)
Conscious Thinking Heartware-Brainware (variable), Initiator, Intention, Initial Thinking, Idealization, Instruction
DAI5 is a problem solving method developed by Dr. Ahmad Indra from the University of Indonesia. This method is known as "Conscious Thinking" and focuses on the thinking process starting from intention to selecting tools as the final step. DAI5 is a concept that integrates heartware and brainware aspects to form conscious and focused thought patterns and attitudes. This approach uses five core variables which are expected to create balance between the mind, heart and human actions. The following is an explanation of these five variables. Initiator: refers to the initial trigger or impulse that starts the thought or action process. This initiator is the main source of energy or motivation that triggers a person to start a certain idea, project, or action. In the context of DAI5, this initiator may arise from within oneself, such as needs, values, or desires, or from outside, such as opportunities or challenges faced.
Intention: is the clarity of the purpose of the action or thought that you want to realize. This intention is very important because it gives direction and meaning to the process of thinking or acting. With strong and positive intentions, individuals can undergo the next process with stable focus and motivation. Intention is a bridge between internal desires and the goals to be achieved.
Initial Thinking: The Initial Thinking is the stage where initial ideas and possibilities are formulated. Here, individuals begin to map out thoughts, consider options, and explore different perspectives. This initial thought becomes the foundation for planning the next steps. At this stage, a person also learns to recognize obstacles, opportunities, and resources needed to achieve goals.
Idealization: is the process of forming an ideal image or vision of the final result you want to achieve. In this stage, individuals imagine the desired results and set standards or ideal values that they want to realize. Idealization helps someone to focus on the best potential of the expected results and maintain enthusiasm and perseverance in achieving them.
Instruction set: This is the final stage, where specific direction or guidance begins to be implemented to achieve the goal. These can be concrete steps, strategies, or established methods to achieve an idealized vision. Instruction functions as a blueprint that guides actions until the final result is achieved.
Conclusion
These five variables, Initiator, Intention, Initial Thinking, Idealization, and Instruction are interrelated and form a structured conscious thinking process. DAI5 Conscious Thinking aims to create a thought pattern that is in harmony between the heart and brain, resulting in effective, meaningful and responsible actions. This approach is highly relevant for increasing self-awareness and decision quality, especially in personal and professional development.
Let's go through the derivation of the finite element equation for a 1D Partial Differential Equation (PDE) using the Weighted Residual (WR) method, step-by- step. We’ll use the following PDE as our example:
𝑑 𝑑 𝑥 ( 𝑘 𝑑 𝑢 𝑑 𝑥 ) = 𝑓 ( 𝑥 ) in ( 0 , 𝐿 ) − dx d
(k
dx du
)=f(x)in (0,L)
where:
𝑢 ( 𝑥 ) u(x) is the unknown function (solution), 𝑘 k is the coefficient (e.g., thermal conductivity in heat conduction problems), 𝑓 ( 𝑥 ) f(x) is the source term. The problem can also have boundary conditions such as:
Dirichlet Boundary Condition (fixed value of 𝑢 u at the boundary). Neumann Boundary Condition (specified derivative of 𝑢 u at the boundary).
Step 1: Formulate the Weak Form using Weighted Residual Method Multiply both sides by a test function 𝑤 ( 𝑥 ) w(x) and integrate over the domain:
∫ 0 𝐿 𝑤 ( 𝑥 ) ( − 𝑑 𝑑 𝑥 ( 𝑘 𝑑 𝑢 𝑑 𝑥 ) − 𝑓 ( 𝑥 ) ) 𝑑 𝑥 = 0 ∫ 0 L
w(x)(−
dx d
(k
dx du
)−f(x))dx=0
Apply integration by parts to move the derivative off 𝑢 u:
This gives:
∫ 0 𝐿 𝑘 𝑑 𝑢 𝑑 𝑥 𝑑 𝑤 𝑑 𝑥 𝑑 𝑥 − ∫ 0 𝐿 𝑤 ( 𝑥 ) 𝑓 ( 𝑥 ) 𝑑 𝑥 = 0 ∫ 0 L
k
dx du
dx dw
dx−∫
0 L
w(x)f(x)dx=0
Here, we assume 𝑤 ( 𝑥 ) = 0 w(x)=0 at the boundary if Dirichlet boundary conditions are imposed.
Step 2: Discretize the Domain Divide the domain into elements (e.g., 𝑒 1 , 𝑒 2 , … , 𝑒 𝑛 e 1
,e
2
,…,e
n
) and approximate
𝑢 ( 𝑥 ) u(x) by a linear combination of shape functions 𝑁 𝑖 ( 𝑥 ) N i
(x):
𝑢 ( 𝑥 ) ≈ ∑ 𝑗 = 1 𝑁 𝑁 𝑗 ( 𝑥 ) 𝑢 𝑗 u(x)≈ j=1 ∑ N
N
j
(x)u
j
where 𝑁 𝑗 ( 𝑥 ) N j
(x) are shape functions, and
𝑢 𝑗 u j
are the nodal values of
𝑢 u.
Step 3: Substitute and Assemble the Element Equations For each element, substitute 𝑢 ( 𝑥 ) ≈ ∑ 𝑁 𝑗 𝑢 𝑗 u(x)≈∑N j
u
j
into the weak form:
∫ 𝑒 𝑖 𝑘 𝑑 𝑁 𝑖 𝑑 𝑥 𝑑 𝑁 𝑗 𝑑 𝑥 𝑑 𝑥 ⋅ 𝑢 𝑗 − ∫ 𝑒 𝑖 𝑁 𝑖 𝑓 ( 𝑥 ) 𝑑 𝑥 = 0 ∫ e i
k
dx dN i
dx dN j
dx⋅u
j
−∫
e i
N
i
f(x)dx=0
Formulate the local stiffness matrix 𝐾 𝑖 𝑗 K ij
and force vector
𝐹 𝑖 F i
:
Stiffness matrix: 𝐾 𝑖 𝑗 = ∫ 𝑒 𝑖 𝑘 𝑑 𝑁 𝑖 𝑑 𝑥 𝑑 𝑁 𝑗 𝑑 𝑥 𝑑 𝑥 K ij
=∫
e i
k
dx dN i
dx dN j
dx
Force vector: 𝐹 𝑖 = ∫ 𝑒 𝑖 𝑁 𝑖 𝑓 ( 𝑥 ) 𝑑 𝑥 F i
=∫
e i
N
i
f(x)dx
Assemble the global system by adding up all elements' contributions:
𝐾 𝑈 = 𝐹 KU=F where 𝐾 K is the global stiffness matrix, 𝑈 U is the vector of unknowns, and 𝐹 F is the global force vector.
Step 4: Algorithm Define the problem parameters, domain, and mesh. Initialize the global stiffness matrix and force vector. Loop over each element: Calculate local stiffness matrix and force vector. Add local contributions to the global matrix/vector. Apply boundary conditions. Solve the linear system 𝐾 𝑈 = 𝐹 KU=F for 𝑈 U. Flowchart sql Copy code
Start | Define parameters | Initialize global K and F | Loop over elements / \ Calculate Calculate
local stiffness local force matrix (K) vector (F)
\ / Assemble global K, F | Apply boundary conditions | Solve KU = F | End
Python Code Here’s a basic Python implementation for a simple linear finite element in 1D:
python Copy code import numpy as np
- Problem parameters
L = 1.0 # Length of the domain k = 1.0 # Coefficient num_elements = 10 num_nodes = num_elements + 1 f = 1.0 # Source term
- Generate mesh
x = np.linspace(0, L, num_nodes) dx = x[1] - x[0]
- Initialize global stiffness matrix and force vector
K = np.zeros((num_nodes, num_nodes)) F = np.zeros(num_nodes)
- Element stiffness and force contributions
for i in range(num_elements):
# Local stiffness matrix for element i K_local = (k / dx) * np.array([[1, -1], [-1, 1]]) F_local = (f * dx / 2) * np.array([1, 1])
# Assemble global K and F K[i:i+2, i:i+2] += K_local F[i:i+2] += F_local
- Apply boundary conditions (e.g., u(0) = 0)
K[0, :] = 0 K[0, 0] = 1 F[0] = 0
- Solve for nodal values
U = np.linalg.solve(K, F)
print("Nodal displacements (U):", U) This code calculates the nodal displacements for a simple 1D problem using the finite element method and assumes Dirichlet boundary conditions at 𝑥 = 0 x=0. Modify it as needed for different boundary conditions or problem specifics.