A Mathematician and Meshing: Tyler Anderson’s Summer Internship

tyler-anderson-badgeWe introduced you to Tyler Anderson a month ago. This Aggie math major finished his summer internship on our Product Development team last week and we wanted to share with you what he accomplished. 

Updating Glyph Scripts

One of Tyler’s first tasks this summer was to update several scripts on the Glyph Script Exchange on Github, primarily to allow those scripts to operate on entities selected prior to script execution (versus requiring selecting within the script). For example, the butterfly topology script shown below (converts a structured grid with an H-topology into a so-called butterfly topology) was updated so the block can be selected first.

This script is one of seven on the Glyph Script Exchange that Tyler updated (ButterflyMaker, ConGeometricAutoDimension, CreatOH, Domain2Ellipse, ExtrudeEdges, QuadWarp and TurningAngleCalculator). If these are your favorites you might want to download new versions soon.

tyler-anderson-glyph

The butterfly topology script is freely available on the Glyph Script Exchange on Github.

Glyph Tk Interface to Growth Profiles

Tyler also contributed to a new feature coming in V18.1 R2 called Growth Profiles, a set of Glyph commands that will create meshing attributes for the T-Rex technique based on laminar or turbulent flow parameters or based on your best practices. (In other words, Growth Profiles is like a macro command that sets your wall spacing, growth rate, and growth rate acceleration.)

tyler-anderson-gropro-regions

An example of using Growth Profiles to create a custom growth of cells away from the wall using T-Rex. (GR is growth rate, GRA = growth rate acceleration)

Tyler’s work involved building a Tk interface to the new Growth Profiles commands in Glyph. This UI will make use of Growth Profiles a little easier, especially for those folks who prefer not to program directly in Glyph. You’ll eventually find this script on the Glyph Script Exchange.

tyler-anderson-gropro-tk

A Tk interface to the new Growth Profiles capability, shown here for the Custom option. Laminar and Turbulent options are also available.

Python Interface

You may recall that we introduced the Glyph Server capability in December 2016 so that Glyph scripts (which are based on Tcl) can be called from virtually any scripting language including Python.

Tyler has been working on an update to the Glyph client that provides the Python interface. The updated version generates the Glyph functions “on the fly” rather than working from a preset dictionary of commands.

This updated Python client is a work in progress. We plan to share it on the Glyph Script Exchange shortly after the release of Pointwise V18.2 R1.

tyler-anderson-glypy

The Glyph client for Python lets you write scripts for Pointwise that look like this.

Approximating Pi with Needles

Tyler could not resist the temptation to teach us engineers something about mathematics so he implemented Buffon’s Needle Experiment in Pointwise with a Glyph script written in Python. This experiment involves randomly dropping needles of length l onto a sheet with stripes of width t.

tyler-anderson-buffon

Buffon’s experiment involves randomly dropping needles (lines a and b) onto a sheet with stripes of width t and counting how many needles cross a stripe.

It turns out that a good approximation of pi can be computed as (2l)/(tP) where P is the ratio of the number of pins crossing a stripe to the total number of pins dropped.

tyler-anderson-buffon-script

The Buffon Experiment simulator implemented in Pointwise by executing Glyph through Pyton. 100 needles were dropped over 10 iterations. In the Display window, red needles cross stripes while blue ones do not. The graph was generated using a Python package.

Tyler left us with this bit of math trivia: 355/113 is the best approximation of pi where the numerator and demoninator have less than 5 digits.

Another Successful Summer

Tyler’s senior year at Texas A&M begins soon and he’ll be graduating in May with a B.S. in Applied Mathematics. He plans to pursue graduate study in math after that.

IMG_4337

Tyler Anderson (right) and Pat Baker (left), Manager of Product Development

Let’s end with Tyler’s own words.

“My internship at Pointwise was phenomenal. I was given challenging projects and I was surrounded by people who were passionate about helping me grow and sharing their knowledge with me.”

This entry was posted in Applications, People & Places, Software and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s