Difference between revisions of "JosiahEnrico"

From ccitonlinewiki
Jump to: navigation, search
Line 26: Line 26:
 
  Real ER[N];
 
  Real ER[N];
 
  Real sol; //solution
 
  Real sol; //solution
 
+
 
  algorithm
 
  algorithm
 
+
 
  A[1]:=a;
 
  A[1]:=a;
 
  B[1]:=b;
 
  B[1]:=b;
 
  y[1]:=B[1]-(exp(-B[1])-B[1])*(A[1]-B[1])/((exp(-A[1])-A[1])-(exp(-B[1])-B[1]));
 
  y[1]:=B[1]-(exp(-B[1])-B[1])*(A[1]-B[1])/((exp(-A[1])-A[1])-(exp(-B[1])-B[1]));
 
  ER[1]:=abs(1-B[1]/y[1]);
 
  ER[1]:=abs(1-B[1]/y[1]);
 
+
 
  for i in 2:N loop
 
  for i in 2:N loop
 
   A[i]:=B[i-1];
 
   A[i]:=B[i-1];
Line 39: Line 39:
 
   y[i]:=B[i]-(exp(-B[i])-B[i])*(A[i]-B[i])/((exp(-A[i])-A[i])-(exp(-B[i])-B[i]));
 
   y[i]:=B[i]-(exp(-B[i])-B[i])*(A[i]-B[i])/((exp(-A[i])-A[i])-(exp(-B[i])-B[i]));
 
   ER[i]:=abs(1-y[i-1]/y[i]);
 
   ER[i]:=abs(1-y[i-1]/y[i]);
 
+
 
   if ER[i]<er then
 
   if ER[i]<er then
 
   sol:=y[i];
 
   sol:=y[i];
Line 46: Line 46:
 
   end if;
 
   end if;
 
  end for;
 
  end for;
 
+
 
  end Secant_Algorithm;
 
  end Secant_Algorithm;
  

Revision as of 16:00, 17 November 2020

Rico profile.jpg

Holaaa

Perkenalkan nama saya Josiah Enrico S dari jurusan teknik mesin FTUI. Sebagai salah seorang mahasiswa, saya senang belajar dan berbagi banyak hal baru kepada dunia. Melalui wiki ini, saya akan berbagi kepada kalian tentang apa yang saya pelajari. :)

Gate Valve - Metode Numerik/18 November 2020

Berikut ini adalah contoh penerapan aplikasi OpenModelica untuk menyelesaikan metode numerik roots of equation (akar persamaan):

1. Metode Terbuka

*Newton Raphson
  • Secant
model Secant_Algorithm

parameter Real a=0; //guess
parameter Real b=1; //guess
parameter Integer N=10; //max iteration
parameter Real er=0.0000001; //error maximum
Real A[N];
Real B[N];
Real y[N];
Real ER[N];
Real sol; //solution

algorithm

A[1]:=a;
B[1]:=b;
y[1]:=B[1]-(exp(-B[1])-B[1])*(A[1]-B[1])/((exp(-A[1])-A[1])-(exp(-B[1])-B[1]));
ER[1]:=abs(1-B[1]/y[1]);

for i in 2:N loop
 A[i]:=B[i-1];
 B[i]:=y[i-1];
 y[i]:=B[i]-(exp(-B[i])-B[i])*(A[i]-B[i])/((exp(-A[i])-A[i])-(exp(-B[i])-B[i]));
 ER[i]:=abs(1-y[i-1]/y[i]);

 if ER[i]<er then
 sol:=y[i];
 break;
 
 end if;
end for;

end Secant_Algorithm;


Gate Valve - Aplikasi CFD/12 November 2020

Gate Valve

membuka atau menutup aliran

Mengatur kecepataan fluida (Regulasi)

Mangatasi Backflow atau aliran balik