<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7538381093803741892</id><updated>2026-07-07T13:42:08.583-07:00</updated><category term="Fun"/><category term="Thermo-Fluid Science"/><category term="Physics"/><category term="Mathematics"/><category term="Space"/><category term="Electrical"/><category term="Design"/><category term="CAD"/><category term="Materials"/><category term="Apps"/><category term="Programming"/><category term="micro/nano"/><category term="Statistics"/><category term="Sociopolitical"/><category term="Bio"/><category term="Marketing"/><category term="Manufacturing"/><category term="Finance"/><category term="IoT"/><title type='text'>Ruander.com</title><subtitle type='html'>Ideas Put to Work!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.ruander.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.ruander.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>142</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-1745587446988462825</id><published>2024-05-18T16:06:00.000-07:00</published><updated>2024-05-18T16:18:53.129-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Electrical"/><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="IoT"/><title type='text'>How to wire a Pull-Up or Pull-Down Resistor</title><content type='html'>&lt;p&gt;&amp;nbsp;When a digital signal is not connected to either positive (+) or
negative (-), the signal is said to be “floating”. Floating simply means that
the signal is not connected to anything. This will result in giving false indications
when connected to an input which is expecting either a positive or negative
signal. To solve this problem, one can use a Pull-Up Resistor or a Pull-Down Resistor,
depending on what is needed. The figure below shows the correct way to wire a
Pull-Up or Pull-Down Resistor for an active Device or Sensor with an output
signal.&lt;/p&gt;&lt;div style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAz0M-cRaezMW3uK2q9n8OxvuFQ0Xh6yQNznkXf4_bI3rfK4KyI3keIKr-Zkm8HCfZgRhaz868s0MyJLnrxmtUrme0wL0Lg68AwY-c6jQLYBZvy1DT_wUuylQvobR1rjsDrHkMq-dQAr1CjMaAT8L9bRjr_JfD8icr8IoC8qAHF-snzw2ih9maHwPmS2g/s460/PullUpDownResistor5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;257&quot; data-original-width=&quot;460&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAz0M-cRaezMW3uK2q9n8OxvuFQ0Xh6yQNznkXf4_bI3rfK4KyI3keIKr-Zkm8HCfZgRhaz868s0MyJLnrxmtUrme0wL0Lg68AwY-c6jQLYBZvy1DT_wUuylQvobR1rjsDrHkMq-dQAr1CjMaAT8L9bRjr_JfD8icr8IoC8qAHF-snzw2ih9maHwPmS2g/s16000/PullUpDownResistor5.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: white; color: #333333; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;In general, the pull-up or pull-down
resistor should have a larger resistance than the logic circuit&#39;s impedance. A
good rule of thumb is that you want a resistor value on the order of 10kΩ or
higher. Personally, I have had to use Pull-up and Pull-Down resistors for my &lt;a href=&quot;https://www.arduino.cc/&quot; target=&quot;_blank&quot;&gt;Arduino&lt;/a&gt; projects as well as for reading fan speed on fans which have a tachometer output.&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;background: white; color: #333333; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;To learn more about Pull-up or
Pull-Down Resistors please visit these sites:&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;a href=&quot;https://www.douglaskrantz.com/ElecPullUpResistor.html&quot; target=&quot;_blank&quot;&gt;https://www.douglaskrantz.com/ElecPullUpResistor.html&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;a href=&quot;https://learn.sparkfun.com/tutorials/pull-up-resistors/all&quot; target=&quot;_blank&quot;&gt;https://learn.sparkfun.com/tutorials/pull-up-resistors/all&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/1745587446988462825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2024/05/how-to-wire-pull-up-or-pull-down.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/1745587446988462825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/1745587446988462825'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2024/05/how-to-wire-pull-up-or-pull-down.html' title='How to wire a Pull-Up or Pull-Down Resistor'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAz0M-cRaezMW3uK2q9n8OxvuFQ0Xh6yQNznkXf4_bI3rfK4KyI3keIKr-Zkm8HCfZgRhaz868s0MyJLnrxmtUrme0wL0Lg68AwY-c6jQLYBZvy1DT_wUuylQvobR1rjsDrHkMq-dQAr1CjMaAT8L9bRjr_JfD8icr8IoC8qAHF-snzw2ih9maHwPmS2g/s72-c/PullUpDownResistor5.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-6306171427966802976</id><published>2024-03-03T16:55:00.000-08:00</published><updated>2024-03-03T16:55:46.691-08:00</updated><title type='text'>Unveiling the Secrets of Investing: Why You&#39;re Ready to Dive In Now</title><content type='html'>&lt;p&gt;&lt;span style=&quot;background-color: white; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; white-space-collapse: preserve;&quot;&gt;As we journey through the maze of financial literacy, one lesson stands out: the art of investing. Picture this – you&#39;ve mastered the art of saving pennies and living within your means, but what about putting those hard-earned dollars to work for you? That&#39;s where investing steps into the spotlight.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;Let&#39;s rewind a bit. Growing up, I was all about pinching pennies and stashing cash in my piggy bank. But the world of investing? It seemed like a distant galaxy, reserved for the elite with overflowing bank accounts. Little did I know, the key ingredients for investing weren&#39;t just heaps of cash – they were money and time.&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi9ouCBDOiKapTnbH1yVWCcAr7PwI_aAcrLmBGW6IdOj1Mii5QaG67LyId_aOTP5E6rDYLQjLi3Y01w44tIun-y1QNPc6r6gS6Pcy9VenmlcqpGGpIMRVaXnGv8TSLNS9HGBGukghMAM9jCvonq0HLnhaSvn_nBXoz401q8IvkdMrJY4ETSyquGwdE0YyI&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; height=&quot;297&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEi9ouCBDOiKapTnbH1yVWCcAr7PwI_aAcrLmBGW6IdOj1Mii5QaG67LyId_aOTP5E6rDYLQjLi3Y01w44tIun-y1QNPc6r6gS6Pcy9VenmlcqpGGpIMRVaXnGv8TSLNS9HGBGukghMAM9jCvonq0HLnhaSvn_nBXoz401q8IvkdMrJY4ETSyquGwdE0YyI=w297-h297&quot; width=&quot;297&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;Now, here&#39;s the scoop: while you might not have stacks of cash lying around, you&#39;ve got something even more valuable – time. Yep, time is your secret weapon in the world of investing. Starting early means your money has more time to grow and flourish, like planting seeds in a garden and watching them sprout into mighty oak trees. &lt;a href=&quot;https://money.usnews.com/investing/investing-101/articles/2018-07-23/9-charts-showing-why-you-should-invest-today&quot; target=&quot;_blank&quot;&gt;Here&lt;/a&gt; are some charts showing why starting early is important.&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;But hold up – there used to be a catch. Remember those pesky commissions? Yeah, they were like the gatekeepers to the investing world, demanding hefty tolls for each trade. Imagine trying to invest $10 but getting slapped with a $5 fee – talk about a buzzkill! But fear not, my friends, because the tides have turned. Commission-free investing is now the norm, thanks to platforms like &lt;a href=&quot;https://join.robinhood.com/ruandec/&quot; target=&quot;_blank&quot;&gt;Robinhood&lt;/a&gt;, &lt;a href=&quot;https://www.fidelity.com/&quot; target=&quot;_blank&quot;&gt;Fidelity&lt;/a&gt;, and &lt;a href=&quot;https://us.etrade.com/&quot; target=&quot;_blank&quot;&gt;E*TRADE&lt;/a&gt; among many others.&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;And that&#39;s not all – say hello to fractional shares, the game-changer for budding investors everywhere! Got your eye on a pricey stock or ETF but only have a few bucks to spare? No problemo! With fractional shares, you can own a piece of the pie without breaking the bank. It&#39;s like buying a slice of your favorite pizza instead of the whole pie – affordable and oh-so-satisfying.&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhD-bozk3paob9mc87A3oX9uWWyYx1p2v42A9AstO7dCiw5Z0BgU-aXvSyWIjaldqejU-I9O1beemIjMnhB9wz56Ee_1cWuGzISqUiSVpuuaM_06GwcXuAeDbSKr4NhHyqdGJOe2ojYeDlduWZ9Y2e_n16vZK9id1W8e0gm3tyCVcwfmME0va4kBoNn20c&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; height=&quot;280&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEhD-bozk3paob9mc87A3oX9uWWyYx1p2v42A9AstO7dCiw5Z0BgU-aXvSyWIjaldqejU-I9O1beemIjMnhB9wz56Ee_1cWuGzISqUiSVpuuaM_06GwcXuAeDbSKr4NhHyqdGJOe2ojYeDlduWZ9Y2e_n16vZK9id1W8e0gm3tyCVcwfmME0va4kBoNn20c=w280-h280&quot; width=&quot;280&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px; white-space-collapse: preserve;&quot;&gt;Now, let&#39;s talk about the elephant in the room – market knowledge. Sure, you might not have time to pore over financial reports and dissect market trends. But guess what? That&#39;s totally okay! You don&#39;t need to be a Wall Street wizard to make savvy investment decisions. Instead, focus on low-cost, diversified options like index funds and ETFs. They&#39;re like the Swiss Army knives of investing – versatile, reliable, and beginner-friendly. Take a look at &lt;a href=&quot;https://investor.vanguard.com/investment-products/etfs/profile/vti#overview&quot; target=&quot;_blank&quot;&gt;VTI&lt;/a&gt;, great place to start.&lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px 0px; white-space-collapse: preserve;&quot;&gt;In a nutshell, there&#39;s never been a better time to dip your toes into the world of investing, especially for young bucks. Time is on our side, and with just a few bucks, we can kickstart our investment journey. So go ahead, take the plunge – whether it&#39;s $1 or $100, the world of investing is yours for the taking. And the best part? You can set it and forget it, letting your money work its magic while you focus on the fun stuff. Cheers to a bright financial future! &lt;/p&gt;&lt;p style=&quot;--tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-ring-color: rgba(69,89,164,.5); --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 transparent; --tw-ring-offset-width: 0px; --tw-ring-shadow: 0 0 transparent; --tw-rotate: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-scroll-snap-strictness: proximity; --tw-shadow-colored: 0 0 transparent; --tw-shadow: 0 0 transparent; --tw-skew-x: 0; --tw-skew-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; background-color: white; border: 0px solid rgb(227, 227, 227); box-sizing: border-box; color: #0d0d0d; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; margin: 1.25em 0px 0px; white-space-collapse: preserve;&quot;&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiSrg_Mk4WbwkGrTVI0FlKbiEr_5SRIU1CmbxYQS-7h5Zz-kxgnmVwevBB2HrxPrlihYM7gTv5feRvLKzIcUow0xHuhMIQTJxKvaajgIfS_2Id4Pr6lEELBDPazEB7TGsfT36t4jgdC23aVATmtSCBHCny7JAEvbmve32q0wSwSaXN671UtpJ7N6HOg7JE&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; height=&quot;282&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiSrg_Mk4WbwkGrTVI0FlKbiEr_5SRIU1CmbxYQS-7h5Zz-kxgnmVwevBB2HrxPrlihYM7gTv5feRvLKzIcUow0xHuhMIQTJxKvaajgIfS_2Id4Pr6lEELBDPazEB7TGsfT36t4jgdC23aVATmtSCBHCny7JAEvbmve32q0wSwSaXN671UtpJ7N6HOg7JE=w282-h282&quot; width=&quot;282&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/6306171427966802976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2024/03/unveiling-secrets-of-investing-why.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/6306171427966802976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/6306171427966802976'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2024/03/unveiling-secrets-of-investing-why.html' title='Unveiling the Secrets of Investing: Why You&#39;re Ready to Dive In Now'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEi9ouCBDOiKapTnbH1yVWCcAr7PwI_aAcrLmBGW6IdOj1Mii5QaG67LyId_aOTP5E6rDYLQjLi3Y01w44tIun-y1QNPc6r6gS6Pcy9VenmlcqpGGpIMRVaXnGv8TSLNS9HGBGukghMAM9jCvonq0HLnhaSvn_nBXoz401q8IvkdMrJY4ETSyquGwdE0YyI=s72-w297-h297-c" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-670203786475890496</id><published>2020-11-27T16:20:00.000-08:00</published><updated>2020-11-27T16:20:31.108-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Finance"/><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics"/><title type='text'>Compound Interest Calculator with Contribution</title><content type='html'>&lt;p&gt;Albert Einstein is famously quoted for saying that &quot;Compound interest is the 8th wonder of the world. He who understands it, earns it; he who doesn&#39;t, pays it&quot;. Thankfully none of us need to be Albert Einstein to understand the rather simple and yet powerful concept of Compound Interest. There are a lot of compound interest calculators out there. I particularly like the &lt;a href=&quot;https://www.investor.gov/financial-tools-calculators/calculators/compound-interest-calculator&quot; target=&quot;_blank&quot;&gt;Compound Interest Calculator from Investor.gov&lt;/a&gt;. The main reason I like &lt;a href=&quot;https://www.investor.gov/financial-tools-calculators/calculators/compound-interest-calculator&quot; target=&quot;_blank&quot;&gt;this calculator&lt;/a&gt; is that it allows you to include Monthly Contributions, which if you are a serious investor, should be part of your strategy.&amp;nbsp; Let&#39;s take a look at how it works. First, you need to enter some general information such as starting amount, monthly contribution, length of time and estimated interest rate. For this example, I will use the numbers below:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzeHVj_Z7_3YsUL5wFJobvGcl21OKTjvMV08B9y3ShlifTqMycNYBo2B_74W66nuCbezFGO-zCjvTHi7oTEQBx2iHHYdROYVefuNmoxuD9T9jmMZLCuXSEYaVtFZGD7JF0EbS40-DtD1k/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;777&quot; data-original-width=&quot;666&quot; height=&quot;467&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzeHVj_Z7_3YsUL5wFJobvGcl21OKTjvMV08B9y3ShlifTqMycNYBo2B_74W66nuCbezFGO-zCjvTHi7oTEQBx2iHHYdROYVefuNmoxuD9T9jmMZLCuXSEYaVtFZGD7JF0EbS40-DtD1k/w401-h467/image.png&quot; width=&quot;401&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;Once you have entered the information above, all you need to do is click &quot;CALCULATE&quot; and the graph below will appear showing you how your account balance is expected to grow over time. Additionally, you can also get the data in table form. Another reason I like this particular calculator is because it is so simple and yet it provides you with very powerful option beyond monthly contributions such as interest rate variance and compounding frequency.&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl8Wth_SdR-FCb7B_6d2me0xEdlJIB7vVZB4UW4fAP0WhyVuSGCN5Lj4Z10gmnyHzRqkqcm2Mq8cIsO3XOKQJIi96LrBE9YTtOxYU1JK8Zzjho3FwF1SAsuxKpxOeOV4HNOi1yiMOSiK0/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;476&quot; data-original-width=&quot;793&quot; height=&quot;274&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl8Wth_SdR-FCb7B_6d2me0xEdlJIB7vVZB4UW4fAP0WhyVuSGCN5Lj4Z10gmnyHzRqkqcm2Mq8cIsO3XOKQJIi96LrBE9YTtOxYU1JK8Zzjho3FwF1SAsuxKpxOeOV4HNOi1yiMOSiK0/w456-h274/image.png&quot; width=&quot;456&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_lzpl0RRcoIsfr8tABPm8RUIVE-AgzgELG2NN189y0IF339HRPDBBZBiBVBvueg_uWfMOBNjje8oziYDRulN4waIRKoPFOwzIBstD9dR8_5E2B4fN5v48occQj9Zkg_Ba3aV9ikKt0rw/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;540&quot; data-original-width=&quot;810&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_lzpl0RRcoIsfr8tABPm8RUIVE-AgzgELG2NN189y0IF339HRPDBBZBiBVBvueg_uWfMOBNjje8oziYDRulN4waIRKoPFOwzIBstD9dR8_5E2B4fN5v48occQj9Zkg_Ba3aV9ikKt0rw/w446-h296/image.png&quot; width=&quot;446&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;So, if you are looking for a compound interest calculator, give &lt;a href=&quot;https://www.investor.gov/financial-tools-calculators/calculators/compound-interest-calculator&quot; target=&quot;_blank&quot;&gt;this one&lt;/a&gt; a try!&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/670203786475890496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2020/11/compound-interest-calculator-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/670203786475890496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/670203786475890496'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2020/11/compound-interest-calculator-with.html' title='Compound Interest Calculator with Contribution'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzeHVj_Z7_3YsUL5wFJobvGcl21OKTjvMV08B9y3ShlifTqMycNYBo2B_74W66nuCbezFGO-zCjvTHi7oTEQBx2iHHYdROYVefuNmoxuD9T9jmMZLCuXSEYaVtFZGD7JF0EbS40-DtD1k/s72-w401-h467-c/image.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-8964380865708018584</id><published>2020-11-14T13:48:00.005-08:00</published><updated>2020-11-15T19:13:59.722-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics"/><category scheme="http://www.blogger.com/atom/ns#" term="Statistics"/><title type='text'>Why use a Design-of-Experiment (DOE) Matrix</title><content type='html'>&lt;p&gt;The word Design-of-Experiment, or DOE, has become very popular among engineers. However, often times this word is misused and misunderstood. The principles of DOE are based on the capabilities and limitations of the analysis tools that will be used to process the data and determine cause and effect. Sometimes proper DOE matrix are followed but adequate analysis is not performed. Other times, a proper DOE matrix is not followed but yet we try to use analysis methods that would have required a proper DOE matrix. Even more confusing is when we use the word DOE when neither a DOE matrix or analysis method was followed.&amp;nbsp;&lt;/p&gt;&lt;p&gt;First, it is important to acknowledge that DOE results are intended to be analyzed using regression analysis and something called &quot;response surface method&quot; or RSM. These methods rely on using a proper DOE matrix to help with variable independence or orthogonality and statistical significance.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Let&#39;s take a look at the following example. Say you have 4 variables in a process (A, B, C and D) and you want to understand their impact in your process outcome. You conduct the following study where -1, 0, and 1 represent each variable min, middle, and max value:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmJzUSv4jWpS0eyOKMsy9TsstUv7RwvaH424wuS3s_DrvMExTEJ1D9S8qz88vdJoiYpWnv09wWewZmtSIBoFOsFqF1TEWdRgP-864Lfz0v0j_BoUPBWqzeXf5lVteVjoKHkrLqCFP8u2A/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;261&quot; data-original-width=&quot;595&quot; height=&quot;175&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmJzUSv4jWpS0eyOKMsy9TsstUv7RwvaH424wuS3s_DrvMExTEJ1D9S8qz88vdJoiYpWnv09wWewZmtSIBoFOsFqF1TEWdRgP-864Lfz0v0j_BoUPBWqzeXf5lVteVjoKHkrLqCFP8u2A/w400-h175/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You may be tempted to say that you have conducted a DOE. However, the table above has not followed any proper DOE matrix design. Even with the table above, it will be difficult to understand the effect of each variable (main effects) since some variables are strongly correlated. For example, let&#39;s take a look at the relationship between Parameter A and Parameter B:&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxF6-TeH0hHFZ7TtHXhgWbKIN5QCHlq5f1xQkzeC1ak8U_kGyrw5f26WubTnFQ7-RpL-CmoWUpM_jQNevVAlzN6Vn-ikyLmrPx-syWhI3uRHjb_-1QRQnUcjJ0-fzKjUPXf-f0i8_bIiI/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;481&quot; data-original-width=&quot;609&quot; height=&quot;316&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxF6-TeH0hHFZ7TtHXhgWbKIN5QCHlq5f1xQkzeC1ak8U_kGyrw5f26WubTnFQ7-RpL-CmoWUpM_jQNevVAlzN6Vn-ikyLmrPx-syWhI3uRHjb_-1QRQnUcjJ0-fzKjUPXf-f0i8_bIiI/w400-h316/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Note from the graph above that the coefficient of determination, R^2, is quite high, indicating that Parameter A and Parameter B are confounded. When parameter A goes up, Parameter B also often goes up. It will be difficult for regression analysis to decouple the effect of parameter A vs. Parameter B. If you created a table of R^2 for all the variables, it will look like this (correlation table):&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXgVBwnlwiQBqfR2OnIVbhKFfbcLByJor4tsHGYtg7F1lljKgaJoaloAytiLVmlVoQkxuHdTcrs8k6KQdZ_IKhutf0eeGGe6vu9vA4Dr6rgZQ_qas77C9qS_A9yUBzsXQo7uh7lE1R6Wc/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;166&quot; data-original-width=&quot;481&quot; height=&quot;138&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXgVBwnlwiQBqfR2OnIVbhKFfbcLByJor4tsHGYtg7F1lljKgaJoaloAytiLVmlVoQkxuHdTcrs8k6KQdZ_IKhutf0eeGGe6vu9vA4Dr6rgZQ_qas77C9qS_A9yUBzsXQo7uh7lE1R6Wc/w400-h138/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;In the table above, you expect to have &quot;1&quot; along the diagonal, but you want to minimize the non-diagonal terms (ideally they would be zero). If you are a MATLAB user, you can use the function &quot;corrplot(X)&quot; to graphically obtain the table above or &quot;corrcoef(X)&quot; to get the table in a variable. Please note that MATLAB will plot R and not R^2. You can also use the DOE Diagnostic, Evaluate design option in JMP to do the same. Other programs like R and Python have similar functionality. Some programs plot R instead of R^2 but the essence of the message is the same.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;The study matrix above also present troubles if there are significant variable interactions. For example, let&#39;s take a look at the correlation between Parameter A*C Interaction vs. and Parameter A*D Interaction:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7vE-TS4JPZl4YgpFwgVhT5sR5khryuyWbkCFGdfH2H0zat20Hls0R5yMj8gjF-v7r5XKAI9AS0p_VI1cA53elDNIcOQ4ifXxsC0T2qKEwWHRAhCcujY0NQBmihp7aIIkiL1XNz9kOY8w/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;315&quot; data-original-width=&quot;396&quot; height=&quot;318&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7vE-TS4JPZl4YgpFwgVhT5sR5khryuyWbkCFGdfH2H0zat20Hls0R5yMj8gjF-v7r5XKAI9AS0p_VI1cA53elDNIcOQ4ifXxsC0T2qKEwWHRAhCcujY0NQBmihp7aIIkiL1XNz9kOY8w/w400-h318/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Note that the interaction between Parameter A*C and Parameter A*D are also strongly correlated. It will be difficult for the statistical tools to tell the difference between these two interaction effects. The complete correlation table (these are R^2 Values) including 2-level interactions and square terms is shown below. By exploring the table below you will see that there is a lot of variable confounding in this study.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpEG9EI2ae4ge3Z-yiSAAF64157jZ3ym-s_1MyOagW0thZQU3Th4g_fS6pwZnOFPkhVXKk1Yk4EBh9UYRijH_p-BxRMdxuknleXKI8qsf6ouAMj6Yc2gi5NZunRr6cJd_zUkIcjpN2MOA/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;355&quot; data-original-width=&quot;707&quot; height=&quot;201&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpEG9EI2ae4ge3Z-yiSAAF64157jZ3ym-s_1MyOagW0thZQU3Th4g_fS6pwZnOFPkhVXKk1Yk4EBh9UYRijH_p-BxRMdxuknleXKI8qsf6ouAMj6Yc2gi5NZunRr6cJd_zUkIcjpN2MOA/w400-h201/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Ideally, if you have 4 parameters at 3 Levels, you would want to do a Full Factorial (FF) DOE which will result in 3^4 = 81 runs (#Levels^#Factors = # runs). If you did this, you would have perfect decoupling and the DOE would be perfectly orthogonal.&amp;nbsp; The correlation matrix (now in absolute value of R) would look something like this with 1 along the diagonal and zero everywhere else. This design is ideal to find all the main effects and interactions as well as squared terms.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMOY1A0H84wTlx5kZ73Yszl1baYTyZQpILkIDPbPYdK6xkpY4wzasuXy_YCuR4ZCjL0djHm7qIYmUBmUekMVSmBLZ-YFSzebnjwk_HC4OWgwunst9jRpb0XwWcPu9j7HbLd-ljxlQB1K8/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;397&quot; data-original-width=&quot;410&quot; height=&quot;390&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMOY1A0H84wTlx5kZ73Yszl1baYTyZQpILkIDPbPYdK6xkpY4wzasuXy_YCuR4ZCjL0djHm7qIYmUBmUekMVSmBLZ-YFSzebnjwk_HC4OWgwunst9jRpb0XwWcPu9j7HbLd-ljxlQB1K8/w400-h390/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;However, 81 runs is a lot of runs. You may perhaps be limited to a much smaller number of runs. Here is where you can choose some other DOE matrix designs such as a central composite design (CCD). A CCD design will look like this having a total of 26 runs.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih2ZffvCF7GAR6oVhVmBkJvKqoz8vv_anHl2ejHbjzpOykp6vCId6YeQ9VzhUdELlh2yBkmt2iqOKjw_ISvd4lnJLHOA6VWCVh572m4jJ_g5Mg7yji2OdEHRPNg2Bfg642BncCMrfXiaQ/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;632&quot; data-original-width=&quot;307&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih2ZffvCF7GAR6oVhVmBkJvKqoz8vv_anHl2ejHbjzpOykp6vCId6YeQ9VzhUdELlh2yBkmt2iqOKjw_ISvd4lnJLHOA6VWCVh572m4jJ_g5Mg7yji2OdEHRPNg2Bfg642BncCMrfXiaQ/w312-h640/image.png&quot; width=&quot;312&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;The corresponding correlation plot will look like this. Note that only the square terms (X1^2, X2^2, X3^2, and X4^2) are confounded but not the first level interactions.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaLPkc69PNjPhNlUHpUp5XSPLkoaG5d6owakflsnzzwwHucGwhHSNsEUut0_Z-nq48OyK-n9gcuhXv9TmLN5iQFvX0Vk_MAqkmqdSKiXuyopP3sXNKB96bCHQ9SNU6XWs8Aa9jST38ui8/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;395&quot; data-original-width=&quot;413&quot; height=&quot;382&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaLPkc69PNjPhNlUHpUp5XSPLkoaG5d6owakflsnzzwwHucGwhHSNsEUut0_Z-nq48OyK-n9gcuhXv9TmLN5iQFvX0Vk_MAqkmqdSKiXuyopP3sXNKB96bCHQ9SNU6XWs8Aa9jST38ui8/w400-h382/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;You may still be limited to a much smaller number of runs. After all, the original study only had 6 runs. Here is where one must understand the trade-offs and limitations of what you can do with such a small number of runs and large number of factors and levels. You can use something called D-optimal design to find the an optimal design with a constrain in the number of runs given that perhaps you are most interested in the main effects. For example, the table below is from a D-optimal design focusing around the main effects:&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQpgFjNATUhnS28Fauqjy1v043dIO-tuIc9fib9S17Z0GsnaNmX3e0dqh8vm8t5BddMqsNG5nkZ21uulpno5duKaToN1Xjji0mrXL9rEfI-iLYjNnARnwAQuhxVyHxF6GO_fS-5g42U3U/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;261&quot; data-original-width=&quot;458&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQpgFjNATUhnS28Fauqjy1v043dIO-tuIc9fib9S17Z0GsnaNmX3e0dqh8vm8t5BddMqsNG5nkZ21uulpno5duKaToN1Xjji0mrXL9rEfI-iLYjNnARnwAQuhxVyHxF6GO_fS-5g42U3U/w400-h228/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRq2kFhi_7FDx5Rao4oa6-mDqq-QzJoWPqrArMGy-9PVZ3N6AWUvX5E3zNLcjH_OtRH30-zerG_BOxlWqK6oSDkfPeu2Hszqk6zdm0LmCywLKCdhrqyXNdxM4IfwKOOZc07BTmVF8GxSU/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;402&quot; data-original-width=&quot;418&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRq2kFhi_7FDx5Rao4oa6-mDqq-QzJoWPqrArMGy-9PVZ3N6AWUvX5E3zNLcjH_OtRH30-zerG_BOxlWqK6oSDkfPeu2Hszqk6zdm0LmCywLKCdhrqyXNdxM4IfwKOOZc07BTmVF8GxSU/w400-h384/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;In the correlation matrix above one can see that the main effects have been decoupled as much as possible but some interactions are stilled coupled to main effects. This matrix was created to decouple the variables as much as possible given only 6 runs.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;In summary:&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;1. Don&#39;t use the word DOE if you have not followed proper DOE matrix designs and/or used adequate regression modeling to evaluate your results for significant cause and effect&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;2. Do spend some time comparing DOE matrix design tables to understand the trade-off with number of runs and variable confounding and thus analysis capabilities&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;3. Be aware of the modeling limitations you may have (linear, second order, main effects, interactions, main effect second order, etc.)&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;4. Always use your engineering judgement when performing DOE studies. Follow statistical recommendations as long as they make engineering sense for your application&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/8964380865708018584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2020/11/why-use-design-of-experiment-doe-matrix.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/8964380865708018584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/8964380865708018584'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2020/11/why-use-design-of-experiment-doe-matrix.html' title='Why use a Design-of-Experiment (DOE) Matrix'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmJzUSv4jWpS0eyOKMsy9TsstUv7RwvaH424wuS3s_DrvMExTEJ1D9S8qz88vdJoiYpWnv09wWewZmtSIBoFOsFqF1TEWdRgP-864Lfz0v0j_BoUPBWqzeXf5lVteVjoKHkrLqCFP8u2A/s72-w400-h175-c/image.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-6119529146617250679</id><published>2020-11-01T16:47:00.000-08:00</published><updated>2020-11-01T16:47:16.617-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics"/><category scheme="http://www.blogger.com/atom/ns#" term="Statistics"/><title type='text'>Monte Carlo Analysis: Right Triangle</title><content type='html'>&lt;p&gt;Here is a very simple problem. Assume you want to build a right triangle of known base (10) and height (3) dimension. However, the sigma tolerance of these dimensions are 1% of its value. Your goal is to find the variability that you will obtain for the dimension of the hypotenuse and the largest of the two complementary angles. It is straight forward to do some simple math to figure out the nominal value for the two variables of interest. This is shown in the figure below:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4OE3YLPAkd2jULP7oRLbwiZQOl9oMW8AT6wk2a741fzK4Po99TjanPWFdTJjdgTaa3YzNrY1sUnsDo_tj72HwHyAM_KugBo2vFnDQY-C7EI5sSoIBt0JN8Gctq23AGKAr-_E925wmfJ4/&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Ruander Right Triangle Monte Carlo&quot; data-original-height=&quot;736&quot; data-original-width=&quot;956&quot; height=&quot;308&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4OE3YLPAkd2jULP7oRLbwiZQOl9oMW8AT6wk2a741fzK4Po99TjanPWFdTJjdgTaa3YzNrY1sUnsDo_tj72HwHyAM_KugBo2vFnDQY-C7EI5sSoIBt0JN8Gctq23AGKAr-_E925wmfJ4/w400-h308/image.png&quot; title=&quot;Right Triangle Variability Problem&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Note that the variables of interest are not linear with respect to the known variables. Therefore, it is not possible to simply add the variances of the two known dimensions. It is possible to use the principles of propagation of uncertainty to propagate the known variation through the non-linear equations. This exercise will be left to the reader. Here, I will show how you can quickly use my &lt;a href=&quot;http://www.ruander.com/2020/05/monte-carlo-simulation-excel.html&quot; target=&quot;_blank&quot;&gt;Excel Monte Carlo Workbook&lt;/a&gt; to solve this problem. First, download the &lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;free version&lt;/a&gt; of this workbook or if you wish, you can also purchase the non free version &lt;a href=&quot;https://gumroad.com/l/ZOzQL&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&amp;nbsp; Set up the problem with 2 input variables of normal distribution with the given mean and sigma values. The inputs will look like this:&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNvFCLtXVn9-lVNE-uTuZ9ZqDwlA-g7oBNaGEJ45qQoFQsRxXewhCh39UyV0k8KcNUamDH1RaT-L8ed4SkVetToevck5RqrT6x9PytPq6A8VXS5U3h8XC9SE5KBj3WdzGwAS3bZxh2Wos/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Monte Carlo Excel&quot; data-original-height=&quot;315&quot; data-original-width=&quot;1146&quot; height=&quot;110&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNvFCLtXVn9-lVNE-uTuZ9ZqDwlA-g7oBNaGEJ45qQoFQsRxXewhCh39UyV0k8KcNUamDH1RaT-L8ed4SkVetToevck5RqrT6x9PytPq6A8VXS5U3h8XC9SE5KBj3WdzGwAS3bZxh2Wos/w400-h110/image.png&quot; title=&quot;Excel Monte Carlo Analysis&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;After setting up the problem, simply&amp;nbsp; run a large enough number of simulations by entering the number of simulations in cell F6 and then click the &quot;2. Simulate&quot; bottom. I recommend running at least 500K simulations. For this example, I will run 1M simulations. After the simulation is completed, just type in the formula to compute the hypotenuse and the angle as shown in the first figure above. Drag this equation down for all the simulations performed.&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJXAl4LiGeNTXuJB_Ilo8Ug-AJlZWsIMi2MiaIE9mm6OrMlWFBQLX3qL4rfdY0jHuN-XUFQkfbqtcXfyrR5M5YNXpZh5uFLwwgdR2YWMq_z3EX-nV60MpeQJlIMxNGuoRi5EDRZa6z_84/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;368&quot; data-original-width=&quot;873&quot; height=&quot;169&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJXAl4LiGeNTXuJB_Ilo8Ug-AJlZWsIMi2MiaIE9mm6OrMlWFBQLX3qL4rfdY0jHuN-XUFQkfbqtcXfyrR5M5YNXpZh5uFLwwgdR2YWMq_z3EX-nV60MpeQJlIMxNGuoRi5EDRZa6z_84/w400-h169/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Finally, simply compute the average and standard deviation for the variables of interest. The results are the following:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi4NNgYWaj92FthGMHvFuas0Tva7JbuCtGh-5ihZA2Nx9MRFRP6aoP5r8S3pJ3hbY2WKPK7CZt8ORhPUmAxAea0Aj3m-dm8046Vl1o1-RFkwW8JjG8PmTyzOgb_e_BMEUbZcpyu2uTYXA/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;276&quot; data-original-width=&quot;837&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi4NNgYWaj92FthGMHvFuas0Tva7JbuCtGh-5ihZA2Nx9MRFRP6aoP5r8S3pJ3hbY2WKPK7CZt8ORhPUmAxAea0Aj3m-dm8046Vl1o1-RFkwW8JjG8PmTyzOgb_e_BMEUbZcpyu2uTYXA/w400-h133/image.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;As mentioned earlier, if you follow the principles of uncertainty propagation using partial derivatives, you will arrive at this same result (&lt;a href=&quot;http://web.mit.edu/fluids-modules/www/exper_techniques/2.Propagation_of_Uncertaint.pdf&quot; target=&quot;_blank&quot;&gt;Rule No. 5 here&lt;/a&gt;). This is shown in the table above under the Analytical column. Using the Monte Carlo Excel you can also visualize the distribution of these two variables.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN7xTfdoUf2YNJi_ZCDH4iO09rzzN9Y5vHBp-LoGNxVsTmob8Yo0RVyUE4P0M442PGr7ufKDZZA7ZszfA4An4bk2VR0PHGO15GDjnrGbLZZSzf4QQza3J13ZUFy8b7iAVWN_cg9_7JoPo/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;697&quot; data-original-width=&quot;582&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN7xTfdoUf2YNJi_ZCDH4iO09rzzN9Y5vHBp-LoGNxVsTmob8Yo0RVyUE4P0M442PGr7ufKDZZA7ZszfA4An4bk2VR0PHGO15GDjnrGbLZZSzf4QQza3J13ZUFy8b7iAVWN_cg9_7JoPo/w333-h400/image.png&quot; width=&quot;333&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;I hope this example is useful to help identify other relevant applications where a Monte Carlo Analysis can help you understand variation of non-linear problems.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/6119529146617250679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2020/11/monte-carlo-analysis-right-triangle.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/6119529146617250679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/6119529146617250679'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2020/11/monte-carlo-analysis-right-triangle.html' title='Monte Carlo Analysis: Right Triangle'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4OE3YLPAkd2jULP7oRLbwiZQOl9oMW8AT6wk2a741fzK4Po99TjanPWFdTJjdgTaa3YzNrY1sUnsDo_tj72HwHyAM_KugBo2vFnDQY-C7EI5sSoIBt0JN8Gctq23AGKAr-_E925wmfJ4/s72-w400-h308-c/image.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-5949416514106578561</id><published>2020-06-20T13:00:00.000-07:00</published><updated>2020-06-20T13:00:42.074-07:00</updated><title type='text'>Monte Carlo: Roll 2 Dice</title><content type='html'>Sometime ago I posted about the &lt;a href=&quot;http://www.ruander.com/2013/06/sum-of-two-dice_12.html&quot; target=&quot;_blank&quot;&gt;Sum of Two Dice&lt;/a&gt;. In that &lt;a href=&quot;http://www.ruander.com/2013/06/sum-of-two-dice_12.html&quot; target=&quot;_blank&quot;&gt;post&lt;/a&gt;, I explained the math behind it and I also performed a Monte Carlo Simulation in &lt;a href=&quot;https://www.r-project.org/&quot; target=&quot;_blank&quot;&gt;R&lt;/a&gt;. I would like to go back to this problem to show how my free &lt;a href=&quot;http://www.ruander.com/2020/05/monte-carlo-simulation-excel.html&quot; target=&quot;_blank&quot;&gt;Monte Carlo Simulation Excel file&lt;/a&gt;&amp;nbsp;can be used in this situation.&lt;br /&gt;
&lt;br /&gt;
Assuming a fair die, each die has six different possible output values (1, 2, 3, 4, 5, and 6) and the probability of any of these values should be equal (1/6). The probability function that describes this behavior is the uniform discrete probability function with a lower bound of 1 and an upper bound of 6. The reason that this is a discrete probability is that in between values that are not integers (such as 1.5) are not an option.&lt;br /&gt;
&lt;br /&gt;
Using my&amp;nbsp;&lt;a href=&quot;http://www.ruander.com/2020/05/monte-carlo-simulation-excel.html&quot; target=&quot;_blank&quot;&gt;Monte Carlo Simulation Excel file&lt;/a&gt;&amp;nbsp;to simulate the sum of two dice is very straight forward. First, click &quot;0. Reset&quot;&amp;nbsp; in the Simulator sheet to make sure you are starting with a fresh and clean sheet. Indicate that the number of inputs is 2 by typing this value in cell F5. Remember, each input will represent one die. Now, click on &quot;1. Define Inputs&quot; and select the Uniform_Discrete probability function for both inputs with 1 as the lower bound (parameter 1) and 6 as the upper bound (parameter 2). Leave the other parameters empty. Your Simulator sheet should look like this:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi83K5Ys7DKaGm__C-dPF1ea2HAlU0ctA5fP0MhaUCjhDHmgIkUmZd88egploeGLimg_yWew01QMMtD8R4VMbc-F2oJ0SNQ2DMoikz5zTKmg8E9baKptXGeMgCcq9qJln9ZWWTZt3j2Bnk/s1600/2-dice-setup.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;281&quot; data-original-width=&quot;965&quot; height=&quot;116&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi83K5Ys7DKaGm__C-dPF1ea2HAlU0ctA5fP0MhaUCjhDHmgIkUmZd88egploeGLimg_yWew01QMMtD8R4VMbc-F2oJ0SNQ2DMoikz5zTKmg8E9baKptXGeMgCcq9qJln9ZWWTZt3j2Bnk/s400/2-dice-setup.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
Now indicate the number of simulations to perform by typing the number of simulations in cell F6. For this example, I will perform &lt;u&gt;1 million&lt;/u&gt; simulations knowing that this large number of simulations will likely take some time to complete so I will have to be patient. It took ~30 mins in a very slow computer on battery. Note that if I would have done 100K simulations it would have only taken about 3 minutes (time is approximately linear with number of simulations). Faster computers will finish faster.&lt;br /&gt;
&lt;br /&gt;
Once the simulation is completed, there are a couple of things to do. First, in the &quot;Y=&quot; column, you will want to type the equation which is basically the sum of die 1 and die 2. This should look like this:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnarx8RYEw25FV2dJ0z0wQhwcZ8v0wnmv2kgti8ZbW3A9qyLVXURkdERidnURBLUzZWnrNkiuWcvZqnmebtmPX4YYfYTov1lp6diXYx-sSWnajBQs9d5CaHJhgmKh-ZvbNFFDZ5mu0olU/s1600/2-dice-Equation.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;355&quot; data-original-width=&quot;693&quot; height=&quot;203&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnarx8RYEw25FV2dJ0z0wQhwcZ8v0wnmv2kgti8ZbW3A9qyLVXURkdERidnURBLUzZWnrNkiuWcvZqnmebtmPX4YYfYTov1lp6diXYx-sSWnajBQs9d5CaHJhgmKh-ZvbNFFDZ5mu0olU/s400/2-dice-Equation.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
First, let&#39;s explore the output of each die. My&amp;nbsp;&lt;a href=&quot;http://www.ruander.com/2020/05/monte-carlo-simulation-excel.html&quot; target=&quot;_blank&quot;&gt;Monte Carlo Simulation Excel file&lt;/a&gt;&amp;nbsp;automatically outputs a histogram of your X1 variable if you have excel 2016 or higher. However, for discrete outcomes, I like making my own using the Excel Function COUNTIF. Doing this I obtained very similar outputs for both X1 and X2. Below I show the output for X1. Note that the number of occurrences for each number is about 1/6 of the total as expected.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifHUS50pAgY4mI4BQHXZ-jXXjMOXEVVwn7XAilf45RNxXBQIiFQ0Dli7P20hRqnbSv9HrXsrL6JoEUeai6Y8ExwGLCHKuC_BcpAbLHv0_q-BcJ-OTkidyIsX2YcK0ORVOXfee7LlUA5BY/s1600/1-die-output.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;383&quot; data-original-width=&quot;632&quot; height=&quot;241&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifHUS50pAgY4mI4BQHXZ-jXXjMOXEVVwn7XAilf45RNxXBQIiFQ0Dli7P20hRqnbSv9HrXsrL6JoEUeai6Y8ExwGLCHKuC_BcpAbLHv0_q-BcJ-OTkidyIsX2YcK0ORVOXfee7LlUA5BY/s400/1-die-output.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In the same way, we can plot the histogram of our Y= X1 + X2. Note that in accordance with my &lt;a href=&quot;http://www.ruander.com/2013/06/sum-of-two-dice_12.html&quot; target=&quot;_blank&quot;&gt;previous post&lt;/a&gt;, the number 7 occurred approximately 16.6667% of the time. It is pretty interesting how the sum of two variables that have a uniform discrete probability function results in an output variable with a discrete triangular distribution function.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6lNItSEahwO6T6in7wV0EvC5E6YmUYG3wvwyBUvvm-kVEd9JYHUIHNgdjoO3S7iqwAv6jt9NnsqbI96Zkg_HjcXUWzhDBmoOeJ-apSzQRBjl3XCcZ1NnIarE2Z6xLEuAsaLojdh7_4S0/s1600/2-die-output.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;349&quot; data-original-width=&quot;567&quot; height=&quot;241&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6lNItSEahwO6T6in7wV0EvC5E6YmUYG3wvwyBUvvm-kVEd9JYHUIHNgdjoO3S7iqwAv6jt9NnsqbI96Zkg_HjcXUWzhDBmoOeJ-apSzQRBjl3XCcZ1NnIarE2Z6xLEuAsaLojdh7_4S0/s400/2-die-output.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that we have looked into the sum of 2 dice, how about the sum of 3 dice, or 7 dice? Can you use my&amp;nbsp;&lt;a href=&quot;http://www.ruander.com/2020/05/monte-carlo-simulation-excel.html&quot; target=&quot;_blank&quot;&gt;Monte Carlo Simulation Excel file&lt;/a&gt;&amp;nbsp;to do this with more than 2 dice?</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/5949416514106578561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2020/06/monte-carlo-roll-2-dice.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/5949416514106578561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/5949416514106578561'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2020/06/monte-carlo-roll-2-dice.html' title='Monte Carlo: Roll 2 Dice'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi83K5Ys7DKaGm__C-dPF1ea2HAlU0ctA5fP0MhaUCjhDHmgIkUmZd88egploeGLimg_yWew01QMMtD8R4VMbc-F2oJ0SNQ2DMoikz5zTKmg8E9baKptXGeMgCcq9qJln9ZWWTZt3j2Bnk/s72-c/2-dice-setup.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-1255093535118320890</id><published>2020-05-30T15:28:00.000-07:00</published><updated>2020-05-30T15:28:00.180-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apps"/><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Statistics"/><title type='text'>Monte Carlo Simulation Excel</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you are looking for a &lt;b&gt;FREE&lt;/b&gt; excel calculator to perform
Monte Carlo Simulations you have arrived at the right place. Just &lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;download&lt;/a&gt; my
FREE &lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;Excel Monte Carlo Simulator&lt;/a&gt; and start doing Monte Carlo simulations right in
your already familiar Excel Environment. &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;I will provide a short intro below, but feel
free to &lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;download&lt;/a&gt; my Excel Monte Carlo Simulator to get started right away.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;ruander.com&quot; border=&quot;0&quot; data-original-height=&quot;335&quot; data-original-width=&quot;810&quot; height=&quot;165&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZAOy8el2ikoaXWiVqZmgTMbTtfzzLz28NaFGE-IQsb9-DH-55WVeVW1yfg0PABpPPRqDOwvrc2PJob_iWg37PQKBQqo3xxXyx5K46_RM-FxrF8GVPf4d8Cy4N26gjtRHlUEuGCvDe07c/s400/Excel-Monte-Carlo.JPG&quot; title=&quot;ruander.com&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you are searching the Word Wide Web for “Monte Carlo
Excel” you probably already know or have a general idea of how Monte Carlo
Simulations work. The user typically has one or more variables with known probability
distributions as well as a transfer function (basically an equation) to
translate these input variables into the desired output variable. The goal in a
Monte Carlo Simulation is to randomly retrieve a value for each of the input
variables according to their probability distribution. Do this over and over
multiple times (1k, 100k, 500k, 1 million times, and so on) and you can now
understand what your output distribution (and statistics) will look like in the
limit as the number of iterations go to infinity. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Monte Carlo Simulations can be performed in a number of
different software tools including &lt;a href=&quot;https://www.python.org/&quot; target=&quot;_blank&quot;&gt;Python&lt;/a&gt;, &lt;a href=&quot;https://www.r-project.org/&quot; target=&quot;_blank&quot;&gt;R&lt;/a&gt;, &lt;a href=&quot;https://www.mathworks.com/products/matlab.html&quot; target=&quot;_blank&quot;&gt;MATLAB&lt;/a&gt;, &lt;a href=&quot;https://www.jmp.com/en_us/home.html&quot; target=&quot;_blank&quot;&gt;JMP&lt;/a&gt;, and many more.
However, from my engineering experience, there is a broad audience of Excel
users who would like to do this right within the familiar excel environment and
without the need to code.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;It is for this
reason that I created my Free &lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;Excel Monte Carlo Simulator&lt;/a&gt;. This is a simple to
use Excel Workbook where the user can perform Monte Carlo Simulations and use the results in any way they wish within Excel. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;u&gt;&lt;b&gt;Disclaimer:&lt;/b&gt;&lt;/u&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Every time a user runs a simulation using my Free &lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;Excel Monte Carlo Simulator&lt;/a&gt;, this website will open in their browser. I have done this to
help support the development of tools just like this. However, if you would
prefer for this not to occur, I have also included a for-purchase version &lt;a href=&quot;https://gumroad.com/l/ZOzQL&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;
that will not open this website upon performing a simulation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;For Purchase:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;a href=&quot;https://gumroad.com/l/ZOzQL&quot;&gt;https://gumroad.com/l/ZOzQL&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Free:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;height: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/1255093535118320890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2020/05/monte-carlo-simulation-excel.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/1255093535118320890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/1255093535118320890'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2020/05/monte-carlo-simulation-excel.html' title='Monte Carlo Simulation Excel'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZAOy8el2ikoaXWiVqZmgTMbTtfzzLz28NaFGE-IQsb9-DH-55WVeVW1yfg0PABpPPRqDOwvrc2PJob_iWg37PQKBQqo3xxXyx5K46_RM-FxrF8GVPf4d8Cy4N26gjtRHlUEuGCvDe07c/s72-c/Excel-Monte-Carlo.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-6518024181888472754</id><published>2019-10-14T18:46:00.001-07:00</published><updated>2019-10-14T18:54:25.558-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Manufacturing"/><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Statistics"/><title type='text'>Excel Gage R&amp;R Macro</title><content type='html'>&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; color: #1d2228;&quot;&gt;A Gage R&amp;amp;R is a measurement system capability study whose purpose is to assess how much variation is associated with a measurement system and to compare it to the total process variation or tolerance.&amp;nbsp; The gage variation is divided into two main groups:&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #1d2228;&quot;&gt;R&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #1d2228;&quot;&gt;epeatability and&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #1d2228;&quot;&gt;R&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #1d2228;&quot;&gt;eproducibility, thus the name Gage&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #1d2228;&quot;&gt;R&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #1d2228;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: #1d2228;&quot;&gt;R&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #1d2228;&quot;&gt;.&amp;nbsp; Repeatability is the variation obtained by the same person using the same instrument on the same product for repeated measurements (within operator). Reproducibility is the variation obtained due to differences in people who are taking the measurements (between operators). There are multiple software tools that would run a Gage R&amp;amp;R analysis including&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #1d2228;&quot;&gt;&lt;a href=&quot;https://sigmazone.com/quantumxl/&quot; target=&quot;_blank&quot;&gt;QuantumX&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #1d2228;&quot;&gt;&lt;a href=&quot;https://sigmazone.com/quantumxl/&quot; target=&quot;_blank&quot;&gt;L&lt;/a&gt;, &lt;a href=&quot;http://www.minitab.com/en-US/default.aspx&quot; target=&quot;_blank&quot;&gt;Minitab&lt;/a&gt;, &lt;a href=&quot;https://www.jmp.com/en_us/home.html&quot; target=&quot;_blank&quot;&gt;JMP&lt;/a&gt;, &lt;a href=&quot;https://www.mathworks.com/products/matlab.html&quot; target=&quot;_blank&quot;&gt;MATLAB&lt;/a&gt;, &lt;a href=&quot;https://www.r-project.org/&quot; target=&quot;_blank&quot;&gt;R&lt;/a&gt;, and many others. However, it has been my experience that often engineers do not feel comfortable with the results due to a lack of clarity on how the variance components were computed. While it is possible to perform a Gage R&amp;amp;R in a tool as simple as Excel using ANOVA, these calculations are numerous and tedious. It is for this reason that I created an &lt;/span&gt;&lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;Excel Gage R&amp;amp;R Macro&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #1d2228;&quot;&gt;, which does not only compute the variance components but also shows the math used to compute them within the excel file. &lt;/span&gt;&lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;These calculations&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #1d2228;&quot;&gt; can be used by engineers to get more familiar with the variance component calculations.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #1d2228; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;343&quot; data-original-width=&quot;463&quot; height=&quot;237&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVlAkTfm97PHK_RKYoYFeAzOqL5EwVuWrpdhvPFx05xutD95b-Dw0joVYGF5IEi4vP7dxPlgOcE3FiaLtWdoNaVuZQn1X0eaOIsep6sjVq39WVRtOZUQ6GlM7Tm2l0x7P360G4W5MpqF0/s320/GageR%2526R-Ruander.PNG&quot; title=&quot;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #1d2228; font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #1d2228; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;This link&lt;/a&gt; will take you to my personal one drive&amp;nbsp;where you can download the file &quot;&lt;a href=&quot;https://onedrive.live.com/?id=B6BC22119A0A836B%21110&amp;amp;cid=B6BC22119A0A836B&quot; target=&quot;_blank&quot;&gt;Anova_GageR&amp;amp;R_Rev0&lt;/a&gt;&quot;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/6518024181888472754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2019/10/excel-gage-r-macro.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/6518024181888472754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/6518024181888472754'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2019/10/excel-gage-r-macro.html' title='Excel Gage R&amp;R Macro'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVlAkTfm97PHK_RKYoYFeAzOqL5EwVuWrpdhvPFx05xutD95b-Dw0joVYGF5IEi4vP7dxPlgOcE3FiaLtWdoNaVuZQn1X0eaOIsep6sjVq39WVRtOZUQ6GlM7Tm2l0x7P360G4W5MpqF0/s72-c/GageR%2526R-Ruander.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-7173551455825106746</id><published>2018-10-11T19:34:00.001-07:00</published><updated>2018-10-11T19:40:05.572-07:00</updated><title type='text'>Is VTSAX really cheaper on Mondays?</title><content type='html'>&lt;p&gt;&lt;a href=&quot;http://www.ruander.com/2018/10/best-day-of-week-to-buy-vtsax.html&quot;&gt;&lt;font style=&quot;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;a href=&quot;http://www.ruander.com/2018/10/best-day-of-week-to-buy-vtsax.html&quot;&gt;On my last blog post&lt;/a&gt; I looked at which day of the week is better to buy VTSAX over time. On that post I showed that over the time period ranging from 11/13/2000 thru 10/5/2018, the median price difference between the daily price and the weekly average was the lowest on Monday.  The plot showing this result is once again shared below&lt;p&gt;&lt;br&gt;&lt;p&gt;&lt;strong&gt;Box Plot for daily price difference from weekly average:&lt;/strong&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii4Kyf5mS4oF1nrKTJzsUuNkqpMakAZ6fGOvFRZGJgwpVyRLXYwC_dDq9w1mfPae-nLnTPEWPKyVSCB8cgPa6R2ubGX_QMfyRcsUsm0wrLpUNldkMcQPcJH1wlQDKTcLKBibfNSKDYB2g/s1600-h/Difference+From+Weekly%255B12%255D&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;433&quot; height=&quot;232&quot; title=&quot;Difference From Weekly&quot; style=&quot;display: inline;&quot; alt=&quot;Difference From Weekly&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVB-D7ot2tW8CNCnQL9-cT4TAyRbiUEC0p6mxBCq7gcHaSaeoOqdRCLsgv6vmqPr8D_4vs1xi20e1gu3Jd5jI6DMiF4tjY4Kv2LF6EoLr2R9JeGjcbk1ITU1P8GeGu16OYo1sIIhv2eGE/?imgmax=800&quot;&gt;&lt;/a&gt;&lt;p&gt;Since this post, I have received a few comments asking if the difference is “really real” meaning is this difference statistically significant? One way to answer this question is through hypothesis testing. For those asking a similar question, I decided to share my findings here: Looking at the price variation from the weekly average, the Kruskal-Wallis test rejects the null hypothesis that all days come from the same distribution at a 1% significance level. The Wilcoxon rank sum test also rejects the null hypothesis of equal medians at the 1% significance level between Monday and any other day except for Tuesday.  So basically, I would say yes, this difference is statistically significant. Now, while these results help answer this question, I am more of a graphical person. Therefore, I decided to plot the 95% confidence intervals for the median daily price deviation from weekly average. This plot is shown below with blue circles indicating the Median Value and Red Circles indicading the +/- 95% Confidence Intervals (CI). Once again, since the Monday CI does not overlap with the CI of any of the other days except Tuesday, I would say that this difference is significant. Even with Tuesday, the tails of the CI are just barely overlaping.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;+/- 95% Confidence Intervals for Median Daily Price Difference:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvzywWBpLfMBX5ugbCpDhQjXEPpi8HejwiLcCDoD6EciBW5oq0tf9hviN3BtlcEoD64Al41oL8pQ7eVrVRrUGYhKI37lFmKMbeIgmvpEGehjL-ygcKRxKG5ipMoYGx_EHRk4st95_IoNQ/s1600-h/Median_CI_Posting2%255B11%255D&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;483&quot; height=&quot;365&quot; title=&quot;Median_CI_Posting2&quot; style=&quot;display: inline;&quot; alt=&quot;Median_CI_Posting2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAh4WRKTulNcrbwspF2AJXEylxx55K11NZAMOyhVuc8aMYxoGSV2_F3ot7e3sU4EQsIWYoA3McPUTWrdOIiiV-Agu3Yd8ZXcW3sWFGtOC5Tn95NmXutv3QNbi8F7XJCWGyJT-XcfSZjyI/?imgmax=800&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;By the way, I have decided the use the median and not the mean here since there are a number of outliers in the data, as seen on the box plot above. The median value would be less affected by these points.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/7173551455825106746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2018/10/is-vtsax-really-cheaper-on-mondays.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/7173551455825106746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/7173551455825106746'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2018/10/is-vtsax-really-cheaper-on-mondays.html' title='Is VTSAX really cheaper on Mondays?'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVB-D7ot2tW8CNCnQL9-cT4TAyRbiUEC0p6mxBCq7gcHaSaeoOqdRCLsgv6vmqPr8D_4vs1xi20e1gu3Jd5jI6DMiF4tjY4Kv2LF6EoLr2R9JeGjcbk1ITU1P8GeGu16OYo1sIIhv2eGE/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-5290504083094101763</id><published>2018-10-07T18:13:00.001-07:00</published><updated>2018-10-07T19:30:22.523-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Finance"/><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Statistics"/><title type='text'>Best Day of the Week to Buy VTSAX</title><content type='html'>&lt;p&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;If you are into low cost index investing, you have probably heard and are buying the &lt;/font&gt;&lt;a href=&quot;https://investor.vanguard.com/home/&quot; target=&quot;_blank&quot;&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;Vanguard&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt; Total Stock Market Index Fund, particularly &lt;/font&gt;&lt;a href=&quot;https://investor.vanguard.com/mutual-funds/profile/VTSAX&quot; target=&quot;_blank&quot;&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;VTSAX&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;. One of the great tools that Vanguard offers is free recurring automatic investment. Using this tool, one can automatically buy VTSAX at any desired frequency such as weekly, bi-weekly, monthly and so on. Just let Vanguard know the day of the week you want to purchase and the frequency. This particular process led me to ask the following question: Which day of the week is the best day to buy VTSAX? Assuming we define the best day to buy as the day of the week on which the VTSAX closing price is lowest, we can take a look at past data to answer this question. To do this, I downloaded the VTSAX price history from 11/13/2000 up to 10/5/2018 from &lt;/font&gt;&lt;a href=&quot;https://finance.yahoo.com/quote/VTSAX/history?period1=946713600&amp;amp;period2=1538895600&amp;amp;interval=1d&amp;amp;filter=history&amp;amp;frequency=1d&quot; target=&quot;_blank&quot;&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;Yahoo Finance&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;.  Using this historical dataset, I looked at 1) the closing price distribution per day of the week and 2) the price difference between the daily closing price and the weekly average price per day of the week. Using this data, one can easily see (plots are shown below) that &lt;b&gt;Monday&lt;/b&gt; is the day of the week with the lowest median closing price as well as the largest negative closing price difference from weekly average. This result may or may not come as a surprise since on average, the market always goes up. Therefore, one would expect the Monday closing price to be, on average, lower than the Friday closing price. However, it is great to be able to confirm this using past price data. In addition to looking at the data over the time period mentioned above, I also took a look at the data over the last ~5 years. The results are the same and indicate that if you are doing recurring automatic investment, you probably want to buy on Mondays. Please feel free to take a look at the results below. &lt;/font&gt;&lt;p&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;Here are the plots for the entire time period:&lt;/font&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwH0U1kXkFJzGUwvRbbmeHOWQSK1s9eIrEFXxS091kS-nv6OxfAmdH7-6ql5AZbzurBjFsgjgjeg_qA17aViNFMlLlPQM94ChD7n3Ya12_R0BKqa6c0n6uk0sukgCD9s2uzxwUdlHowl8/s1600-h/Daily+Closing+Price%255B10%255D&quot; target=&quot;_blank&quot;&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;&lt;img width=&quot;439&quot; height=&quot;214&quot; title=&quot;Daily Closing Price&quot; style=&quot;display: inline;&quot; alt=&quot;Daily Closing Price&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUyPW5jqiaG3OiKnRlN3yoh2aDdJFIXVqWqUbAoHIo8vuMaiysjBtbWZySvKGA0vgGopoZihaZCd3e3bzYijzBLiyQ_ni83HefVKk67VyT-d8nfQSv1ZiVdA03VKgrqB8oevFIzz5MmhE/?imgmax=800&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8VJ2kjr0Bc8p3xosy_Bu49712JfU6pSTGjENoaY1Pirn3Yh1F6Y9cXjpQSb9jckYqRSPpaKu3Qy-D7oNklcBzY9iz-BUJIZ5L2L9RNPibd4SYICpdq7BpwQp-BnLLfkPLUfn65zA6NNo/s1600-h/Difference+From+Weekly%255B11%255D&quot; target=&quot;_blank&quot;&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;&lt;img width=&quot;439&quot; height=&quot;214&quot; title=&quot;Difference From Weekly&quot; style=&quot;display: inline;&quot; alt=&quot;Difference From Weekly&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQPuvOyIb_M9W7_nSWO453crP4LgRBmXVOr13JhxFBDrIpjXaXIA4s41fPtZJOUvaFuYp6BlcQUpggsxyKL5aESMZmPYuklQBTgHqajnnOyPRrM3Qd75FijVfFZPRTfYQoAY5swle9D4Q/?imgmax=800&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEHdMT0_C0IQXyiSq2V9dxsrqttdFdmVRCsK_gBCrfM0nD9Zqlk4O2tq06LkqeNYcA1tLBin26ms8DVj8Ft9ky-IOFu1Z1kZ0IGgHkKIhMoRJs-0oVp7SttxSL3KHc4tV00srq2ctRfBs/s1600-h/RainCloudAll%255B10%255D&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;435&quot; height=&quot;212&quot; title=&quot;RainCloudAll&quot; style=&quot;display: inline;&quot; alt=&quot;RainCloudAll&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWnk_Nk62gIYrsD1bCpYglJ932eXEnrYGgDvjTGM3_z7V2CUzfz1Hpd7nmoE4xdjaBDN5d5cXSrQEsP78mcyEKsbjP-dpacPB_7mrxYW0CsgwctGgiQsuNHlOl-fq4ME3mMRMG5PaLXnc/?imgmax=800&quot;&gt;&lt;/a&gt;&lt;p&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;Here are the plots for the last ~5 years starting in Jan 2013:&lt;/font&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY94nemlyYk8MYcaozJNDJPjhypsNCJCt4LWXlgVMOlCc8PY88rArvY4gj8ILpVWnUaLwkdKmdGBp8A0NxOG9fzsR_7lD8lpPdP17QYy046bgewiUAjwWuj2U4uFB4PDHgqF0G0knAiCo/s1600-h/Daily+Closing+Price2013%255B9%255D&quot; target=&quot;_blank&quot;&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;&lt;img width=&quot;437&quot; height=&quot;213&quot; title=&quot;Daily Closing Price2013&quot; style=&quot;display: inline;&quot; alt=&quot;Daily Closing Price2013&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix92GlFuls3asV5efsUfcNwlF3xhOtv6Umuxw0JWl0qwtB-hN6t32zehtL-nuNFuXzHGuxXABgdJqvXf1JYSJaf0-chjSiRkhyJA_tVB1HwoVdjQF5m1GO3bxzwQ5ocshRRZNVzcOBOm0/?imgmax=800&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2ip-5PXWYvILs1jXKkZvawjrx73ClUjmuYKGRGDXJDnNRSthzy_Tq8xIuSPM2J7qH7R5eJF1zDApSQTgG2tg4ZCQxONYiV_W4YYPA0d0iPvW9gV8gZ_IjnfXf4go7A4A39dAiXKDPh-Q/s1600-h/Difference+From+Weekly+2013%255B10%255D&quot; target=&quot;_blank&quot;&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;&lt;img width=&quot;436&quot; height=&quot;213&quot; title=&quot;Difference From Weekly 2013&quot; style=&quot;display: inline;&quot; alt=&quot;Difference From Weekly 2013&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTbaLJ5bP25kgeOPtDNUNuprkVLcwB2j1oUhjR-DkPr8MIM9ktN_1pdYkiPeggJKW6tsYH8RJMakWXWi-J4aBI9dcRIb6_0gO0pWSuGPBidMJtt3aodj3J1EWDwvnpM4TkwwX_Ru2CbLY/?imgmax=800&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaNdq599LyqcAPNr2dTKXCCxkexit3mdiyCzQjntK8T3IOEY9nfxa3LBG_MZSyYMl_ADMOIYE0mVXRRjLqUbZoOWhyphenhyphenD1tsorJeVkc6CaxnpIu7zANLg9B67cU1fKLamNBDr0EWEdmcb8g/s1600-h/RainCloud2013%255B9%255D&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;437&quot; height=&quot;213&quot; title=&quot;RainCloud2013&quot; style=&quot;display: inline;&quot; alt=&quot;RainCloud2013&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRbph-u9XbOD5KBW-LuK43Jg_yVEQvt5KAptux7B4F2PNNwbDnzZWcbajl2_wBIAck_l7RSak4UxZFiQjP-JNpeQFce_a5vjc7Vz1SIVmNdoRHI2OIyKdnnkJsTsC76wkX8AfE3VLG7kE/?imgmax=800&quot;&gt;&lt;/a&gt;&lt;p&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;Disclaimer: All investments involve risk. Past performance doesn’t guarantee future results. Use the material contained here at your own risk. &lt;/font&gt;&lt;p&gt;&lt;font style=&quot;background-color: rgb(255, 255, 255);&quot;&gt;RainCloud Matlab Source: &lt;a title=&quot;https://git.fmrib.ox.ac.uk/marshall/public/tree/master/raincloud_plots&quot; href=&quot;https://git.fmrib.ox.ac.uk/marshall/public/tree/master/raincloud_plots&quot;&gt;https://git.fmrib.ox.ac.uk/marshall/public/tree/master/raincloud_plots&lt;/a&gt;&lt;/font&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/5290504083094101763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2018/10/best-day-of-week-to-buy-vtsax.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/5290504083094101763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/5290504083094101763'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2018/10/best-day-of-week-to-buy-vtsax.html' title='Best Day of the Week to Buy VTSAX'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUyPW5jqiaG3OiKnRlN3yoh2aDdJFIXVqWqUbAoHIo8vuMaiysjBtbWZySvKGA0vgGopoZihaZCd3e3bzYijzBLiyQ_ni83HefVKk67VyT-d8nfQSv1ZiVdA03VKgrqB8oevFIzz5MmhE/s72-c?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-8851304525190619586</id><published>2018-09-12T20:35:00.001-07:00</published><updated>2018-09-12T20:48:52.433-07:00</updated><title type='text'>Remembering DOE Resolution</title><content type='html'>&lt;p&gt;Engineering often relies on &lt;b&gt;D&lt;/b&gt;esign &lt;b&gt;o&lt;/b&gt;f &lt;b&gt;E&lt;/b&gt;xperiments (DOE) to effectively understand significant dependencies of different input or control parameters to a desire measurable outcome. It is critical to properly design your experiments in a way that maximizes your ability to distinguish between the impact or contribution that each input variable has on your outcome. Different types of DOE designs have different resolutions. As stated &lt;a href=&quot;https://www.itl.nist.gov/div898/handbook/pri/section7/pri7.htm&quot;&gt;here&lt;/a&gt;, a DOE resolution describes the degree to which main effects are confounded with 2-level interactions, 3-level interactions and so on.  For example, in a resolution III design main effects are confounded with 2-level interactions. Ideally, we would like to have the highest resolution possible DOE. Full factorial designs have no confounding and thus are considered resolution “infinity”. However, having full factorial designs is often not possible due to the very large number of runs required. As a result, I often end up working with different resolution DOEs and often I need to remember which factors are confounded. For this, I always use a hand trick that was thought to me during my Design for Lean Six Sigma Training. I wanted to share this hand trick for those looking to remember this. However, rather than explaining it, I put together the following picture: &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimPNBOPOsVYAuBjIW37EbGBrUM-ASmqdZzKRKJUF795o1N7N8_7figD8cYj-ywN23rgedOvX_xeZKP0r5o30-kBVgNeWiZt4jvTXw9aX3mQXlY0gudlYtUWT5lrorFUXAPyFp5U5OFQjw/s1600-h/DOE_hand_trick%255B28%255D&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI4YLjlekJkMuyRRZaoPU5X7Cv1Yj6tv4Pt1iF73m9eyO5vb2EDYcd2rEU0ldglNIPLm77nnNxfSnROaRxq3BfqwcRxOM2yaGsqZgCSgJZN2FkEVi8DmRWvD3ExaAJKglJmUCmtA5ISj8/s1600-h/DOE_hand_trick%255B55%255D&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;492&quot; height=&quot;250&quot; title=&quot;DOE_hand_trick&quot; style=&quot;border: 0px currentcolor; border-image: none; display: inline; background-image: none;&quot; alt=&quot;DOE_hand_trick&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEippgLBRxskXhJ4SfSn6Ub4lF6rB_TuDfXJtJs-Mto-rJSwgfwZc7CBHTOwiGa8ud9q6ECyUWeAsi7dQJxNexF4uX_89b8w2BXYWMrjNKZsMOvaFaeZrIvEgzkvgJT7vKeXX4WEAwUluIM/?imgmax=800&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;p&gt;The nice thing about this trick is that it also holds true when you are dealing with say resolution VI or greater DOE. For DOE resolutions higher than V, just use your two hands, and work with the number of fingers equal to the DOE resolution as indicated above.</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/8851304525190619586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2018/09/remembering-doe-resolution.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/8851304525190619586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/8851304525190619586'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2018/09/remembering-doe-resolution.html' title='Remembering DOE Resolution'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEippgLBRxskXhJ4SfSn6Ub4lF6rB_TuDfXJtJs-Mto-rJSwgfwZc7CBHTOwiGa8ud9q6ECyUWeAsi7dQJxNexF4uX_89b8w2BXYWMrjNKZsMOvaFaeZrIvEgzkvgJT7vKeXX4WEAwUluIM/s72-c?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-7501782293885893351</id><published>2018-07-25T18:33:00.001-07:00</published><updated>2018-07-25T18:33:50.650-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CAD"/><category scheme="http://www.blogger.com/atom/ns#" term="Design"/><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Mathematics"/><category scheme="http://www.blogger.com/atom/ns#" term="Physics"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Statistics"/><category scheme="http://www.blogger.com/atom/ns#" term="Thermo-Fluid Science"/><title type='text'>ME Software Flow Chart</title><content type='html'>&lt;p&gt;Engineers solve problems every day. I have been practicing the Mechanical Engineering profession for over 10 years and every day I solve problems. Every big problem can be broken down in small bits, which become a problem to solve on their own. Like in any profession, one very important step to solve a problem is to find the right tool to get the job done in the most effective and efficient way. In the digital age, most of these tool that I am talking about end up being some type of computer software. I often find myself mentally evaluating different software packages against the details of the problem at hand.&amp;nbsp; For this reason, I have tried here to provide a decision tree style flow chart to illustrate the typical thinking process used by many mechanical engineers to choose the right software for the job.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFtaCMoeMrI_TgEr4f6bIOYf5wJXdLV2i8T0fxXtsCUZAFEB_LSXmvd3PQfC_8eh0A9FFP7oaewB8GW968mgB7xJyJjx8MEjx-phTGNC-KWx1wq6NJJrnc5zJFun2jr-oxQ75x-HGcNDU/s1600-h/ME_Software_Flow_Chart%255B24%255D&quot; target=&quot;_blank&quot;&gt;&lt;img width=&quot;467&quot; height=&quot;263&quot; title=&quot;ME_Software_Flow_Chart&quot; style=&quot;border: 0px currentcolor; border-image: none; display: inline; background-image: none;&quot; alt=&quot;ME_Software_Flow_Chart&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit4wlmk1GCKWss8qspKolQxzcxjTVYrMB1VoYg_FPrlzFhmw5EItgNsl6A0G3R14YkvvmA85jn203Ie6CQYJJynnYoSAStcHIQa_rUBDMwTA5KCR9YHdeCHHGoCTbv1bx66rnZMEGQqSM/?imgmax=800&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/7501782293885893351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2018/07/me-software-flow-chart_25.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/7501782293885893351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/7501782293885893351'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2018/07/me-software-flow-chart_25.html' title='ME Software Flow Chart'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit4wlmk1GCKWss8qspKolQxzcxjTVYrMB1VoYg_FPrlzFhmw5EItgNsl6A0G3R14YkvvmA85jn203Ie6CQYJJynnYoSAStcHIQa_rUBDMwTA5KCR9YHdeCHHGoCTbv1bx66rnZMEGQqSM/s72-c?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-5085390869601361677</id><published>2016-07-08T22:45:00.001-07:00</published><updated>2016-07-08T22:46:28.957-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="IoT"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>Access your Raspberry Pi from Anywhere</title><content type='html'>&lt;p&gt;The &lt;a href=&quot;https://www.raspberrypi.org/help/what-is-a-raspberry-pi/&quot; target=&quot;_blank&quot;&gt;Raspberry Pi&lt;/a&gt; is such a small, versatile, and cost-effective computer that it has found several uses in multiple applications. The Raspberry Pi’s ability to interact with the physical world through its &lt;a href=&quot;https://www.raspberrypi.org/documentation/usage/gpio/README.md&quot; target=&quot;_blank&quot;&gt;GPIO&lt;/a&gt; makes it the perfect computer for Makers and DIY projects. For these reasons, it is not uncommon to have several Raspberry Pi computers located in different geographical areas performing a variety of tasks. Therefore, there is naturally a need, especially for &lt;a href=&quot;https://www.raspberrypi.org/blog/tag/internet-of-things/&quot; target=&quot;_blank&quot;&gt;IoT&lt;/a&gt; applications, to securely access the Raspberry Pi over the internet from anywhere and any time. A very effective method that I have been now reliably using for a couple of months is a &lt;strong&gt;FREE&lt;/strong&gt; service provided by &lt;a href=&quot;https://www.weaved.com/&quot; target=&quot;_blank&quot;&gt;Weaved&lt;/a&gt;. I first came across this option on &lt;a href=&quot;https://www.raspberrypi.org/documentation/remote-access/access-over-Internet/internetaccess.md&quot; target=&quot;_blank&quot;&gt;raspberrypi.org&lt;/a&gt; and I learned more on &lt;a href=&quot;https://www.weaved.com/raspberry-pi-remote-connection/&quot; target=&quot;_blank&quot;&gt;weaved.com&lt;/a&gt;. The &lt;a href=&quot;https://www.weaved.com/installing-weaved-raspberry-pi-raspbian-os/&quot; target=&quot;_blank&quot;&gt;installation process&lt;/a&gt; was simple. I installed the &lt;a href=&quot;https://www.raspberrypi.org/documentation/remote-access/ssh/&quot; target=&quot;_blank&quot;&gt;SSH&lt;/a&gt; service as well as the &lt;a href=&quot;https://www.raspberrypi.org/documentation/remote-access/vnc/README.md&quot; target=&quot;_blank&quot;&gt;VNC&lt;/a&gt; service. On my PC at home, I use &lt;a href=&quot;http://www.putty.org/&quot; target=&quot;_blank&quot;&gt;PuTTY&lt;/a&gt; to access my Raspberry Pi using SSH. For the VNC service, which allows me to interact with the Raspberry Pi’s GUI, I use &lt;a href=&quot;http://www.tightvnc.com/&quot; target=&quot;_blank&quot;&gt;TightVNC&lt;/a&gt; which works great. A great thing about SSH is that it allows you to use &lt;a href=&quot;https://filezilla-project.org/&quot; target=&quot;_blank&quot;&gt;FileZilla&lt;/a&gt; for file management and transfer. I have been using the FileZilla software to transfer images taken by a &lt;a href=&quot;https://www.raspberrypi.org/documentation/usage/webcams/&quot; target=&quot;_blank&quot;&gt;USB camera connected to the Raspberry Pi&lt;/a&gt;. &lt;p&gt;Once you have completed the installation process described &lt;a href=&quot;https://www.raspberrypi.org/documentation/remote-access/access-over-Internet/internetaccess.md&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; or &lt;a href=&quot;https://www.weaved.com/installing-weaved-raspberry-pi-raspbian-os/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, you should be able to login to Weaved and see your services online: &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl69ernPEYVxpVMEWNH2pLCT_YyWOP0PbzPLhAjQJd4LoPRA9CUoNPL4mOnIeHxZd8D5GFD29sBy01oe72858yduIM3IjGwG76vEZ1TIhyDn0QtLBrmW3oaQ4SMogCntj53B1tw3TrBcI/?imgmax=800&quot; width=&quot;463&quot; height=&quot;81&quot;&gt; &lt;p&gt;I strongly recommend that you change your Raspberry Pi password to something other than the default password for increased security. &lt;p&gt;If you select the SSH service, you will be given the following information: &lt;p&gt;&amp;nbsp; &lt;p align=&quot;left&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZo7aeL424oVoKcq-bPEK0PQVOyiVuF5g3dSExhl4JPd_Ohnun45xOH1x1KYjN4B5JjwZzb4F_6H4NYPNF_uV1scHic_j3YYt8Sqal1rIHxU_1rM_6A-npSC3JSdmjprlLJesQgrjH3mI/?imgmax=800&quot; width=&quot;351&quot; height=&quot;369&quot;&gt; &lt;p&gt;And the information for VNC acces looks like this: &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhgUJt4diBv8TjHfztLKoss1d27crH6rgkN8YL511EZWDgPGFgtD4SgctjsuYl7SFZsSu2D01M46Kzvj1d41tkm4dqt4hU6I41iChRD-2RglvwqRMrB2EGmuInewhZiZBKDL9JEGShiMk/?imgmax=800&quot; width=&quot;331&quot; height=&quot;281&quot;&gt;  &lt;p&gt;More information on using Weaved with PuTTY and FileZilla can be found &lt;a href=&quot;https://www.weaved.com/using-weaved-with-third-party-sshscp-applications/&quot; target=&quot;_blank&quot;&gt;HERE&lt;/a&gt;. My next IoT project using the Raspberry Pi will most likely involve the use of &lt;a href=&quot;http://webiopi.trouch.com/&quot; target=&quot;_blank&quot;&gt;WebIOPi&lt;/a&gt; which can also be accessed using &lt;a href=&quot;https://www.weaved.com/raspberry-pi-remote-connection/&quot; target=&quot;_blank&quot;&gt;Weaved&lt;/a&gt;.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/5085390869601361677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2016/07/access-your-raspberry-pi-from-anywhere.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/5085390869601361677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/5085390869601361677'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2016/07/access-your-raspberry-pi-from-anywhere.html' title='Access your Raspberry Pi from Anywhere'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl69ernPEYVxpVMEWNH2pLCT_YyWOP0PbzPLhAjQJd4LoPRA9CUoNPL4mOnIeHxZd8D5GFD29sBy01oe72858yduIM3IjGwG76vEZ1TIhyDn0QtLBrmW3oaQ4SMogCntj53B1tw3TrBcI/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-2210006140615963539</id><published>2016-05-15T12:48:00.001-07:00</published><updated>2016-05-15T13:05:58.681-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Electrical"/><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><title type='text'>How much does it cost to charge a cell phone or Tesla vehicle?</title><content type='html'>&lt;p&gt;Have you ever wondered how much money does it cost to charge a cell phone or perhaps a &lt;a href=&quot;https://www.teslamotors.com/&quot; target=&quot;_blank&quot;&gt;Tesla&lt;/a&gt; vehicle? The first step to answer this question is to know how much you pay for electricity. This &lt;a href=&quot;http://www.neo.ne.gov/statshtml/204.htm&quot; target=&quot;_blank&quot;&gt;website&lt;/a&gt; from the &lt;a href=&quot;http://www.neo.ne.gov/&quot; target=&quot;_blank&quot;&gt;Nebraska Goverment&lt;/a&gt; gives us an idea of the average cost of electricity per state, in cents per KiloWatt-hour. The next step is to find out the capacity of the battery for the device of interest. &lt;/p&gt; &lt;p&gt;The battery capacity for an &lt;a href=&quot;http://www.apple.com/iphone/&quot; target=&quot;_blank&quot;&gt;Iphone&lt;/a&gt; 6 is about 6.9 Watt-hour, and about 9.8 Watt-hour for a &lt;a href=&quot;http://www.samsung.com/us/mobile/cell-phones&quot; target=&quot;_blank&quot;&gt;Samsung&lt;/a&gt; Galaxy S6. For these calculations we will need to make a couple of assumptions and approximations. I decided to include a 95% efficiency in the charging process and also decided that my device will be charged 1.5 times per day, 365 days per year. It turns out that it costs about &lt;strong&gt;&lt;u&gt;50 cents per year to charge a cell phone&lt;/u&gt;&lt;/strong&gt;. Overall, I was surprised how relatively inexpensive it is to charge a cell phone given everything that a cell phone does for us these days.&lt;/p&gt; &lt;p&gt;The battery capacity of a &lt;a href=&quot;https://www.teslamotors.com/&quot; target=&quot;_blank&quot;&gt;Tesla&lt;/a&gt; vehicle ranges from 70 KiloWatt-hour to 90 KiloWatt-hour (about 10,000x larger than your phone). The average range of a &lt;a href=&quot;https://www.teslamotors.com/models&quot; target=&quot;_blank&quot;&gt;Model S&lt;/a&gt; is about 240 miles, battery-only. On average, a vehicle is driven 12,000 miles per year, which would be equivalent to charging your Tesla 0.137 times per day (about once every 7 days). Using a 95% charging efficiency and 365 days per year, it costs about &lt;strong&gt;&lt;u&gt;$440 per year to charge a Tesla Model S&lt;/u&gt;&lt;/strong&gt;. I do not own a Tesla yet, but I will do some approximations to relate this number to the cost of driving a gasoline vehicle. An average of 12K miles per year is equivalent to &lt;strong&gt;27.3 miles/$ for Tesla&lt;/strong&gt;. My current 4 cylinder 2.0L car gets about 30 MPG. Currently, gas is about &lt;strong&gt;$2.5/gallon &lt;/strong&gt;(May 2016). Therefore, my &lt;strong&gt;4 cylinder 2.0L car costs 12 miles/$&lt;/strong&gt; or 2.3x the price of Tesla for the same distance.&lt;/p&gt; &lt;p&gt;For reference, here are the numbers for the cost to charge per year:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font size=&quot;5&quot;&gt;CELL PHONE:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-ffipGI_JK-Thv-8V34WjTwWkUVA3eaCOMOo4OJKCUvFp69Dlu5zEGaDhDzLxhTlphPqTontHeXhsw-e3fWEo9Eecia3d0vdcda1pMrL8hZWhd-7Xm4RXkqBh420sULiA9_ysV5Xpnrc/s1600-h/image%25255B32%25255D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqyj7XCc2k8HKczgiOXCG3jYMmanTLxFXxA4oRTXhIpCJRfCVUOMsVyOHE9m7ASGFhXJKRG2PwUXAvZ-843z0vxtFxJ27i5U_4kEC5EgzMSb07_yRZP1mJsm7rydnBTTloTZjeyPIvO14/?imgmax=800&quot; width=&quot;432&quot; height=&quot;751&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font size=&quot;5&quot;&gt;TESLA:&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPtehyphenhyphenGVfsqPWvnwJdjW6SzEZko4XWq_MYBh4AveSHWSdaD8RQkMOxMTEz-TPP0orHCJ5At5JpyIcVzVXhuXw1frUp4V7d3APV8HUrcSlOPyP5gKjSHzBTN8SyNme2zwwvFgmcAwmDgfE/s1600-h/image%25255B86%25255D.png&quot;&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkC0MYG_cDJy4DM7d8MdewaXtqf_AD0zPDuf3I9YKtDnRdwgeWK_qEiy8M44ba8Mm2Ac3a_9riZOFQNy3tzopiG9zcS17-wP1i6ioq1-NEf2WO2RKXBeopXxrkcy6fWdrwMMtd_Ho7Mpk/?imgmax=800&quot; width=&quot;431&quot; height=&quot;686&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/2210006140615963539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2016/05/how-much-does-it-cost-to-charge-cell.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/2210006140615963539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/2210006140615963539'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2016/05/how-much-does-it-cost-to-charge-cell.html' title='How much does it cost to charge a cell phone or Tesla vehicle?'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqyj7XCc2k8HKczgiOXCG3jYMmanTLxFXxA4oRTXhIpCJRfCVUOMsVyOHE9m7ASGFhXJKRG2PwUXAvZ-843z0vxtFxJ27i5U_4kEC5EgzMSb07_yRZP1mJsm7rydnBTTloTZjeyPIvO14/s72-c?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-1732841900333210654</id><published>2016-02-22T20:29:00.001-08:00</published><updated>2016-02-22T20:31:14.011-08:00</updated><title type='text'>Driven Cavity Flow Results</title><content type='html'>&lt;p&gt;A few days ago I wrote about the &lt;a href=&quot;http://www.ruander.com/2016/02/driven-cavity-flow.html&quot; target=&quot;_blank&quot;&gt;Driven Cavity Flow Problem&lt;/a&gt;. Since then, I decided to re-solve the problem with a 100&lt;sup&gt;2&lt;/sup&gt; grid size and with a more strick residual tolerance of 10&lt;sup&gt;-6&lt;/sup&gt;.&amp;nbsp; Three days later and with nearly 700,000 iterations, the residuals had tapered off nearly to the target. I had to stop the code because I needed the computer for other work. However, here are the results I obtained:&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT-yOvvLsaOf_tdNlXFxJSiei7QXlUXdoe2nzzX0WbpRAEz3UDADN4E0VngNk_BoSRVS8a68q4nFSDF-Oea1YPPoJgVonAJJsU_BMLuzmZJXKLsoFLWk3-vGho3Re1lk8_ereQxNmwpX8/s1600-h/Residual%25255B6%25255D.png&quot;&gt;&lt;img title=&quot;Residual&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Residual&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8oulmH6Xec5iYh5wolTb_6lidYdBkSAdYMkP0GBFYeberAJRQqVxRa9CxsbmebSqiOs0QMIGQWKrcuoT56HnG5mwP2lMk31nypOoahsPdohxGLvF7IAtVoAPw8u70OTD-x2JtckY2EXY/?imgmax=800&quot; width=&quot;460&quot; height=&quot;375&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;For the velocity vectors, I am plotting every third data point to make it easier to see. The background color is a countour of the pressure field.&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6LsSZJBPvcTphcxYpbbuVa4vK_jZvEe-tIuffJ8KEE-bboyg2x8EI4rF1yE5flJ_nhPOPXbwNRe66iU6ojMj-s9jmzfMHeNo0UeY-6mWmHw71ynb3fzCdR01yyBNB8D0i-ch9Tslffu4/s1600-h/CavityFlow%25255B6%25255D.png&quot;&gt;&lt;img title=&quot;CavityFlow&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;CavityFlow&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGWIXbEZC1xyTkwAj03SiY5JbgGmj5TSo6-kxcJzbFFPqkonyiNodPy8WG4ps6RWM_K3FDe4tjn-kSSLdmfJROpgC3SY7CXLrBNDnuvx-H_cYYeaeCvlk2MXW_0XfUB1VrR6LuJPQlCyg/?imgmax=800&quot; width=&quot;450&quot; height=&quot;455&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/1732841900333210654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2016/02/driven-cavity-flow-results.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/1732841900333210654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/1732841900333210654'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2016/02/driven-cavity-flow-results.html' title='Driven Cavity Flow Results'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8oulmH6Xec5iYh5wolTb_6lidYdBkSAdYMkP0GBFYeberAJRQqVxRa9CxsbmebSqiOs0QMIGQWKrcuoT56HnG5mwP2lMk31nypOoahsPdohxGLvF7IAtVoAPw8u70OTD-x2JtckY2EXY/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-8661349350428227624</id><published>2016-02-18T21:23:00.001-08:00</published><updated>2016-02-18T21:44:39.884-08:00</updated><title type='text'>Driven Cavity Flow</title><content type='html'>&lt;p&gt;In graduate school I took several courses on Computational Fluid Dynamics (CFD). During one of these courses, a classmate and I worked together to model a driven cavity flow.&amp;nbsp; Driven cavity flows appear quite often in our regular lives. For example, driven cavity flows are often encountered in transportation such as a convertible car, or when an airplane is about to deploy the landing gear.&amp;nbsp; In 2-D, a driven cavity flow can be simplified as the following:&lt;/p&gt; &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqPPAKHuKy5hItsZ1B2BZd32QODne8uYJlob8zCHmW4JsZiETcvXmxNtrdUU1jYzckm0vcBVGj_gyNXUdEYHgLkw6GyKJ1iNlwWIFkb8s_tBpEKj0KLKy8Lg95DadTN_kVY_GycLb-X7Y/?imgmax=800&quot; width=&quot;457&quot; height=&quot;336&quot;&gt;&lt;/p&gt; &lt;p&gt;To solve this flow problem numerically, we assumed steady state flow, no body forces, no source terms, and constant fluid properties. The mass and momentum equations governing the flow are the following:&lt;/p&gt; &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha5dkD_hX8uwQ9yRpvYXRwf1JV-oZ6WIFzg4Gcm-4BvHSTjXBcc0NBy99uBwCqfVbRR0JSQcqvHnqLfplHsRPo1Nf2mlF93NpxBfCEsXbmhaW05wjTM78F5Ga0Rp7Q5UGBCOeB0xHZ158/?imgmax=800&quot; width=&quot;307&quot; height=&quot;358&quot;&gt;&lt;/p&gt; &lt;p&gt;To discretize the domain, we used a staggered grid configuration and the equations were solved iteratively using the Semi-Implicit Method for Pressure Linked Equations (SIMPLE algorithm) with Upwind Differencing Scheme (UDS). &lt;/p&gt; &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsf3WhhYRz6gLBZwf3Ma13XtbrZWQB8h0Et_BxXXzfeYtSRpl9uI5O46s2elwuG7I7MjmDre6n5Ft5GoX_5G034WyvAS-Ni0FOHRLNRX2WHXv04cdwqCTTGhLO7tUkPf5p3ypU_Kujp7w/?imgmax=800&quot; width=&quot;460&quot; height=&quot;380&quot;&gt;&lt;/p&gt; &lt;p&gt;Visually, the velocity boundary conditions can be represented as follows:&lt;/p&gt; &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHQAoUw3flA8gkZ7Zt7QumIsNpTKbLq_A569OGoA2pGM-ZDn-W6Ij20B2Ea-bOJsvykdap-0jDkYLIwzSFR4dLf3j9Dp1Q-_JeaOftgV4MaPwp4_V9qbYF3aujLPoQfxp92uB5B0W6fqo/?imgmax=800&quot; width=&quot;364&quot; height=&quot;422&quot;&gt;&lt;/p&gt; &lt;p&gt;We found that it was quite difficult and computationally expensive to converge a solution. Small relaxation factors seemed to aid in the convergence process. Nevertheless, we sucessfully converged a solution with the relatively low Re=100 with 2 different grid sized.&lt;/p&gt; &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguhP7k9rnDE8GFxF37Z0k__GUb0FRK0ceIWREXrhEnaPsfGhRyy2BTssMTHNYjYvkE7BhkU12VBU-tftjoeZ5CCZ2_r5SuyWQOgprGSG8VXDmAmLBEm31Rn1cH_yGITWdWM6662hJ4FsI/?imgmax=800&quot; width=&quot;468&quot; height=&quot;275&quot;&gt;&lt;/p&gt; &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbhePSr94Z2gm_9e9juPmzyuulH-MkRNhKTTXQOJDNKNeMTizq5x4SA52flzXg2it-b0bO1245cxUkANn1E8lks0Vzrh0S_7FuqgzPG6ZsuhbxM3wn1EtOmLUAa3D3GmTR4cdaGNibp54/?imgmax=800&quot; width=&quot;475&quot; height=&quot;266&quot;&gt;&lt;/p&gt; &lt;p&gt;This is an example of the residuals as a function of iteration number:&lt;/p&gt; &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFUkIQ0TG3Tj5f91g8H3kwCLOmlZBWKABawOTnWdAhGbuTFgQNijXe6n6N1WcmJRMVh6cNKt59OAjOQ9AAlsKajbaMpbSOW0Qw9kkkb8zg5Q25u-8A23WG3VnKnhrCW4x5TeLl1snuiyo/?imgmax=800&quot; width=&quot;462&quot; height=&quot;201&quot;&gt;&lt;/p&gt; &lt;p&gt;In case someone is interested, here is the MATLAB code we wrote (all rights reserved):&lt;/p&gt; &lt;p&gt;clear&lt;br&gt;clc&lt;br&gt;close all&lt;/p&gt; &lt;p&gt;%% Constants&lt;br&gt;rho=1; % kg/m^3&lt;br&gt;mu=1e-5; % N/m-s&lt;br&gt;% Geometery&lt;br&gt;M=10; % Square Grid Size&lt;br&gt;N=M;&lt;br&gt;dx=.001/N; % meters, square cavity with side of 1&lt;br&gt;dy=dx; % meters&lt;br&gt;% Convergence&lt;br&gt;alpha_p=.001; % Pressure under-relaxtion&lt;br&gt;alpha_u=.02; % u-momentum under-relaxation&lt;br&gt;alpha_v=.02; % v-momentum under-relaxation&lt;br&gt;max_iter=200000; % maximum number of iterations&lt;br&gt;max_res=1e-6; % Maximum Residual &lt;br&gt;inner_iter=1; % Number of iterations before velocity is updated&lt;br&gt;% Parameters&lt;br&gt;Dn=mu*dx/dy;Ds=Dn;&lt;br&gt;De=mu*dy/dx;Dw=De;&lt;/p&gt; &lt;p&gt;&lt;br&gt;% Boundary Conditions&lt;br&gt;P_free=10; % Pascals&lt;br&gt;u_free=1; % meters/second&lt;br&gt;Re=rho*.001*u_free/mu;&lt;/p&gt; &lt;p&gt;%% Creating the variables (initial guesses)&lt;br&gt;% Starred velocities&lt;br&gt;u_s=zeros(M+2,N+1); % m/s&lt;br&gt;u_s(1,:)=u_free*ones(1,N+1);&lt;br&gt;u_s(2:end-1,2:end-1)=u_free*ones(size(u_s)-2);&lt;br&gt;u_s=(rot90(u_s,3)); % rotating to get i corresponding &lt;br&gt;% to an x column and j to a y row&lt;br&gt;v_s=zeros(M+1,N+2); % m/s&lt;br&gt;v_s(2:end-1,2:end-1)=u_free*ones(size(v_s)-2);&lt;br&gt;v_s=(rot90(v_s,3)); % rotating to get i corresponding&lt;br&gt;% %% Load Previous Velocity Solution&lt;br&gt;% load(&#39;10_square_sol.mat&#39;,&#39;v&#39;)&lt;br&gt;% XI=linspace(0,11,M+1);&lt;br&gt;% YI=linspace(0,12,N+2);&lt;br&gt;% [XI YI]=meshgrid(XI,YI);&lt;br&gt;% X=1:11;&lt;br&gt;% Y=1:12;&lt;br&gt;% [X Y]=meshgrid(X,Y);&lt;br&gt;% v_s = interp2(X,Y,v,XI,YI);&lt;br&gt;% clear v&lt;br&gt;% %% Load Previous Pressure Solution&lt;br&gt;% load(&#39;10_square_sol.mat&#39;,&#39;u&#39;)&lt;br&gt;% XI=linspace(0,12,M+2);&lt;br&gt;% YI=linspace(0,11,N+1);&lt;br&gt;% [XI YI]=meshgrid(XI,YI);&lt;br&gt;% X=1:12;&lt;br&gt;% Y=1:11;&lt;br&gt;% [X Y]=meshgrid(X,Y);&lt;br&gt;% u_s = interp2(X,Y,u,XI,YI);&lt;br&gt;% clear u&lt;/p&gt; &lt;p&gt;&lt;br&gt;% to an x column and j to a y row&lt;br&gt;% Old Velocities&lt;br&gt;u_o=1*u_s; % m/s&lt;br&gt;v_o=1*v_s; % m/s&lt;br&gt;% New Velocities&lt;br&gt;u=u_s; % m/s&lt;br&gt;apm_u=zeros(size(u)); % The u momentum :a&quot; coefficient matrix&lt;br&gt;v=v_s; % m/s&lt;br&gt;apm_v=zeros(size(v)); % The v momentum &quot;a&quot; coefficient matrix &lt;br&gt;% Acutal Pressure&lt;br&gt;x=linspace(0,1,M);&lt;br&gt;y=x;&lt;br&gt;[x y]=meshgrid(x,y);&lt;br&gt;z=1./((x-1).^2+(y).^2+.5);&lt;br&gt;P=P_free*z; % Pascals&lt;br&gt;P=(rot90(P,3)); % Pascals, rotating to get i corresponding &lt;br&gt;% to an x column and j to a y row&lt;br&gt;% Starred Pressure&lt;br&gt;% %% Load Previous Pressure Solution&lt;br&gt;% load(&#39;10_square_sol.mat&#39;,&#39;P&#39;)&lt;br&gt;% XI=linspace(0,10,N);&lt;br&gt;% YI=linspace(0,10,M);&lt;br&gt;% [XI YI]=meshgrid(XI,YI);&lt;br&gt;% X=1:10;&lt;br&gt;% Y=X;&lt;br&gt;% [X Y]=meshgrid(X,Y);&lt;br&gt;% P = interp2(X,Y,P,XI,YI);&lt;br&gt;P_s=P; % Pascals&lt;br&gt;% Old Pressure&lt;br&gt;P_o=P; % Pascals&lt;br&gt;% Pressure Correction&lt;br&gt;P_p=zeros(size(P)); % Pascals&lt;/p&gt; &lt;p&gt;%% Initiating the Simple Algorithm Infinite Loop&lt;br&gt;% Begin the while loop&lt;br&gt;count=0;&lt;br&gt;residual=zeros(3,max_iter);&lt;/p&gt; &lt;p&gt;while 1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; count=count+1; % Counting the iterations&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; disp(count)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for k=1:inner_iter&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %% Solving starred momentum equations&lt;br&gt;%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u=u+.5*exp(-0.05*count);&lt;br&gt;%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v=v+5*exp(-0.1*count);&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P=P+50*exp(-count);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % u-momentum&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i=2:size(u,1)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for j=2:size(u,2)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Computing the face fluxes:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fe=rho*dy/2*(u_o(i+1,j)+u_o(i,j)); Fw=rho*dy/2*(u_o(i,j)+u_o(i-1,j));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fn=rho*dx/2*(v_o(i,j)+v_o(i+1,j)); Fs=rho*dx/2*(v_o(i,j-1)+v_o(i+1,j-1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Computing the &quot;a&quot; coefficients:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=De-min(0,Fe); aw=Dw+max(0,Fw);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=Dn-min(0,Fn); as=Ds+max(0,Fs);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; apm_u(i,j)=ae+aw+an+as+(Fe-Fw+Fn-Fs);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u_s(i,j)=1/apm_u(i,j)*(ae*u_s(i+1,j)+aw*u_s(i-1,j)... % x-direction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +an*u_s(i,j+1)+as*u_s(i,j-1)...% y-direction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -dy*(P_s(i,j-1)-P_s(i-1,j-1))); % Pressure term&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the j loop&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the i loop&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % v-momentum&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i=2:size(v,1)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for j=2:size(v,2)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Computing the face fluxes:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fe=rho*dy/2*(u_o(i,j+1)+u_o(i,j)); Fw=rho*dy/2*(u_o(i-1,j+1)+u_o(i-1,j));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fn=rho*dx/2*(v_o(i,j+1)+v_o(i,j)); Fs=rho*dx/2*(v_o(i,j)+v_o(i,j-1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Computing the &quot;a&quot; coefficients:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=De-min(0,Fe); aw=Dw+max(0,Fw);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=Dn-min(0,Fn); as=Ds+max(0,Fs);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; apm_v(i,j)=ae+aw+an+as+(Fe-Fw+Fn-Fs);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v_s(i,j)=1/apm_v(i,j)*(ae*v_s(i+1,j)+aw*v_s(i-1,j)... % x-direction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +an*v_s(i,j+1)+as*v_s(i,j-1)...% y-direction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -dx*(P_s(i-1,j)-P_s(i-1,j-1))); % Pressure term&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the j loop&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the I loop&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %% Enforcing conservation of mass on the top boundary&lt;br&gt;%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v_s(2:end-1,end)=v_s(2:end-1,end-1);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i=2:N+1&lt;br&gt;%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u_s(i,M+2)=u_s(i-1,M+2)+v_s(i,M+1);&lt;br&gt;%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;/p&gt; &lt;p&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %% Solving the pressure correction equations&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Pressure correction loop&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for I=1:N&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for J=1:M&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if I==1 &amp;amp;&amp;amp; J==1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Bottom left corner&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=rho*dy^2/apm_u(I+1,J+1); aw=0;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=rho*dx^2/apm_v(I+1,J+1); as=0;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=rho*(dy*u_s(I,J+1)-dy*u_s(I+1,J+1)+dx*v_s(I+1,J)-dx*v_s(I+1,J+1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_p(I,J)=1/ap*(ae*P_p(I+1,J)+an*P_p(I,J+1)+b);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif I==1 &amp;amp;&amp;amp; J~=1 &amp;amp;&amp;amp; J~=M&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Left wall&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=rho*dy^2/apm_u(I+1,J+1); aw=0;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=rho*dx^2/apm_v(I+1,J+1); as=rho*dx^2/apm_v(I+1,J);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=rho*(dy*u_s(I,J+1)-dy*u_s(I+1,J+1)+dx*v_s(I+1,J)-dx*v_s(I+1,J+1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_p(I,J)=1/ap*(ae*P_p(I+1,J)+an*P_p(I,J+1)+as*P_p(I,J-1)+b);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif J==1 &amp;amp;&amp;amp; I~=1 &amp;amp;&amp;amp; I~=N&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Bottom wall&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=rho*dy^2/apm_u(I+1,J+1); aw=rho*dy^2/apm_u(I,J+1);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=rho*dx^2/apm_v(I+1,J+1); as=0;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=rho*(dy*u_s(I,J+1)-dy*u_s(I+1,J+1)+dx*v_s(I+1,J)-dx*v_s(I+1,J+1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_p(I,J)=1/ap*(ae*P_p(I+1,J)+aw*P_p(I-1,J)+an*P_p(I,J+1)+b);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif I==N &amp;amp;&amp;amp; J==1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Bottom right corner&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=0; aw=rho*dy^2/apm_u(I,J+1);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=rho*dx^2/apm_v(I+1,J+1); as=0;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=rho*(dy*u_s(I,J+1)-dy*u_s(I+1,J+1)+dx*v_s(I+1,J)-dx*v_s(I+1,J+1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_p(I,J)=1/ap*(aw*P_p(I-1,J)+an*P_p(I,J+1)+b);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif I==N &amp;amp;&amp;amp; J~=1 &amp;amp;&amp;amp; J~=M&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Right wall&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=0; aw=rho*dy^2/apm_u(I,J+1);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=rho*dx^2/apm_v(I+1,J+1); as=rho*dx^2/apm_v(I+1,J);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=rho*(dy*u_s(I,J+1)-dy*u_s(I+1,J+1)+dx*v_s(I+1,J)-dx*v_s(I+1,J+1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_p(I,J)=1/ap*(aw*P_p(I-1,J)+an*P_p(I,J+1)+as*P_p(I,J-1)+b);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif I==1 &amp;amp;&amp;amp; J==M&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Top Left&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=rho*dy^2/apm_u(I+1,J+1); aw=0;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=0; as=rho*dx^2/apm_v(I+1,J);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=rho*(dy*u_s(I,J+1)-dy*u_s(I+1,J+1)+dx*v_s(I+1,J)-dx*v_s(I+1,J+1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_p(I,J)=1/ap*(ae*P_p(I+1,J)+as*P_p(I,J-1)+b);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif I==N &amp;amp;&amp;amp; J==M&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Top Right&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=0; aw=rho*dy^2/apm_u(I,J+1);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=0; as=rho*dx^2/apm_v(I+1,J);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=rho*(dy*u_s(I,J+1)-dy*u_s(I+1,J+1)+dx*v_s(I+1,J)-dx*v_s(I+1,J+1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_p(I,J)=1/ap*(aw*P_p(I-1,J)+as*P_p(I,J-1)+b);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elseif I~=N &amp;amp;&amp;amp; I~=1 &amp;amp;&amp;amp; J==M&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Top Row&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=rho*dy^2/apm_u(I+1,J+1); aw=rho*dy^2/apm_u(I,J+1);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=0; as=rho*dx^2/apm_v(I+1,J);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=rho*(dy*u_s(I,J+1)+dx*v_s(I+1,J)-dx*v_s(I+1,J+1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_p(I,J)=1/ap*(ae*P_p(I+1,J)+aw*P_p(I-1,J)+as*P_p(I,J-1)+b);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Interior nodes&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=rho*dy^2/apm_u(I+1,J+1); aw=rho*dy^2/apm_u(I,J+1);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=rho*dx^2/apm_v(I+1,J+1); as=rho*dx^2/apm_v(I+1,J);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b=rho*(dy*u_s(I,J+1)-dy*u_s(I+1,J+1)+dx*v_s(I+1,J)-dx*v_s(I+1,J+1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_p(I,J)=1/ap*(ae*P_p(I+1,J)+aw*P_p(I-1,J)+an*P_p(I,J+1)+as*P_p(I,J-1)+b);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the conditional boundary node statement&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the J loop&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the I loop&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %% Correcting the pressure and velocities&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; P=P_s+alpha_p*P_p; % Relaxed Pressure&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % u-correction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i=2:size(u,1)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for j=2:size(u,2)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u(i,j)=u_s(i,j)+dy/apm_u(i,j)*(P_p(i-1,j-1)-P_p(i,j-1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % v-correction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i=2:size(v,1)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for j=2:size(v,2)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v(i,j)=v_s(i,j)+dx/apm_v(i,j)*(P_p(i-1,j-1)-P_p(i-1,j));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %% Enforcing conservation of mass on the top boundary&lt;br&gt;%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v(2:end-1,end)=v(2:end-1,end-1);&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %% Relaxing the velocities&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Similar equations to &quot;solving the starred momentum&quot;, only the starred&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % quantities are the new guesses (both velocity and pressure) &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % u-momentum&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i=2:size(u,1)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for j=2:size(u,2)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Computing the face fluxes:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fe=rho*dy/2*(u_o(i+1,j)+u_o(i,j)); Fw=rho*dy/2*(u_o(i,j)+u_o(i-1,j));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fn=rho*dx/2*(v_o(i,j)+v_o(i+1,j)); Fs=rho*dx/2*(v_o(i,j-1)+v_o(i+1,j-1));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Computing the &quot;a&quot; coefficients:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=De-min(0,Fe); aw=Dw+max(0,Fw);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=Dn-min(0,Fn); as=Ds+max(0,Fs);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as+(Fe-Fw+Fn-Fs);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u(i,j)=alpha_u/ap*(ae*u(i+1,j)+aw*u(i-1,j)... % x-direction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +an*u(i,j+1)+as*u(i,j-1)...% y-direction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -dy*(P(i,j-1)-P(i-1,j-1)))+(1-alpha_u)*u_o(i,j); % Pressure term&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the j loop&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the i loop&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % v-momentum&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i=2:size(v,1)-1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for j=2:size(v,2)-1&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Computing the face fluxes:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fe=rho*dy/2*(u_o(i,j+1)+u_o(i,j)); Fw=rho*dy/2*(u_o(i-1,j+1)+u_o(i-1,j));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fn=rho*dx/2*(v_o(i,j+1)+v_o(i,j)); Fs=rho*dx/2*(v_o(i,j)+v_o(i,j-1));&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Computing the &quot;a&quot; coefficients:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ae=De-min(0,Fe); aw=Dw+max(0,Fw);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; an=Dn-min(0,Fn); as=Ds+max(0,Fs);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ap=ae+aw+an+as+(Fe-Fw+Fn-Fs);&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v(i,j)=alpha_v/ap*(ae*v(i+1,j)+aw*v(i-1,j)... % x-direction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +an*v(i,j+1)+as*v(i,j-1)...% y-direction&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -dx*(P(i-1,j)-P(i-1,j-1)))+(1-alpha_v)*v_o(i,j); % Pressure term&lt;/p&gt; &lt;p&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the j loop&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the I loop&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %% Enforcing conservation of mass on the top boundary&lt;br&gt;%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v(2:end-1,end)=v(2:end-1,end-1);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for i=2:N+1&lt;br&gt;%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u(i,M+2)=u(i-1,M+2)+v(i,M+1);&lt;br&gt;%&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end % the inner iterations&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %% Checking for convergence&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if sum(isnan(u(:)))+sum(isnan(v(:)))+sum(isnan(P(:)))&amp;gt;=1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disp(&#39;Error: Solution has diverged&#39;);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break % End the simple algorithm&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if count&amp;gt;max_iter&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disp(&#39;Maximum number of iterations has been reached&#39;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break % End the simple algorithm&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if max(abs(u_o(:)-u(:)))&amp;lt;max_res &amp;amp;&amp;amp; max(abs(v_o(:)-v(:)))&amp;lt;max_res &amp;amp;&amp;amp; max(abs((P_o(:)-P(:))./P_o(:)))&amp;lt;10*max_res&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disp(&#39;Success: Solution has converged&#39;);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break % End the simple algorithm&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else % Plotting the residuals&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; residual(1,count)=max(abs(u_o(:)-u(:)));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; residual(2,count)=max(abs(v_o(:)-v(:)));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; residual(3,count)=max(abs((P_o(:)-P(:))./P_o(:)));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; figure(1)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plot(1:count,residual(1,1:count),&#39;r-&#39;,&#39;linewidth&#39;,1.5);hold on % u-mom&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plot(1:count,residual(2,1:count),&#39;g-&#39;,&#39;linewidth&#39;,1.5); % v-mom&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plot(1:count,residual(3,1:count),&#39;b-&#39;,&#39;linewidth&#39;,1.5); % Pressure&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plot(1:count,max_res*ones(1,count),&#39;k--&#39;,&#39;linewidth&#39;,1.5);hold off&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; legend(&#39;u-momentum&#39;,&#39;v-momentum&#39;,&#39;Pressure&#39;,&#39;Maximum&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Residual&#39;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xlabel(&#39;Iterations&#39;,&#39;fontsize&#39;,16)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ylabel(&#39;Residual&#39;,&#39;fontsize&#39;,16)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set(gca,&#39;fontsize&#39;,16,&#39;yscale&#39;,&#39;log&#39;);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set(gcf,&#39;color&#39;,&#39;white&#39;)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drawnow&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; figure(2)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pcolor(P);shading interp;drawnow&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pause(0.01)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %% Re-initiating old values&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % Since the algorithm did not converge, the new values are now the old&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; % values&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u_s=u;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; v_s=v;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_s=P;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; u_o=u;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; v_o=v;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; P_o=P;&lt;br&gt;end&lt;/p&gt; &lt;p&gt;%% Plotting Results&lt;br&gt;x=linspace(0,1,N+1);&lt;br&gt;y=x;&lt;br&gt;[x y]=meshgrid(x,y);&lt;br&gt;figure,quiver(x,y,u(:,2:end)&#39;,v(2:end,:)&#39;,2,&#39;k&#39;);hold on&lt;br&gt;xlabel(&#39;x&#39;,&#39;fontsize&#39;,16);&lt;br&gt;ylabel(&#39;y&#39;,&#39;fontsize&#39;,16);&lt;br&gt;set(gca,&#39;fontsize&#39;,16);&lt;br&gt;x=linspace(0,1,N);&lt;br&gt;y=x;&lt;br&gt;[x y]=meshgrid(x,y);&lt;br&gt;pcolor(x,y,P&#39;);shading interp&lt;br&gt;pco=get(gca,&#39;children&#39;);&lt;br&gt;set(pco(1),&#39;facealpha&#39;,.5);&lt;br&gt;xlabel(&#39;x&#39;,&#39;fontsize&#39;,16);&lt;br&gt;ylabel(&#39;y&#39;,&#39;fontsize&#39;,16);&lt;br&gt;set(gca,&#39;fontsize&#39;,16);&lt;br&gt;colorbar&lt;br&gt;% figure,surf(u);shading interp&lt;br&gt;% figure,surf(v);shading interp&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/8661349350428227624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2016/02/driven-cavity-flow.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/8661349350428227624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/8661349350428227624'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2016/02/driven-cavity-flow.html' title='Driven Cavity Flow'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqPPAKHuKy5hItsZ1B2BZd32QODne8uYJlob8zCHmW4JsZiETcvXmxNtrdUU1jYzckm0vcBVGj_gyNXUdEYHgLkw6GyKJ1iNlwWIFkb8s_tBpEKj0KLKy8Lg95DadTN_kVY_GycLb-X7Y/s72-c?imgmax=800" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-3532964229265167715</id><published>2016-01-10T14:09:00.001-08:00</published><updated>2016-01-10T14:09:54.091-08:00</updated><title type='text'>Arduino Control System</title><content type='html'>&lt;p&gt;&lt;b&gt;&lt;font size=&quot;4&quot;&gt;Here is the Problem:&lt;/font&gt;&lt;/b&gt;  &lt;p&gt;My parents live in Costa Rica and they have their own water system. The water system consists of a handmade well for the water supply and an elevated tank for storage. A pump is used to bring the water from the well to the storage tank. There is an overflow pipe at the top of the tank which leaks water out to indicate that the tank is full. Unfortunately, the amount of water in the well is limited. The pump can only run for about 22 minutes in the rainy season and for 12 minutes in the dry season before the well runs out of water.&amp;nbsp; After the well runs out, it takes two hours for the water in the well to be replenished.  &lt;p&gt;My family has managed this system by physically walking to the water management site, and manually activating the pump as often as every 2 hours, then waiting until the well runs dry to turn off the pump. As you can image, this is a very tedious and inconvenient process. The need to keep the tank full is constant and the frequency at which the pump needs to be turned on increases with increasing water demands. On a positive note, despite the inconvenience, this method has served my family for about 15 years.  &lt;p&gt;Here are a couple of pictures of the water management site:  &lt;p&gt;&lt;img title=&quot;IMG-20160110-WA0016&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;IMG-20160110-WA0016&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8AyS5VZ3sg63BRxgmb86j1x43GhsA5COikEcGN5vIc3oHCqtswpREJBlUcB4TBrgPZIaaIFxUHsgVrUS7Zq8UT3InxuuPI4ed41ASX_6N7qcYJYaof0P6bXG183IyOu5kDy1-qJRP4H0/?imgmax=800&quot; width=&quot;400&quot; height=&quot;552&quot;&gt;  &lt;p&gt;&lt;img title=&quot;IMG-20160110-WA0015&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;IMG-20160110-WA0015&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW-0HvVa6R48x-DbGcP8U-eEsX7OssIoMgm7rBz7IoYn6laY98vZWOZOVGjFrb8_l6be2sOWZZ-P2_bl6pY7pgvquF18onF9x2WI6ukJ2hw9RD59e2FkAtEZGkbqvsZ4Sqod_LR15mGtQ/?imgmax=800&quot; width=&quot;393&quot; height=&quot;535&quot;&gt;  &lt;p&gt;Here is a schematic representation of the water system:  &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivDbIhirmnmCo1CjTLAeoBhlWT7ZgjTBpInj3plr8Ryh6mLUDkta-wL7sZxrhuvJ4Hivo2idEOXK8suRlNkrFzf8-TFyeyps9sIKW7Ow0slN7hDTBIStiXsIT0mYPcJb76qMQBDkTtTVI/?imgmax=800&quot; width=&quot;386&quot; height=&quot;444&quot;&gt;  &lt;p&gt;&amp;nbsp; &lt;p&gt;&lt;b&gt;&lt;/b&gt; &lt;p&gt;&lt;b&gt;&lt;font size=&quot;4&quot;&gt;Here is the Solution:&lt;/font&gt;&lt;/b&gt;  &lt;p&gt;After considering many options to provide my family with a more convenient solution to manage the water system, I selected the following method: I programmed an &lt;a href=&quot;https://www.arduino.cc/&quot;&gt;Arduino&lt;/a&gt; Uno to control the system autonomously. The water pump is 220VAC. I used two 220VAC 25A rated solid state relays to turn on and off the pump through a +5VDC signal from the Arduino. The relays were properly mounted on heat sinks using thermal paste to maintain adequate heat dissipation. A digital liquid level sensor powered by the Arduino was installed on the overflow pipe of the tank. This sensor will tell the Arduino when the tank is full. The Arduino will constantly turn on the pump for 10 minutes every two hours year-round. When the water sensor tells the Arduino that the tank is full, the Arduino will turn off the pump and wait for two hours before turning on the pump again. I also installed a manual switch which, when activated, overrides the system and forces the pump to be on. I installed two indicator LEDs. One turns on when the pump is on and the other indicates that the water level sensor has been activated. The system has been successfully working for four weeks now.  &lt;p&gt;Here is a picture of inside the &lt;a href=&quot;https://www.arduino.cc/&quot;&gt;Arduino&lt;/a&gt; control box:  &lt;p&gt;&lt;img title=&quot;20151101_143915&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;20151101_143915&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXDVJhyphenhyphenB0a467kEbl8xZsPosyAYQfa2Wm2ifRcCg6BDG3Wy-KwjBo5ERhPwq8RBf_5nty_cPKf0ITTsCw1v4FyHNMlvMDSdg1jsqzkU4tKXdSgpJlRiRJzZTUHVBXjFJepScpmCQQeLu4/?imgmax=800&quot; width=&quot;454&quot; height=&quot;846&quot;&gt;  &lt;p&gt;Here is a picture of the installed control box and relays which adapts to the current electrical system control set up:  &lt;p&gt;&lt;img title=&quot;20151220_102147&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px&quot; border=&quot;0&quot; alt=&quot;20151220_102147&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMgH5PMGiGIHdZx44MzvDiQkOU45AhQs0X5kXqf73bXyJ871W635ufIx0upLPr4lhULve1hCUd9mdTLLH7K1tnYF_gc1I2RJZMDR9mbnETuSQCGQ8kgCvV7XC1Hvo4aI9LVN7_WfElsB0/?imgmax=800&quot; width=&quot;456&quot; height=&quot;271&quot;&gt;  &lt;p&gt;The feedback sensor at the end of the overflow pipe: &lt;p&gt;&lt;img title=&quot;20151219_152318&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;20151219_152318&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSvYNmzZg8aD03jh6dtKa7grDlHXF2xgW4CN5QonxeNCw3PaVgw9ibFbQgSqrCMQisF4D32bKrs5aBPmDoteMq2IZDkZ3Xk5cXlqO9DSgZBX-A4PQwEr2XQYaEi17pyg6p_0xkRQcyp3g/?imgmax=800&quot; width=&quot;471&quot; height=&quot;787&quot;&gt;  &lt;p&gt;&amp;nbsp; The schematic of the control system is as follows: &lt;p&gt;&amp;nbsp; &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-uTUjgrVC6qx9qCKhC0twrNknYwXNF6nmstFiIz2NPr7SRpY2nfd9Hvke6ZBNjeiAb607XSanX21R_piVuoo4pdccsk5mjwGeLQGG6s9TeF7sh8CmYKFjxGo73mG1KMbwglOHB23H29U/?imgmax=800&quot; width=&quot;446&quot; height=&quot;393&quot;&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;&lt;/font&gt;&amp;nbsp; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;The control system design was influenced by the previous electrical wiring and water pipes, as well as the contraints that come with tropical environments. Were the system to fail, the set up is such that it can easily be returned to the previous method with minimum effort.&lt;/font&gt; &lt;p&gt;&lt;font size=&quot;3&quot;&gt;&lt;/font&gt;&amp;nbsp; &lt;p&gt;&lt;b&gt;&lt;font size=&quot;4&quot;&gt;Part List:&lt;/font&gt;&lt;/b&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Micro-Controller: &lt;a href=&quot;https://www.arduino.cc/&quot;&gt;Arduino&lt;/a&gt; Uno (QTY: 1)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Liquid Level Sensor: Optomax Series Digital Range LLT600D3SH (QTY: 1)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Solid State Relays: Crydom D2425 (QTY: 2)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Heat Sinks (QTY: 2)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Enclosure box (QTY: 1)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Prototype Printed Circuit Board (QTY: 1)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Dsub9 connector (QTY: 1)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;9V Power Supply (QTY: 1)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Indicator LEDs (QTY: 2)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Resistors 320 ohms (QTY: 2)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;ON-OFF Switch (QTY: 1)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Electrical Wire Assorted Colors (~20AWG)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Screw terminal blocks (QTY: 2)&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Heat shrinks Assorted Sizes&lt;/font&gt;  &lt;li&gt;&lt;font size=&quot;3&quot;&gt;Fastening Screws Assorted Sizes&lt;/font&gt; &lt;/li&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt; &lt;p&gt;&lt;font size=&quot;4&quot;&gt;&lt;strong&gt;*Code:&lt;/strong&gt;&lt;/font&gt; &lt;/p&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;/*============================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;==============================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;==============================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;Costa Rica Water Tank / Water Well Management&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;Fully Autonomous with Switch Option&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;Created by Ruander Cardenas&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;Last Updated on: 12/19/2015&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;==============================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;==============================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;=============================================================================================*/&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//+++++++++++++++++++++++++++++ USER INPUTS +++++++++++++++++++++++++++++++++++++++++++++++++&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//Define Pins to be Used&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;#define pinSensor 12 // Water Sensor: Not using 13 due to onboard LED circuit&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;#define pinRelay1 11 // Relay No. 1 signal&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;#define pinRelay2 10 // Relay No. 2 signal&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;#define pinLED1 9 // Pump On or Off status LED&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;#define pinLED2 8 // Sensor Air or Water LED&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;#define pinButton 7 // Manual on and off switch&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//Define Constants&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;const unsigned long ontime = 600000; // Units of millisecons: (min)x(s/min)x(ms/s)=ms (10 mins --&amp;gt; 600000 ms)&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;const unsigned long offtime = 7200000; // (10/60/60)*(60)*(60)*(1000); //Units of millisecons:(hr)x(min/hr)x(s/min)x(ms/s)=ms (2.5 hrs --&amp;gt; 9000000 ms)&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;const int t_inc = 250; // Milliseconds to wait inside the loop&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;// Define Variables&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;int sensorState; // Variable for tank full (LOW) or not full (HIGH)&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;int buttonState; // Variable for manual switch: ON (LOW) or OFF (HIGH)&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;unsigned long t_on = 0; // Variable for time pump has been on. Assumes pump has not been on&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;unsigned long t_off = offtime; // Variable for time pump has been off. Assumes pump has been off for atleast offtime limit&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;unsigned long ti; // Time at the start of the loop&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;unsigned long tf; // Time at the end of the loop&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;void setup() {&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;// put your setup code here, to run once:&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;pinMode(pinSensor, INPUT);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;pinMode(pinButton, INPUT_PULLUP);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;pinMode(pinRelay1, OUTPUT);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;pinMode(pinRelay2, OUTPUT);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;pinMode(pinLED1, OUTPUT);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;pinMode(pinLED2, OUTPUT);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;// Initialize Serial for debugging purposes&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//Serial.begin (9600); &lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;void loop() {&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;// put your main code here, to run repeatedly:&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;ti=micros();&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;sensorState = digitalRead(pinSensor);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;buttonState = digitalRead(pinButton);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;if (sensorState == LOW) { //Turn on LED2 to indicate tank is full&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinLED2,HIGH);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;t_off=0; //Reset off time to zero (prevents jerking on and off pump)&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;if (sensorState == HIGH) { //Turn off LED2 to indicate tank is not full&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinLED2,LOW);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;if (buttonState == LOW) { on2(); //Pump on&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;} else {&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;if (t_off &amp;lt; offtime) {off(); //Pump off while water in well replenishes&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;} else {&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;if (sensorState == LOW) {off(); //Pump off since tank is full&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;} else {&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;if (t_on &amp;lt; ontime) { on(); //Pump on&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;if (t_on &amp;gt; ontime) { off(); //Pump off&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;delay(t_inc);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;tf=micros();&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//Serial Commands for debugging Purposes&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//Serial.print(&quot;On Time = &quot;);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//Serial.println(t_on);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//Serial.print(&quot;Off Time = &quot;);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//Serial.println(t_off);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//=================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//=================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//=================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;void on(){&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinRelay1,HIGH);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinRelay2,HIGH);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinLED1,HIGH);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;t_on = t_on + t_inc;&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;if(t_on &amp;gt; ontime - t_inc){ t_off=0; //Reset off time to zero&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//=================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//=================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//=================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;void off(){&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinRelay1,LOW);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinRelay2,LOW);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinLED1,LOW);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;t_off = t_off + t_inc;&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;if(t_off &amp;gt; offtime - t_inc){ t_on=0; //Reset on time to zero&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//=================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//=================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;//=================================================================================&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;void on2(){&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinRelay1,HIGH);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinRelay2,HIGH);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;digitalWrite(pinLED1,HIGH);&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;t_off = 0; //Assumes well needs a full braek after manual switch&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;t_on = ontime; // Assmes pump was manually turned on for the max time&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;h1&gt;&lt;font size=&quot;2&quot;&gt;&lt;font style=&quot;font-weight: normal&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; &lt;p&gt;&lt;b&gt;&lt;/b&gt; &lt;p&gt;*Please note that the timing of the code is based on a 250ms delay. Therefore, times are approximations and not exact (code takes around 48 us to run without delay). For my applications, this is just fine. I did an error approximation test and my expected times are off by about 1.5 seconds every 2 hours. I did look into timing rollover and variable overflow (&lt;a href=&quot;http://playground.arduino.cc/Code/TimingRollover&quot;&gt;http://playground.arduino.cc/Code/TimingRollover&lt;/a&gt;) but decided to go with the delay option since for my application, this was simpler and adequate.  &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/3532964229265167715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2016/01/arduino-control-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/3532964229265167715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/3532964229265167715'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2016/01/arduino-control-system.html' title='Arduino Control System'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8AyS5VZ3sg63BRxgmb86j1x43GhsA5COikEcGN5vIc3oHCqtswpREJBlUcB4TBrgPZIaaIFxUHsgVrUS7Zq8UT3InxuuPI4ed41ASX_6N7qcYJYaof0P6bXG183IyOu5kDy1-qJRP4H0/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-2006869016529179031</id><published>2015-08-20T21:30:00.001-07:00</published><updated>2015-08-20T21:30:23.562-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Space"/><title type='text'>Send your name to Mars, Again</title><content type='html'>&lt;p&gt;NASA is giving an opportunity &lt;a href=&quot;http://www.ruander.com/2009/09/send-your-name-to-mars.html&quot; target=&quot;_blank&quot;&gt;again&lt;/a&gt; to send your name to Mars. This time will be on NASA’s InSight lander. All you need to do is go to &lt;a href=&quot;http://go.usa.gov/3Aj3G&quot; target=&quot;_blank&quot;&gt;this site&lt;/a&gt; (click &lt;a href=&quot;http://go.usa.gov/3Aj3G&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;) and enter your information. The launch is scheduled for March, 2016! With your submission you get a Boarding Pass similar to mine shown below. Make sure to invite your friends to participate and check out the world participation map to see all the countries represented.&lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;image&quot; style=&quot;border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin: 0px auto; border-left: 0px; display: block; padding-right: 0px&quot; border=&quot;0&quot; alt=&quot;image&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiLEvpcII9UfV0sY4A1ibCz5AcoduMWJ49RlzapXUylVi6swoH2RHeRuHkbWXOcxwIVVfR6t2yi9mLyAKTxm18wesFBmrnddknu0bGGKOXd271fh-lw9CMfT43kPnW6PJCEmL6t2ah1O0/?imgmax=800&quot; width=&quot;455&quot; height=&quot;202&quot; /&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/2006869016529179031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2015/08/send-your-name-to-mars-again.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/2006869016529179031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/2006869016529179031'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2015/08/send-your-name-to-mars-again.html' title='Send your name to Mars, Again'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiLEvpcII9UfV0sY4A1ibCz5AcoduMWJ49RlzapXUylVi6swoH2RHeRuHkbWXOcxwIVVfR6t2yi9mLyAKTxm18wesFBmrnddknu0bGGKOXd271fh-lw9CMfT43kPnW6PJCEmL6t2ah1O0/s72-c?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-9123996412079134111</id><published>2015-07-05T18:50:00.000-07:00</published><updated>2015-07-05T18:51:56.896-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Design"/><category scheme="http://www.blogger.com/atom/ns#" term="Electrical"/><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Manufacturing"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>NI CompactDAQ and CompactRIO</title><content type='html'>&lt;a href=&quot;http://www.ni.com/&quot; target=&quot;_blank&quot;&gt;National Instruments (NI)&lt;/a&gt; is a&amp;nbsp;familiar name in many engineering fields. I first became aware of this company during my undergraduate engineering studies at &lt;a href=&quot;http://oregonstate.edu/&quot; target=&quot;_blank&quot;&gt;Oregon State University&lt;/a&gt;&amp;nbsp;where we used their &lt;a href=&quot;http://www.ni.com/labview/&quot; target=&quot;_blank&quot;&gt;LabVIEW&lt;/a&gt; software and data acquisition hardware to collect and analyze engineering data in several instrumentation and laboratory courses. This&amp;nbsp;was the beginning of a long term relationship as I would continue to use their software and hardware to instrument both my experimental Master&#39;s and Doctorate theses as well as other&amp;nbsp;automation and data collection&amp;nbsp;task in my current industry engineering position. &amp;nbsp;I recently attended a one day&amp;nbsp;free (yes, free) NI hands-on &lt;a href=&quot;http://www.ni.com/events/&quot; target=&quot;_blank&quot;&gt;seminar&lt;/a&gt;&amp;nbsp;using their &lt;a href=&quot;http://www.ni.com/data-acquisition/compactdaq/&quot; target=&quot;_blank&quot;&gt;CompactDAQ &lt;/a&gt;and &lt;a href=&quot;http://www.ni.com/compactrio/&quot; target=&quot;_blank&quot;&gt;CompactRIO&lt;/a&gt; hardware and I must say I was pretty happy with this time investment. The CompactDAQ section was very familiar as I have done a fair amount of this in the past. However, the CompactRIO was new and exciting. I enjoyed learning about the benefits of a Real Time operating system and programing FPGAs. I strongly encourage anyone interested in learning more about CompactDAQ and CompactRIO to take advantage of these &lt;a href=&quot;http://www.ni.com/events/&quot; target=&quot;_blank&quot;&gt;opportunities&lt;/a&gt;.&amp;nbsp; Get your hands &quot;dirty&quot; with NI software and hardware and you will get a feel for how it can help you work smarter and more efficiently.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGZt0nf51RT-Fqx2zW4GSwxbriKko8rirHHBWHkmCc53JuwDpb3p8Kk3ocRbv9_UB-JIO-mPhtEdQ2ogP5wZIiaIWp7Czqf4iBXMMR6oTDvWoaWH4bc8dfbChxqRBBKMrapqR95ESQsfA/s1600/CompactDAQ.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGZt0nf51RT-Fqx2zW4GSwxbriKko8rirHHBWHkmCc53JuwDpb3p8Kk3ocRbv9_UB-JIO-mPhtEdQ2ogP5wZIiaIWp7Czqf4iBXMMR6oTDvWoaWH4bc8dfbChxqRBBKMrapqR95ESQsfA/s400/CompactDAQ.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
CompactDAQ&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjamtg3sVcQtPGtQ6NHlguFEKLf9DCt_sUtYAG_ckGMWKJ4XX2gGg0rErI8t24EESL4bKpr1TK2JNq4nLtLEkd0CarMc0CHLxG2hcX3qALmn9uFMviE1UqaGNXGYhyphenhyphenmOzqw08VwNOqXlrM/s1600/CompactRIO.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjamtg3sVcQtPGtQ6NHlguFEKLf9DCt_sUtYAG_ckGMWKJ4XX2gGg0rErI8t24EESL4bKpr1TK2JNq4nLtLEkd0CarMc0CHLxG2hcX3qALmn9uFMviE1UqaGNXGYhyphenhyphenmOzqw08VwNOqXlrM/s400/CompactRIO.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
CompactRIO&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/9123996412079134111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2015/07/ni-compactdaq-and-compactrio.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/9123996412079134111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/9123996412079134111'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2015/07/ni-compactdaq-and-compactrio.html' title='NI CompactDAQ and CompactRIO'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGZt0nf51RT-Fqx2zW4GSwxbriKko8rirHHBWHkmCc53JuwDpb3p8Kk3ocRbv9_UB-JIO-mPhtEdQ2ogP5wZIiaIWp7Czqf4iBXMMR6oTDvWoaWH4bc8dfbChxqRBBKMrapqR95ESQsfA/s72-c/CompactDAQ.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-6653246083058468391</id><published>2015-03-15T13:38:00.001-07:00</published><updated>2015-03-15T13:38:11.476-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Space"/><title type='text'>Franklin Chang’s Second Book</title><content type='html'>&lt;p&gt;On a &lt;a href=&quot;http://www.ruander.com/2010/01/franklin-changs-first-book.html&quot; target=&quot;_blank&quot;&gt;prior post&lt;/a&gt;, I had already written about &lt;a href=&quot;http://www.ruander.com/2010/01/franklin-changs-first-book.html&quot; target=&quot;_blank&quot;&gt;Franklin Chang’s First Book&lt;/a&gt;. I am now happy to say that the wait for the second book is over. Last week I received by mail the copy I purchased &lt;a href=&quot;http://franklinchangdiaz.com/publications.html&quot; target=&quot;_blank&quot;&gt;online&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Package&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; float: none; margin-left: auto; display: block; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Package&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdanhz62Y_AHJr4_03BBBzckfEri7k8a4NjRkyRdHV9E1JQlvA5GcuT6drIVgCJ_TdydWBJjR-V08o_nMa9fMY7e07s-LRuCbIbHTolBbiOKj8KoPipMfG758AVOrK1NZLsHtMXv3gM5k/?imgmax=800&quot; width=&quot;456&quot; height=&quot;266&quot; /&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Dr. Chang’s second book is titled “Dream’s Journey” and in contrast to his first book, his second book is in English. He tells us that he has decided to share his memories in the language in which they were lived.&lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Chang Diaz 2nd book&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; float: none; margin-left: auto; display: block; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Chang Diaz 2nd book&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHv0oYwB4iIjiNEV6sJnzQzJbhwDGamv9iR6qwh-6x6HgEAmnmFKyk5HXWLeEiwbMg34nZpUvt_CVCloxqh_izA7PPeFHJHKN4i6NSCYiyOvKe7e6gUEjheEUuAGPWwHwqNdXpfS93r5c/?imgmax=800&quot; width=&quot;366&quot; height=&quot;553&quot; /&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;I am looking forward to reading this book and I encourage all dreamers out there to pick up copy and read it. I have &lt;a href=&quot;https://www.asme.org/career-education/articles/early-career-engineers/my-engineers-notebook-ruander-cardenas&quot; target=&quot;_blank&quot;&gt;said it before&lt;/a&gt;; Dr. Franklin Chang Diaz has always been a hero of mine and he has inspired me in many stages of my life. Thank you Dr. Chang Diaz for sharing your memories with us.&lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;chang book bar code&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; float: none; margin-left: auto; display: block; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;chang book bar code&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-zNhVb07ZrDt-xLGzfHIYqdczkinhvn8mLrULfYNXlhjxS6729m4iohyphenhyphenY6xS0IV3kyy0LWN2lnOaghuB1Xb03bDBhECklQOVuaBuIxttFTV5UbKyAq2mtXjarLjBV7tnEgtJOo0pmWWA/?imgmax=800&quot; width=&quot;350&quot; height=&quot;204&quot; /&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/6653246083058468391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2015/03/franklin-changs-second-book.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/6653246083058468391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/6653246083058468391'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2015/03/franklin-changs-second-book.html' title='Franklin Chang’s Second Book'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdanhz62Y_AHJr4_03BBBzckfEri7k8a4NjRkyRdHV9E1JQlvA5GcuT6drIVgCJ_TdydWBJjR-V08o_nMa9fMY7e07s-LRuCbIbHTolBbiOKj8KoPipMfG758AVOrK1NZLsHtMXv3gM5k/s72-c?imgmax=800" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-4538308035109537736</id><published>2015-02-24T15:06:00.001-08:00</published><updated>2015-02-24T15:32:01.153-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Space"/><title type='text'>Costa Rica from Space</title><content type='html'>&lt;div dir=&quot;ltr&quot;&gt;
I typically enjoy looking at pictures of earth taken from space. I often hear from those who have had the opportunity to see earth from space that it is an incredible feeling.I could not agree more with the fact that we discovered earth when we flew into space. I would like to thank Dr. Franklin Chang Diaz &lt;a href=&quot;https://twitter.com/franklinchangd&quot; target=&quot;_blank&quot;&gt;@FranklinChangD&lt;/a&gt; for sharing this amazing picture of Costa Rica from space which he took in 1996. This is not only a great picture of my country but, I also appreciate that it was taken by a heroe of mine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_AUYsW1k0MMEFyeu-aFlR54TM4iHUoFVJ3uxaxSVYizxB_mwK4SV2VhFoGVl-CK-i67yqzKWClbMfoZbgbJRoijCJ5GquiiEKAfTzpP-8dAHfmDmtE8jm9OmpkkZnDwUFqkaGo54cnZk/s1600/IMG_20150224_065802.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt; &lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_AUYsW1k0MMEFyeu-aFlR54TM4iHUoFVJ3uxaxSVYizxB_mwK4SV2VhFoGVl-CK-i67yqzKWClbMfoZbgbJRoijCJ5GquiiEKAfTzpP-8dAHfmDmtE8jm9OmpkkZnDwUFqkaGo54cnZk/s640/IMG_20150224_065802.jpg&quot; height=&quot;400&quot; width=&quot;400&quot; /&gt; &lt;/a&gt; &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/4538308035109537736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2015/02/costa-rica-from-space.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/4538308035109537736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/4538308035109537736'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2015/02/costa-rica-from-space.html' title='Costa Rica from Space'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_AUYsW1k0MMEFyeu-aFlR54TM4iHUoFVJ3uxaxSVYizxB_mwK4SV2VhFoGVl-CK-i67yqzKWClbMfoZbgbJRoijCJ5GquiiEKAfTzpP-8dAHfmDmtE8jm9OmpkkZnDwUFqkaGo54cnZk/s72-c/IMG_20150224_065802.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-5488820940385876664</id><published>2014-02-22T14:22:00.001-08:00</published><updated>2014-02-22T14:22:06.510-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Electrical"/><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>Arduino Servo Motor</title><content type='html'>&lt;p&gt;Finally had a chance to hook up a small servo motor to an &lt;a href=&quot;http://www.arduino.cc/&quot; target=&quot;_blank&quot;&gt;Arduino&lt;/a&gt; &lt;a href=&quot;http://arduino.cc/en/Main/arduinoBoardUno#.Uwkgz_ldU34&quot; target=&quot;_blank&quot;&gt;Uno&lt;/a&gt; board and get it working. I bought these components with the goal of learning more about the operation of servo motors, particularly for motion control and automation purposes.&lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;P1080219&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;P1080219&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwJnBNlqgiIlATuCDE8jkqHMkzXYvQTxARHmIf4dv6S5zJ418S6YIY5pZUVix5ZVVlEq97zNtaaDGucetgMSAzzXUTNNm7fNV-21e9QgwSotMRzTct07W8P9oR1KWmnp7sibaZ0hDyr9M/?imgmax=800&quot; width=&quot;409&quot; height=&quot;235&quot; /&gt; &lt;/p&gt;  &lt;p&gt;Instead of using the standard &lt;a href=&quot;http://arduino.cc/en/main/software#.Uwkg-PldU34&quot; target=&quot;_blank&quot;&gt;Arduino IDE software&lt;/a&gt;, I am running my Arduino using &lt;a href=&quot;http://www.ni.com/labview/&quot; target=&quot;_blank&quot;&gt;LabVIEW&lt;/a&gt; to take advantage and to further develop my skills with this software.&lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;servo&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;servo&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj-sP9YYYYBJAZrgE1TGNfS57szIZ2WGhc36YBS6FTrgxsqQX2ixlVA3cppLDbLtF8RFqF_7l1XWzDbuOg4PACcYyskiNfa949urvLDJflawRrI_RgkeFoZHBmj7o8jvaGbLEqqv4ty08/?imgmax=800&quot; width=&quot;425&quot; height=&quot;243&quot; /&gt; &lt;/p&gt;  &lt;p&gt;Initially, I was having trouble getting the servo motor working properly. After troubleshooting, I found that the power supplied to the Arduino through the USB cable was not enough to power both the board and the servo motor. As you can see in the first image above, I had to add an additional power source using a 9V battery.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/5488820940385876664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2014/02/arduino-servo-motor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/5488820940385876664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/5488820940385876664'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2014/02/arduino-servo-motor.html' title='Arduino Servo Motor'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwJnBNlqgiIlATuCDE8jkqHMkzXYvQTxARHmIf4dv6S5zJ418S6YIY5pZUVix5ZVVlEq97zNtaaDGucetgMSAzzXUTNNm7fNV-21e9QgwSotMRzTct07W8P9oR1KWmnp7sibaZ0hDyr9M/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-7472138941060177311</id><published>2013-11-10T14:34:00.001-08:00</published><updated>2013-11-10T14:34:57.974-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Electrical"/><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>FEZ Panda II</title><content type='html'>&lt;p&gt;For a few weeks now I have been learning how to program the &lt;a href=&quot;https://www.ghielectronics.com/catalog/product/256&quot; target=&quot;_blank&quot;&gt;FEZ panda II&lt;/a&gt; microcontroller. This microcontroller uses the &lt;a href=&quot;http://www.netmf.com/&quot; target=&quot;_blank&quot;&gt;.NET Micro Framework&lt;/a&gt; (&lt;a href=&quot;http://www.netmf.com/&quot; target=&quot;_blank&quot;&gt;.NET MF&lt;/a&gt;) which allows the user to program and debug code using Microsoft’s free &lt;a href=&quot;http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products&quot; target=&quot;_blank&quot;&gt;Visual Studio Express&lt;/a&gt; through the &lt;a href=&quot;http://msdn.microsoft.com/en-us/vstudio/hh341490.aspx&quot; target=&quot;_blank&quot;&gt;C#&lt;/a&gt; language. The controller consist of a 72MHz, 32-bit ARM7 processor, 512 KB Flash and 96 KB RAM. The board has several digital and analog inputs and outputs some with Pulse-width modulation and serial port capabilities among several key features (&lt;a href=&quot;https://www.ghielectronics.com/catalog/product/256&quot; target=&quot;_blank&quot;&gt;more features here&lt;/a&gt;).&amp;#160; Overall, this has been a great learning experience for me as I had never programmed microcontrollers in the past. It has been a little slow since I am not very experienced with the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/vstudio/ms228593.aspx&quot; target=&quot;_blank&quot;&gt;C# language&lt;/a&gt; and &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/vstudio/dd460654.aspx&quot; target=&quot;_blank&quot;&gt;object oriented programming&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;FezPandaII_Ruander&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;FezPandaII_Ruander&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH16jlU0f7VAQbyFBY0O-sBSKMDWfSQ_dx-tYaJauTfEFLdw-5QyNi-6YqPF8wi0aUqYlo7VCUiauQ-7e_cql9bzdVZHSveHzW_elQDKh-p20ZULff8b6fPqD3Jagum5bncC-KHxb3-x4/?imgmax=800&quot; width=&quot;473&quot; height=&quot;226&quot; /&gt; &lt;/p&gt;  &lt;p&gt;To continue to learn more about microcontrollers, I have recently purchase an &lt;a href=&quot;http://arduino.cc/en/Main/arduinoBoardUno&quot; target=&quot;_blank&quot;&gt;Arduino Uno&lt;/a&gt;&amp;#160; board. One of the reasons I purchased this board is that I should be able to program it using using &lt;a href=&quot;http://www.ni.com/labview/&quot; target=&quot;_blank&quot;&gt;LabVIEW&lt;/a&gt; and &lt;a href=&quot;http://www.mathworks.com/products/matlab/&quot; target=&quot;_blank&quot;&gt;MATLAB&lt;/a&gt; which are languages that I am more experienced with. &lt;a href=&quot;http://blog.timmlinder.com/2012/06/comparison-gadgeteer-netmf-arduino/&quot; target=&quot;_blank&quot;&gt;Here&lt;/a&gt; is a &lt;a href=&quot;http://blog.timmlinder.com/2012/06/comparison-gadgeteer-netmf-arduino/&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt; to a great resource I found about microcontroller comparison. I have been tempted several times to buy a &lt;a href=&quot;http://www.raspberrypi.org/&quot; target=&quot;_blank&quot;&gt;Raspberry Pi&lt;/a&gt;, but this would require learning yet another programming language (&lt;a href=&quot;http://www.python.org/&quot; target=&quot;_blank&quot;&gt;Python&lt;/a&gt;) which I may consider in the near future. Right now, I am trying to get more experience using microcontrollers for Control Systems Engineering.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/7472138941060177311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2013/11/fez-panda-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/7472138941060177311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/7472138941060177311'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2013/11/fez-panda-ii.html' title='FEZ Panda II'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH16jlU0f7VAQbyFBY0O-sBSKMDWfSQ_dx-tYaJauTfEFLdw-5QyNi-6YqPF8wi0aUqYlo7VCUiauQ-7e_cql9bzdVZHSveHzW_elQDKh-p20ZULff8b6fPqD3Jagum5bncC-KHxb3-x4/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-7404658420939297775</id><published>2013-11-05T20:04:00.001-08:00</published><updated>2013-11-05T20:04:27.346-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bio"/><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Materials"/><title type='text'>Autumn Colors</title><content type='html'>&lt;p&gt;Leaves are typically green due to the high chlorophyll content. Chlorophyll captures sunlight and uses this energy to make simple sugars from which the plant feeds (photosynthesis). Chlorophyll is lost during this process and is continuously replenished by the plant. As summer days come to an end, the veins that carry the chlorophyll into the leaves gradually close and the hidden yellow and orange pigments are revealed. As a result, beautiful colored leaves, as the ones below, are observed at the beginning of fall.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img title=&quot;Fall Color 1 Ruander&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Fall Color 1 Ruander&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj96MNlN0rXYqUaOPi3TdxB56_QexbU_8JuXdfh6iRcI09A9LMmqtY6JA4OcMI66fj4mLRcJEUUeQ7GV-FrNAmAYO_-tcLWXyB8F1ZAlOLTi_j3BoreVx_YvaeJbUWklyFVNOocniK2uHs/?imgmax=800&quot; width=&quot;441&quot; height=&quot;330&quot; /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Fall Color 3 Ruander&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Fall Color 3 Ruander&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg96lrCaocwP4hDeZYqy8na5WFubWfbD1eR7uAQqiueQuK9Ty1Ltp_0MyQU8D_HKgkbbWQdFMbTEGkIf9ypl2eRm1_U5qXDKpNPkzpASIyh0nbJUk9Yhxr16cEvblI-UNsIiJNQ8N1Z0rQ/?imgmax=800&quot; width=&quot;441&quot; height=&quot;330&quot; /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img title=&quot;Fall Color 8 Ruander&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Fall Color 8 Ruander&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMoFmOLfJ4GAgiKgOIE_fbDxjXghK4-sfEp4Rum77_VTiLQt61RgOUOF5v99C8TGiFuSkjPXEWvMZHM0JUdy6hhd6UNLuf0iZlgepHSd5Iqq5Rl3OldhYVKoXEpUYlVha6DU03VVVh_JA/?imgmax=800&quot; width=&quot;441&quot; height=&quot;330&quot; /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Fall Color 4 Ruander&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Fall Color 4 Ruander&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtMih7NgVZV5JqHOh8w58u_P3N8htCR0WzIiRSNr7aWeEOCNshyC1koOWsmFyRGIiXdWsfuHmkFo5ryD6l3u5j3hD3y5I7CtVV-D-HR_GKWSyIr7BI_ci_Dl0PrTiUw47dQhAXP31S0JI/?imgmax=800&quot; width=&quot;441&quot; height=&quot;330&quot; /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Fall Color 9 Ruander&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Fall Color 9 Ruander&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcG6exo8Krl-xLdP5CV51TBkrIVomJ01uU3wh3N6Dd2d3QKXzlAMmXUwIypnTd337LPIMSr447i7NjyErUnrQagVZg9mYKVQHXNvG-y0aDjqc3i4RPzDQJ7A_AkJMiPIzsEa1RGe4tT0E/?imgmax=800&quot; width=&quot;441&quot; height=&quot;330&quot; /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Fall Color 2 Ruander&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Fall Color 2 Ruander&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOqLTLKN6CvAwpYmdAH5-DCh-NtQL5gxy_y48wTgL4vfGrLyKpd1HDZdPsEyhOzI0kvS0yUIMbP9oFK-DbXfd9nujWeOrK1C4rE-XvbVaCAdXBGC74JmoQmkZEu_rP2gxI6e8Cx2Lb3DA/?imgmax=800&quot; width=&quot;441&quot; height=&quot;330&quot; /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Fall Color 6 Ruander&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Fall Color 6 Ruander&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit8quFdL_6MWNllBn7zv1vx8f9fV-iZEe6pv0sTMJ67FaJjATFlM3sCKEzm4TfNJbLnKtZhXGM47QLaD13kG7njwk_yJYFw0OvqMHwmH7HZI0AZyJIsxLKvhiF3R5oXTuhvIeKP20lmmg/?imgmax=800&quot; width=&quot;441&quot; height=&quot;330&quot; /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Fall Color 7 Ruander&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Fall Color 7 Ruander&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8139NViCzxYif7NM0PHOQZ4hBIwxE85OyCMDji7Gq3v1j8PNRFyD-yoKaREizcQbTmIpmAV8PMxFUpiRr1KryJNxknpZ7a_LVaYwjUscJ24lRELC70bZZDcti-xN5bpOndUO0lAZG3Ac/?imgmax=800&quot; width=&quot;441&quot; height=&quot;330&quot; /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Fall Color 5 Ruander&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Fall Color 5 Ruander&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh448EfDEdqzlXvAoMRONTKwrNHJTlTL39TuBoDHr0Iq0K6Mk7hvYLx4RBgzaNnuhttujqLU-rOraRzlO9znjBZFlXumMbGQW2peijWC7J4nyyhPArTQ1jv96rLtMB8h7u7jxropbFXAoo/?imgmax=800&quot; width=&quot;441&quot; height=&quot;330&quot; /&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/7404658420939297775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2013/11/autumn-colors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/7404658420939297775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/7404658420939297775'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2013/11/autumn-colors.html' title='Autumn Colors'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj96MNlN0rXYqUaOPi3TdxB56_QexbU_8JuXdfh6iRcI09A9LMmqtY6JA4OcMI66fj4mLRcJEUUeQ7GV-FrNAmAYO_-tcLWXyB8F1ZAlOLTi_j3BoreVx_YvaeJbUWklyFVNOocniK2uHs/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7538381093803741892.post-5283120667010864025</id><published>2013-09-19T22:00:00.001-07:00</published><updated>2013-09-19T22:00:33.530-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fun"/><category scheme="http://www.blogger.com/atom/ns#" term="Physics"/><category scheme="http://www.blogger.com/atom/ns#" term="Space"/><title type='text'>Full Moon Thu Sep-19, 2013</title><content type='html'>&lt;p&gt;Here are a few shots of the moon on Thursday September 19, 2013&amp;#160; at around 9:35 pm. According to &lt;a href=&quot;http://www.moonconnection.com/current_moon_phase.phtml&quot; target=&quot;_blank&quot;&gt;this website&lt;/a&gt;, the moon was 99% full at the time. The view was looking east from &lt;a href=&quot;http://www.ci.wilsonville.or.us/&quot; target=&quot;_blank&quot;&gt;Wilsonville, OR&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Moon1&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Moon1&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiljpZIv8QwK_y3NVC6wRdBsY9mhwhAUQGat3jN4OdvW176n7QdnMmUi5a5aZNTm00e2N8kfi5aMgqEUHuBCx2ZHc1AA-k4ymvAZ-afZT0g8__7r8ujeSfi3ODrNM4fGuV5lDDHvR3vxvo/?imgmax=800&quot; width=&quot;307&quot; height=&quot;401&quot; /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Moon2&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Moon2&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1n-v2BYxVyh-eyFGArhTwCEcxFBZvlwBIZEjHE20YlrAX3DGseTvShF5E5gpyHqyFDawAHZVHz9XQr9XChszm8suZfJqcJz1KErFgP1FqDSy-ivRxFCthFDdmX1iTRB58zPwxf1UVeNc/?imgmax=800&quot; width=&quot;313&quot; height=&quot;347&quot; /&gt; &lt;/p&gt;  &lt;p&gt;&lt;img title=&quot;Moon3&quot; style=&quot;border-top: 0px; border-right: 0px; border-bottom: 0px; float: none; margin-left: auto; border-left: 0px; display: block; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;Moon3&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQsAKqJ4oUp6g7zLVuk58d7bDRl9Se9KhxO3XKyC4WGv_pZloSVWXS3l8wrf-ZeUwv75ltEqg1oQKaqMOBxdqU6cmXT4AoPASefknuxTogn8emTBzyDLbQAH7hXkQ4URhHeBxpIQNpe_w/?imgmax=800&quot; width=&quot;316&quot; height=&quot;390&quot; /&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://www.ruander.com/feeds/5283120667010864025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.ruander.com/2013/09/full-moon-thu-sep-19-2013.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/5283120667010864025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7538381093803741892/posts/default/5283120667010864025'/><link rel='alternate' type='text/html' href='http://www.ruander.com/2013/09/full-moon-thu-sep-19-2013.html' title='Full Moon Thu Sep-19, 2013'/><author><name>Ruander Cardenas</name><uri>http://www.blogger.com/profile/08033909561543425515</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiljpZIv8QwK_y3NVC6wRdBsY9mhwhAUQGat3jN4OdvW176n7QdnMmUi5a5aZNTm00e2N8kfi5aMgqEUHuBCx2ZHc1AA-k4ymvAZ-afZT0g8__7r8ujeSfi3ODrNM4fGuV5lDDHvR3vxvo/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry></feed>