<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rizki A. F.  on Medium]]></title>
        <description><![CDATA[Stories by Rizki A. F.  on Medium]]></description>
        <link>https://medium.com/@rizki.ardika.f?source=rss-8bc487ec25dc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZqWkG8K9mxNNrFZC0rUP4g.jpeg</url>
            <title>Stories by Rizki A. F.  on Medium</title>
            <link>https://medium.com/@rizki.ardika.f?source=rss-8bc487ec25dc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 01:17:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rizki.ardika.f/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Evaluating Your Machine Learning Model]]></title>
            <link>https://python.plainenglish.io/evaluating-your-machine-learning-model-a7c9c971a402?source=rss-8bc487ec25dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7c9c971a402</guid>
            <category><![CDATA[model-evaluation]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[root-mean-squared-error]]></category>
            <category><![CDATA[machine-learning-python]]></category>
            <category><![CDATA[machine-learning-intro]]></category>
            <dc:creator><![CDATA[Rizki A. F. ]]></dc:creator>
            <pubDate>Sat, 07 Feb 2026 12:55:49 GMT</pubDate>
            <atom:updated>2026-02-07T12:55:49.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*xsT-sBBT1MYfPGqbe8i4hA.png" /></figure><p>Continuing from where we left off (<a href="https://medium.com/python-in-plain-english/building-your-first-machine-learning-model-using-python-52c86b6dd93d">here</a>), we’re now going to try to evaluate our model using data that’s been separated/split into test data. To do that, we’re going to add more tools to our model.</p><pre>import numpy as np #You&#39;ll need it for error calculation<br>import pandas as pd<br>from sklearn.model_selection import train_test_split #To split the data into training data and test data<br>from sklearn.tree import DecisionTreeRegressor </pre><p>After importing our tools, it’s time to import our data, the one we used in the previous models. Just import the data normally, since the splitting happened after this.</p><pre>mlb_houses_data = pd.read_csv(&#39;melb_data.csv&#39;) #Put your entire file location if you don&#39;t put your data file with your jupyter notebook file.<br><br>mlb_houses_data = mlb_houses_data.dropna(axis=0) #Don&#39;t forget to clean your data, this is probably kinda basic cleaning tho, i just do what kaggle told me to, haven&#39;t started on real cleaning yet.<br><br>mlb_houses_data.columns #Just in case you forgot the column names</pre><p>Hold up. I need to check on this before we go any further. Do you actually open your VS Code and type along while reading this? You don’t just copy and paste the code, right? Or worse, you don’t just R E A D this right? I mean, if you do, what are you doing here? You won’t remember most of the things you read here if all you do is just read or copy-paste. Type, change the variable, and make your own code based on what you read here. N O W! DID YOU JUST WHINE? DO I HEAR COMPLAIN? NO, BAD BOY, TYPE NOW!</p><p>Ok, now that we’ve addressed the problem, we can continue our endeavor to gain knowledge together! Now, after importing the data into our code, it is time to choose our feature and target, just like before, and after that, we split our data.</p><pre>X = mlb_houses_data[[&#39;Rooms&#39;, &#39;Bathroom&#39;, &#39;Landsize&#39;, &#39;Lattitude&#39;, &#39;Longtitude&#39;]]<br><br>y = mlb_houses_data.Price<br><br>#We&#39;re using X capital now for feature, to make things more consistent with the devblogs<br><br>X_train, X_test, y_train, y_test = train_test_split(X,y ,random_state=1, test_size=0.25, shuffle=True) #Since the data isn&#39;t time series data, we can shuffle when choosing between train or test data, but if you chose not to, it doesn&#39;t really matter.<br><br>#The size of our training and testing data are usually 75% and 25% respectively, and we&#39;ll use it as well here.<br><br>#You can use any number (&gt;0) to use on random_state, this ensure consistency, for my code i use one, but you can change it to 42, 124, or any number.</pre><p>Time to build our model with the training data we just split.</p><pre>mlb_model = DecisionTreeRegressor(random_state=1) <br><br>mlb_model.fit(X_train, y_train) #Fit the model with the assigned training data (X_train, y_train).</pre><p>Now let’s get straight to testing</p><pre>print(&quot;Making prediction based on these five houses&quot;)<br>print(X_test.head())<br>print(&#39;&#39;)<br>print(&quot;Predicted Prices :&quot;, mlb_model.predict(X_test.head()))<br>print(&quot;Real Prices      :&quot;, y_test.head().values)<br>print(&quot;(Prices are in AUD)&quot;)</pre><p>The result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*vKgLelB3eRrgDWCKBH_i2g.png" /></figure><p>As you can see, the values now differ, unlike our previous model.</p><p>The question is, how far off is the prediction? To find out, we’re going to use RMSE or Root Mean Square Error (you could use a more standardized and easier R-square to find out our error tho, up to you). Also, the equation, almost forgot about it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*AF7gUU3L44LJKXx0ffMhJA.png" /><figcaption>credit: <a href="https://www.datacamp.com/tutorial/rmse">https://www.datacamp.com/tutorial/rmse</a></figcaption></figure><p>where:</p><ul><li>n = number of data (in our case, it’s just 5)</li><li>y_i = Test data</li><li>ŷ_i = Predicted data</li></ul><p>You don’t need to manually create this equation tho, since scikit learn already has a package with an RMSE function. Yippee.</p><pre>from sklearn.metrics import root_mean_squared_error<br><br>#Turn our predictions into an array, it won&#39;t work otherwise, for some reason.<br><br>Y_pred = np.array(mlb_model.predict(X_test.head()))<br>Y_real = np.array(y_test.head())<br><br>RMSE = root_mean_squared_error(Y_real, Y_pred)<br><br>print(&quot;Root Mean Squared Error :&quot;, RMSE) #We&#39;ll see how cooked our model is.</pre><p>The result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*uVSSfK6IIp7U2F6jV_JeIg.png" /></figure><p>Uhhhhh, I have no idea what that number mean. It is still in AUD, so, idk, we need to compare it to the mean of our real prices in our test data, that way it will be easier to draw our conlclussion.</p><pre>RMSEP = RMSE / Y_real.mean() * 100<br><br>print(&quot;Root Mean Squared Error (%) :&quot;, RMSEP, &quot;%&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*nmG_b-d6fZOWcEINqW0-EQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4s_WHH9TMzMXIpHIwPd5fQ.png" /><figcaption>credit: u/Keevin-Rabbit on <a href="https://www.reddit.com/r/Keevin_Rabbit/comments/17byfu0/shocked_face_wojak_edition_and_now_you_guys_can/">Reddit</a></figcaption></figure><p>(fahh.mp3) AWWWWW HELLL NAAHHH DAWG, ALMOST 50%??? WE’RE COOKED</p><p>After finding out that our model wasn’t that accurate, the first thing you wanna do is calm down. Close your computer, and let future you deal with it tomorrow.</p><p>Hello future you, or maybe present you if you decide to fix it today, we could fix this mess by either changing our method (remember that scikit learn have more methods than just the Decision Tree Regressor) or we could try changing the small thing first. For now, let’s change our splitting method. Rather than choosing a random row to be assigned as train or test data, we could just turn off shuffle.</p><pre>#Instead of X and y, we&#39;ll use I and j, the progress are the same so, speedrun<br><br>I_train, I_test, j_train, j_test = train_test_split(X,y ,random_state=1, test_size=0.25, shuffle=False)<br><br>mlb_modelns = DecisionTreeRegressor(random_state=1)<br><br>mlb_modelns.fit(I_train, j_train)<br><br>print(&quot;Making prediction based on these five houses&quot;)<br>print(I_test.head())<br>print(&#39;&#39;)<br>print(&quot;Predicted Prices :&quot;, mlb_modelns.predict(I_test.head()))<br>print(&quot;Real Prices      :&quot;, j_test.head().values)<br>print(&quot;(Prices are in AUD)&quot;)<br><br>J_pred = np.array(mlb_modelns.predict(I_test.head()))<br>J_real = np.array(j_test.head())<br><br>RMSENS = root_mean_squared_error(J_real, J_pred)<br><br>RMSEPNS = RMSENS / J_real.mean() * 100<br><br>print(&quot;Root Mean Squared Error (%) :&quot;, RMSEPNS, &quot;%&quot;)</pre><p>The result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*hvCfS8XYXy9D0QgE81P_uQ.png" /></figure><p>Well, as you can see, we got a better result, and we could make this more accurate by changing more variables or methods (and feeding more data ofc). Today tho, we’ll end it here. You can explore more methods for reducing the error by yourself. I believe in you (definitely not because I haven’t learned about other methods). That’s it from me, see you later A L L I G A T O R.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7c9c971a402" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/evaluating-your-machine-learning-model-a7c9c971a402">Evaluating Your Machine Learning Model</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Your First Machine Learning Model Using Python]]></title>
            <link>https://python.plainenglish.io/building-your-first-machine-learning-model-using-python-52c86b6dd93d?source=rss-8bc487ec25dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/52c86b6dd93d</guid>
            <category><![CDATA[scikit-learn]]></category>
            <category><![CDATA[machine-learning-python]]></category>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Rizki A. F. ]]></dc:creator>
            <pubDate>Fri, 16 Jan 2026 18:12:48 GMT</pubDate>
            <atom:updated>2026-01-16T18:45:11.502Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*8eKHL6sm4VTnUy4KVnFWUQ.png" /><figcaption>credit: pngkey.com</figcaption></figure><p>Have you ever wondered, after a series of data, what comes after it? Or “if I have this set of data with known parameters, can I find out this new data that only has partially known parameters that is similar to the known old data, using that old data?” Well, of course you can! It’s called prediction, or forecast, or whatever you business people say. The point is, we could fill out some missing/unknown parameters using available data, like for example, a new house was built, and you don’t know its price, but you know its size, address, and number of rooms. You can now predict its price as long as you have old data of house prices on that location that also includes its size, address, and number of rooms.</p><p>There are a lot of tools and methods to predict future value using machine learning. For now, we’re going to use Python in Jupyter Notebook. After deciding on our tools, we also need to decide on the method. To predict a value, we could use Linear Regression, Decision Tree, etc., for now, we’re going to use Decision Tree Regressor available in scikit learn package.</p><p>Before starting, download <a href="https://www.kaggle.com/datasets/dansbecker/melbourne-housing-snapshot">this</a> dataset I used in my notebook. Open your Jupyter Notebook, either in Anaconda, VS Code, or well in Jupyter Notebook (standalone). On our first line, let’s load up our package.</p><pre>import pandas as pd #We need pandas to read our dataset<br>from sklearn.tree import DecisionTreeRegressor #Our Machine learning tools</pre><p>After that lets mount our dataset</p><pre>mlb_houses_file = &#39;melb_data.csv&#39; #Put your file address inside &#39;&#39; if you don&#39;t put it in the same folder as your notebook<br><br>mlb_houses_data = pd.read_csv(mlb_houses_file) #You can of course put the address inside the () instead of puting it inside a variable</pre><p>We could continue straight into our model building, but if you haven’t checked the csv file yourself and don’t know what columns are there, you can use the .column command to show the columns inside the csv file.</p><pre>mlb_houses_data.columns</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*PUlZfmuriKrrtMFAjeQVTw.png" /></figure><p>Now that we know what columns there are, we could choose some or most of them as a feature and one column we want to predict, to be fed to the machine learning model, so it can predict the value of our target. Before that tho, normally for training purposes, the dataset would be cleaned by the tutor before we use it, but the one we’re using isn’t, so Kaggle has instructed us to use this line of code to clean it up.</p><pre>mlb_houses_data = mlb_houses_data.dropna(axis=0) #This code erase one row of data that at least have one missing value (NaN or None, but not zero))</pre><p>Now, to build our model, we need to decide what target we want to predict. In this case, let’s try predicting house prices.</p><pre>y = mlb_houses_data.Price #You can also use y = mlb_houses_data[Price], this code is case sensitive so check your target column name again before running the code</pre><p>Next, let’s choose our feature(s). In the simplest term, feature is the known data that’s related to our target prediction that we want to feed to our model. Imagine guessing what type of girl (or boy) your boy goon too by observing the people your bro interacts with, the kind of fanart artist he follows, the type of anime/cartoon girl (or boy) he likes, etc., except this one involves more data, more than a guess, and typically not used to figure out someones fetishes (you still can do that tho).</p><pre>mlb_houses_features = [&#39;Rooms&#39;, &#39;Bathroom&#39;, &#39;Landsize&#39;, &#39;Lattitude&#39;, &#39;Longtitude&#39;] #Those are the feature we&#39;ll use to predict our house prices<br><br>x = mlb_houses_data[mlb_houses_features] #If you choose not to use variable you can assign feature like this: x=mlb_houses_data[[&#39;feature_list&#39;]] remember the double bracket are only for list of feature not singular one</pre><p>Time to finalize our model.</p><pre>mlb_model = DecisionTreeRegressor(random_state=1) #Assigning number to random_state ensure same result for each run, the number are arbitrary<br>           #^The one we import at the beginning<br><br>#Use previous Target and Features and put like below<br>mlb_model.fit(x, y)</pre><p>Now that we have our model, let’s see if it works.</p><pre>print(&quot;Making prediction based on these five houses&quot;) #Don&#39;t forget that you need to print the result to see it, I&#39;m saying this totally not because I forgot to do that myself.<br>print(x.head()) #.head() only choose the first five row of our data.<br>print(&quot;The price preditions are:&quot;)<br>print(mlb_model.predict(x.head())) #.predict() predict dataset that contain our feature, it could be from different file, as long as the column name is the same and all feature is there, it could be predicted.<br>print(&quot;Real prices are:&quot;)<br>print(y.head().values) #Remember that y only contain prices data while x contain our feature data</pre><p>And for the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*a4sYS61tbJA2W_mRjOSfvw.png" /></figure><p>As you can see, the result is there, the model works, BUT we have to remember that we’re only trying to see if the code works. This isn’t how we typically built our model, at least on the topic of data being fed. Usually, as scientist we only feed our model partially instead of an entire dataset. When building our model and testing its validity, we typically only feed 75% of our data and use the remaining as test data, so that we can measure the accuracy of our model. Using training data as test data will result in the accuracy of our model to be 100%, since it&#39;s similar to just asking the model if he remember the price of houses with these parameters/features instead of asking to predict it, and obviously, the machine will remember.</p><p>We could address the train-test data problem later on. I will make another article about it when…. ever I feel like it, maybe tomorrow, maybe next week, who knows? If you think my english kinda odd, that’s because I’m an ESL, I might try to improve my English skills, or not, depending on my mood. Anyway thx for coming by on my journey to employment</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52c86b6dd93d" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/building-your-first-machine-learning-model-using-python-52c86b6dd93d">Building Your First Machine Learning Model Using Python</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simulasi Perubahan Fasa Pada Freeze Plug di Dalam MSR]]></title>
            <link>https://medium.com/@rizki.ardika.f/simulasi-perubahan-fasa-pada-freeze-plug-di-dalam-msr-34114a35fd5b?source=rss-8bc487ec25dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/34114a35fd5b</guid>
            <category><![CDATA[finite-element-method]]></category>
            <category><![CDATA[molten-salt-reactors]]></category>
            <category><![CDATA[heat-transfer]]></category>
            <category><![CDATA[simulation]]></category>
            <category><![CDATA[comsol]]></category>
            <dc:creator><![CDATA[Rizki A. F. ]]></dc:creator>
            <pubDate>Sun, 10 Dec 2023 18:59:36 GMT</pubDate>
            <atom:updated>2023-12-10T19:25:37.837Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*gO3pnnONIwgqI72MH7_UeA.png" /><figcaption>Gambar 1. Desain MSR secara umum. (Suzuki dan Shimazu, 2008)</figcaption></figure><p>Pada artikel di tautan <a href="https://medium.com/@rizki.ardika.f/metode-simulasi-pergantian-fasa-menggunakan-comsol-342d92afdab4">ini</a>, telah dijelaskan cara untuk melakukan simulasi dengan COMSOL, dan pada artikel ini akan ditunjukkan hasil untuk si-mulasi tersebut. Hasil yang akan kita dapatkan adalah waktu buka, yang mana berarti waktu yang dibutuhkan untuk garam beku pada pipa <em>freeze plug</em> jatuh/sampai garam beku dibagian yang menyentuh Hastelloy-N men-cair sampai beberapa mm. Selain waktu buka akan kita lihat juga visual dari pencairan garam dan grafik perubahan fasa.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*7iySrH-ej16nqpPdhRSgQw.png" /><figcaption>Gambar 2. Mesh yang digunakan.</figcaption></figure><p>Gambar 2 merupakan mesh yang telah dibahas di artikel lalu, dimana size yang digunakan adalah normal dan dimensi dari simulasi adalah 2D axi-symetry. Ketika simulasi dijalankan, hasil yang akan kita dapat adalah ber-bentuk 3D, ini dikarenakan walaupun pada awalnya 2D saat simulasi model akan dirotasi 360 derajat sehingga didapat hasil 3D tapi dengan waktu si-mulasi yang lebih cepat dan akurasi yang lumayan bagus.</p><h3>Hasil Simulasi</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*1QwezWb33Qf3VRC5Hvul1w.png" /><figcaption>Gambar 3. Hasil simulasi awal</figcaption></figure><p>Pada gambar 3 bisa dilihat sebaran temperatur dari simulasi yang dila-kukan, <em>range</em> temperatur yang akan kita lihat adalah di 698.75–699.25 K, hal ini dikarenakan interval pergantian fasa yang kita set adalah 0.5 K sehingga jika temperatur perubahan fasa ada di 699 K maka perubahan fasa dari cair ke padat sepenuhnya terjadi di 699.25 K. Ilustrasi dari hal ini bisa anda lihat di gambar 4. Sebelum itu perlu dilihat dulu gambar 3, disana bisa dilihat bahwa model yang kita miliki memiliki garam liquid di bagian atas dan bawah dan yang solid hanya di tengah, kita juga tahu bahwa ada sumber temperatur 840 K yang mana merupakan temperatur operasional dari MSR, namun pada bagian bawah tidak ada. Ini berarti bagian bawah ke-mungkinan besar akan mengalami penurunan temperatur.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*7xvhC5F98GxK7-nRTlSJoA.png" /><figcaption>Gambar 4. Diagram perubahan fasa.</figcaption></figure><h3>Waktu Buka</h3><p>pertama kita tentukan dahulu poin observasi untuk melihat diagram indi-kator fasa. Kita simpan garis referensi di bagian bawah pada bagian garam. Ini seperti terlihat di bawah*.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*IRLSHeQ4b3_odVOfDZ2Y3Q.png" /><figcaption>Gambar 5. Titik referensi.</figcaption></figure><p>Cari waktu buka dengan cara melihat satu persatu waktu di grafik (tidak perlu berurutan, bisa dilihat loncat loncat untuk mempercepat waktu). Waktu buka terjadi ketika terjadi pencairan garam beku di bagian paling ujung kanan pada garis referensi. Hal ini bisa dilihat seperti dibawah ini**.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*5c69u4euaLfOAbTQ_JtKiQ.png" /><figcaption>Gambar 6. Grafik indikator fasa, 1 berarti fasa cair.</figcaption></figure><p>Jangan lupa untuk melakukan cek visual untuk pemastian, ini terjadi pada detik ke 1833.3 detik, mari kita lihat di bagian 3D plot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*lSRjcpfpHmMnRCGnlxtELA.png" /><figcaption>Gambar 7. Plot 3D pada waktu 1833.3 detik.</figcaption></figure><p>Walaupun berbentuk agak aneh, karena data yang dimasukkan seharusnya benar dan dari artikel terpercaya maka kita bisa percaya akan hasil ini. Namun bisa dilihat pada gambar 7 bagian yang sudah meleleh cukup jauh dari bagian samping, ini bisa dibilang bahwa pipa sudah terbuka sejak dari lama. Mari kita cari waktu dimana saluran di pipa benar — benar baru terbuka.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*YGPpbIjMFA59_lq1_W9bKg.png" /><figcaption>Gambar 8. Plot 3D pada waktu 1732.1 detik.</figcaption></figure><p>Setelah ditelusuri 1732.1 terlihat seperti waktu buka yang lebih cocok, ba-gian yang meleleh tidak begitu dekat dan tidak begitu jauh. Sekarang kita bandingkan dengan plot 2D yang kita miliki.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*LEBpv3Q4fwD5zBLguHbrNQ.png" /><figcaption>Gambar 9. Indikator fasa untuk waktu 1732.1 detik.</figcaption></figure><p>Pada grafik diatas bisa dilihat, grafik perubahan fasa menyatakan bahwa pada waktu tersebut hanya bagian dipaling ujung yang mencair dan itupun sangat sedikit sehingga normalnya agak meragukan dan kurang pasti untuk disebut sebagai waktu buka, tidak boleh dipilih. Analisis keselamatan nuk-lir haruslah <em>overestimate</em> bukan estimasi yang cukup apalagi <em>underestimate</em>. Hal ini disebabkan resiko yang dibawa ketika pengoprasian teknologi ini.</p><p>Jika kita terlusuri lebih lanjut, ternyata grafik indikator fasa akan terus seperti ini dan tidak berubah sampai detik ke 1833.3, ini berarti grafik tidak menampilkan data secara benar, karena pertimbangan itu kita bisa me-milih 1732.1 detik sebagai waktu buka dan bukan 1833.3 detik. Walaupun pada grafik indikator fasa terlihat seperti itu, tapi karena grafik tidak <em>terupdate</em> secara benar maka kita harus <em>crosscheck</em> dengan grafik lain yang kita punya, yaitu seperti yang terlihat pada gambar 8. Setelah <em>crosscheck</em> itulah kita bisa tahu bahwa ternyata detik 1732.1 lebih cocok daripada detik ke-1833.3.</p><h3>Kesimpulan</h3><p>Pada simulasi ini ditemukan bahwa pada <em>freeze plug</em> di pipa saluran pem-buangan pada MSR dengan garam yang digunakan MgCl2-KCl dan memi-liki dimensi ketebalan dinding 5 mm, radius dalam pipa 19.05 mm, dan tinggi 155 mm memiliki waktu buka selama 1732.1 detik dimulai dari ma-tinya daya diseluruh fasilitas yang menyebabkan berhentinya pompa pe-ngalir garam juga pendingin yang membekukan garam di freeze plug. Kesimpulan ini didasari atas prinsip <em>safety conservatism. </em>Dengan prinsip tersebut sebagai dasar dilakukan analisis fasa secara 2D dibarengi dengan analisis temperatur secara 3D, sehingga didapat waktu buka seperti yang disebutkan.</p><h3>Saran</h3><p>Untuk memberi <em>novelty</em> coba lakukan simulasi dengan beberapa perubahan sebagai berikut: temperatur diatas model yang berubah terhadap waktu dan sesuai dengan <em>decay heat</em> dari bahan bakar nuklir, ubah tebal dinding, ubah radius dalam pipa, dll. Selain itu untuk mengetahui penuh apakah garam/dimensi pipa yang digunakan untuk desain ini aman atau tidak perlu juga dilakukan simulasi pengosongan teras reaktor, tentunya aplikasi seperti COMSOL tidak diperlukan untuk hal ini. Untuk hasil akhir adalah waktu buka ditambah wakktu drainase, bandingkan dengan waktu aman dari reaktor tersebut, ambil contoh suzuki dan shimazu (2008) menyatakan untuk keamanan seluruh garam yang mana berisi bahan bakar perlu di-buang dalam waktu satu jam.</p><h3>Referensi</h3><p>Ilham, M., Aji, I. K., Okawa, T., 2023. Numerical investigation on the effects of fundamental design parameters on freeze plug performance in molten salt reactors. Nuclear Engineering and Design, 403, 112144. ISSN 0029–5493.</p><p>Suzuki, N., Shimazu, Y., 2008. Reactivity-Initiated-Accident Analysis without Scram of a Molten Salt Reactor. J. Nucl. Sci. Technol. 45 (6), 575–581.</p><p>catatan:</p><p>Ini merupakan artikel yang menjadi bagian ke-5 dari seri RBL mata kuliah SPSF, baca bagian lainnya disini:<br><a href="https://medium.com/@azkabudiman/latar-belakang-penggunaan-pltn-dan-keselamatannya-f98e2e60f6b3">part 1</a>|<a href="https://medium.com/@purwasatria/perpindahan-panas-9755c5838b4e">part 2</a>|<a href="https://medium.com/@kaniedo/finite-element-method-f384f50fa711">part 3</a>|<a href="https://medium.com/@rizki.ardika.f/metode-simulasi-pergantian-fasa-menggunakan-comsol-342d92afdab4">part 4</a></p><p>*cara menambah garis referensi: <em>Expand result</em> dan klik kanan pada data sets lalu pilih <em>cut line 2D</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*hLSTvTCZATrr8cn__pTimA.png" /><figcaption>Gambar 10. Cara menambah garis referensi.</figcaption></figure><p>**Cara menambah grafik fasa.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*jXbj3ghjJ0AnolrG9pFq7g.png" /><figcaption>Gambar 11. Cara menambah grafik fasa</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34114a35fd5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Metode Simulasi Pergantian Fasa Menggunakan COMSOL]]></title>
            <link>https://medium.com/@rizki.ardika.f/metode-simulasi-pergantian-fasa-menggunakan-comsol-342d92afdab4?source=rss-8bc487ec25dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/342d92afdab4</guid>
            <category><![CDATA[simulation]]></category>
            <category><![CDATA[comsol]]></category>
            <category><![CDATA[heat-transfer]]></category>
            <category><![CDATA[molten-salt-reactors]]></category>
            <dc:creator><![CDATA[Rizki A. F. ]]></dc:creator>
            <pubDate>Sat, 09 Dec 2023 18:14:40 GMT</pubDate>
            <atom:updated>2023-12-10T19:25:15.742Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*QyUBCnWidqk9MpCYwGe9iA.png" /><figcaption>Gambar 1. Windows hasil simulasi COMSOL</figcaption></figure><p>Dari banyaknya aplikasi yang menggunakan metode FEM (penjelasan FEM <a href="https://medium.com/@kaniedo/finite-element-method-f384f50fa711">disini</a>) dalam melaku-kan simulasi, COMSOL merupakan aplikasi berbayar yang memiliki repu-tasi baik dalam topik ini. Berbeda dengan pustaka <em>open source </em>seperti OpenFOAM dll. COMSOL merupakan <em>module based</em> app yang menggunakan <em>model builder </em>dari modul yang bersangkutan. Selain itu juga, COMSOL menggunakan UI untuk membuat model simulasi, sedangkan pustaka seperti OpenFOAM menggunakan <em>code</em>, ya namanya juga pustaka dari bahasa pemrograman. Ini tentunya tidak berarti COMSOL itu lebih bagus atau lebih akurat dibandingkan OpenFOAM, kedua aplikasi merupakan aplikasi yang memiliki reputasi bagus yang populer dan penggunaannya pada akhirnya hanya ditentukan dari preferensi user saja. Untuk hari ini kita akan melakukan simulasi menggunakan COMSOL.</p><h3><strong>Memulai Simulasi Dengan COMSOL</strong></h3><p>Untuk memulai simulasi dengan COMSOL beli lisensi COMSOL, jika anda mahasiswa tentunya anda tidak punya uang untuk membeli software ini, harga untuk satu modul saja lebih mahal dari rata-rata uang yang dibayar orang Amerika untuk naik ambulans, atau beberapa ratus dolar lebih ma-hal dari laptop gaming paling bagus di website origin. Oleh karenanya untuk anda mahasiswa saya anjurkan untuk memulai mencari dosen atau keluarga yang memiliki lisensi COMSOL, karena aplikasi ini cukup flek-sibel sehingga bisa digunakan oleh banyak disiplin ilmu dan punya re-putasi yang baik sehingga digunakan di banyak perusahaan. Setelah mendapatkan lisensi dan menginstall aplikasi anda akan disuguhkan <em>windows</em> seperti di bawah.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*H0zEJCQJpco-Ug5zMLlEuA.png" /><figcaption>Gambar 2. Windows pemilihan model.</figcaption></figure><p>Agar memudahkan, pilih model wizard. Setelahnya pilih dimensi yang akan digunakan. Pada simulasi ini, untuk menghemat waktu namun tetap representatif terhadap fenomena dan tetap akurat, pilih dimensi 2D Axi-symmetric, bentuk ini merupakan bentuk dimensi 2D yang nantinya diputar sehingga menghasilkan simulasi yang 3D. Setelahnya kita akan diminta untuk memilih modul physics yang kita butuhkan, disini pilih <em>heat transfer in solid and liquid</em> dan klik study. Pada windows <em>study</em> pilih <em>Time Dependent</em> karena perubahan terhadap waktu adalah yang kita inginkan mengingat persamaan dari konduktivitas adalah persamaan diferensial terhadap waktu. (lebih tepatnya fungsi diferensial temperaturnya yang terhadap waktu)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*bDyfRscUsYGV6sFrjv-S3w.png" /><figcaption>Gambar 3. Opsi yang dipilih untuk memulai simulasi.</figcaption></figure><h3><em>Model Builder</em></h3><p>Setelahnya anda akan disuguhkan dengan beberapa UI di windows sebelah kiri. Pada windows awal anda secara <em>default</em> sedang berada di bagian geometry, disana anda bisa men-<em>set</em> unit dari panjang dan sudut. Pada simulasi hari ini pilih milimeter, abaikan mengenai sudut karena tidak akan dipakai. Selanjutnya anda bisa klik <em>bar</em> geometry atau klik kanan pada menu <em>geometry</em> dan pilih <em>square</em>. Atur sesuka anda, dan tambahkan <em>geo-metri</em> sesuai yang anda butuhkan. Terakhir klik <em>build all </em>di bagian atas windows dimana anda mengatur unit panjang. Model yang akan kita gunakan adalah model yang berdasarkan Ilham dkk, bisa dilihat pada gambar 5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cs1Gqe4cg7SLjgHCw4Mkmg.png" /><figcaption>Gambar 4. Model builder.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*trm9JRRlQk3x3U0BWl70xw.png" /><figcaption>Gambar 5. Model yang dihasilkan.</figcaption></figure><p>Setelahnya pada menu material, klik kanan dan tambahkan <em>blank</em> material secukupnya. Ganti nama <em>blank</em> material tersebut ke nama material yang diinginkan lalu isi data material tersebut dengan data yang sesuai, data bisa anda cari di google cendikia. Data yang anda butuhkan adalah adalah Cp, konduktivitas, densitas, <em>latent heat of fusion, melting point, </em>dan terkadang rasio antara Cp dan Cv atau biasa disebut gamma. Jangan lupa simpan material baru itu dengan klik kanan dan pilih <em>add to user defined library</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*q2NUOOMtFnNyUvzsBWGTyg.png" /><figcaption>Gambar 6. Cara menambah material.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vKrmS2TZLVmGHx8bYbN_Xg.png" /><figcaption>Gambar 7. Tips cara mencari data di google scholar, pada simulasi ini digunakan data dari Xu, dkk.</figcaption></figure><p>Setelah data berhasil ditemukan dan diisikan waktunya menentukan daerah mana merupakan material apa. Caranya cukup simpel, pertama klik material, lalu pada layar sebelah kanan, klik daerah yang ingin anda tetapkan sebagai material tersebut. Lanjutkan untuk material lainnya.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cs3Cjtgidw5--BNYMBW3uw.png" /><figcaption>Gambar 8. Daerah yang menunjukkan material tertentu.</figcaption></figure><p>Setelah menambah dan menentukan bagian/daerah material waktunya kita menentukan parameter dari menu <em>heat transfer in solid and liquid</em>. Tentukan daerah untuk solid 1 dan fluid 1, tambahkan juga solid 2 dan <em>temperature 1</em>. Setelah itu tentukan daerah untuk <em>initial value 1</em> dan tambahkan initial value 2 dan 3. Cara untuk menambahkan dan memilih daera sama seperti pada penambahan dan pemilihan daerah di material. Pada solid 2 dan fluid 1 klik kanan dan tambahkan phase change material, untuk fluid 1 tambah-kan dua buah. Pada intial value, pada daerah yang telah dipilih fluid 1 set temperatur di 840 K, hal yang sama juga lakukan untuk <em>temperature 1. </em>Untuk daerah solid 1 yang juga daerah Hastelloy-N pilih temperatur 625 K dan di daera kecil pada gambar 5 pilih 297 K. Untuk daerah solid 2 yang mana merupakan daerah solid MgCl2-KCl pilih temperatur 625 K, tempe-rature ini dipilih berdasarkan artikel ilham dkk, 2019. Pada phase change material isi data <em>latent heat </em>dan <em>phase change temperature </em>sesuai<em> </em>dengan data <em>latent heat of fusion </em>dan <em>melting point</em> yang didapat, set juga interval di 0.5 K. Pada fluid 1, set <em>phase change 1 </em>dari liquid ke solid dan sebaliknya untuk <em>phase change 2.</em> Untuk solid yang merupakan daerah solid MgCl2-KCl set <em>phase change 1</em> dari solid ke liquid. Tentunya data yang digunakan untuk semua <em>phase change</em> adalah sama.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gH-EzgBHntZWWF-urdqXxg.png" /><figcaption>Gambar 9. <em>Heat transfer in solid and liquid model builder.</em></figcaption></figure><h3>Mesh dan Study</h3><p>Setelah semuanya beres, waktunya kita melakukan bagian akhir dari pembuatan model ini, yaitu pengaturan <em>mesh</em> dan <em>study</em>. Untuk mesh, untuk mengurangi beban dan menyesuiakan dengan kapasitas devais dan menghindari artifak, pilih mesh <em>physics controlled </em>dengan ukuran normal atau <em>coarse.</em> Setelahnya <em>expand</em> menu <em>study</em> dan pilih <em>step 1:Time dependent</em>. Set <em>Times</em> pada bagian <em>study settings</em> menjadi <em>range(0,0.1,2500)</em> dengan <em>time unit s</em>. Ini berarti <em>study </em>akan dilaksanakan dalam waktu 2500 sekon dengan perhitungan dilakukan tiap 0,1 sekon. Klik <em>compute </em>jika sudah selesai.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5UE54jiNesERDkumLFTT7Q.png" /><figcaption>Gambar 10. Mesh untuk model.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*n66Wjj3_hqu5okquPuepZA.png" /><figcaption>Gambar 11. Study settings.</figcaption></figure><p>Tunggu sampai selesai, jika ada <em>error</em> diperteengahan jalan coba cek jika ada bagian yang kurang/tertinggal. Jika error menunjukkan <em>out of memory </em>turunkan size element ke <em>very coarse</em> atau size yang lebih besar lagi. Jika terjadi <em>inconsistent initial value error</em> coba lihat data yang anda gunakan, kemungkinan besar kesalahan terjadi disana, lihat konduktivitasnya apakah masuk akal? cek satuan yang digunakan, dll.</p><p>Untuk hasil dari simulasi ini, akan diperlihatkan di artikel berikut: <a href="https://medium.com/@rizki.ardika.f/simulasi-perubahan-fasa-pada-freeze-plug-di-dalam-msr-34114a35fd5b">https://medium.com/@rizki.ardika.f/simulasi-perubahan-fasa-pada-freeze-plug-di-dalam-msr-34114a35fd5b</a></p><p>catatan:</p><p>Ini merupakan artikel yang menjadi bagian ke-4 dari seri RBL mata kuliah SPSF, baca bagian lainnya disini:<br><a href="https://medium.com/@azkabudiman/latar-belakang-penggunaan-pltn-dan-keselamatannya-f98e2e60f6b3">part 1</a>|<a href="https://medium.com/@purwasatria/perpindahan-panas-9755c5838b4e">part 2</a>|<a href="https://medium.com/@kaniedo/finite-element-method-f384f50fa711">part 3</a>|<a href="https://medium.com/@rizki.ardika.f/simulasi-perubahan-fasa-pada-freeze-plug-di-dalam-msr-34114a35fd5b">part 5</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=342d92afdab4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FEM Analysis Using Anastruct]]></title>
            <link>https://python.plainenglish.io/fem-analys-using-anastruct-ea8097fed2c6?source=rss-8bc487ec25dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea8097fed2c6</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[finite-element-method]]></category>
            <category><![CDATA[anastruct]]></category>
            <dc:creator><![CDATA[Rizki A. F. ]]></dc:creator>
            <pubDate>Tue, 14 Nov 2023 23:41:13 GMT</pubDate>
            <atom:updated>2023-12-11T02:27:21.110Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rb6jxG_6Iz9M_Rj6tiHC6g.png" /><figcaption>Figure 1. An example of simple structure using anaStruct.</figcaption></figure><p>In 2023 there are several libraries that we could use to perform simulation or analysis using FEM or Finite Element Method. Such library are anaStruct. anaStruct could be used like any other libraries, and to use it you need to install it first.</p><h3>Installing anaStruct</h3><p>First like last time made a cmd shortcut and name it whatever you want, as usual empty the start in box in properties, this will be used later. Now open real cmd, and type pip install anastruct if failed, upgrade your pip first using pip install --upgrade pip now things should work. Create empty txt file and rename it however you like and change the format into .py, you’re ready to go.</p><h3>Using anaStruct</h3><p>Here are an example of code that i made, put it inside the .py file we made</p><pre>from anastruct import SystemElements<br><br>ss = SystemElements(EA=2000)<br>ss.add_truss_element(location=[[0, 0], [2, 0]])<br>ss.add_truss_element(location=[[2, 0], [4, 0]])<br>ss.add_truss_element(location=[[0, 0], [2, 2]])<br>ss.add_truss_element(location=[[2, 2], [4, 0]])<br><br>ss.add_support_hinged(node_id=1)<br>ss.add_support_hinged(node_id=3)<br>ss.add_support_spring(node_id=4, translation=2, k=0.5)<br><br>ss.point_load(Fy=-10, node_id=2)<br>ss.show_structure()</pre><p>if running it on your native IDE bear no result, the open the cmd shortcut we prepared before and type python &#39;filename&#39;.py change the ‘filename’ into your .py filename, without the ‘’ of course. That code above will resulted in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*KJtM9R-Ep74oIPwKEjYUwQ.png" /><figcaption>Figure 2. A triangle with two support and one spring with coefficient of 0.5.</figcaption></figure><p>In the code above at the spring code, we see translation and k. Translation mean the position of our spring, the input value is from 1 to 3, 1 mean at the right side of point, 2 mean horizontal to the point, and 3 mean to your face. While k mean the value of spring coefficient.</p><h3>The Analysis</h3><p>The structure that I made as you could see, have some force applied to it, we could analyze, the normal force value at supports, the displacement, or axial force if exist. At default the truss element had young modulus times area (Standard axial stiffness of elements) value of 15000 and young modulus times inertia (Standard bending stiffness of elements) value at 5000, this could be changed by putting EA or EI after truss element. Like this</p><pre>ss.add_truss_element(location=[[0, 0], [2, 0]], EA=1500)<br>ss.add_truss_element(location=[[2, 0], [4, 0]], EA=1500)</pre><p>This change in EA and EI should affect the result of analysis we will conduct.</p><h3>React Force/Normal Force</h3><p>Before doing any analysis put ss.solve() at the end of your code, but before any command/syntax for analysis. To show react force put ss.show_reaction_force() at the end of your code below the show structure code, it should show you both structure and reaction force figure. If you only want to view the reaction force, delete the show structure line from your code.</p><p>Result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zBSUVCTJHb7GjfsJ3fG_KQ.png" /><figcaption>Figure 3. Reaction force, spring coefficient=0.5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*aVN4FB314aUxStfYAGES-Q.png" /><figcaption>Figure 4. Spring translation=1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*bVXrsd1AuE8R7XRG-ZH9iQ.png" /><figcaption>Figure 5. Reaction force when spring translation=1</figcaption></figure><p>As seen above the spring only react to force that is in the same vector as his.</p><h3>Displacement</h3><p>Put ss.show_displacement(factor=x) x is any positive number and factor control the magnitude of displacement by the number x.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*03-6pRp7P2qejY5rzMVuHg.png" /><figcaption>Figure 6. Displacement factor=5.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*qdChCMV3i4-tmOR5yHT1HA.png" /><figcaption>Figure 7. Displacement factor=15.</figcaption></figure><h3>Axial Force</h3><p>You know the drill, just put ss.show_axial_force() and you’re good to go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*yu_fUKEElSgQulTYamnZrg.png" /><figcaption>Figure 8. Axial Force.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*25FdjW_v4DfWexVfw4NLIA.png" /><figcaption>Figure 9. Point force moved and it’s vector changed.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*gARHrLVpPlH9hGpzrjlZAA.png" /><figcaption>Figure 10. Axial force of changed figure.</figcaption></figure><p>since axial force diagram show part of structure that affected by load and it’s magnitude, we could see that when the point of load changed, the diagram of axial force is also changed.</p><h3>Conclussion</h3><p>That’s the basic of FEM analysis with anaStruct. Hopefully this short will help you create a better result.</p><p>Find the complete documentation of this amazing libraries over here: <a href="https://anastruct.readthedocs.io/en/latest/getting_started.html">Getting started — anaStruct 1.0 documentation</a>.</p><h3><a href="https://plainenglish.io/">PlainEnglish.io</a> 🚀</h3><p><em>Thank you for being a part of the In Plain English community! Before you go:</em></p><ul><li><em>Be sure to </em><strong><em>clap</em></strong><em> and </em><strong><em>follow</em></strong><em> the writer</em><strong>️</strong></li><li><em>Learn how you can also </em><a href="https://plainenglish.io/blog/how-to-write-for-in-plain-english"><strong><em>write for In Plain English</em></strong></a><em>️</em></li><li><em>Follow us: </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>X</em></strong></a><strong><em> | </em></strong><a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><strong><em> | </em></strong><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><strong><em> | </em></strong><a href="https://discord.gg/in-plain-english-709094664682340443"><strong><em>Discord</em></strong></a><strong><em> | </em></strong><a href="https://newsletter.plainenglish.io/"><strong><em>Newsletter</em></strong></a></li><li><em>Visit our other platforms: </em><a href="https://stackademic.com/"><strong><em>Stackademic</em></strong></a><strong><em> | </em></strong><a href="https://cofeed.app/"><strong><em>CoFeed</em></strong></a><strong><em> | </em></strong><a href="https://venturemagazine.net/"><strong><em>Venture</em></strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea8097fed2c6" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/fem-analys-using-anastruct-ea8097fed2c6">FEM Analysis Using Anastruct</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Scholar Data Scraping and Node JS Shenanigan]]></title>
            <link>https://medium.com/@rizki.ardika.f/google-scholar-data-scraping-and-node-js-shenanigan-0f33562a1a7e?source=rss-8bc487ec25dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f33562a1a7e</guid>
            <category><![CDATA[research]]></category>
            <category><![CDATA[data-scraping]]></category>
            <category><![CDATA[search-engines]]></category>
            <category><![CDATA[node-js-tutorial]]></category>
            <category><![CDATA[google-scholar]]></category>
            <dc:creator><![CDATA[Rizki A. F. ]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 20:37:16 GMT</pubDate>
            <atom:updated>2023-10-26T20:37:16.162Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*3KNY7cdMjgSw-S5r4ucjzg.png" /><figcaption>Figure 1. Node JS installation page.</figcaption></figure><p>Last week we’re trying to look for some data using google scholar manu- ally. We also remember that putting a sentence, an inclusion or exclusion, change the link of the search address. Using that knowledge we’re going to try and made a program to search and display the result with only things we want to see. But first, we need to know what we’ll use and how to use it.</p><h3>Node JS</h3><p>Node JS is an open-source program that is used for running web apps outside of client’s browser (your browser). To install Node JS, go to this website: <a href="https://nodejs.org/en/download">https://nodejs.org/en/download</a> and download the one that is suitable for your system. The rest are just clicking next, you know the drill.</p><p>After installing Node JS, made a new shortcut for cmd.exe like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*8gw7CmNLSItvfJhD9eq2EQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*PqWdYhxfKVj4rDN3VvgH8Q.png" /><figcaption>Figure 2. Make CMD shortcut.</figcaption></figure><p>Next we right click the shortcut and go to properties and emptied out the start in section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*G3ALFTcriyLnwkgGoGXLMg.png" /><figcaption>Figure 3. Shortcut properties.</figcaption></figure><h3>Initiating Node JS</h3><p>After we did the thing in figure 3, we need to open it and type npm init -ythis will create file named package.json. After doing that, you should firts try to update the npm version to the lattest one by typing npm install -g npm@latest . After that install these packages: cheerio, unirest and json2csv by typing npm install &#39;package name&#39; insert package name without ‘’, ignore any warning and you’re good to go. It will look like something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rvmUq0O0rkNlq0UAX-33XQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XU_B_Qk_SVxXZTLL-TmxdA.png" /><figcaption>Figure 4. Initiating and installing some packages.</figcaption></figure><h3>Time to Scrape</h3><p>After we done with all the preparation it is now time to scrape all of over google scholar. To do this we need to either download <a href="https://github.com/Darshan972/GoogleScrapingBlogs/blob/main/GoogleorganicResultsScraper.js">this code</a> by Khandelwal from his github page or made a blank .js file and copy paste the code from Khandelwal’s page, if you prefer that way. But, sadly the code from Khandelwal’s page aren’t something you could use for google scholar, we’ll need to edit this code below:</p><pre>const unirest = require(&quot;unirest&quot;);<br>const cheerio = require(&quot;cheerio&quot;);<br><br>const getOrganicData = () =&gt; {<br>  return unirest<br>    .get(&quot;https://www.google.com/search?q=javascript&amp;gl=us&amp;hl=en&quot;)<br>    .headers({<br>      &quot;User-Agent&quot;:<br>        &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36&quot;,<br>    })<br>    .then((response) =&gt; {<br>      let $ = cheerio.load(response.body);<br><br>      let titles = [];<br>      let links = [];<br>      let snippets = [];<br>      let displayedLinks = [];<br><br>      $(&quot;.yuRUbf &gt; a &gt; h3&quot;).each((i, el) =&gt; {<br>        titles[i] = $(el).text();<br>      });<br>      $(&quot;.yuRUbf &gt; a&quot;).each((i, el) =&gt; {<br>        links[i] = $(el).attr(&quot;href&quot;);<br>      });<br>      $(&quot;.g .VwiC3b &quot;).each((i, el) =&gt; {<br>        snippets[i] = $(el).text();<br>      });<br>      $(&quot;.g .yuRUbf .NJjxre .tjvcx&quot;).each((i, el) =&gt; {<br>        displayedLinks[i] = $(el).text();<br>      });<br><br>      const organicResults = [];<br><br>      for (let i = 0; i &lt; titles.length; i++) {<br>        organicResults[i] = {<br>          title: titles[i],<br>          links: links[i],<br>          snippet: snippets[i],<br>          displayedLink: displayedLinks[i],<br>        };<br>      }<br>      console.log(organicResults)<br>    });<br>};<br><br>getOrganicData();</pre><p>Into something usable by editing this line</p><pre>$(&quot;.yuRUbf &gt; a &gt; h3&quot;).each((i, el) =&gt; {<br>        titles[i] = $(el).text();</pre><p>This “.yuRUbf &gt; a &gt; h3” is something that you’ll see when you do inspect element using your browser. It’s something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQd5ibmEhtTXxs3jnIdCXg.png" /><figcaption>Figure 5. Inspect element.</figcaption></figure><p>Hover your mouse pointer until a section of the result got highlighted. Like this one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ey7BWsiMcbkuy2m2tY3K8Q.png" /><figcaption>Figure 6. Highlighted part.</figcaption></figure><p>Then we’ll work from here, keep expanding until a specific part like the title got highlighted. Then see the class mentioned in the element tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*tRLiVQzUTuMsC-HgRK0iCw.png" /><figcaption>Figure 7. Element tab.</figcaption></figure><p>See the class=”gs_rs” and many other class section of the element are something that you should use to replace this code</p><pre>$(&quot;.yuRUbf &gt; a &gt; h3&quot;).each((i, el) =&gt; {<br>        titles[i] = $(el).text();</pre><p>into</p><pre>$(&quot;.gs_rt&quot;).each((i, el) =&gt; {<br>        titles[i] = $(el).text();</pre><p>The code above only valid for the title of the website, for the rest of them, you should redo the whole thing i mentioned above, but now for different section like snippets, author, etc. After changing the class and search url to the relevant google scholar search, the final code would be like this.</p><pre>const unirest = require(&quot;unirest&quot;);<br>const cheerio = require(&quot;cheerio&quot;);<br><br>const getOrganicData = () =&gt; {<br>  return unirest<br>    .get(&quot;https://scholar.google.com/scholar?hl=en&amp;as_sdt=0%2C5&amp;q=LiCl&amp;btnG=&quot;)<br>    .headers({<br>      &quot;User-Agent&quot;:<br>        &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36&quot;,<br>    })<br>    .then((response) =&gt; {<br>      let $ = cheerio.load(response.body);<br><br>      let titles = [];<br>      let author = [];<br>      let snippets = [];<br>      let TimesCited = [];<br><br>      $(&quot;.gs_rt&quot;).each((i, el) =&gt; {<br>        titles[i] = $(el).text();<br>      });<br>      $(&quot;.gs_a&quot;).each((i, el) =&gt; {<br>        author[i] = $(el).text();<br>      });<br>      $(&quot;.gs_rs&quot;).each((i, el) =&gt; {<br>        snippets[i] = $(el).text();<br>      });<br>      $(&quot;.gs_fl.gs_flb&quot;).each((i, el) =&gt; {<br>        TimesCited[i] = $(el).text();<br>      });<br><br>      const organicResults = [];<br><br>      for (let i = 0; i &lt; titles.length; i++) {<br>        organicResults[i] = {<br>          title: titles[i],<br>          author: author[i],<br>          snippet: snippets[i],<br>          TimesCited: TimesCited[i],<br>        };<br>      }<br>      console.log(organicResults)<br>    });<br>};<br><br>getOrganicData(); </pre><p>Now save the file, and back to the cmd shortcut, we made earlier. There type node &#39;filename&#39;.js and enter, the result should be a bunch of search result containing title, snippets, etc. Like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XTgMaFWXbDqpHRSVAyP60Q.png" /><figcaption>Figure 8. Something wrong.</figcaption></figure><p>or maybe not, clearly somthing has gone wrong and we need to find out. Back to the .js file we made and change console.log(organicResults) to console.log(response.body) and rerun the .js file via the cmd. We should get an html code like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iYD3yZf0RKxIIxGep7MhpQ.png" /><figcaption>Figure 9. HTML code from .js file.</figcaption></figure><p>After that, copy paste and made an HMTL file with .html extension, run it and your browser shall reveal the problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vMMyIoxa8ABnxy6Jz3KQ2A.png" /><figcaption>Figure 10. The problem.</figcaption></figure><p>As you can see, the search engine has blocked access to the result because our connection doesn’t seem human. To combat this all we need to do is, change this following line.</p><pre>.headers({<br>      &quot;User-Agent&quot;:<br>        &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36&quot;,</pre><p>We need to change the version of the browser or operating system that were mentioned in that line, until we could bypass this problem. After that the result should be look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JCzDJQctV26Xx39m_ysg6w.png" /><figcaption>Figure 11. The result of scraping.</figcaption></figure><p>Using the same method we could also put the amount of search results below our search results, by modifying the code like this.</p><pre>const unirest = require(&quot;unirest&quot;);<br>const cheerio = require(&quot;cheerio&quot;);<br><br>const getOrganicData = () =&gt; {<br>  return unirest<br>    .get(&quot;https://scholar.google.com/scholar?hl=en&amp;as_sdt=0%2C5&amp;q=LiCl&amp;btnG=&quot;)<br>    .headers({<br>      &quot;User-Agent&quot;:<br>        &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Chrome/118.0.5993.80 Safari/537.36 &quot;,<br>    })<br>    .then((response) =&gt; {<br>      let $ = cheerio.load(response.body);<br><br>      let titles = [];<br>      let author = [];<br>      let snippets = [];<br>      let TimesCited = [];<br><br>      $(&quot;.gs_rt&quot;).each((i, el) =&gt; {<br>        titles[i] = $(el).text();<br>      });<br>      $(&quot;.gs_a&quot;).each((i, el) =&gt; {<br>        author[i] = $(el).text();<br>      });<br>      $(&quot;.gs_rs&quot;).each((i, el) =&gt; {<br>        snippets[i] = $(el).text();<br>      });<br>      $(&quot;.gs_fl.gs_flb&quot;).each((i, el) =&gt; {<br>        TimesCited[i] = $(el).text();<br>      });<br><br>      const organicResults = [];<br><br>      for (let i = 0; i &lt; titles.length; i++) {<br>        organicResults[i] = {<br>          title: titles[i],<br>          author: author[i],<br>          snippet: snippets[i],<br>          TimesCited: TimesCited[i],<br>        };<br>      }<br><br>      const resultstat = &quot;There are&quot; + $(&quot;.gs_ab_md&quot;).text();<br><br>      console.log(organicResults);<br>      console.log(resultstat)<br>    });<br>};<br><br>getOrganicData();</pre><p>Theoritically, this should give you, list of article and amount of search result below it (if you want the amount of search result above list of result, just move the console.log(resultstat) above). Sadly i could not show you the full result because my access are now blocked again by google, so i could only show the result amount for you. Three words were chosen for this: LiCl, Solid, and Data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*y-4Sch5QV0XKZE_EuRJZng.png" /><figcaption>Figure 12. Data for one word</figcaption></figure><p>That just one word, now we’ll use two words with random order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*wmGN6paHpQiwrKdGCbUykg.png" /><figcaption>Figure 13. Data for two words</figcaption></figure><p>Now for three words with random order,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*zFeyKqo7pBUnbIRwdYERug.png" /><figcaption>Figure 14. Data for three words.</figcaption></figure><p>Now for a three words as a proper phrase. Phrase chosen: Solid LiCl Data for MSR Simulation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*rnzBCUIjKSEdJCa72RyS8g.png" /><figcaption>Figure 15. Data for a phrase.</figcaption></figure><h3>Turning the Output Into a CSV File.</h3><p>To do this we need json2csv package installed, and make a new file so that if something wrong were to happen we could minimize the loss we suffer. For the code itself, it was something like this.</p><pre>const unirest = require(&quot;unirest&quot;);<br>const cheerio = require(&quot;cheerio&quot;);<br>const j2cp = require(&quot;json2csv&quot;).Parser;<br>const fs = require(&quot;fs&quot;);<br><br>const getOrganicData = () =&gt; {<br>  return unirest<br>    .get(&quot;https://scholar.google.com/scholar?hl=en&amp;as_sdt=0%2C5&amp;q=LiCl&amp;btnG=&quot;)<br>    .headers({<br>      &quot;User-Agent&quot;:<br>        &quot;Mozilla/5.0 (Linux; Android 14) Chrome/83.0.4103.97 Safari/537.36&quot;,<br>    })<br>    .then((response) =&gt; {<br>      let $ = cheerio.load(response.body);<br><br>      let titles = [];<br>      let author = [];<br>      let snippets = [];<br>      let TimesCited = [];<br><br>      $(&quot;.gs_rt&quot;).each((i, el) =&gt; {<br>        titles[i] = $(el).text();<br>      });<br>      $(&quot;.gs_a&quot;).each((i, el) =&gt; {<br>        author[i] = $(el).text();<br>      });<br>      $(&quot;.gs_rs&quot;).each((i, el) =&gt; {<br>        snippets[i] = $(el).text();<br>      });<br>      $(&quot;.gs_fl.gs_flb&quot;).each((i, el) =&gt; {<br>        TimesCited[i] = $(el).text();<br>      });<br><br>      const organicResults = [];<br><br>      for (let i = 0; i &lt; titles.length; i++) {<br>        organicResults[i] = {<br>          title: titles[i],<br>          author: author[i],<br>          snippet: snippets[i],<br>          TimesCited: TimesCited[i],<br>        };<br>      }<br>      //console.log(organicResults)<br>      const parser = new j2cp();<br>      const csv = parser.parse(organicResults);<br>      fs.writeFileSync(&quot;./LiCl.csv&quot;, csv);<br>    });<br>};<br><br>getOrganicData();</pre><p>The output of this should be LiCl.csv and contain data from figure 11. Let’s see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*_FBhu3ssGhYkaWUssy6Jcw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FQlp_BlANzHK0PfDHTDung.png" /><figcaption>Figure 16. The result in csv file.</figcaption></figure><h3>Conclusion</h3><p>Data scraping through Node JS usually used to automate searching for data on specific site or search engine. This method is quick and very beneficial for researcher since it’s faster and offer the same results as doing it manu-ally. Despite it’s advantage, as seen from figure 16, the results obtained by this method are only results from the first page of the search engine. Besides that, since we’re only using three words, as seen from figure 12–15, the results are still in the thousands with search result from a phrase being the narrowest, that is at 7100 results.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f33562a1a7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Some Things Just Don't Exist: A Google Scholar Journey]]></title>
            <link>https://medium.com/@rizki.ardika.f/something-just-dont-exist-a-google-scholar-journey-1c935bcb0b1f?source=rss-8bc487ec25dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c935bcb0b1f</guid>
            <category><![CDATA[google-scholar]]></category>
            <category><![CDATA[search-tips]]></category>
            <dc:creator><![CDATA[Rizki A. F. ]]></dc:creator>
            <pubDate>Thu, 19 Oct 2023 18:37:36 GMT</pubDate>
            <atom:updated>2023-10-20T00:41:42.661Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*hnJt575VOL9E21qD6D-O6g.png" /><figcaption>Figure 1. Google Scholar Homepage</figcaption></figure><p>Google Scholar has been a great tool for helping college student and re-searcher in their project/research. After all, all great theory, postulate, etc. start with gathering sources/reference (after coming up with the idea) in the form of experiment or simulation result, be it done by themselves or their predecessor. Google Scholar or GS in short, help researcher to find the later. In this article we’re going to try different method of searching in GS and see if we can find a specific article about LiCl thermal data.</p><h3>Plain Simple Search</h3><p>A simple search usually done by doing what you would normally do with common google search. In this case, let’s type LiCl in the search box. It will resulted as below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HC9SL_lvDBJFo3YOXBxTIA.png" /><figcaption>Figure 2. Simple search result of LiCl.</figcaption></figure><p>As you could see in figure 2, there are still quite a lot of result. This is happening since we’re only doing a simple search and not going super specific about it.</p><h3>Word Combination</h3><p>Now, to make our search more specific let’s add more word to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1kcbMUu9YBWgKylcC4FlJQ.png" /><figcaption>Figure 3. Search result of LiCl data.</figcaption></figure><p>But as you can see, instead of narrowing it down we’re actually making it appear to be broader than ever, well it’s actually not become broader but the number of articles which specifically deal with data or LiCl data are much broader than articles that only talk about LiCl alone. Since we wanted to know about specific LiCl data, let’s narrow it down again by adding more words.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tj5UZFWSoL1cqWnqePZXVQ.png" /><figcaption>Figure 4. Search result using more specific word</figcaption></figure><p>As you can see, we’re finally able to get a narrower result. This is good, let’s continue with other technique.</p><h3>Quote or Phrase</h3><p>Beside combining words, we could search our topic using Quote/phrase instead. Now let’s try to use “LiCl data” instead of LiCl data and see the difference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nDdnyi9ju7LWnr0N-iEi2Q.png" /><figcaption>Figure 5. Searching using phrase</figcaption></figure><p>As you could see in figure 5, this is the narrowest result as far. After seeing this let’s get greedy and search for “LiCl data at 700 K temperature”. Surely the result would be even greater.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6nOCcV1oowp1WLgr0-ykTw.png" /><figcaption>Figure 5. Search result for “LiCl data at 700 K temperature”</figcaption></figure><p>Oopsie daisy, seems like we became too greedy. This means that there are no article with a specific phrase “LiCl data at 700 K temperature” in it, at time like this, it is better to be more general with this method or just move on to other method.</p><h3>Include and Exclude Words</h3><p>We could also make our search result narrower by using “+” to include the word after this character or “-” to exclude words after this character into our search results. Let’s try and see the result below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMmspCS3397LsW22_-dGkQ.png" /><figcaption>Figure 6. Search result when multiple words included.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bR833Y7qdjOdaOizILM9dw.png" /><figcaption>Figure 7. Search result when there are multiple excluded and included words.</figcaption></figure><p>So far using exclusion and inclusion of certain words made the result diffe-rent compared to the initial combined words search in figure 3, be it in how much narrower the result is or what the top 3 result are. Next let’s use one of included word as combined words and see the difference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hKxTJq5boIJPavwK89tjDA.png" /><figcaption>Figure 8. Search result when included words became combined words.</figcaption></figure><p>Surprisingly it gave a different result, it became less narrow, the 2nd result from figure 7 that we might actually now gone. This is not good, let’s compensate this by went back and further excluding and including more words.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hdVmIiaoQcL1KfBZUAtpYg.png" /><figcaption>Figure 9. Search result</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hLvqv5BQMZvq55KrubmnAQ.png" /><figcaption>Figure 10. More exclusion added.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u5OhA8ctBVMINMXnOXa6zw.png" /><figcaption>Figure 11. A more narrow result by mentioning value that we want to know.</figcaption></figure><p>We could further narrow the result, but looking at the current result, it seems be wasteful, since the first result are the only relevant result. Sadly, it is still not something i need.</p><h3>Specific Site Search</h3><p>We could narrow down our search result by restrict the search to only one specific site, to do this we could use the operator “site:” at the end of our search keyword and input what site we want. For example, look at the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o73Aj3_BhBb7Q4pmrQgJjg.png" /><figcaption>Figure 12. Site search at researchgate.net</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VAKjuiaFj4aVqwPsGgEDGg.png" /><figcaption>Figure 13. Site search at <a href="https://www.bing.com/ck/a?!&amp;&amp;p=2035da7e4418737dJmltdHM9MTY5NzY3MzYwMCZpZ3VpZD0wMzc4Mzc1NC1hNWE3LTZiY2QtM2FhNC0yN2MzYTFhNzY1OTUmaW5zaWQ9NTE5NQ&amp;ptn=3&amp;ver=2&amp;hsh=3&amp;fclid=03783754-a5a7-6bcd-3aa4-27c3a1a76595&amp;psq=wiley&amp;u=a1aHR0cHM6Ly9vbmxpbmVsaWJyYXJ5LndpbGV5LmNvbS8&amp;ntb=1">onlinelibrary.wiley.com</a>.</figcaption></figure><p>By restricting the site alone, the results are already very narrow, now it’s time to combine this method with previous method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y11f2JP2oswjhuh5B3Ew7Q.png" /><figcaption>Figure 14. Quote-site combination result.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jbhJat_gURhhSFHT5cynIg.png" /><figcaption>Figure 15. Exclude-Include-Site combination result.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V-x7_0scdmbaZF38Sh8gZA.png" /><figcaption>Figure 16. Exclude-Include-Site combination result 2.</figcaption></figure><h3>Can’t Find it</h3><p>Now that we’re able to search using GS with multiple method, the chance to find that specific things that we need to complete our research increase exponentially, right?… right?. Well, sadly there are still chances of you not finding it in the end, for example the things i used as example for this whole journey. In the end there are no article providing thermal data for LiCl at temperature around 700 kelvin, suck but no need to cry just yet. Here are something you could do when this happen:</p><ul><li>Check and recheck your words, exclusion, inclusion.</li><li>Use more combination in your exclusion and inclusion.</li><li>Try some help from AI like perplexity.</li><li>Some simulation app like COMSOL actually provide some material data for you to use inside the app, try them out.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c935bcb0b1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making Plot in Python]]></title>
            <link>https://python.plainenglish.io/making-plot-in-python-a01f983e46fe?source=rss-8bc487ec25dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/a01f983e46fe</guid>
            <category><![CDATA[matplotlib]]></category>
            <category><![CDATA[basics]]></category>
            <category><![CDATA[physics]]></category>
            <dc:creator><![CDATA[Rizki A. F. ]]></dc:creator>
            <pubDate>Wed, 13 Sep 2023 10:29:24 GMT</pubDate>
            <atom:updated>2024-01-25T06:49:25.551Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*SCAV4YPS_wQk5S-rKxRirQ.png" /><figcaption>Figure 1. A line plot (Moruzzi, 2020)</figcaption></figure><p>Plot a term used to describe a graphical representation of data could be done in a lot of ways. There’s a lot of applications that could be used to create a plot, such as Microsoft Excel, MATLAB, etc. Beside using an established apps, you could also made plot using computing languages of your choice. Today i will tell you how to graphically represent your data using python, the reference used would be from Essential Python for the Physicist by Giovanni Moruzzi.</p><h3><strong>Pyplot</strong></h3><p>In python there’s a lot of library you could use, for plotting we will use matplotlib and its plotting module pyplot. Pyplot ussually used to make Matplotlib function a lot like MATLAB. Using pyplot we could customize our graph to satisfy our needs, whether plot lines, adding label, and many more could be done with this.</p><h3><strong>Plotting List of Number</strong></h3><p>To plot a list of number, first you need to get a list of number, for this example we’ll use [1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0]. The code that we’ll use are shown below:</p><pre>#!/ usr/ bin/env python3 <br>import matplotlib.pyplot as plt <br># <br>plt.plot ([1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0]) <br>plt.show( )</pre><p>At line 2 we see that pyplot were imported under the names plt, and to use all command associated pyplot we now need to use plt instead, as seen in line 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*5Ky-_AxkjOuLE4dFMxevCw.png" /><figcaption>Figure 2. Result of code before.</figcaption></figure><p>As you see we haven’t specified whether the data is y or x, but the machine spirit will assume that the data is y. We, the children of omnissiah could of course specify which data is in what axis.</p><p>4 plt.plot ([3.0,4.0,5.0,6.0,7.0,8.0],[8.0,16.0,32.0,64.0,128.0,256.0], ’ro ’)</p><p>We modified the 4th line into something like the above. The first set of data will be x and the second will be y, the ro in the end means that we don’t want the data to be served in a wacky line, we want it in red (r) circle (o)™.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*4JsFMUKrwKVoCAQHUZDW9w.png" /><figcaption>Figure 3. Result of our improved code.</figcaption></figure><p>Let’s make our life a bit harder, we love pain and suffering after all. Lets add complexity to our plot by plotting three data, and two of them are a function. We will need numpy for this one.</p><pre>#!/usr/ bin/env python3 <br>import matplotlib. pyplot as plt <br>import numpy as np <br># <br>x=np.arange (0.0 ,2.0 ,0.05) <br>plt.plot (x,x,x,np. sqrt (x) , &#39;ro &#39; ,x,x∗x, &#39;g^ &#39; ) <br>plt.show( )</pre><p>note: in the book Moruzzi use x**2 to represent x², but if you just copy paste directly from the e-book it‘s fine, but i rather retype it, it is, in my opinion help me in learning the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*vgi8BgCoV87xwDZUCqU9eg.png" /><figcaption>Figure 3. Result of our complicated plot code.</figcaption></figure><h3><strong>Plotting Function</strong></h3><p>We’ve kinda do that already, but let’s try again, now using even more function than the last example. First a basic sin graph.</p><pre>#!/usr/ bin/env python3 <br>import matplotlib. pyplot as plt <br>import numpy as np <br># <br>x=np.arange (0,6.4 ,0.1)<br>y=np.sin(x)<br>plt.plot (x, y) <br>plt.show( )</pre><p>Line 5 is a command that will create an array of number from 0 to 6.4 with 0.1 step. It is important to also remember that every trigonometric function use radian instead of degree here. We could improve this code by adding detail such as label using plt.ylabel ( r ’$\ sin (x)$’ , fontsize=24), grid using plt.grid (True), and many more, I’m not going to show you how it’s done, do it yourself.</p><h3>Multiple Plot</h3><p>Let say you have two function and you want to have its plot placed side by side at the same time. That could be done using plt.subplot(1,2,1)where (1,2,1) represents row, column, and the last 1 means that the nex plt.plot will be in the first column, and if you put 2 intead, the next plt.plot will be in the second column. <br>Simple example:</p><pre>#!/ usr/ bin/env python3<br>import matplotlib.pyplot as plt<br>import numpy as np<br>#<br>x = np.arange (0,6.4 ,0.1)<br>y= np.sin(x)<br>plt.subplot(1,2,1)<br>plt.plot(x,y, &#39;r-&#39;)<br>plt.grid(True)<br>plt.xticks(fontsize=14)<br>plt.yticks(fontsize=14)<br>plt.xlabel(r&#39;$x({\rm rad})$&#39;, fontsize=14)<br>plt.ylabel(r&#39;$\ sin (x)$&#39;, fontsize=14)<br>plt.tight_layout( )<br>#<br>plt.subplot (1,2,2)<br>plt.plot(x,np.exp(x))<br>plt.grid(True)<br>plt.xticks(fontsize=14)<br>plt.yticks(fontsize=14)<br>plt.xlabel(&#39;X&#39;, fontsize=14)<br>plt.ylabel(r&#39;$e^x$&#39;, fontsize=14)<br>plt.tight_layout( )<br>#<br>plt.savefig (&#39;MultiPlot0.eps&#39;, format=&#39;eps&#39;, dpi=1000)<br>plt.show( )</pre><p>result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*SnIvv51KeAjmTmT39Rlyzg.png" /><figcaption>Figure 4. Result of subplot example.</figcaption></figure><h3><strong>Logarithmic Axis Scales</strong></h3><p>We could set the scale of our plot using command plt.xscale(`log`)or plt.xscale(`symlog`)if the x value is zero or negative. <br>example:</p><pre>#!/ usr/ bin/env python3<br>import matplotlib.pyplot as plt<br>import numpy as np<br>#<br>x = np.arange (0,100,0.1)<br>y= np.sqrt(x)<br>plt.subplot(2,2,1)<br>plt.plot(x,y, &#39;r-&#39;)<br>plt.grid(True)<br>plt.xticks(fontsize=14)<br>plt.yticks(fontsize=14)<br>plt.xlabel(r&#39;$x$&#39;, fontsize=14)<br>plt.ylabel(r&#39;$sqrt(x)$&#39;, fontsize=14)<br>plt.tight_layout( )<br>#<br>plt.subplot (2,2,2)<br>plt.plot(x,y)<br>plt.grid(True)<br>plt.xscale(&#39;log&#39;)<br>plt.xticks(fontsize=14)<br>plt.yticks(fontsize=14)<br>plt.xlabel(r&#39;$\ log$&#39;, fontsize=14)<br>plt.ylabel(r&#39;$sqrt(x)$&#39;, fontsize=14)<br>plt.xlim(x.min(),x.max())<br>plt.tight_layout( )<br>#<br>plt.subplot (2,2,3)<br>plt.plot(x,y)<br>plt.grid(True)<br>plt.xscale(&#39;symlog&#39;)<br>plt.xticks(fontsize=14)<br>plt.yticks(fontsize=14)<br>plt.xlabel(r&#39;$\ symlog$&#39;, fontsize=14)<br>plt.ylabel(r&#39;$sqrt(x)$&#39;, fontsize=14)<br>plt.xlim(x.min(),x.max())<br>plt.tight_layout( )<br>#<br>plt.savefig (&#39;MultiPlot0.eps&#39;, format=&#39;eps&#39;, dpi=1000)<br>plt.show( )</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*i86P2dD8EqC0qCArL6AgUQ.png" /><figcaption>Figure 5. The difference between plot with linear scale, log scale, and symlog.</figcaption></figure><p>We could clearly see the difference between the use of log and symlog at figure 5. When using log scale, the value at x=0 aren’t 0 this was not the same as the value found at linear scale, but when using symlog, the value is the same as the one found at linear scale.</p><h3><strong>Plotting Field Lines</strong></h3><p>Ever wonder how to plot an electromagnetic field using python? or perhaps just some basic vector field? well its complicated process but we’ll see. The code below are code to draw a Field, a Field is an area where a certain things exist, like mentioned before electromagnetics, velocity, etc.. The result of this code are rather unlclear, simplistic and lacking, but sadly this is all i got.</p><pre>#!/usr/bin/env python3<br>#<br>import matplotlib.pyplot as plt<br>import numpy as np<br>#<br>yplus = 1.0<br>yminus = -1.0<br>xplus = xminus = 0.0<br>rad = 0.1<br>lim = 30<br>nLin = 60<br>plt.axis(&#39;off&#39;)<br>#<br>i = 0<br>d = 0.05<br>xlist = []<br>ylist = []<br>while i &lt; nLin:<br> alpha0 = i * 2 * np.pi / float(nLin) , there should be an indent here<br> x = xplus + rad * np.cos(alpha0)<br> y = yplus + rad * np.sin(alpha0)<br> xlist.append(x)<br> ylist.append(y)<br> i += 1<br> while True: , there should be an indent here<br> alpha = np.arctan2((y - yplus), (x - xplus))<br> beta = np.arctan2((y - yminus), (x - xminus))<br> Eplus = 1.0 / ((x - xplus) ** 2 + (y - yplus) ** 2)<br> Eminus = -1.0 / ((x - xminus) ** 2 + (y - yminus) ** 2)<br> Ex = Eplus * np.cos(alpha) + Eminus * np.cos(beta)<br> Ey = Eplus * np.sin(alpha) + Eminus * np.sin(beta)<br> gamma = np.arctan2(Ey, Ex)<br> x = x + d * np.cos(gamma)<br> y = y + d * np.sin(gamma)<br> if x &gt; lim or x &lt; -lim or y &gt; lim or y &lt; 0:<br> break , there should be an indent here<br> xlist.append(x)<br> ylist.append(y)<br>plt.plot(xlist, ylist, &#39;k-&#39;, linewidth=0.5) , aligned with the While True above<br>ylist = -np.array(ylist)<br>plt.plot(xlist, ylist, &#39;k-&#39;, linewidth=0.5)<br>plt.savefig(&#39;DipoleField.pdf&#39;, format=&#39;pdf&#39;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*7ZuseM7z634SN2kwYx1ttg.png" /><figcaption>Figure 6. The result of code above</figcaption></figure><h3><strong>Animating Your Plot</strong></h3><p>Using matplotlib there’s two easy way to make animation, using Func-Animation or ArtistAnimation. FuncAnimation as the name suggest will use a function and repeat those function to make animation, so it close to what a simmulation is. Today we’ll learn about FuncAnimation.</p><p>You know the drill</p><pre>#!/usr/bin/env python3<br>#<br>import numpy as np<br>import matplotlib.pyplot as plt<br>import matplotlib.animation as anim<br>#<br>fig,ax=plt.subplots( figsize =(10,6))<br>ax.set(ylim=(-1,1))<br>#<br>def func(x):<br>return np.sin(8*x)*np.exp(-0.1*x)<br>#<br>x= np.arange(0,10,0.01)<br>line1,=ax.plot (x, func(x))<br>#<br>def animate(i):<br>xx=x+i/100<br>line1.set_xdata(xx)<br>line1.set_ydata(func(xx))<br>ax.set(xlim=(xx[0] ,xx[999]))<br>return line1,<br>#<br>ani=anim.FuncAnimation(fig, animate, interval=20)<br>plt.show( )</pre><p>The code above animate function sin(8x)*e^(-1x).</p><p>The result would be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Q795PWoeQhaA_1ksDmHw6g.gif" /><figcaption>Figure 7. The animation of sin(8x)*e^(-1x)</figcaption></figure><p>Different function will require different code, if the function are a function of two variable you’ll have to modify the funct(x) to func(x, t) if your other variable are t. If you have such equation, let say a wave packet equation, you can enter it and set all the variable such as ‘k’ etc outside or inside the defined function. Tho if you have some difficulties, you could always ask ChatGPT and enter your equation, it’s lazy and not recomended, but who am i to stop you. I’ve asked said AI to make me some animation and the result were pretty good.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*VW-ZrkIrYDuYRCHfm3aw0w.gif" /><figcaption>Figure 8. Wave packet-like wave animation made by ChatGPT 3.5.</figcaption></figure><h3>Conclussion</h3><p>Making plot aren’t just fun but also useful to represent your data and make it more interesting while making it easy to understand. I made this article in hope that reader will not just copy paste the code but also playing around with all the parameter in the code. My lack of explanation is not a mistake, but rather an attempt for you to learn and explore more, the codes are in english after all, it won’t be that hard. Happy learning.</p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://twitter.com/inPlainEngHQ"><strong>X</strong></a><strong> | </strong><a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a><strong> | </strong><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a><strong> | </strong><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a><strong> | </strong><a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a></li><li>Visit our other platforms: <a href="https://stackademic.com/"><strong>Stackademic</strong></a><strong> | </strong><a href="https://cofeed.app/"><strong>CoFeed</strong></a><strong> | </strong><a href="https://venturemagazine.net/"><strong>Venture</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a01f983e46fe" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/making-plot-in-python-a01f983e46fe">Making Plot in Python</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You Should Learn Matrix]]></title>
            <link>https://medium.com/@rizki.ardika.f/you-should-learn-matrix-eae3a62fc78?source=rss-8bc487ec25dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/eae3a62fc78</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[matrix]]></category>
            <dc:creator><![CDATA[Rizki A. F. ]]></dc:creator>
            <pubDate>Tue, 05 Sep 2023 20:48:00 GMT</pubDate>
            <atom:updated>2023-09-05T20:48:00.038Z</atom:updated>
            <content:encoded><![CDATA[<p>Seriously, you should, while it’s not the easiest thing to learn, matrices have a lot of use in solving a lot of equations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D7xxD_yZf6pKD1G0mmlJ2A.png" /><figcaption>Figure 1. m by n matrix. (source: byjus.com)</figcaption></figure><p>You should learn matrix, why? it is because matrix is a fundamental tool used in a lot of mathematical and scientific problems, usually used to process or manipulate data, solving equations, and any other calculations that were too complicated or even could not be calculated without the use of matrices. Now, knowing how important this tool is, I bet you want to learn about this amazing tools as soon as possible (I lied, I know you hate it). Although sadly you have to be patient, because before we dive deeper, we should first learn what matrices really are.</p><h3><strong>Matrix Definition</strong></h3><p>By general definition a matrix (plural matrices) is an array of numbers, symbols, or expressions that were arranged in a rectangular shape with a specific number of row and column commonly called dimension (ex: a matrix of 2 by 3 dimension will have 2 row and 3 column). Matrix consists of elements that represent those numbers or symbols or whatever you want (that includes unit vector, derivative operator, etc.). These elements usually written in the form of a letter with two indices, for example in figure 1, you could see there is a letter namely “a” with two indices (a little thing beside said letter) that is 1 and 1, the letter “a” usually mean that this letter is an element of a matrix namely A, while the little number, the first “1” means that this element is located in the first row, and the second &quot;1&quot; means that this element is located in the first column of our matrix A. While in practice the indices of elements usually written in numbers, for learning purposes, the number are replaced by letter “i” and “j” where i represents row and j represent column, this way of writing element of a matrix is common since it simplifies things and make further work with matrix easier.</p><h3><strong>Basic Operation</strong></h3><p>Just like any other mathematical operation, basic operations such as addition, subtraction, and multiplication could be applied to matrices.</p><p>A. Addition and subtraction<br>While this operations are (in my opinion) the easiest of bunch, there are some crucial rules that you need to remember. First, this operation only possible for matrices with the same dimension, that means a two-by-two matrices could only be added (or subtracted) by other two-by-two matrices. The other thing is the thing that being added or subtracted are the elements of matrix. The rest are the same with ordinary addition and subtraction. Example:</p><p>lets say that we have two matrices, namely A and B, which had elements a[i][j] for matrix A and b[i][j] for matrix B, both matrix have the same dimension. When the two matrices are added, it resulted in a new matrix let us call it C, and its element c[i][j] (obviously the new matrix will also have the same dimension as A and B). Using our previous rule, we could wrote the whole operation as.</p><blockquote>A + B = C, or in its full matrix form (assuming it’s a 2 by 2 matrices)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*TtWk4FWSWPh7G8s7pPWZZw.png" /></figure><blockquote>with:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*g_blt6F0gjjcewTY8Ho1pw.png" /></figure><blockquote>or, in a simple term:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/179/1*q3pC7bHaDfs4cn5lzkKlMw.png" /></figure><p>For subtraction just change the plus sign into minus one.</p><p>B. Multiplication with a scalar<br>I will just assume you already learned what a scalar and vector are, if you haven’t then too bad, I will not explain what it is, it’s 2 am and I didn’t get paid for this, let me sleep, now back to matrix, a matrix multiplied by a scalar are simple. Imagine a matrix, lets name it A and the dimension could be whatever, now also imagine a scalar lets call it k. The result of A multiplied by k would be a new vector, lets called it B. The complete operation could be seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*4W-OdkCey0tNOgCBMpQ0Fg.png" /></figure><blockquote>this could be written as, b[i][j]= a[i][j]*k</blockquote><p>C. Element wise multiplication (Hadamard product)<br>Similar to scalar multiplication, Hadamard product between two matrices are basically multiplications between matrices element with the same index, for matrix with the same dimension, for matrix with different dimension however, thing will be a bit more complicated.</p><p>For two matrices with the same dimension</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*O-QzIadR8WEdsIJN38Bm6w.png" /></figure><p>For two matrices with different dimension</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*i_rXUZlxzfzaOuA407C9dA.png" /></figure><p>D. Vector multiplication<br>Vector multiplication could be divided into two: dot and cross multiplication, or more known as dot and cross product.</p><p>D1. Dot product<br>A dot product between two vector will only have value when two element of a vector of the same unit vector, so if a vector A consist of sum of a[i]e[i] with i is a number starting from 1 to n, were to be multiplied with another vector B that consist of sum of b[j]e[j] with j is a number starting from 1 to n, this operation will only have value when i = j since this operation have rule where if e[i] dot e[j] have different i and j value it will resulted in zero. Another important note, dot product of two vectors will have a scalar result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*nyTJ8nbvPKNZuqoggCMflg.png" /></figure><p>D2. Cross product<br>Unlike dot product, cross product of two vector will result in a new vector. The rule are also different, unlike dot product, cross product only have result when the unit vector are different. When conducting cross product for two vector, we could arrange the vector into 3 by 3 matrix (if the vector three dimensional) and calculate the result using determinant of said matrix. The process are seen below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*J7vVqao3kbWBFOl26QJqFQ.png" /></figure><p>Sadly, the method above only work for 3 by 3 matrix, tho i assure you, if you’re not a theoretical physicist, you’ll rarely encounter vector that is more than 3 dimension. However, if you’re indeed a theoretical physicist, what are you doing here? you should already know all this so please leave, go back to your cave, and solve some quantum entanglement equation or whatever.</p><p>E. Negative matrices<br>Like the name suggest, its a matrices where the entire elements have value lower than zero, or in other word negative value. There’s nothing much to say so here’s a visualization of what i said</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*SBsQF0UJLgqq37MSAH0YRw.png" /></figure><h3><strong>Linear Equation and Matrix Inverse</strong></h3><p>Let say we have three matrices: A, Y, and C. The relation between the three matrices fulfilled the following linear equation, AY=C. That equation is nice and all, but there’s a problem, we didn’t know the value of matrix Y, we do however know the value of matrix A and C. Now now, i know what you’re thinking, “<em>let’s just divide this equation with matrix A, to make the equation look like this: Y=C/A</em>, <em>with this we could find matrix Y.”</em> well we can’t, we couldn’t divide matrix, it is not allowed, we could however change it into Y=CA^-1, where A^-1 is inverse of matrix A. So, by using inverse of a matrix, we could find value of Y that we didn’t know before, but how do we exactly find the inverse of A? we’ll find out.</p><p>To find the inverse of a matrix, we first have to see wether the determinant of said matrix zero or not since a matrix will have inverse only if the deter-minant are nonzero. That rule exist because the basic equation of inverse are, adjoint of said matrix divided by the determinant of said matrix, now you’ll see the problem. Another thing that you have to remember, to check whether your result are correct, try multiplying the inverse with the original matrix, if its resulted in identity matrix then you’re good to go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*eX4jcS2BDVrdq4dc0h2Eiw.png" /></figure><p>c[i][j] were cofactor of matrix A[i][j], and M[i][j] were minor of matrix A, that means M[i][j] is matrix of A but without any elements in row i and column j.</p><h3>Implementation of Matrix in Physical Problem</h3><p>Matrices find extensive application in solving real-world problems, particularly in physics and engineering. For instance, they are used in analyzing electrical circuits, modeling fluid dynamics, and simulation of other physical systems. By representing physical systems as matrices and applying mathematical operations, scientists and engineers can gain valuable insights and make predictions about the behavior of these systems.</p><h3>Conclusion</h3><p>Now that i have show you a lot of things about matrix and its usage (although, i mainly showing you about basic operation of matrices instead of convincing you about why you should learn it), i really hope that i am able to convince you to learn more about matrix. After all, they are versatile tools for representing data, performing operations, solving linear equations, and gaining insights into complex systems. Understanding matrices and their operations is essential for anyone seeking to excel in mathematics and its various applications.</p><blockquote>a[i][j] + b[i][j] = c[i][j]</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eae3a62fc78" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Future Full of Agony: My First Impression of Dr. Viridi SPSF Class]]></title>
            <link>https://medium.com/@rizki.ardika.f/future-full-of-agony-my-first-impression-of-dr-viridi-spsf-class-c8a9ec75a004?source=rss-8bc487ec25dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8a9ec75a004</guid>
            <category><![CDATA[kuliah]]></category>
            <category><![CDATA[kelas-spsf-pak-dudung]]></category>
            <category><![CDATA[ekspektasi]]></category>
            <dc:creator><![CDATA[Rizki A. F. ]]></dc:creator>
            <pubDate>Tue, 29 Aug 2023 20:48:56 GMT</pubDate>
            <atom:updated>2023-08-29T21:10:11.573Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zI3rMJz6tmTEVXU5POINqA.png" /><figcaption>Figure 1. Simulation of Heat Transfer</figcaption></figure><p>Simulation and Modelling of Physical Systems (SPSF) is a subject where you learn all the things needed to perform simulation of a physical system and what come after. Starting from learning problem solving problem using numerical method to application of numerous simulations techniques to solve physics problems. After simulation were done, of course what comes after is data analysis which would be taught alongside simulations method mentioned above, at least that’s what the syllabus told me.</p><p>In this article, i will talk about my first impressions, my expectations, and what i want from this class.</p><h3>FIRST IMPRESSION</h3><p>When asked about first impression, this quote first came to mind:</p><blockquote>“When life gave you lemon, squeeze it, put it inside a water gun and spray it on people’s eyes.”</blockquote><p>I said this because the moment Dr. Viridi (or more well known as Mr. Dudung) said “If i ask you to solve a problem, you may decide on who will solve the next problem” it really does feels like a lemon just sprayed directly into my delicate eye.</p><p>I know for sure that Mr. Dudung did this for a good reason and within our best interest, but i could not help but to believe that he seems unaware of the unwanted consequences of this system which really affect me in a weird way. The unwanted conseqences came from the unexpected and random nature of this system, which in turn intensify my fear of being the chosen one since i hate it when i have to go and stand in front of a crowd, after all i don’t like to be the center of attention. All this combined lead to a rapid shift in my adrenaline level, cold sweat, instinctively avoiding eye contact, hyper panic in silent mode, and many other weird phenomena, which i don’t really like to experience, yet strangely i find it kind of fun, it feels like i was playing a horror game, except rather than avoiding manmade horror beyond comprehension i am actively avoiding becoming embarrassment to my ancestor.</p><p>While my first impression of this class is literally pain and agony with a hint of excitement, i do believe that this system which causing me pain and agony are needed and should be continued. All the joke aside, i’m going to say it again, while i found this method that i usually seen in my time as a high schooler really ‘bothersome’ i could see and understand the effectiveness of it. I also believe that this system has benefit, maybe it could train my confidence, and many more.</p><h3>THE MANY THINGS I EXPECT TO LEARN</h3><p>Obviously, since it’s a simulation class i do expect to learn a lot of simulation method, whether it’s lagrangian or eulerian simulation method. Beside learning simulation method, i also expect the class to be about programming and of course changing a physics equation into a numerical form to be calculated using the program made using python or any other programming language. Since simulation doesn’t just end with obtaining calculation results, the last thing that is also the most important thing i expect to learn from this class are presenting and analyzing data or said calculations result.</p><p>Since the subject name is Simulation and Modelling of Physical Systems, there’s of course modelling part, which i’m not really sure what to expect so i’ll just assume things and said what comes to mind. For the modelling part, i expect to learn how to translate physical phenomena into equations, graph or any other method that is considered representative of that phenomenon. That is all i could think of, i do believe there’s more to it, maybe some detailed knowledge, or maybe i’m completely wrong about this, but for now that’s all i expect.</p><h3>PLAN AND COMITMENT</h3><p>To achieve the highest grade possible i plan to learn python after a long time not doing any programming, hasn’t been realized yet, but i’ll start soon, surely, hopefully. I planned it because Mr. Dudung said that we will be using it and i automatically assume that it will be vital part of this class. The other reason for learning python or planning to do so is because in Computational Physics class we used Pascal instead of any other language, and we all know how old Pascal is, and because of that i feel the urge to upgrade my knowledge.</p><p>Beside learning programming language, i also planning to relearn a lot of thing that i already forgot, that include: any subject before this semester that will be used in this class. After evaluating the subject that needs to be re learned, i have decided to relearn Mechanic and Fluid Mechanic. The first step to realize this plan is by retaking Mechanic class this semester (definitely not because i got C last time). Joke aside, i seriously think that i need to relearn those two subjects, based on the how vital it seems for this class.</p><p>For this class, i plan to invest three hours outside intended time to be used for realization of all the plan i made in this article, this three hour will be spent either by myself or with my study group that was created last week. Those three hours will be spent not in a single day, but in two business days seeing that other classes i took this semester will be as busy as or busier this class. Beside the three hour i invest for my plan, i will also invest another hours for learning via YouTube, i haven’t searched for any specific video to watch, but i will.</p><h3>TARGET</h3><p>While i do believe lowering my expectations will result in me less depressed, i also believe that having low expectations will result in me slacking off, which is bad, so i have no choice but to have a big target. With that being said i declare that this semester i will get A on all classes i took. Hopefully i will really achieve my target, but realistically it’s unlikely, after all it’s all depends on me, and i don’t trust myself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8a9ec75a004" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>