Difference between revisions of "Muhammad Anggito Zhafranny"

From ccitonlinewiki
Jump to: navigation, search
m (Core Python)
(Numerical Methods)
Line 131: Line 131:
 
===3rd Session===
 
===3rd Session===
  
TBA
+
Missed 3rd Session
 +
 
 +
 
 +
===4th Session===
 +
 
 +
Lecturer : Dr. Ahmad Indra and dear assistant Bg. Edo
 +
 
 +
Date : 23 September 2019
 +
 
 +
'''Systems of Linear Algebraic Equations'''
 +
 
 +
'''Pr / Hiburan'''
 +
 
 +
[[File:PR_sesi_4.jpg]]
 +
 
 +
Convert to array/matrix equation in order to eliminate it using Gaussian Elimination. Thus its equation and matrix are:
 +
 
 +
<div border-style: inset;">
 +
6x<sub>1</sub> + 4x<sub>2</sub> = 50
 +
2x<sub>1</sub> + x<sub>3</sub> + 4x<sub>4</sub> = 50
 +
7x<sub>2</sub> + 3x<sub>3</sub> + 4x<sub>4</sub> = 50
 +
4x<sub>1</sub> + 4x<sub>3</sub> = 50
 +
 
 +
Therefore resulting this in matrix
 +
[[6. 4. 0. 0.]
 +
  [2. 0. 1. 4.]
 +
  [0. 7. 3. 4.]
 +
  [4. 0. 4. 0.]]
 +
</div>
 +
 
 +
Then define those matrix in python.
 +
 
 +
<div border-style: inset;">
 +
import numpy as np
 +
<br>A = np.array([[6, 4, 0, 0], [2, 0 ,1, 4], [0, 7, 3, 4], [ 4, 0, 4, 0]], float)
 +
B = np.array([50, 50, 0, 0], float)
 +
<br>n = len(A)
 +
</div>
 +
 
 +
'''Use Gaussian Elimination'''
 +
 
 +
<div border-style: inset;">
 +
for k in range(0,n-1):
 +
    for i in range(k+1,n):
 +
        if A[i,k]!=0 :
 +
            lam = A[i,k]/A[k,k]
 +
            A[i,k:n] = A[i,k:n]-(A[k,k:n]*lam)
 +
            B[i] = B[i]-(B[k]*lam)
 +
</div>
 +
 
 +
'''Back Subs'''
 +
 
 +
<div border-style: inset;">
 +
x = np.zeros(n,float)
 +
for m in range(n-1,-1,-1):
 +
    x[m]=(B[m]-np.dot(A[m,m+1:n],x[m+1:n]))/A[m,m]
 +
</div>
 +
 
 +
'''Results'''
 +
 
 +
[[File:1569690540111.jpg|500px]]
  
 
== Fluid Mechanics ==
 
== Fluid Mechanics ==

Revision as of 00:12, 29 September 2019

Left  THIS IS FINE This Page isn't Completed Yet the deadline is near. Help.


Profile

Nama: MUHAMMAD ANGGITO ZHAFRANNY
NPM : 1706027761
For further information about the creator/user, Click Here

Core Python

Numpy, SciPy, and Matplotlib

 (work) C:\DEV>python -m pip install numpy
 (work) C:\DEV>python -m pip install scipy
 (work) C:\DEV>python -m pip install matplotlib

'Numpy' is the core library for scientific computing in Python. It provides a high-performance multidimensional array object, and tools for working with these arrays. If you are already familiar with MATLAB, you might find this tutorial useful to get started with Numpy. Numpy provides a high-performance multidimensional array and basic tools to compute with and manipulate these arrays. 'SciPy' builds on this, and provides a large number of functions that operate on numpy arrays and are useful for different types of scientific and engineering applications.

'Matplotlib' is a plotting library. In this section give a brief introduction to the matplotlib.pyplot module, which provides a plotting system similar to that of MATLAB.

Then click enter and appeared to be like this:

Installing numpy scipy and matplotlib.jpg

Python Tutorial

Link Click Here and click https://en.wikibooks.org/wiki/Python_Programming/Basic_Math also from here learnpython.org

Numerical Methods

