<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>Jacks of Science</title>
	<atom:link href="http://www.jacksofscience.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jacksofscience.com</link>
	<description>Puttin' the Tron in Electron</description>
	<pubDate>Thu, 27 Aug 2009 05:25:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Three Aspects of a Great Fluid Simulation</title>
		<link>http://www.jacksofscience.com/physics/three-aspects-of-a-great-fluid-simulation/?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://www.jacksofscience.com/physics/three-aspects-of-a-great-fluid-simulation/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 05:25:23 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Computation]]></category>

		<category><![CDATA[GSOC]]></category>

		<category><![CDATA[Physics]]></category>

		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.jacksofscience.com/?p=549</guid>
		<description><![CDATA[ 
GSOC has finally come to a close. It seems like yesterday when I was blogging on here, young and foolish about the complexity of my project. What you see above are my modest results. Pretty as it might look, this fluid is most definitely code-name O(n^2), and that's not really a good thing! Let [...]]]></description>
			<content:encoded><![CDATA[<p><!--yay--> <a href="http://www.jacksofscience.com/wp-content/uploads/2009/08/gsoc09.png"><img class="size-full wp-image-548 alignnone" title="Fluid Visualization in Step" src="http://www.jacksofscience.com/wp-content/uploads/2009/08/gsoc09.png" alt="Google Summer of Code Fluid in Step" width="475" height="207" /></a></p>
<p>GSOC has finally come to a close. It seems like yesterday when I was blogging on here, young and foolish about the complexity of my project. What you see above are my modest results. Pretty as it might look, this fluid is most definitely code-name O(n^2), and that's not really a good thing! Let me explain the name in the three major aspects of my project.</p>
<p><strong>Realism</strong></p>
<p>It's one thing to implement a smoothed particle hydrodynamics <a href="http://www.matthiasmueller.info/publications/sca03.pdf">paper</a> in STEP, that was basically done by the midterm, but how can you make it... well, physical? In an SPH system, there are several parameters that must be adjusted to achieve that. Namely, the temperature dependent gas constant, the rest density, the smoothing kernel length, the surface tension coefficient, the viscosity constant, and the universal bounciness of object-object interactions. With the exception of the surface tension and bounciness, I was able to determine a number of these constants for a working fluid using trial and error.</p>
<p>Most significant for computation was the adjustment of the smoothing kernel length. This is the radius around each fluid particle at which the effects of the particle are spread out. According to the SPH algorithm I implemented, at each time step we compute the pressures at each fluid particle based on the density of all fluid particles within the smoothing kernel radius. That being said, at each time-step I made O(n^2) distance to fluid particle comparisons, and in the limit of an infinitely large smoothing kernel there would be O(n^2) arithmetic operations. Among some other issues I will discuss, I found this to be a limiting factor for the number of fluid particles I could use. </p>
<p>Unfortunately, this prevented me from testing an important aspect of fluids, surface tension. By adding some additional fake surface tension forces outlined in Muller 2003, my fluid would be calmer and perhaps even support the weight of a boat at it's surface. Additionally, the addition of bounciness would allow gravity to act realistically on the fluid and have density collect at the bottom of a jar.</p>
<p>So, how can one improve on this brute-force enumeration of all pairs of particles? My expert mentor Vladimir suggested a new data structure might be the best approach. Since both fluids and gases benefit from a large number of particles, it would be advantageous to implement a <a href="http://en.wikipedia.org/wiki/Minimum_bounding_box">Axis-Aligned Bounding Box</a> data structure. Not only would this help for collision detection between any Step objects but this would provide a way to only calculate pressure forces for neighboring fluid particles. This works because we store a sorted list of boxes about both our X an Y axes and keep track of box overlaps. Unfortunately, my mentor and I did not have enough time to implement this complex rehaul to StepCore.</p>
<p><strong>Measurement</strong></p>
<p>Step is about education. For educational purposes, at the very least, it would be great to be able to know the average density and pressure within a region of the fluid. Despite my fluid being somewhat artificial and hacked together with strange internal values, I managed to achieve this. However, the computational complexity is, once again, not pretty. </p>
<p>The calculation of pressure at a particle point in the World was already used for the dynamics of the fluid. I merely had to generalize it for discrete area elements of Step's "measurement rectangle". By moving the rectangle and resizing it within the Fluid, each time-step I am sliced the area into a grid, calculated the pressure and density at the center of each area, and then added it all together.</p>
<p>The trouble with that is probably quite clear. If you have a very large measurement rectangle you may want a widely spaced grid and for a small measurement rectangle you may want a closely spaced grid. A grid dependent on the size of the rectangle and the smoothing kernel radius is also a difficult value to fine tune.</p>
<p>In the future,  It would be ideal for the user to be able to select the precision of the pressure and density calculation at their own discretion, and have the variance values adjust accordingly. I was unable to implement variance calculations for these measurements, but that may also be an expensive calculation!</p>
<p><strong>Visualization</strong></p>
<p>Finally, the Pièce de résistance. The jaw-dropping visuals that all fluids deserve. As you can see above, there's lots of room for improvement. Visualization can be done in two ways. Muller 2003, the paper I was following for this SPH implementation, suggests a fancy isosurface calculation. That is, determine the normal to the fluid particle density field at every point. If this value is greater than some threshold, it's safe to say it's a surface particle and it could be used to draw a sexy looking surface. </p>
<p>However, with a deadline looming, my mentor suggested a simpler approach. I would simply calculate density at each point in a grid and then paint a particle there with opacity based on the density. As seen above, these opacity calculations weren't quite calibrated, since we don't see much variation in blue except at the edges of the fluid. </p>
<p>I had a problem though. Where should I "draw the line" for drawing the dots? I can't very well calculate the density at each point in the observable screen area. It would take forever to get a smooth fluid. The solution is to calculate the minimum bounding box for the fluid and use a cut-off value in-case one fluid particle flies away off the screen. This ended up being quite challenging for some reason, so I decided to only render the fluid within the "measurement rectangle".</p>
<p>I had an issue with converting between coordinate systems that still remains unsolved. I needed to draw my fluid about the origin of the WorldScene or else my fluid would render in the incorrect location. This is likely due to a simple mapping problem that I intend to figure out soon.</p>
<p><strong>End</strong></p>
<p>So, what's next for Fluids, Step, and Me? The realism, measurement, and visualization issues outlined above will continue to be worked on by Vladimir and I. After some of the fundamental problems are addressed, I forsee a very liquidy Step in the near future. Me? I'm starting a MSc. in Physics at University of Waterloo this Fall, but I had a lot of fun on this project and hope to continue making Step a richly featured open-source physics simulator!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacksofscience.com/physics/three-aspects-of-a-great-fluid-simulation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fluid Integration into the Step GUI</title>
		<link>http://www.jacksofscience.com/physics/fluid-integration-into-the-step-gui/?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://www.jacksofscience.com/physics/fluid-integration-into-the-step-gui/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 06:18:27 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Education]]></category>

		<category><![CDATA[GSOC]]></category>

		<category><![CDATA[Physics]]></category>

		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.jacksofscience.com/?p=531</guid>
		<description><![CDATA[ 
It's about time I popped this bubble of silence.
I've been working hard on two programming projects this summer, namely my Google Summer of Code project and a fancy upgrade to some molecular dynamics software. In my previous posts, I looked at the back-end of Step and some of the mathematics of smoothed particle hydrodynamics. [...]]]></description>
			<content:encoded><![CDATA[<p><!--yay--> <a href="http://www.jacksofscience.com/wp-content/uploads/2009/06/bubble-1242713362.jpg"><img class="alignnone size-full wp-image-544" title="Bubble" src="http://www.jacksofscience.com/wp-content/uploads/2009/06/bubble-1242713362.jpg" alt="Bubble" width="459" height="344" /></a></p>
<p>It's about time I popped this bubble of silence.</p>
<p>I've been working hard on two programming projects this summer, namely my <a href="http://socghop.appspot.com/">Google Summer of Code</a> project and a fancy upgrade to some <a href="http://dirac.cnrs-orleans.fr/MMTK/">molecular dynamics software</a>. In my previous posts, I looked at the back-end of <a href="http://edu.kde.org/step/">Step</a> and some of the mathematics of smoothed particle hydrodynamics. There are still plenty of outstanding problems in those areas but I'll address those gradually in the coming weeks. For this post, I'll give an overview of all the GUI/user interactivity stuff that i'll have to tackle on my quest to implement fast fluid simulation.</p>
<p>I'll just enumerate the ways the user can interact with a fluid and trace through exactly what is going on behind the scenes. I know, KDevelop/IDEs are pretty fancy, but I'm oldschool so I tend to just follow the code execution manually. It's kind of like a grep-based treasure hunt! So, I'll just give some running commentary with bonus screenshots from the current Gas classes. I doubt many readers of this blog will find this interesting, but my dream is that this post series may someday be useful for a new Step developer =P </p>
<p>Oh, if you're a Qt newbie just remember that any class with a Q is a <a href="http://doc.trolltech.com/">Qt class</a>, and don't forget your <a href="http://doc.trolltech.com/signalsandslots.html">slots and signals</a>.</p>
<p><span id="more-531"></span><img class="alignnone size-full wp-image-540" title="Screenshot 4" src="http://www.jacksofscience.com/wp-content/uploads/2009/06/ss4.png" alt="Screenshot 4" width="158" height="380" /></p>
<p><strong>User clicks the fluid object in the item palette and adds it to the Scene.</strong></p>
<p>When any action, such as clicking on a button, is performed by the user, a QAction:triggered signal is emitted by that object. Within the itemPalette class (as pictured graphically above) we deal with this signal by linking it up to an actionTriggered slot. </p>
<p>    QObject::connect(_actionGroup, SIGNAL(triggered(QAction*)), this, SLOT(actionTriggered(QAction*)));</p>
<p>This slot then passes over the responsibility of creating a new object from the itemPalette to the WorldScene's beginAddItem method. The WorldScene handles all things graphical in Step. It inherits QGraphicsScene and provides us with a safe place for visualizing our 2D objects. Some day, when a brave Summer of Code student steps up to the challenge, Step will evolve to 3D and leave QGraphicsScene in the dust.</p>
<p>WorldScene then initializes a new ItemCreator. You can only add one item at a time to the WorldScene, so it checks to see if an itemCreator has already been defined, and if so it deletes it, while emitting an endAddItem signal. Anyway, since we don't actually know the type of the item being created, we have to pass the item over to the worldFactory class to query our object. Once we know more about the object we call the specific newItemCreator class of that object, that in my case will be FluidCreator. It's worth mentioning that every derived class form Item has it's own Creator, GraphicsItem, and MenuHandler classes.  I'll go over these as they come up.</p>
<p>FluidCreator will be a class with the sole purpose of adjusting the initial state of the fluid before it gets placed on the WorldScene. It's definition should look something like this:</p>
<p>    FluidCreator(const QString&amp; className, WorldModel* worldModel, WorldScene* worldScene) : ItemCreator(className, worldModel, worldScene) {}</p>
<p>At this point the user gets a friendly notification to click somewhere to position the start of the fluid. In the Phun physics sandbox you can "liquify" any object to create a fluid. This can be pretty entertaining, but when it comes building a precise simulation, a boring rectangle is best suited!</p>
<p><img class="alignnone size-full wp-image-537" title="Screenshot 1" src="http://www.jacksofscience.com/wp-content/uploads/2009/06/ss1.png" alt="Screenshot 1" width="476" height="74" /></p>
<p>Any WorldScene clicks get passed to the fluidCreator sceneEvent until the item creation is flagged as being completed. Three different mouse events are handled by the fluidCreator scene event. </p>
<ol>
<li>The user clicks the mouse. This creates a fluid object and a fluidForce object that are added to the World. This case also starts a "Macro" for undo purposes later on.</li>
<li>The user drags the mouse. This updates the measureRectSize and measureRectCenter fluid attributes.</li>
<li>The user releases the mouse. This finalizes the rectangle information. If the user did not drag the mouse it  would create a default rectangle size. Releasing the mouse prompts the user to input detailed attributes for the fluid. For early development all values should be fixed as only certain values may permit stable fluids. Once this information is added, the fluid particles will be created within the fluid and the Undo macro is ended. A nice pop-up confirming the creation of a new fluid will appear and we are left with a rectangle filled with non overlapping fluid particles.</li>
</ol>
<p><img class="alignnone size-full wp-image-538" title="Screenshot 2" src="http://www.jacksofscience.com/wp-content/uploads/2009/06/ss2.png" alt="Screenshot 2" width="477" height="243" /></p>
<p>On top of all that, when the user releases the mouse, a menu handler is created. This menuHandler takes care of both the context menu and the creation of new fluid particles. By itself, a fluid is just a framework for keeping track of fluid particles. Separating the creation of fluid particles from creation of a fluid allows the user to re-run the particle creation method until a desired smoothness is achieved. MenuHandler also kicks off a critical chain reaction by adding a FluidParticleList to the WorldModel.</p>
<p>The WorldModel is really the central nervous system of Step. All solvers, constraints, collisions, and general mayhem occurs within this monster of a class. I won't unnecessarily spill the guts of Step into this post, but suffice to say, things get quite elaborate at this point. </p>
<p>To quote my mentor:</p>
<blockquote><p>In WorldScene::worldRowsInserted signal handler, which is called when new item is added to the World, the corresponding graphics item gets created and initialized. In WorldScene::worldDataChanged slot, which is called when some (or all) items in the World changes their state, it calls WorldGraphicsItem::worldDataChanged method for each graphics item on the scene so that each item can redraw itself</p></blockquote>
<p>The question I have to ask is, how should one draw a fluid Particle? I will have to do some hands on experimentation with this later, but it is important that fluid particle spheres overlap to give an illusion of a continuos fluid. The actual drawing of the fluid particle object is coded into the GraphicsItem::paint class.</p>
<p><strong>Users selects a fluid particle</strong></p>
<p> Selecting or hovering over a fluid particle is considered a "stateChange" event and is handled depending on the object. User interactivity with the fluid may be an interesting task, especially in real-time while the simulation is running. However, clicking and dragging a fluid particle should be entirely possible even when pushing against other fluid particles. As with a Gas, I feel that a fluid particle should display a velocity vector (as pictured below). This velocityHandler is created using the Vector2D velocity quantity of our fluid as follows:</p>
<p>    _velocityHandler = new ArrowHandlerGraphicsItem(item, worldModel, this, _item-&gt;metaObject()-&gt;property("velocity"));</p>
<p>In particular, ArrowHandlerGraphicsItem is described in detail in the WorldGraphics class. One idea I may be interested in implementing in the future, is adding support for displaying "velocity field lines" to show the instantaneous velocity at a fixed grid of points throughout the fluid. Other cool graphical features might be a rainbow color mapping to identify the areas of high pressure/density.</p>
<p><img class="alignnone size-full wp-image-541" title="Screenshot 5" src="http://www.jacksofscience.com/wp-content/uploads/2009/06/ss5.png" alt="Screenshot 5" width="475" height="174" /></p>
<p><strong>User presses simulate.</strong></p>
<p>The actual simulation process, in order words, the integration algorithm of all our forces in order to go forward one step in time, is briefly outlined in the Introduction to StepCore document here (http://stepcore.sourceforge.net/docs/design_intro.html). But what end user in their right mind is interested in such things? </p>
<p>End users can keep track of two types of measurements for a fluid. </p>
<ol>
<li>Exact properties of a selected "fluid particle".</li>
<li>Average observables of our system like average velocities, densities and pressures using a rectangular selection.</li>
</ol>
<p>Where the latter would be the most accurate data to be obtained from the fluid. The difficulty with the first measurement is that fluid particles are an arbitrary representation of a bulk amount of fluid. Nonetheless, for either measurement, the properties browser gets updated with data in a similar way. PropertiesBrowser has slots to catch when an object gets selected or when data changes in the world. Then it updates the browser fields accordingly. </p>
<p><img class="alignnone size-full wp-image-539" title="Screenshot 3" src="http://www.jacksofscience.com/wp-content/uploads/2009/06/ss3.png" alt="Screenshot 3" width="476" height="176" /></p>
<p>A difficult aspect of simulation will surely be the collision of fluid particles with other objects. In that case, it is imperative that the effective radius of a fluid particle avoid overlapping excessively with other objects. Perhaps by tweaking the smoothing kernel, no overlap will actually occur, but I must pay close attention that the fluid particles don't appear penetrate though an object when in fact the core particle is somewhere safe. This is a case when dynamic graphical scaling of the radius of a particle might be beneficial.</p>
<p><strong>User deletes the object.</strong></p>
<p>Deleting a fluid is a bit less complex than creating a new fluid and fluid particles from scratch. It's more or less just a matter of getting your book-keeping straight. Any delete event, for instance, selecting an object and pressing the delete key, will be caught and passed on to the worldModel for annilhation. </p>
<p>That's just about all the interactions the user has with the fluid. Phew, talk about exhaustive. Next post, hopefully  on Thursday or Friday, I'll touch on some collision detection issues. That'll be the final topic before I dive into a glorious ocean of code.</p>
<p> </p>
<p><span style="text-decoration: underline;"><br />
</span></p>
<p><span style="text-decoration: underline;"><br />
</span></p>
<p><span style="text-decoration: underline;"><br />
</span></p>
<p><span style="text-decoration: underline;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacksofscience.com/physics/fluid-integration-into-the-step-gui/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Making Errors Work For You</title>
		<link>http://www.jacksofscience.com/software/making-errors-work-for-you/?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://www.jacksofscience.com/software/making-errors-work-for-you/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 06:44:10 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Education]]></category>

		<category><![CDATA[GSOC]]></category>

		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.jacksofscience.com/?p=519</guid>
		<description><![CDATA[ 
The trials and tribulations of uncertainty run deep in the hearts of experimentalists. From our biased human minds, to the imprecision of our measurement devices, to the quantum uncertainty of our universe, errors have confounded scientists for eons. Even within the safe and deterministic world of computation, inexactness is rampant.
There are two main types [...]]]></description>
			<content:encoded><![CDATA[<p><!--yay--> <a href="http://www.dezeen.com/2008/10/18/tape-measure-project-by-debbie-smyth/"><img class="alignnone size-full wp-image-526" title="Debbie Smyth Tape Measure Project" src="http://www.jacksofscience.com/wp-content/uploads/2009/06/debbie-smyth2.jpg" alt="Debbie Smyth Tape Measure Project" width="450" height="313" /></a></p>
<p>The trials and tribulations of uncertainty run deep in the hearts of experimentalists. From our <a href="http://en.wikipedia.org/wiki/Human_error">biased human minds</a>, to the <a href="http://en.wikipedia.org/wiki/Systematic_error">imprecision of our measurement devices</a>, to the <a href="http://en.wikipedia.org/wiki/Measurement_in_quantum_mechanics">quantum uncertainty of our universe</a>, errors have confounded scientists for eons. Even within the safe and deterministic world of computation, inexactness is rampant.</p>
<p>There are two main types of numerical errors. The first of which is result of computers having a limited number of bits (32 or 64) to represent numbers. All the coolest real numbers have an infinite number of digits so we're restricted to representing numbers that differ by <a href="http://en.wikipedia.org/wiki/Machine_epsilon">machine epsilon</a>.</p>
<p>The second source of numerical error pops up a lot in numerical algorithms, including those implemented in <a href="http://edu.kde.org/step/">Step</a> for solving differential equations. It would be nice if we could perform exact <a href="http://en.wikipedia.org/wiki/Symbolic_computation">symbolic computation</a> all the time, but physics can get messy, especially with errors! Almost any time we take a derivative on computer, we approximate it using a <a href="http://en.wikipedia.org/wiki/Taylor%27s_theorem">taylor series</a>. This approximation works great if we keep an infinite number of terms but who has the time to calculate all that? Thus, our results differ from the exact answer based on where we truncate our taylor series. This truncation error combined with the <a href="http://en.wikipedia.org/wiki/Floating_point_error#Accuracy_problems">floating point error</a> mentioned above, has the potential to cause serious numerical instabilities and pain for computational scientists.</p>
<p>Numerical issues aside*, in true experimentalist fashion, Step allows users keep track of the propagation of user-inputted uncertainties over the course of a simulation. The mathematics behind this process is reviewed briefly <a href="http://en.wikipedia.org/wiki/Propagation_of_uncertainty#Partial_derivatives">here</a>. As an example let's look at the calculation for the uncertainty in <a href="http://en.wikipedia.org/wiki/Kinetic_energy">kinetic energy</a> in the Step's ParticleErrors class,</p>
<blockquote><p> </p>
<p>double ParticleErrors::kineticEnergyVariance() const {<br />
  return _velocityVariance.dot(particle()-&gt;velocity().cwise().square()) * square(particle()-&gt;mass())        + square(particle()-&gt;velocity().squaredNorm()/2) * _massVariance;<br />
}</p>
<p> </p></blockquote>
<p>The kinetic energy (KE) of a particle is a function of both mass and velocity, where each of these variables have their respective uncertainties. In order to calculate the variance of kinetic energy we have to take the sum of d(KE)/dv multiplied by our velocityVariance and d(KE)/dm multiplied by our massVariance. The function only looks a bit confusing because we want a scalar value and we have to use a few <a href="http://eigen.tuxfamily.org/">Eigen</a> functions to deal with 2D vectors. </p>
<p>The trouble with smoothed particle hydrodynamics is that each "fluid particle" is inherently an approximation of many particles or a bulk region of fluid. Nonetheless, the calculated densities and pressures for each chunk of fluid are subject to uncertainty. As outlined by <a href="http://www.matthiasmueller.info/publications/sca03.pdf">Muller et al.</a>, any scalar quantity <strong>A</strong> can be calculated by summing over all particles <strong>j</strong> with some smoothing kernel defined by <strong>W</strong>:</p>
<p><a href="http://www.jacksofscience.com/wp-content/uploads/2009/05/picture-2.png"><img class="alignnone size-full wp-image-525" title="Discrete Equation for Scalar Quantity in SPH" src="http://www.jacksofscience.com/wp-content/uploads/2009/05/picture-2.png" alt="Discrete Equation for Scalar Quantity in SPH" width="461" height="67" /></a></p>
<p><a href="http://www.jacksofscience.com/wp-content/uploads/2009/05/picture-2.png"></a>Given the user-inputted uncertainty in particle mass <strong>m</strong> and whatever calculated uncertainty we have for our quantites <strong>A</strong> and <strong>p</strong>, this formula can be used with the method above to calculate uncertainty in the newly calculated quantity <strong>A</strong>. These calculations will be coded in the FluidParticleError class outlined below. Note the addition of the member variables for densityVariance and pressureVariance. These values could be calculated on the fly, but in doing there would be a large amount of calculations due to the summation of all nearby particle errors. Later in this project this will also include Viscosity error calculations that depend on the velocity of nearby particles using the same equation above. </p>
<p><a href="http://www.jacksofscience.com/wp-content/uploads/2009/05/step-fluids-uml-error12.png"><img class="alignnone size-full wp-image-524" title="Step Fluids UML Errors 1" src="http://www.jacksofscience.com/wp-content/uploads/2009/05/step-fluids-uml-error12.png" alt="Step Fluids UML Errors 1" width="445" height="442" /></a></p>
<p>It's a week into my GSOC project and I still have lots of work to do. Next post will be a bit more software development oriented, as I'll look more at the Qt GUI and how it connects with the numerical back-end of Step. Expect a post shortly!</p>
<p>*You can adjust the precision of your Solver in the properties dialog box of Step!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacksofscience.com/software/making-errors-work-for-you/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building a Fluid One Chunk At A Time</title>
		<link>http://www.jacksofscience.com/physics/building-a-fluid-one-chunk-at-a-time/?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://www.jacksofscience.com/physics/building-a-fluid-one-chunk-at-a-time/#comments</comments>
		<pubDate>Mon, 25 May 2009 07:19:02 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Computation]]></category>

		<category><![CDATA[GSOC]]></category>

		<category><![CDATA[Physics]]></category>

		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.jacksofscience.com/?p=507</guid>
		<description><![CDATA[ 
I went to the Sharcnet GPU and Cell Computing Symposium at my university last week. One of the keynote speakers, Dr. Paul Woodward, pretty much blew my weak and feeble mind. He used Roadrunner, a.k.a. the faster supercomputer in the world, to compute some impressive fluid dynamics. You know your research group is on [...]]]></description>
			<content:encoded><![CDATA[<p><!--yay--> <a href="http://www.jacksofscience.com/wp-content/uploads/2009/05/sg5-curtain-1024x768.png"><img class="alignnone size-full wp-image-515" title="Fluid Simulation Woodward Minnesota" src="http://www.jacksofscience.com/wp-content/uploads/2009/05/sg5-curtain-1024x768.png" alt="Fluid Simulation Woodward Minnesota" width="475" height="200" /></a></p>
<p>I went to the <a href="http://www.sharcnet.ca/events/ssgc2009/">Sharcnet GPU and Cell Computing Symposium</a> at my university last week. One of the keynote speakers, <a href="http://www.lcse.umn.edu/">Dr. Paul Woodward</a>, pretty much blew my weak and feeble mind. He used <a href="http://en.wikipedia.org/wiki/IBM_Roadrunner">Roadrunner</a>, a.k.a. the faster supercomputer in the world, to compute some impressive fluid dynamics. You know your research group is on the right track when you have a <a href="http://www.lcse.umn.edu/coppermine/index.php?cat=18">Wallpapers section</a> on your web site.</p>
<p>Back on planet earth, us computational plebs don't have such luxurious resources at our finger tips. To start with, you don't have a lot of options when you feel like simulating fluids on a computer. Things get even more depressing when you want fluid flow computed in real time. In video games, or maybe just in old video games, accurate water simulation ends up being avoided all together with some elaborate ruse to keep computation costs down. Why do fluids have such a bad rep? To paraphrase <a href="http://en.wikipedia.org/wiki/Navier-Stokes_equations">Wikipedia</a>: "We suck at solving systems of non-linear partial differential equations, here's a million dollars if you figure it out, good luck lol".</p>
<p>I find this whole water simulation extra-depressing because <a href="http://en.wikipedia.org/wiki/Digital_physics">the universe computes the solution to these problems</a> instantly and literally rubs it in our face whenever the wind blows (<a href="http://en.wikipedia.org/wiki/Navier–Stokes_existence_and_smoothness">via turbulence</a>). Just imagine with me what life would be like if we had an exact solution for fluid flow. Picture weather forecasts that actually forecast, reliable message-in-a-bottle delivery using ocean currents, and aerodynamic everything.</p>
<p>Wow, nice introduction. This post is actually about my fluid simulation project for Google Summer of Code. To achieve real-time fluid simulation in Step, I intend to follow the <a href="http://en.wikipedia.org/wiki/Smoothed_particle_hydrodynamics">Smoothed Particle Hydrodynamics </a>(SPH) algorithm outlined by Muller et al. in "<a href="http://www.matthiasmueller.info/publications/sca03.pdf">Particle-Based Fluid Simulation for Interactive Applications</a>". This method works by breaking up a large fluid body into discrete chunks and using these chunks to create smoothed out fields. In fluids, the stuff we care about are pressure, density, and velocity fields. SPH is just a fancy way of figuring out the forces that act on your fluid by taking these fields into account.</p>
<p>Without going into all the mathematical detail presented by Muller et al., we can begin to define our fluid particles class in <a href="http://stepcore.sourceforge.net/docs/design_intro.html">StepCore</a>, the mathematical back-end of Step. Note that all of this is pretty fuzzy right now since I haven't started coding anything. Many important properties of FluidParticle already exist the base class Particle in Step as depicted below. Nothing too special here, just get and set methods for the particle member variables. One thing to note is that FluidParticle has a specific radius that defines the core radius of each particle. However, at this point it is unlikely that the radius of each particle will vary. I'll talk about Errors in a separate post also.</p>
<p><span style="text-decoration: underline;"><img class="alignnone size-full wp-image-510" title="step-fluids-uml1" src="http://www.jacksofscience.com/wp-content/uploads/2009/05/step-fluids-uml1.png" alt="step-fluids-uml1" width="450" height="581" /></span></p>
<p>Now that the FluidParticle is defined we can look at the collective group, the Fluid. All "bodies and forces" in Step are derived from the root class <a href="http://stepcore.sourceforge.net/docs/classStepCore_1_1Item.html">Item</a>. A Fluid is simply a group of FluidParticle items in a handy "Item Group". The main purpose of this group is to extract macroscopic features of our fluid particles that exists within a rectangle drawn in the GUI.</p>
<p>This rectangular data inquiry box was designed for use with the Gas class where determining the number of particles, the kinetic energy, and the temperature are meaningful quantities for statistical mechanics. However, I'm not really sure how well the physics of statistical mechanics translates to the mathematics of a fluid. For instance, I may know the velocities of all my fluid chunks but is it correct to use these velocities to determine the so-called "temperature" of my fluid? I suppose so... but I have to do a bit more research.</p>
<p>Nonetheless, for now I'll just use the rectPressure(), rectVelocity() and rectDensity(). I'd like to be able to use these methods to not just calculate the average pressure, velocity, and density by looping over the values stored in each fluid chunk but averaging over the entire field created by the fluid chunks. I'm not sure how computationally demanding this calculation will be, but if I discretized space within the fluid into some sort of grid this may be possible. </p>
<p><span style="text-decoration: underline;"><img class="alignnone size-full wp-image-514" title="Step Fluids UML 2" src="http://www.jacksofscience.com/wp-content/uploads/2009/05/step-fluids-uml22.png" alt="Step Fluids UML 2" width="446" height="384" /></span></p>
<p>So now we have a Fluid that is composed of individual FluidParticles. Where does the physics come in? We need to look at the FluidForce class for that. The purpose of the FluidForce class is to do the work of applying the inter-fluid forces to each particle in our item group by means of the calcForce method that allows you to calculate the variances based on a boolean flag. In the process of calculating the forces on each fluid particle, I'll have to use the helper method calcPressureDensity() as well.</p>
<p><img class="alignnone size-full wp-image-516" title="Step Fluids UML 3" src="http://www.jacksofscience.com/wp-content/uploads/2009/05/step-fluids-uml3.png" alt="Step Fluids UML 3" width="440" height="137" /></p>
<p>You'll notice that the only member variable for the fluidForce is a cutoff value and FluidErrors (which I will elaborate on later). This value represents a limiting distance for which the force contribution from a distant particle would be so small that it's not worth calculating. In the current Gas implementation in Step, calcForce requires O(n^2) comparisons, as we have to loop through all pairs of particles to determine if they have a distance less than the cutoff value. As mentioned briefly in Muller et al., a potential speed-up over this approach might be to place our fluid particles on a grid and only calculate the force contribution from particles attached to neighboring grid cells to our particle of interest. I'll address performance issues later in my project.</p>
<p>I've already overlooked a few critical issues that may require the modification of these classes. A fundamental characteristic of a fluid is <a href="http://en.wikipedia.org/wiki/Viscosity">viscosity</a>, which is defined as resistance of a fluid to shear and stress forces. Obviously, my GSOC project will not be complete unless I can simulate some delicious sticky honey. At this stage, for simplicity, I'll probably just hard code some viscosity values. The second critical issue will be collisions. My mentor and I both agree that collision handling may get tricky. If you've ever been stuck in a wall or a tree when playing a video game you'll know what I mean.</p>
<p>I'll address that problem eventually but next I'll briefly discuss the Error classes associated with the fluid objects. The calculation of errors/variances is one of the cool features that makes Step unique!</p>
<p>After that, I'll explore the Qt and GUI side of Step. I'll connect the classes I've defined above to user interactions. Once I do that, things should get a lot clearer in terms of how the FluidForce, Fluid and FluidParticles work in conjunction with the World.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacksofscience.com/physics/building-a-fluid-one-chunk-at-a-time/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Learning Science through Comic Books, A List</title>
		<link>http://www.jacksofscience.com/art/learning-science-through-comic-books-a-list/?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://www.jacksofscience.com/art/learning-science-through-comic-books-a-list/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 06:36:35 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Art]]></category>

		<category><![CDATA[Education]]></category>

		<category><![CDATA[Comics]]></category>

		<category><![CDATA[entertainment]]></category>

		<category><![CDATA[Physics]]></category>

		<guid isPermaLink="false">http://www.jacksofscience.com/?p=495</guid>
		<description><![CDATA[ 
Reading textbooks gives me scary flashbacks of my days as an undergraduate (about 2 weeks ago). I did a little research on the internet and supposedly there are these things kids are calling "light reads" that make reading fun again. Comic books/Graphic novels are the pinnacle of fun, so I put together a quick [...]]]></description>
			<content:encoded><![CDATA[<p><!--yay--> <a href="http://www.jacksofscience.com/wp-content/uploads/2009/04/picture-3.png"><img class="alignnone size-full wp-image-494" title="Richard Feynman, Safecracker" src="http://www.jacksofscience.com/wp-content/uploads/2009/04/picture-3.png" alt="Richard Feynman, Safecracker" width="475" height="223" /></a></p>
<p>Reading textbooks gives me scary flashbacks of my days as an undergraduate (about 2 weeks ago). I did a little research on the internet and supposedly there are these things kids are calling "light reads" that make reading fun again. Comic books/Graphic novels are the pinnacle of fun, so I put together a quick list of illustrated reading to salivate the mind in absence of raw textbook facts.</p>
<p>1. Larry Gonick's <strong>The Cartoon Guides</strong></p>
<p><strong><img class="alignnone size-full wp-image-496" title="Cartoon Guide to Physics" src="http://www.jacksofscience.com/wp-content/uploads/2009/04/picture-6.png" alt="Cartoon Guide to Physics" width="475" height="175" /><br />
</strong></p>
<p>First order of business, the master of non-fiction science comics: <a href="http://www.larrygonick.com/html/pub/pub.html">Larry Gonick</a>. He's the author of such masterpieces as <a href="http://www.amazon.com/Cartoon-Guide-Physics-Larry-Gonick/dp/0062731009/?tag=jackofscie-20">The Cartoon Guide to Physics</a>, <a href="http://www.amazon.com/Cartoon-Guide-Chemistry/dp/0060936770/?tag=jackofscie-20">The Cartoon Guide to Chemistry</a>, <a href="http://www.amazon.com/Cartoon-Guide-Genetics-Updated/dp/0062730991/?tag=jackofscie-20">The Cartoon Guide to Genetics</a>, and <a href="http://www.amazon.com/Cartoon-Guide-Environment-Larry-Gonick/dp/0062732749/?tag=jackofscie-20">The Cartoon Guide to the Environment</a>. I own the Physics one so I can testify that these books have high educational merit!</p>
<p>2. Jay Hosler's<strong> The Sandwalk Adventures</strong></p>
<p><span style="text-decoration: underline;"><a href="http://www.jacksofscience.com/wp-content/uploads/2009/04/picture-5.png"><img class="alignnone size-full wp-image-497" title="The Sandwalk Adventures" src="http://www.jacksofscience.com/wp-content/uploads/2009/04/picture-5.png" alt="The Sandwalk Adventures" width="475" height="175" /></a></span></p>
<p><a href="http://www.jayhosler.com/">Jay Hosler</a> is on fire with biology themed comics. <a href="http://www.amazon.com/Sandwalk-Adventures-Adventure-Evolution-Chapters/dp/0967725518/?tag=jackofscie-20">The Sandwalk Adventures</a> is a tale of two mites living on a eyebrow follicle of Charles Darwin. Comics Worth Reading has a nice <a href="http://comicsworthreading.com/2006/01/22/the-sandwalk-adventures/">review</a>. Also check out <a href="http://www.amazon.com/Clan-Apis-Jay-Hosler/dp/096772550X/?tag=jackofscie-20">Clan Apis</a>, Hosler's comic about honey-bee life and insect society.</p>
<p>3. Jim Ottaviani's <strong>Two-Fisted Science/Dignifying Science/Suspended in Language</strong></p>
<p><span style="text-decoration: underline;"><a href="http://www.jacksofscience.com/wp-content/uploads/2009/04/picture-9.png"></a><a href="http://www.jacksofscience.com/wp-content/uploads/2009/04/picture-9.png"><img class="alignnone size-full wp-image-498" title="Two-Fisted Science" src="http://www.jacksofscience.com/wp-content/uploads/2009/04/picture-9.png" alt="Two-Fisted Science" width="475" height="175" /></a></span></p>
<blockquote><p>"<a href="http://www.amazon.com/Two-Fisted-Science-Stories-Scientists/dp/0966010620/?tag=jackofscie-20">Two-Fisted Science</a>, a Xeric Award-winning and Eisner nominated original trade paperback, features true stories from the history of science. Some are serious, some are humorous, and most are a bit of both. Scientists highlighted include physicists Richard Feynman, Galileo, Niels Bohr, and Werner Heisenberg, but you'll find a cosmologist and some mathematicians inside as well." -<a href="http://www.gt-labs.com/twofisted.html">GT Labs</a></p></blockquote>
<p><a href="http://www.gt-labs.com/writers.html">Jim Ottaviani</a> is making big moves in the science comics game. <a href="http://www.amazon.com/Dignifying-Science-Stories-About-Scientists/dp/0966010647/?tag=jackofscie-20">Dignifying Science</a> illustrates the stories of a number of famous female scientists like Emmy Noether, Lisa Meitner, Marie Curie, and Rosalind Franklin. Recently, <a href="http://www.npr.org/templates/story/story.php?storyId=4495248">Jim collaborated</a> with Jay Hosler (see above) on <a href="http://www.amazon.com/Suspended-Language-Discoveries-Century-Shaped/dp/0966010655/?tag=jackofscie-20">Suspended in Language</a>, a biography of Neils Bohr. If you're in the area, you can <a href="http://www.gt-labs.com/blog/2009/03/im-going-to-mars-but-firsttcaf.html">catch Jim</a> at the <a href="http://www.torontocomics.com/tcaf/">Toronto Comic Arts Festival</a> and get your comics signed!</p>
<p>4. Capstone Press' <strong>Max Axiom/Inventions and Discovery Series</strong></p>
<p><strong><a href="http://www.jacksofscience.com/wp-content/uploads/2009/04/maxaxiom.jpg"><img class="alignnone size-full wp-image-499" title="Max Axiom" src="http://www.jacksofscience.com/wp-content/uploads/2009/04/maxaxiom.jpg" alt="Max Axiom" width="475" height="175" /></a></strong></p>
<p>Capstone Press brings forth a veritable treasure trove of K-12 science teaching material in graphic novel format. They star Max Axiom, your standard <a href="http://www.jacksofscience.com/physics/sylvester-gates-and-the-one-ring-to-rule-them-all/">african american superhero scientist</a> in action-packed adventures like <a href="http://www.amazon.com/Shocking-Electricity-Scientist-Graphic-Science/dp/0736878882/?tag=jackofscie-20">The Shocking World of Electricity</a>, <a href="http://www.amazon.com/Attractive-Magnetism-Scientist-Graphic-Science/dp/1429601418/?tag=jackofscie-20">The Attractive Story of Magnetism</a>, <a href="http://www.amazon.com/Investigating-Scientific-Scientist-Graphic-Science/dp/1429617608/?tag=jackofscie-20">Investigating the Scientific Method</a>, and <a href="http://www.amazon.com/Understanding-Warming-Scientist-Graphic-Science/dp/1429617675/?tag=jackofscie-20">Understanding Global Warming</a>. Capstone Press also publishes a bunch of comics about scientists like <a href="http://www.amazon.com/Isaac-Newton-Motion-Inventions-Discovery/dp/0736878998/?tag=jackofscie-20">Isaac Newton</a>, <a href="http://www.amazon.com/Charles-Darwin-Evolution-Graphic-Library/dp/1429601450/?tag=jackofscie-20">Charles Darwin</a>, <a href="http://www.amazon.com/Louis-Pasteur-Pasteurization-Inventions-Discovery/dp/0736878963/?tag=jackofscie-20">Louis Pasteur</a>, and <a href="http://www.amazon.com/Jonas-Polio-Vaccine-Inventions-Discovery/dp/0736896457/?tag=jackofscie-20">Jonas Salk</a>. Google Books has a <a href="http://books.google.com/books?id=KrZRMb5Dnl4C">teaser of the Photosynthesis with Max Axiom volume</a>.</p>
<p>5. Apostolos Doxiadis’ <strong>Logicomix</strong></p>
<p><strong><a href="http://www.jacksofscience.com/wp-content/uploads/2009/04/418kibnjnl_ss500_.jpg"><img class="alignnone size-full wp-image-500" title="Logicomix" src="http://www.jacksofscience.com/wp-content/uploads/2009/04/418kibnjnl_ss500_.jpg" alt="Logicomix" width="475" height="175" /></a></strong></p>
<p><a href="http://www.logicomix.com/en/">Logicomix</a> is a "brilliantly illustrated tale of reason, insanity, love and truth recounts the story of <a href="http://en.wikipedia.org/wiki/Bertrand_Russell">Bertrand Russell</a>'s life". This novel comes off as one of the more mature reads of this list, so I'm pretty excited for this comic to be <a href="http://www.amazon.com/Logicomix-Search-Truth-Apostolos-Doxiadis/dp/0747597200/?tag=jackofscie-20">released later this year</a>.</p>
<p>6. Matt Fraction's <strong>The Five Fists of Science</strong></p>
<p><a href="http://www.jacksofscience.com/wp-content/uploads/2009/04/5fists.png"><img class="alignnone size-full wp-image-501" title="5 Fists of Science" src="http://www.jacksofscience.com/wp-content/uploads/2009/04/5fists.png" alt="5 Fists of Science" width="475" height="175" /></a></p>
<p>Okay, you might not learn a lot from <a href="http://www.amazon.com/gp/product/1582406057/?tag=jackofscie-20">The Five Fists of Science</a>, but who can argue against a steam-punk comic featuring Nikola Tesla and Mark Twain fighting against an evil Thomas Edison?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacksofscience.com/art/learning-science-through-comic-books-a-list/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Summer of Fast Fluid and Gas Simulation</title>
		<link>http://www.jacksofscience.com/physics/summer-of-fast-fluid-and-gas-simulation/?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://www.jacksofscience.com/physics/summer-of-fast-fluid-and-gas-simulation/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 19:44:44 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Computation]]></category>

		<category><![CDATA[GSOC]]></category>

		<category><![CDATA[Physics]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[computers]]></category>

		<guid isPermaLink="false">http://www.jacksofscience.com/?p=491</guid>
		<description><![CDATA[ 
Step is a 2D open-source physics simulator that was recently added to the KDE Education project.
Vladimir, the original developer and former Google Summer of Code student, posted up a few ideas to improve Step for this years Google Summer of Code. He included one about improving fluid simulation and, being a computational physicist (TM), [...]]]></description>
			<content:encoded><![CDATA[<p><!--yay--> <img class="alignnone size-full wp-image-490" title="Gas Simulation in KDE Step" src="http://www.jacksofscience.com/wp-content/uploads/2009/04/gas1-1.png" alt="Gas Simulation in KDE Step" width="450" height="184" /></p>
<p><a href="http://edu.kde.org/step/">Step</a> is a 2D open-source physics simulator that was recently added to the <a href="http://edu.kde.org/">KDE Education project</a>.</p>
<p><a href="http://ksvladimir.blogspot.com/">Vladimir</a>, the original developer and former Google Summer of Code student, posted up a few ideas to improve Step for this years <a href="http://socghop.appspot.com/program/home/google/gsoc2009">Google Summer of Code</a>. He included one about improving fluid simulation and, being a computational physicist (TM), I decided to go for it. I wrote up a fancy <a href="http://www.jacksofscience.com/wp-content/uploads/2009/04/gsoc2009.pdf">proposal</a> a few weeks ago and I'm happy to say that it was accepted.</p>
<p>A lot of GSOC projects are strictly geeking out behind-the-scenes, but this one is fun, visual, and physics-based. It's perfect for me.</p>
<p>Compared to Vladimir's original summer of code, <a href="http://edu.kde.org/step/gsoc.php">spent designing Step in it's entirety</a>, my proposal seems like a pretty modest addition. However, fluids are traditionally a very messy subject in the world of physics simulators. If you aren't convinced, <a href="http://www.box2d.org/forum/viewtopic.php?f=3&amp;t=574">read this thread on the Box2D forums from only a month ago</a>. To quote ElectroDruid on <a href="http://www.box2d.org/forum/viewtopic.php?f=3&amp;t=574&amp;start=80">page 9</a>:</p>
<blockquote><p>"I gave up with having the particles be handled by Box2D, and one of the main reasons was because of the amount of pairs generated. You can up the maximum limits, but eventually you just run out of storage space for the numbers of pairs that can be needed in certain cases. Box2D is great for rigid bodies, but for fluids where you need a lot of particles which interact with each other in close proximity all the time, it's easy to push the limits to breaking point."</p></blockquote>
<p>I'm sure I will have to deal with similar problems encountered in that thread, but I'm optimistic that such issues can be resolved. Throughout the summer I'll be blogging my progress on the project here, so stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacksofscience.com/physics/summer-of-fast-fluid-and-gas-simulation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Merits of a Formula Sheet</title>
		<link>http://www.jacksofscience.com/physics/the-merits-of-a-formula-sheet/?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://www.jacksofscience.com/physics/the-merits-of-a-formula-sheet/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 05:34:23 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Education]]></category>

		<category><![CDATA[Physics]]></category>

		<category><![CDATA[Art]]></category>

		<category><![CDATA[condensed matter]]></category>

		<category><![CDATA[exams]]></category>

		<category><![CDATA[illustration]]></category>

		<category><![CDATA[school]]></category>

		<guid isPermaLink="false">http://www.jacksofscience.com/?p=482</guid>
		<description><![CDATA[ 
Click the thumbnail above to catch a glimpse of a single-sided slice of beauty. I cranked it out for my condensed matter physics final tomorrow morning.
Arguably a waste of potential "comprehension-intensive" study time, preparing an excessive formula sheet always puts me at ease (at least until moments before the exam when classmates are chatting [...]]]></description>
			<content:encoded><![CDATA[<p><!--yay--> <a href="http://www.jacksofscience.com/wp-content/uploads/2009/04/image0028.jpg"><img class="size-full wp-image-484 alignnone" title="Formula Sheet for Condensed Matter Physics" src="http://www.jacksofscience.com/wp-content/uploads/2009/04/blogthumb.jpg" alt="Formula Sheet for Condensed Matter Physics" width="450" height="245" /></a></p>
<p>Click the thumbnail above to catch a glimpse of a single-sided slice of beauty. I cranked it out for my condensed matter physics final tomorrow morning.</p>
<p>Arguably a waste of potential "comprehension-intensive" study time, preparing an excessive formula sheet always puts me at ease (at least until moments before the exam when classmates are chatting about some obscure textbook chapters).</p>
<p>I usually insert inspirational messages into my formula sheets just in case I need that bonus motivation, but this time... see if you can find Waldo!</p>
<p>P.S., I can't wait until I can take care of this blog again after my finals.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacksofscience.com/physics/the-merits-of-a-formula-sheet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Christmas Dinner is a Tasty Experiment</title>
		<link>http://www.jacksofscience.com/chemistry/christmas-dinner-is-a-tasty-experiment/?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://www.jacksofscience.com/chemistry/christmas-dinner-is-a-tasty-experiment/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 17:41:54 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Chemistry]]></category>

		<guid isPermaLink="false">http://www.jacksofscience.com/?p=480</guid>
		<description><![CDATA[ 
If you're taking any science labs in school or work in a lab every day, then there's no reason why you shouldn't be the one to prepare Christmas dinner this year.
Just remember to budget lots of time, thawing your turkey can take days in the refrigerator and not all of this stuff will fit [...]]]></description>
			<content:encoded><![CDATA[<p><!--yay--> <a href="http://www.popsci.com/scitech/article/2007-11/turkey-day-chemistry-kitchen"><img class="alignnone size-full wp-image-481" title="PopSci Turkey Science" src="http://www.jacksofscience.com/wp-content/uploads/2008/12/turkeyday_485.jpg" alt="PopSci Turkey Science" width="485" height="275" /></a></p>
<p>If you're taking any science labs in school or work in a lab every day, then there's no reason why you shouldn't be the one to prepare Christmas dinner this year.</p>
<div style="margin: 0px;">Just remember to budget lots of time, thawing your turkey can take days in the refrigerator and not all of this stuff will fit in your oven at a time. It's no harder than following the instructions of your chemistry lab manual or experimental procedure of a paper...</div>
<div style="margin: 0px;"><a href="http://www.foodnetwork.com/recipes/alton-brown/good-eats-roast-turkey-recipe/index.html"><strong>Good Eats Roast Turkey (10-12 servings)</strong></a></div>
<div style="margin: 0px; line-height: 21px;"></div>
<div style="margin: 0px; line-height: 21px;">A 3% salt solution dissolves parts of the protein structure that supports contracting filaments in the muscle. Tender! Additionally, the salt and protein interactions result in greater water-holding capacity in the muscle cells. Juicy! This is very important since cooking meat removes a large percentage of its moisture, so balancing this with the moisture intake of the brine is key. Moisty?</div>
<div style="margin: 0px; line-height: 21px;">In order to crisp the skin of your turkey, the cook must dissolve the leathery collagen into tender gelatin in the skin's water, and then vaporize the water out of the skin. This is the purpose of the high-heat 500 degree portion of the cooking procedure.</div>
<div style="margin: 0px; line-height: 21px;">This recipe is very careful about preserving moisture. Alton Brown, and many great cooks before him have recommended that you let your meat rest after the stressful cooking procedure. By allowing your muscle proteins to relax, they re-absorb a lot of the moisture that were squeezed out during cooking.</div>
<div style="margin: 0px; line-height: 21px;"><a href="http://www.foodnetwork.com/recipes/alton-brown/best-gravy-ever-recipe/index.html"><strong>Best Gravy Ever (10-12 servings)</strong></a></div>
<div style="margin: 0px;">To create delicious gravy it's essential to deglaze browning reaction products from your pan. Corn starch and flour are excellent thickeners. Read a blog post on the <a href="http://scienceblogs.com/chaoticutopia/2006/11/the_science_of_gravy.php">science of gravy here</a>. <span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: Verdana;"><a href="http://tinyurl.com/57quz5" target="_blank"></a></span></div>
<div style="margin: 0px; line-height: 21px; min-height: 14px;"><a href="http://www.potatolovers.co.uk/content/recipes/info/?id=70"><br />
</a></div>
<div style="margin: 0px; line-height: 21px;"><a href="http://www.potatolovers.co.uk/content/recipes/info/?id=70"><strong>Heston Blumenthal's Roast Potatoes</strong></a></div>
<div style="margin: 0px;"><strong><a href="http://tinyurl.com/5osw3v" target="_blank"><br />
</a></strong></div>
<div style="margin: 0px; line-height: 21px;"><a href="http://en.wikipedia.org/wiki/Heston_Blumenthal">Heston Blumenthal</a>'s restaurant was voted the best in the United Kingdom last year, and the dude has a TV show called In Search of Perfection where he cooks classic dishes with scientific gusto. It may seem laborious to rinse your potatoes for 20 minutes and changing the water every 5, but this dude doesn't kid around. I don't have access to Heston's book, but according to <a href="http://www.registerguard.com/csp/cms/sites/web/living/entree/2411833-41/story.csp">this article on the science behind perfect potatoes</a>:</div>
<blockquote>
<div style="margin: 0px; line-height: 21px;">Potatoes harvested early in the season have high starch content, which limits browning. Early potatoes may have starch on the surface, which covers the sugars that brown faster. But rinsing the potatoes several times can eliminate this problem.</div>
</blockquote>
<div style="margin: 0px;"><a href="http://www.elise.com/recipes/archives/007350brandied_cranberries.php"><strong>Brandied Cranberries (Makes 2 cups)</strong></a></div>
<div style="margin: 0px;"><strong><a href="http://tinyurl.com/6kaev2" target="_blank"><br />
</a></strong></div>
<div style="margin: 0px;">Harold McGee, lord of all that is good in food science, claims that since cranberries are rich in pectin, macerating (letting them soak) in alcohol may cause your alcohol to gel. In other words, enjoy giving your family jello shots.</div>
<div style="margin: 0px;"><a href="http://www.elise.com/recipes/archives/001449green_beans_with_almonds_and_thyme.php"><strong>Green Beans with Almonds and Thyme (8 servings)</strong></a></div>
<div style="margin: 0px;"><strong><a href="http://tinyurl.com/5tpmcu" target="_blank"><br />
</a></strong></div>
<div style="margin: 0px;">Great side dish here. Blanching is the process of boiling a food substance and then plunging it in ice water to halt the cooking process. Typically it is useful for halting enzymatic breakdown of vitamins and pigments but it has an added benefit of keeping your beans chlorophyll a luscious green. Supposedly, it also enhances flavor by releasing bitter acids.</div>
<p>For more food science, check out Harold McGee's book <a href="http://www.amazon.com/Food-Cooking-Science-Lore-Kitchen/dp/0684800012?tag=jackofscie-20">On Food and Cooking</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacksofscience.com/chemistry/christmas-dinner-is-a-tasty-experiment/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CUPC 2008 Or How I Learned To Stop Worrying</title>
		<link>http://www.jacksofscience.com/review/cupc-2008-or-how-i-learned-to-stop-worrying/?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://www.jacksofscience.com/review/cupc-2008-or-how-i-learned-to-stop-worrying/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 22:46:04 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[Review]]></category>

		<category><![CDATA[2008]]></category>

		<category><![CDATA[blogging]]></category>

		<category><![CDATA[conference]]></category>

		<category><![CDATA[cupc]]></category>

		<category><![CDATA[Physics]]></category>

		<category><![CDATA[presentation]]></category>

		<category><![CDATA[students]]></category>

		<guid isPermaLink="false">http://www.jacksofscience.com/?p=477</guid>
		<description><![CDATA[ 
I had a nice/brief stay in Toronto last weekend at the Canadian Undergraduate Physics Conference 2008. I was trying to kill 2 birds with 1 stone and catch Madlib DJing at wrongbar too, but he cancelled. However, it turned out for the best because I met many fellow nerds. I even unknowingly stumbled upon [...]]]></description>
			<content:encoded><![CDATA[<p><!--yay--> <a href="http://www.jacksofscience.com/wp-content/uploads/2008/10/cupc-2008-polanyi.jpg"><img class="alignnone size-full wp-image-478" title="CUPC 2008 Polanyi and Students" src="http://www.jacksofscience.com/wp-content/uploads/2008/10/cupc-2008-polanyi.jpg" alt="CUPC 2008 Polanyi and Students" width="460" height="250" /></a></p>
<p>I had a nice/brief stay in Toronto last weekend at the <a href="http://cupc.ca/">Canadian Undergraduate Physics Conference 2008</a>. I was trying to kill 2 birds with 1 <em>stone</em> and catch <a href="http://www.stonesthrow.com/madlib">Madlib</a> DJing at wrongbar too, but <a href="http://wallholder.com/madlib-is-not-performing-in-toronto-despite-flyer/">he cancelled</a>. However, it turned out for the best because I met many fellow nerds. I even unknowingly stumbled upon <a href="http://morningcoffeephysics.wordpress.com/2008/10/23/busy/">another physics blogger</a>! Keep up the good work Jasper, consider yourself blogrolled.</p>
<p>I'm not 100% sure why I went to CUPC because I presented research I did at University of Notre Dame last summer in Computational Chemistry. But some good old fashioned American chemistry never hurt anyone.</p>
<p>Highlights of the weekend include my museum/pub crawl attempt with some Manitobian physics students. I tried to explain that <a href="http://www.ein-stein.ca/">Einstein</a>'s, despite the name, was a pretty weak bar but I feel like failed to impress them with my Toronto-skillz as I led them on a lackluster College St. journey. Where is your cheap drinks + live music when you need it?</p>
<p>The next day I presented my talk "<strong>The Counterintuitive Intermolecular Interactions of Hydroxyl Radical <a href="http://en.wikipedia.org/wiki/In_silico">In Silico</a></strong>" which was probably a counterintuitive title since it had nothing to do with Silicon. Poster presentations were at the same time as my talk, so I tried to do a little PR and told as many people as I could when my talk would be, and how mind-blowing it would be. Where is your publicist when you need him?</p>
<p>I missed most of the events but had the pleasure of hearing how <a href="http://www.utoronto.ca/jpolanyi/">John Polanyi</a> (pictured above courtesy of Alan Robinson) uses a web of deception to get funding for his <a href="http://www.nce.gc.ca/media/success/cipi2000_e.htm">fundamental science research</a> (and he's surely <a href="http://www.pinktentacle.com/2008/10/atomic-pen-writes-with-individual-atoms/">not the only one</a>). Where is your funding when you need it?</p>
<p>I also managed to award "Best Sneakers at CUPC" to Evan Rand from University of Guelph who presented the poster "<strong>GEANT4 Simulations of the GRIFFIN Spectrometer</strong>". He was wearing some nice brown <a href="http://www.nike.com/af1/index.jhtml">AF1's</a> which I should have got a picture of.</p>
<p>The "Best Illustration" award went to Todd Sierens from University of Manitoba who presented "<strong>Electron Scattering: One-Loop Contributions to Parity Violation in QED</strong>".  The picture on his poster was of a skiing <a href="http://blogs.scienceforums.net/swansont/archives/928">Feynman Diagram</a> in a santa hat.</p>
<p>Where is your camera when you need it!?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacksofscience.com/review/cupc-2008-or-how-i-learned-to-stop-worrying/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Unintentionally Inappropriate Science Papers</title>
		<link>http://www.jacksofscience.com/lol/unintentionally-inappropriate-science-papers/?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://www.jacksofscience.com/lol/unintentionally-inappropriate-science-papers/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 23:50:52 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
		
		<category><![CDATA[LOL]]></category>

		<category><![CDATA[dirty]]></category>

		<category><![CDATA[innapropriate]]></category>

		<category><![CDATA[jokes]]></category>

		<category><![CDATA[lude]]></category>

		<category><![CDATA[publishing]]></category>

		<guid isPermaLink="false">http://www.jacksofscience.com/?p=476</guid>
		<description><![CDATA[ 
The Nobel prizes were awarded last week. I say prizes in reference to the ever-important Ig Nobel prizes in addition to the normal boring prizes. I say ever-important because the Ig Nobel prizes always have a direct impact on the common man! This year, the Ig Nobel for chemistry was awarded to a group [...]]]></description>
			<content:encoded><![CDATA[<p><!--yay--> <a href="http://pubs.acs.org/cgi-bin/abstract.cgi/inocaj/2004/43/i11/abs/ic0352250.html"><img class="alignnone size-full wp-image-475" title="Innapropriate Chemistry Fig. 1" src="http://www.jacksofscience.com/wp-content/uploads/2008/10/innapropriatechemistryfigure.png" alt="Innapropriate Chemistry Fig. 1" width="460" height="277" /></a></p>
<p>The Nobel prizes were awarded last week. I say prizes in reference to the ever-important <a href="http://improbable.com/ig/winners/#ig2008">Ig Nobel prizes</a> in addition to the <a href="http://nobelprize.org/nobel_prizes/lists/2008.html">normal boring prizes</a>. I say ever-important because the Ig Nobel prizes always have a direct impact on the common man! This year, the Ig Nobel for chemistry was awarded to a group of researchers for discovering that <a href="http://www.ncbi.nlm.nih.gov/pubmed/4058526?ordinalpos=1&amp;itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DiscoveryPanel.Pubmed_Discovery_RA&amp;linkpos=4&amp;log$=relatedarticles&amp;logdbfrom=pubmed">Coca-Cola could be an effective spermicide</a>, where the vanilla Nobel was awarded for <a href="http://www.thechemblog.com/?p=1023">discovering some glowing jellyfish protein</a>. Which research truly has more important to the common cola-guzzling man?</p>
<p><a href="http://improbable.com/">The Annals of Improbable Research</a> are always a great source of laughs. Most of which are comedic in a sad way because somehow scientists are getting research grants for absurd things like pouring out caffienated beverages on stuff when you are a poor student surviving mostly on a diet of caffienated beverages.</p>
<p>However, there exists another rare specimen of comedy in scientific literature: unintentional innuendo. To appreciate this low-brow/high-brow LOL-mashup, it helps to fall into a sweet spot of ignorance wherein you don't quite know the definition of a particular term in the given context, but you confide in the fact that the research is peer-reviewed so you know it can't be as it sounds!</p>
<p>I've included a list of some of my favorites as an example, in a handy semi-correct citation format.</p>
<ol>
<li>A N Oraevsky, <a href="http://www.turpion.org/php/paper.phtml?journal_id=pu&amp;paper_id=22">Spontaneous emission in a cavity</a>, PHYS-USP, 37 (4), 393-405 (1994)</li>
<li>D Kleppner, <a href="http://link.aps.org/doi/10.1103/PhysRevLett.47.233">Uninhibited Spontaneous Emission</a>, Phys. Rev. Lett. 47, 233 - 236 (1981)</li>
<li>D. Vlassopoulos, et al. <a href="http://cat.inist.fr/?aModele=afficheN&amp;cpsidt=917119">From hairy balls to hairy rods : Using macromolecular chemistry to bridge the gap between polymers and colloids</a>,  The Journal of Rheology (2000)</li>
<li>W. Simon, <a href="http://arxiv.org/pdf/gr-qc/9508042">Nuts Have No Hair</a>, Class. Quant. Grav. 12, L125-L130 (1995)</li>
<li>S. Tanveer, <a href="http://journals.cambridge.org/production/action/cjoGetFulltext?fulltextid=15808">Surprises in Viscous Fingering</a>, J. Fluid Mech. vol. 409, pp. 273–308 (2000)</li>
<li>C. Glocker, F. Pfeiffer, <a href="http://www.springerlink.com/index/L44X4U3P83L01389.pdf">Multiple impacts with friction in rigid multibody systems</a>, Nonlinear Dynamics, Vol. 7 Number 4, 471-497 (1995)</li>
<li>U. Andreaus, P. Casini. <a href="http://linkinghub.elsevier.com/retrieve/pii/S0020746200001013">Friction oscillator excited by moving base and colliding with a rigid or deformable obstacle</a>. Int. Journal of Non-Linear Mech. Vol. 37, Issue 1 117-133 (2002)</li>
<li>W. Likos, N. Lu. <a href="http://trb.metapress.com/index/5716132001K60155.pdf">Automated Measurement of Total Suction Characteristics in High-Suction Range: Application to Assessment of Swelling Potential</a>, Journal of the Transportation Research Board, Vol. 1755 119-128 (2001)</li>
<li>W. Zhong, M. Zhang, <a href="http://linkinghub.elsevier.com/retrieve/pii/S0009250904006037">Jet penetration depth in a two-dimensional spout–fluid bed.</a> Chemical Eng. Science. Volume 60, Issue 2, Pages 315-327 (2005)</li>
<li>X. He, M. Dembo, <a href="http://link.aip.org/link/?JBENDY/118/201/1">Numerical Simulation of Oil-Droplet Cleavage by Surfactant</a>, J. Biomech. Eng., Volume 118,  Issue 2, 201 (1996)</li>
<li>R. Wozniak, M. Rout, J. Aitchison. <a href="http://linkinghub.elsevier.com/retrieve/pii/S0962892498012483">Karyopherins and kissing cousins</a>. Trends in Cell Biology, Vol. 8 Issue 5 184-188 (1998)</li>
</ol>
<p>Are there any papers of this nature I am missing? Sometimes the titles of papers just aren't as lude as I hope. I searched through <a href="http://en.wikipedia.org/wiki/TATA_box">TATA box</a> papers for hours the other day...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jacksofscience.com/lol/unintentionally-inappropriate-science-papers/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.908 seconds -->
