October 15, 2022

Zettle and Chess

Using the note structure system to discover moves in chess

Preface

The Start

I discovered the Zettlekasten method after searching for open source alternative to Notion in Obsidian.md. I then followed the community reccomended How To Take Smart Notes by SĂśnke Ahrens. That right there was the my gateway into the rabbit hole of knowledge management practices.


What is Zettlekasten?

[ˈt͡sɛtl̩ˌkastn̩] (German) | Zettle(“slip; note”) + Kasten (“box”)

Simply put, it is a collection of notes or thoughts that refrence one another. Akin to our brain’s neural network, Zettlekasten is a practice used to build a personal tangible database(a second brain) to facilitate the emergence of new ideas. Here is a more indepth introduction to it.

Linking Your Thinking

Why Zettlekasten / LYT?

The idea of building my personal knowledge base where ideas can either be confronted or reinforced with every additon, it resonated with me. I could finally put into words the insights and ideas that frequently arise from my seemingly unrelated experiences.

Seeing the connections

The principle of refrencing pieces of knowledge with each other has been around long before “Zettlekasten” was coined.

Salvador Dali slept with a key on his hand. When the key fell he would wake up. His belief was that the deepest ideas are kept by ones subconscious. So he attempted to access the transitional state between consciousness and sleep. Linking one's thinking is the same mindset that Dali used to connect to his subconscious and bring it into his work.

Now, this was well before scientists discovered hypnagogia. Dali simply stumbled into this sensation and was able to realize it in his painting.

Graphing the connections

A perpetual state of being one move away from checkmating and being checkmated.

This statement encapsulated my beginner’s anxiety perfectly. As a sufferer of paralysis by analysis, I would be so caught up in avoiding blunders or getting checkmates that I could hardly ever make time.

Occam’s Razor

The root principle of chess is linking pieces to their paths. I started to draw those links on the board. This basic proceudre helped me not only keep track of potential blunders, but also made me confident against backdoor checkmates. I shot up from 1000 elo to 1500 in a matter of weeks.


Epilogue

We are very good at recognizing patterns in our lives. But the quality and fluidity of said patterns depends on our ability of recollection. By archiving and linking my knowledge into a more accessible form in my computer I get some freedom from the volatility of my memory.
And a chance to appereciate my canvas of life, where Jaskson Pollocks hide in the sea of spilt paint buckets.

September 12, 2022

Jekyll and Hrubyde

In this piece, I will discuss my experience building my first website with Jekyll. Jekyll is a static site generator written in Ruby. Before I start, here are all the sources that may be mentioned in this post…

Preface

The Start

Like most other web apps, the site is first built locally. The first step is to follow the Jekyll Docs to install a Ruby and Jekyll frame work. This website uses gem 'jekyll', '~> 4.2'. A stable blog site is served out of the box using the theme minima, although one can also choose out of the hundreds of themes hosted in Github Pages.

The Build

I was inspired by Massively from @ajlkn. This was a static site template for web blogs. It had a mechanism that extracted excerpts from pages and displayed them in a gallery-view. I found a Jekyll integration for Massively from @andrewbanchich. It is implemented for bise.sh/journal. A lot of the site is built on top of the SCSS and JQuery skeleton from Andrew’s Jekyll ports too, although my additions may have rendered the code unrecognizable.

⚠️ I have since depriciated the code of Massively but you may see its design inspiration there.

jekyll-tube

bundle install or bundle exec jekyll serve has to be used when first starting with a Jekyll template to install the required RubyGems and plugins. I started customizing the templates and scripts and using Jekyll --serve to host them on a local port. There were quite a few missing dependencies and gems (bundle add webrick 💢!!) from my attempts to merge different templates. Trying to optimize the end product for mobile browsers was also a chore. It didn’t help that this was my first experience with JS and Ruby.

Jekyll serves ‘post-files’ written in Markdown as Html. It uses the Liquid templating language in conjunction with RubyGems to achieve this.

Deployment

ruby-gems Jekyll sites can be hosted on Github pages. Once the files are added to a repository, Github’s built in Jekyll bundler builds the site into a server with the repo’s name. But its limited plugin, domain and SSL support steered me to CloudFlare Pages. The hosting process was still full of hiccups and Error 404’s, make no mistake about it.
But its working for now and I refuse to touch it.

The Future?

This tiny space in the internet has taken hundreds of hours(yes 100s) of my time. And I can see it taking hundreds more. I don’t plan for it to stop being a work-in-progress and the time spent coding, designing and writing in it has been and will be time well spent. unless I want a new font again . . .

August 30, 2022

Comp. Fluid Dynamics I

repository
This is the second installment in my unofficial series of Multiphysics Simulations. For this project, I compare the mechanisms of winged-lift and explore the results a CFD simulation on an origami paper airplane.