This section serves as my study journal of Numerical Methods through my Fifth Semester at DTM UI.

1st Session

Lecturer : Dr. Ahmad Indra and Dr. Ir. Engkos Kosasih

Date : 02 September 2019

Introduction

Class is being held at Class GK201. A Computer Laboratory. The class was supposed being held by Mr. Achmad Riadi and Dr. Ir. Engkos A. Kosasih yet suprising moments happen when Dr. Ahmad Indra Siswantara or Pak DAI appearing instead. Pak Engkos appeared after a half hour.

At the beginning, Pak DAI told us the essence of praying before studying, the meaning of our purpose of studying and also the difference of us, engineers and accountant at viewing measurement tolerance before and then we continue to introduction of Numerical Methods. An accountant and economist would see measurement down to every detail like how they counting country's debt down to double digit cent while we engineers are so tolerant at measurements as long as it does not create trouble or mishaps at designed machine or system.

According to Pak Engkos, Numerical Method is simply how to using algorythim and equation we learn from prior subject we learn (ex. Engineering Mathematics) and how to communicate or speak language of computer in order to achieve the results of process a large equation that might be impossible to calculated by human minds alone. Any equations that can be completed with numerics can also be attained by exact way but not vice versa. Human might can calculate first or second order, but in higher order we need to use engineering computation to attain results efficiently and quicker. It's is not something we can calculated with paper in higher order, said Pak Engkos.

Tools of Numerical Methods: Python, C++, Java, etc. Any computation language is eligible to use said Pak DAI and seems picking using python as tools.

2nd Session

Lecturer : Dr. Ahmad Indra Siswantara

Date : 09 September 2019

Iterative Method

There is no term of Common Sense, rather any sense or mind is right and the wrong ones is our intrigue, temptation, and sort off...
- Pak DAI

The Iterative Method is a mathematical way of solving a problem which generates a sequence of approximations. This method is applicable for both linear and nonlinear problems with large number of variables.


29244.png

mengapa hasilnya 2 tidak 0/0?

Angka bulat itu tidak ada.

TL;DR

  • 0/0 tidak konsisten karena jika persamaan ini dihadapkan dengan beberapa kasus atau argumen maka bisa didapatkan berbeda hasil, padahal jika dalam eksakta, aturannya adalah hasil persamaan tidak bisa diubah, pasti atau bisa disamakan dengan absolut.

ada beberapa aturan yang kita tahu dari persamaan dengan 0 dan bilangan bulat:

  • Jika (a/0)=infinit, jika a=0 maka 0/0=infinit
  • Jika (0/b)=0, jika b=0 maka 0/0=0
  • Jika (c/c)=1, jika c=0 maka 0/0=1

Bisa kita bandingkan dan simpulkan bahwa 0/0 tidak konsisten atau undefined/


New Terms

  • Perhitungan komputasi undefined/tidak konsisten/error cannot appeared on computer.
  • Discrete >< Continous
> Discrete can only take certain values. Not Decimal.
> Continous can take any value (within a range).
  • Algoritma is an arrangement of instructions to solve problems.
  • Flowchart a diagram that uses a set of standard graphic symbols to represent the sequence of coded instructions fed into a computer, enabling it to perform specified logical and arithmetical operations.
  • Program consists of compiled code that can run directly from the computer's operating system.

PR / Hiburan

Cari x di persamaan berikut menggunakan peranti lunak Python
80092.png

Results
def f(x): 
   return 8*x**3 + 2*x**2 + x - 1
def fprime(x):
   return 24*x**2 + 4*x +1

ep = 0.001
gu = -10 i = 0
print('8*x**3 + 2*x**2 + x - 1')
print('Results by Python 3.7')
while abs(f(gu)) >= ep: gu = gu - (f(gu)/fprime(gu)) i += 1 print(' ' + str(i) + ' ' + str(round(gu,7)))
print('The root approach is ' + str(round(gu,2)) + '| failed to calculate: ' + str(i) + ' times' )

3rd Session

Missed 3rd Session


4th Session

Lecturer : Dr. Ahmad Indra and dear assistant Bg. Edo

Date : 23 September 2019

Systems of Linear Algebraic Equations

