http://air.eng.ui.ac.id/api.php?action=feedcontributions&user=Candra+dw&feedformat=atom ccitonlinewiki - User contributions [en] 2022-07-03T17:25:44Z User contributions MediaWiki 1.30.0 http://air.eng.ui.ac.id/index.php?title=Candra_Damis_Widiawaty&diff=2774 Candra Damis Widiawaty 2019-02-22T01:37:38Z <p>Candra dw: </p> <hr /> <div><br /> There are several software that could be used for numerical calculation in example EES, Python, C, C++, etc. For this discussion, i would like to share how to make algorithm of python for solving discretisation in example 4.1 and 4.3 at veersteg handbook. Here is the step :<br /> - first, you have to understand the algorithm of array<br /> - second, you have to understand the algorithm of pde equation of steady state diffusion, then how to generate tat equation <br /> <br /> Python <br /> Python is one of the open source which could be used for numerical methods for engineering. How to install it, just link to python.org, don’t forget to install numpy in command directory “pip install numpy”. Numpy is module library for solving array calculation.<br /> As we know, that PDE equation can be solved by array. So we have to understand word by word the program. I used Gauss Elimination method. Gauss elimination is the most familiar method for solving simultaneous algebra equation. It consist of two parts : the elimination phase and the back substitution phase. The purpose of elimination phase is to transform the equation into the form Ux=c. The equation are then solve by back substitution. Here is the example of equation transformed :<br /> Fig 2. Transformed equation <br /> The procedure of elimination phase :<br /> Elimination phase is the process of transforming equation become Ux=c by multiplying the equation (let say j) by constant lam and subtracting it from another equation (let say i).<br /> <br /> Fig 3. Transforms equation<br /> The equation being subtracted, is called pivot equation Eq (j). <br /> Using excel makes it easier to understand the elimination phase process. <br /> <br /> Fig 4. Elimination phase process using excel<br /> Fig. 5 Array<br /> Algorithm of elimination phase :<br /> For k in range [0, n-1]:<br /> For i in range [k+1,n]:<br /> If a[i,k] ! ==0.0:<br /> Lam=a[i,k]/a[k,k]<br /> a[i,k+1:n]= a[i,k+1:n]-lam*a[k,k+1:]:<br /> b[i]=b[i]-lam*b[k]<br /> <br /> Back Substitution Phase :</div> Candra dw http://air.eng.ui.ac.id/index.php?title=Candra_Damis_Widiawaty&diff=2773 Candra Damis Widiawaty 2019-02-22T01:32:36Z <p>Candra dw: </p> <hr /> <div><br /> There are several software that could be used for numerical calculation in example EES, Python, C, C++, etc. For this discussion, i would like to share how to make algorithm of python for solving discretisation in example 4.1 and 4.3 at veersteg handbook. Here is the step :<br /> - first, you have to understand the algorithm of array<br /> - second, you have to understand the algorithm of pde equation of steady state diffusion, then how to generate tat equation <br /> <br /> Python <br /> Python is one of the open source which could be used for numerical methods for engineering. How to install it, just link to python.org, don’t forget to install numpy in command directory “pip install numpy”. Numpy is module library for solving array calculation.<br /> As we know, that PDE equation can be solved by array. So we have to understand word by word the program. I used Gauss Elimination method. Gauss elimination is the most familiar method for solving simultaneous algebra equation. It consist of two parts : the elimination phase and the back substitution phase. The purpose of elimination phase is to transform the equation into the form Ux=c. The equation are then solve by back substitution. Here is the example of equation transformed :<br /> Fig 2. Transformed equation <br /> The procedure of elimination phase :<br /> Elimination phase is the process of transforming equation become Ux=c by multiplying the equation (let say j) by constant lam and subtracting it from another equation (let say i).<br /> <br /> Fig 3. Transforms equation<br /> The equation being subtracted, is called pivot equation Eq (j). <br /> Using excel makes it easier to understand the elimination phase process. <br /> <br /> Fig 4. Elimination phase process using excel</div> Candra dw http://air.eng.ui.ac.id/index.php?title=File:Algoritma_Array_using_Python-1.jpg&diff=2772 File:Algoritma Array using Python-1.jpg 2019-02-22T01:20:21Z <p>Candra dw: </p> <hr /> <div></div> Candra dw