This differs from my last article concerning FEA in that this time I am analyzing the behavior of (solids) a fluid system. I’ve linked references at the end of the article. As always the mesh files and formatted calculations can be accessed from my Github page. Should you- the reader- find mistakes or conflict of sources, please feel free to create an issue there.

The tools I used, all of which are Open Source, are:
  • FreeCad (CFDof addon)
    • to construct the model using booleans on primitive solids and act as a GUI for OpenFoam and cfMesh
  • cfMesh (snappyHexMesh)
    • for stl to mesh/imp conversion and mesh coupling/refinement.
  • BlueCFD-Core Project (OpenFoam port)
    • a FOSS windows port of the CFD package from OPENFOAM
  • Hisa (solver)
    • a density-based compressible CFD solver for OF toolkit
  • ParaView
    • powerful powerful postprocessor to render results from Blue-CFD

The specs for our environment is given below:
[Constraints and Boundary]
Velocity = 5e+03 mm/s
Pressure = 0 Pa
Angle of attack = 5°
Sweep Angle = 70°
Inlet = 
Subject = 
Outlet = 
Boundary-Wall = Slip (Inviscid)
[Physics Model]
Time = Steady
Flow = Single Phase
     = Incrompressible
     = Viscous
Turbulence = Laminar
Flow Field = Potential Flow
[ThermoDynamic Properties]
Fluid = Air
Temprature = 20°C
Pressure = 1 atm / 101325 Pa
Density = 1.2 kg/m^3s
Dynamic Viscosity = 1.8e-08 kg/mms
[Mesh refinement]
Gen. method = cfMESH
base-element size = 1.8mm

[Ref I]
relative element size = 0.040
surfaces = outer edges

[Ref II]
relative element size = 0.030
surfaces = nose

[Ref III]
relative element size = 0.198
volume = Cylinder002

An introduction.

I recently watched the behind the scenes of Red Bull’s Castle to Castle advert. Having watched an inverted stuntplane flying above the F1 car, it didnt occur to me until then that the Bernoulli’s principle of lift- where lift is dependent on the shape of an airfoil- is only really useful in the right orientation (up). But planes also have flaps that act like like rudders on a boat. Air being deflected by an angled surface has to produce a force. Does that mean there were two saperate forces in that inverted plane fighting eachother? And was the force given by the shape of the foil that much smaller than force given with Newton’s classic laws?

The debate of Bernoulli

In most text-books “faster air at top, slower at bottom” seems to be the go-to explanation for lift, with Newton’s laws being oddly missing. So I visited some aviation fourms only to find out “lift” itself didnt have a consensus explanation. Berneouli’s model of lift was especiailly polarizing as some argued it was statistically insignificant compared to Newton’s laws, some argued it was primitive, some said it was misleading and an extremely adamant minority argued that it and Newtonian model were one and the same. Intrigued by this controversy and my recent intrest in real-world simulations, I dived deeper into this topic with a project in my mind.