Pr / Hiburan

PR sesi 4.jpg

Convert to array/matrix equation in order to eliminate it using Gaussian Elimination. Thus its equation and matrix are:

6x1 + 4x2 = 50
2x1 + x3 + 4x4 = 50
7x2 + 3x3 + 4x4 = 50
4x1 + 4x3 = 50

Therefore resulting this in matrix

[[6. 4. 0. 0.]
 [2. 0. 1. 4.]
 [0. 7. 3. 4.]
 [4. 0. 4. 0.]]

Then define those matrix in python.

import numpy as np

A = np.array([[6, 4, 0, 0], [2, 0 ,1, 4], [0, 7, 3, 4], [ 4, 0, 4, 0]], float) B = np.array([50, 50, 0, 0], float)
n = len(A)

Use Gaussian Elimination

for k in range(0,n-1):
    for i in range(k+1,n):
        if A[i,k]!=0 :
            lam = A[i,k]/A[k,k] 
            A[i,k:n] = A[i,k:n]-(A[k,k:n]*lam)
            B[i] = B[i]-(B[k]*lam)

Back Subs

x = np.zeros(n,float)
for m in range(n-1,-1,-1):
    x[m]=(B[m]-np.dot(A[m,m+1:n],x[m+1:n]))/A[m,m]

Results

1569690540111.jpg

Fluid Mechanics

Here lies my case studies that examine a set of problems from textbook Fundamentals of Fluid Mechanics by Munson; Young; Okiishi; and Huebsch. I upload it in form of my handwriting on folio paper, youtube videos and text. Mainly text in Indonesian, i supposed. Mainly created as Mr. DAI instructed it to us as homework. Hope this helps your studies; Tschuss

Chapter 8: Viscous Flowin Pipes

Summary & Study Case on Folio Click to enlarge.

Chapter ini membahas tentang karakteristik aliran didalam pipa. Perpindahan energi terjadi akibat terjadi perubahan pressure atau tekanan seiring perpindahan dari titik A ke titik B.

Youtube


Chapter 9: Flow Over Immersed Bodies

Summary & Study Case on Folio Click to enlarge.

Chapter ini membahas tentang karakteristik aliran luar yang melewati benda terendam. Contoh terdekatnya adalah Ikan yang berenang didalam air. Aliran luar juga sering disebut aerodinamika. Ilmu ini diaplikasikan dalam mendesain transportasi pesawat terbang, mobil, maupun kapal selam dengan memperhatikan gaya fluida (Lift-Drag) dan Lapisan Batas suatu aliran akibat benda yang terendam.

Youtube


Chapter 10: Open-Channel Flow

Summary & Study Case on Folio Click to enlarge.

Berbeda dengan Bab 8, Bab 10 ini melibatkan aliran-aliran yang mengalir dalam kanal dan pipa yang tidak terisi sepenuhnya. Contoh aslinya adalah sungai yang berada disekeliling kita, tetapi itu masih tergolong rumit karena memerlukan pengukuran geometri dari sungai tersebut. Perbedaan signifikan antara bab 8 dan bab 10 terletak pada perubahan tekanan sebagai penggeraknya. Open-Channel Flow tidak memiliki perubahan tekanan sebagai penggerak melainkan kemiringan atau gradien dasar kanal sebagai penggerak.

Important Equation

Left


Youtube


Chapter 11: Compressible Flow

Summary & Study Case on Folio Click to enlarge.

Membahas tentang aliran mampu-mampat yang pada dasarnya jika menyertakan persamaan kontinuitas massa, maka densitas juga ikut berubah seiring perpindahannya melewati duct konvergen-divergen atau sebaliknya. Mempelajari karakteristik aliran jika memasuki duct, dalam arti laju dll.

Youtube


References

Fluid Mechanics

  1. MUNSON, B. R., YOUNG, D. F., & OKIISHI, T. H. (2006). FUNDAMENTALS OF FLUID MECHANICS. Hoboken, NJ, J. Wiley & Sons.

Numerical Method

  1. KIUSALAAS, J. (2013). NUMERICAL METHODS IN ENGINEERING WITH PYTHON. Tribeca, NY, Cambridge University Press