Clearing some of the smoke

  • “equal transit time” theory— “path at the top of the airfoil is curved, so to catch up to the air at the bottom, it has to travel faster”- is wrong. The fallacy here is that there is no physical reason that the two parcels of air must reach the trailing edge simultaneously and that’s what we observe in practice.
  • A symmetric airfoil (like the ones in stunt planes) needs to have a positive angle of attack to produce lift.
  • The Newtonian model of lift (momentum is not contradictory nor supplementary to Bernoulis principle. Those are two exactly equivalent mathematical formulations of the same physics.
    • lift because air deflects down, that’s Newton.
    • lift because of pressure/velocity difference between the two sides isn’t symmetric, that’s Bernoulli.

I can show that the sun exists by pointing at a shadow, by pointing at the reflection of the moon, or by pointing at the sun itself. That doesn’t mean that one of these explanations explains 50% of the sun, and the others do another part. They all point to 100% of the sun’s presence.

The humble paper airplane (CFD)

I am a big fan of John Collins, the paper airplane guy, and his book Fantastic Flight was a cherished posession from my childhood. This made my ignorance about the fundamental mechanisms of flight especially frustrating. To visualise the theory and train my intuition, I got some 3d models of paper airplanes from @demetr0s_designs designed a wind tunnel in a CFD environment.

  • How are paper airplanes different from airfoils?

The primary function of Airfoils or curved surfaces on a wing is to reduce drag. A resemblance of an airfoil shape can be seen in laminar streamers from the simulation of flat wings (unsubstantiated in references for now). Functionally, symmetrical airfoils are similar to flat wings as they both need a positive non-zero angle of attack.

  • Why does low pressure get built on top of the wing? It’s definitely not the curvature because this wing is flat..

Where assymetrical airfoils can create lift even if the AOA is parallel to the wind, flat wings and sym. airfoils cannot. So they have to maintain a positive non-zero AOA to generate lift. For a paper airplane, incoming air doesnot meet the plane’s crossection but rather the shape of the wake of said plane. With Newtonian model we can imagine the air molecules as bullets hitting the bottom of the plane and transferring their momentum to make lift while the bullets do not have a direct path to the top of the wing creating a partial vacuum.


  • Can the lift in a paper airplane be observed with Bernoulli’s model?

Every lift can, in some way or another, be visualised through Bernoulli’s model because it derives its equations from the laws of thermodynamics. For a paper plane, with the help of a virtual wind tunnel, we can observe that a flat, symmetrical wing will have asymmetrical airflow speed for a non-zero angle of attack.

Vortex lift and Wake turbulence

Winglets reduce a phenemona called wake turbulence. Out at the wing-tip (or leading edge for delta-wings), all the higher pressure air from the bottom of the wing is no longer blocked from rushing to the high pressure area above the wing by the wing itself and the air flows up around the tip/edge. This produces vortices that(generally) have an affect akin to increasing the viscosity of air, increasing the drag on an aircraft.

But for highly swept wings (>60°) at an high angle of attack, vorticies actually produce their own lift. I came across this helpful discussion in the aviation stackexchange about vortex lift. And while my plane’s AOA was not enough and winglets are detrimental to this effect, you can still see the initial stage of such vortices with the help of streamers or pressure contours.

The vortices form ‘vortex sheets’ along the wing. Air is sucked into the vortex sheets and accelerated downward. As the airspeed in the vortex is high, the pressure is low. This low pressure on the upper surface produces lift.

References

August 21, 2022

Finite Element Analysis

repository
Finite Element Analysis involves dividing the physical product into small, ‘finite’ elements and analyzing how these elements interact under various loads and conditions. They are a collection of Partial Differential Equations hence we can perform FEM by hand if we compartmentalize enough. But I am not spending months for my results; so here I am, writing a piece about how I utilized FEM softwares to analyze my model.

The mesh files and formatted calculations can be found on my Github page. The tools I used, all of which are Open Source, are:

  • FreeCad(Calculix)
    • to construct the model using booleans on primitive solids and to run preliminary calculations (does not support heteregenous models)
  • Meshlab/GMESH (netgen)
    • for stl to mesh/imp conversion and refining the mesh resolution.
  • PreProMax(Calculix)
    • post-porocessing software to conduct the main calculations with proper constraints
  • ParaView
    • powerful visualization software that renders the result from PrePoMax
The specs for our environment is given below:
[Composition]
Name = CalculiX-Steel w/ S420
Description = Standard steel material for 
              CalculiX sample calculations
Father = Metal
[Mechanical]
Density = 7900 kg/m^3
PoissonRatio = 0.28
YoungsModulus = 210000 MPa
YieldStress = 235 MPa
[Constraints and Boundary]
Force = 200 Kg / 1961.33 N
Load = Primary dowel
Boundary-Fixed = SHS
[Mesh and FEM]
Gen. method = GMESH
Max-element size = 50mm
Ele. type = C3D10 Parabolic Tetra.
Solver = Calculix-PaStix w/o Nlgeom
No. of elements = 63485
Nodes = 123414
[Thermal]
SpecificHeat = 590 J/kg/K
ThermalConductivity = 43 W/m/K
ThermalExpansionCoefficient = 0.000012 m/m/K

Displacement

Denotes the maximum movement/deflection during the load bearing process. Perdictably, it occured at the primary dowel where the load was exerted. For homogeniety, the dowel was assumed to be made of steel.

max-disp = 9.7E + 03 mm
max-u1 = 2E + 03 mm
max-u2 = 1.4E + 03 mm
max-u3 = 8.5E + 02 mm

Von-Mises stress and strain

During the loading phase we obtain normal stress in X, Y, Z and shear stress in XY, XZ, YZ. The von Mises stress combines these 6 stress values to one value - an equivalent stress. It is always positive.

Mises-Stress = 1.3E + 06 MPa
Mises-Strain = 7.9

Max-principal stress and strain

The maximum principal stress and strain is a failure predictor that takes ductility of a material and outputs the fracture threshold.

Max-Stress = 6.6E + 05 MPa
Max-Strain = 3.1

Reaction force

I like to think of this as more of a “pushing off” force. Here, its the reaction force on a body due to it pushing it self against an outside agent. Froce exerted by the anchor if you will.

Resultant = 9.6E + 0.5 N


This was more of a study of the design than the product because I cant imagine anything in the real-world having to exert 200kg of load on a pullup bar. In terms of the design, as long as dowels are homogeneous and fused to the body, L-beam collapsing or shearing was the primary point of failure. The force is spread well enough to make the threshold of failure very high. But it meant at full capacity it had a lot of potential energy. To prevent that build up, one could simply introduce a weaker dowel material to create a safer point of failure. As for my worry about the wall anchors shearing from the wall, we see from the R-FORC diagram (F3: normal to the wall) that the torque accentuated by the “L” shape of the body isnt too pronounced.

This was my first FEM study on a real-worls model. Being self-taught for now, I’m sure I have made some mistakes and wrong assumptions. So as I learn more, I will update this if there was some glaring foresight on my part.

July 13, 2022

Product Renders

Something I came up with when I couldnt find an elegant solution for an unified pull-up & dips exercise equipment.

The Thought Process

My critereon for the perfect piece of hardware boiled down to modulatiry.

At first I needed something that took up the least amount of space. This meant a single unit had be compatible with both over head exercises and dips. Being modular would also help someone remove the hardware without powertools should it ever pose as an obstruction.


When I decided I would design one tailored to my needs, I wanted to decrease the number of variables to make the fabrication process simpler. This meant using industry standard parts and making the actual modules homogeneous i.e. using the same metal to avoid complexities in welding and structural integrity. As it would be in some way attached to a wall, I also needed to make sure to caliberate the tensile and shear forces on the anchors.
To verify my napkin maths, I ended up doing a conducting some FEA on the final designs.

Making the models and specifications

The model mesh and its environment was made in blender. To ensure compatibility with other softwares, the primary model was made by conducting boolean operations on primitive solids. For fine tuning and simulations, it was then exported in a .stl format to be read by an FEM capable software.

[Dimensions]
Dowel radius: 1.27cm / 0.5 inch
Dowel mounts (L-Section): 50cm long EA 40x40x5
Brace (L-Sections): 15cm long EA 25x25x4
Dips arms (Square Hollow Section): 40cm long SHS 40x5
Anchors (U-Sections): 8cm long 75 PFC
Anchor radius: 0.83cm / 1/3 inch
Top anchor: 2.28cm / 7'6 (pullups)
Bottom anchor: 1.25m / 4'1 (dips)
  • go to FEA results
  • June 20, 2022

    Fluide Pour Toujours

    Fluent Forever

    A one-size-fits-all approach to language? Or an inevitable ride to burnout city?

    Gabe who?


    Gabriel, writer and founder of Fluent Forever (book and app), was an opera singer. Why is this important? Well among other things, his job required him to have excellent pronunciation in several languages. This not your traditional self-help book from entrepreneurs denying their Survival bias . . . or is it?

    hucksterism

    The principle of FF

    To really learn a language, you need to build connections to all aspects of the word - spelling, sound, meaning, and personal connection.

    1. Sounds (1-3 weeks)

  • Study the phonetic characters and common word patterns. (pronunciation trainers)
  • 2. A set of common words using pictures (1-2 months)

    • Google the images instead of your native translations.
    • Make Anki cards as a part of the learning process.

    3. Grammar and abstract words (2-3 months)

    Your now trained vocabulary will make grammar easier.
    • Learn forms with sentences and your native translation.
    • Google the images instead of your native translations.
    • Make Anki cards as a part of the learning process.

    Then on, pursue fluency by immersion in said language.

    xkcd927

    Sounds good?

    It does. And if we are to go by the millions of copies sold, they work good too. But digging deeper into this “new method” things get a lot less surprising.

    The Questionable.

    Outside of tricking laymen into linguistic best practices (e.g. learn the IPA, learn the phonology of your target language, train on minimal pairs), Gabe uses techniques with various degrees of empirical backup that seem to have worked for him. Fixating on a set of words and trying to perfect the pronunciation before touching grammar rules or reading feels inefficient. Especially when reading as effective for retention and comprehension.

    A Meta-Analysis of Reading and Listening Comprehension Comparisons

    • Review of Educational Research

    The Bad.

    Program Optimizaton

    Gabe's Anki decks is (atleast seems to be) optimized for European Languages. For example, Japanese and Korean "600 word decks" have words common to a English tongue. The set of most used words for Indo-Europian languages isn't the same as Sino-Tibetian languages in the real world. This misrepresentation goes against their ethos of effeciency and fluency.

    Anki (Spaced Repition Software) Burnout

    Gabe also encourages people to make their own detailed Anki cards as part of the learning process, without using your native language. I wont spend time discribing how monotone and tideous that is in practice; you will hear enough from others on the internet.

    xkcd927

    The Ugly.

    The FluentForever app lives in an unoriginal walled garden which holds its user’s data hostage. Add the fact that it was competing with a much powerful and opensource Anki, it was destined to fail. For an overnight kickstarter success, its a cliché really.

    DĂŠnouement

    There is no perfect way to learn language. The original book from Gabriel stayed true to its self by not promising perfection. While many dont agree with his mathematization of language, he was upfront with the effort required to keep up with it. Fluent Forever, the principle, calls to put pronunciation, and audio acclimation in its highest priority. And for the right people, that can be good of a tip as any.
    can be