The Artful Scientist

Communicating the greatest possible growth

  • Google Talk

  • Skype Me

    My status
  • Where are you?

    Welcome to theartfulscientist. Enjoy your stay as I talk about my life as a fire protection engineering student and one who studies fire dynamics. These posts range from day to day excitement to my developmental life and provide a window into my world.



    The about page tells more.
  • Photo Albums

  • Want to read what I read?

    Visit my Google Reader shared items page. You can even subscribe to my favorite shared articles.
  • My Music Plays


  • My Visited US States

    Visited US States


    • Subscribe

        RSS Subscribe

      or subscribe to updates by email:

    • Search This Blog

    • Archives

    •  

      November 2008
      M T W T F S S
      « Oct    
       12
      3456789
      10111213141516
      17181920212223
      24252627282930

    Archive for the 'FDS' Category


    The Arrival of Collaboration in Fire Protection Engineering

    Posted by Kris on 21st October 2008

    Earlier today, the professor for my Combustion class mentioned that for our final project, we will be working on a problem that currently has no solution. This intrigued me of course, as I wondered if our final grades would have no solution as well. After he explained, it made all the more sense and reminded me why my love and passion is in the field of fire protection engineering, the school I go to, and the people I work with: they all heavily align with my values and principles of sharing knowledge and making information available to everyone, everywhere.

    [From NASA]

    So, let me explain his model simply by example:

    The professor said that when he first started this class 2 years ago, the students were working on a different problem with no solution… at the time. The class worked together and in the end the results were so significant that a couple of students took the initiative to publish the results in a scientific journal. The same happened when the class was taught last year - project done, paper published.

    So what does this mean and why do you care? Well, all too often in the academic world, people can get caught up in working on projects and sort of work themselves into a dark corner where nobody gets to benefit from the results… and this is done in real life as well, not just academics. This is where the ridiculous amount of collaborative technology available to us comes in to play. Want to gather up notes on the Smagorinsky constant and publish them for anyone to find who is searching for them in the next 1000 years? Easy: 5 minutes. Want to publish your results in the most useful way? Easy: work on an open source project in your area along with your research - or make your own.

    …Or you could write a paper, finish your thesis work, wrap up the loose ends in a few years and show a flashy poster of your work 5 years after anybody cares about it anymore or thinks it to be useful.

    I digress. I just wanted to stress this new method of collaboration that is among us, and how it’s going to change the way that we work together and grow together in fire protection engineering and fire science.

    [From Rowan University College of Engineering]

    Why not make use of motivated students and brainpower when they come together? Here is me welcoming this new phase of community and collaboration in a field that directly impacts life safety and makes safer buildings around the world. So when we work on that final project in a few weeks, it’s not really at all about a grade anymore - it’s about a new way of doing science - together.

    Update: This is exactly the kind of stuff that I’m talking about here, posted today on the SFPE National blog that I set up a year ago - collaboration: Foundation Funded Research underway at WPI

    Posted in Community, Computing, FDS, Fire, Intention, Passion, People, Programming, Research, School, Science, Teaching, WPI | 1 Comment »

    The Big Move to MA

    Posted by Kris on 17th June 2008

    WPI

    Welp, I’ve been accepted to start my M.S. and eventually start my Ph.D. at Worcester Polytechnic Institute this fall! I will be studying fire protection engineering, a continuation of my bachelor’s degree. The school is populated with just under 4,000 students and it is a private engineering school. Not only does this school house one of the top fire protection engineering programs in the US, but the faculty and their work align closely with my values and passions in life.

    The big move will look something like this in 8 weeks:


    Some cool info about the school includes the fact that Robert Goddard went there and graduated in 1908 - he was the gradnfather of modern rocketry with the first liquid fueled rocket. Also, the fire protection engineering department has about 150 masters of science students and 4 (!) doctoral students. This is quite the opportunity I smell.

    What I did during the summer of 2008

    So far this summer I’m being funded by UHD as a last request to make a catalog of fire models for various textbooks. The work is very refreshing and I love to work when I learn much more than I expected. :) Another cool side effect of this work is that I can include the FDS models and example writeups on my website, free for anyone else in the world to see and learn from. The technical writeup is located here and it gets updated automatically anytime I change a single word in there. Eventually it will have links to FDS files for FDS users and students around the world to download and use on their own - I love technology.

    FDS MESH Size Calculator tool

    Finally, to finish off a nice post about fire protection engineering and FDS: I updated my FDS Mesh Size calculator on my other website to include some awesome and never-before-done functionality! It now takes in x, y, and z dimensions and an expected heat release rate and gives the user three MESH lines (coarse, moderate, and fine) to guide them on making an FDS file that has an adequately resolved MESH.

    The tool can be found here on my FDS/sciency website and the nice folks at NIST gave me a link on their third-party tools page of the FDS website: http://fire.nist.gov/fds/thirdparty.html

    —–

    I know I post out-there stuff like this on my blog here sometimes, but this is what is on my mind and taking up my mental cycles and daily days. Jump in and read the linked pages or play with the tools of my creation!

    Posted in Community, Computing, FDS, Fire, Goals, Intention, Learning, Math, NIST, School, Science, Travels | 2 Comments »

    Apartment fires burn and homes are lost due to outdated modes of thought

    Posted by Kris on 15th April 2008

    [Used from KPRC video click2houston.com]

    Fire. It’s what I do. And I happen to subscribe to Google News alerts that have “Houston Fire” in the title. Helps me keep in touch with the fire. It also helpingly disturbs me as to what actually goes on outside of the classroom. Really, it’s quite a good way to keep yourself thinking and valuable if you are stuck with that stagnant smell of your job or classes.

    Lots of fires happen everyday. Apartment fires always happen. A lot. Three apartment complexes burned to the ground within 48 hours over the past weekend. And then some. This is what I see:

    Residents Say They Heard Gunshots Before 3-Alarm Fire

    Blaze damages second apartment complex in 24 hours

    Fire erupts at SW Houston apartments

    Apartment Blaze Damages At Least 16 Units

    Apartment fire sends 5 to Hospital

    Yes, those are the most recent stories in my warm and cozy feed reader.

    When is legislation going to get off of its ass and move at the pace that the rest of us do? When is enforcement going to follow? Sure, I guess we all are biased to the field that we are in and think that it is the most important thing in the world. But seriously, people are dying and losing their homes in the midst of an ocean of politics and code books wasting valuable daylight.

    Southeast Houston Apartment Fire

    [Picture used from myFoxHouston.com]

    A lot of the time, I am an optimist. I see what change has followed the positive move of a community-based and collaborative internet (see video in previous post) in other industries. And then I imagine progress and change happening in our daily lives. I dream of governmental processes being way more open and community-driven than we are used to. I can watch it in real-time, play-by-play happening with larger corporations - as they break down due to the epidemic spread of knowledge and awareness. And I imagine a world where fire sprinklers (technology that has been around for 130 years) and other fire safety systems make fire protection engineers obsolete before my industry has even had a chance to get popular and prestigious.

    I suppose what I am saying is that I toil my soul, expand my brain, and work every breathing moment that I can, day-by-day on prediction of fire, contribution to the robust knowledge that we have on fire/combustion, and working using my technical skills. All of this to allow fire documentation, analytical and numerical tools, and scientific information to be available to all people around the world: engineers, scientists, students, and so on. Why? I’d say, in this century and society, I do it to contribute. And I think if just a few other key people did the same, our fire, death, and loss of home problems would vanish at amazing and mind-blowing speeds.

    P.S. This thought process isn’t just limited to my field of fire science, but I write about it because it is what I do. Think about your field for a second. Finance, safety, technology, whatever it is. Mentally apply success to the field by working on and tweaking the top 3% of the people, systems, or methods that are in use now. Realize that these top 3% are there due mainly to tradition, and did not get there due to community-driven work.

    Keep working at it. Align your work with your values. The change will happen. I’ll be waiting.

    Posted in Community, Computing, FDS, Fire, Goals, Health, Intention, Passion, People, Productivity, Resources, Science | No Comments »

    Remove that reading examinee from the airport

    Posted by Kris on 14th April 2008

    It’s interesting how my routines change month by month. I guess that is what is defined by this age range. Movies, programming, motorcycling, science. I just finished the book, The Quarterlife Crisis, and as cheesy as the title sounds, I did get a bit of good stories from it. You may notice how I say stories, and that is what I mean. At this point, after reading way too many psychology books and self-help books, this article really puts it into perspective: http://www.life2point0.com/2006/11/follow_your_bli.html

    It’s a long, slimy article, I know. But if you can take time out of your day to read it… well, time out like time out to watch the previous video I posted, you know. Speaking of time, it tends to dilate depending on what you are doing - there is some correlation there based on how uncomfortable I feel before I do something versus how satisfying it is. We humans are built weird like that.

    In other news, I took the Fundamentals of Engineering exam on Saturday, and wow. I cannot discuss the questions and stuff there lest NCEES sues me and makes me homeless, but that was the hardest thing that I have taken in my life. It was at the George R. Brown Convention Center with what looked like 800-900 students and, according to the NCEES stats, about 560 future engineers. I would show pictures but any phone or camera device would have you banned from the building and have you $130 lighter for no good reason. Anyway, about the test: this is why you have to kick ass in school, students. The test is the connector to the reality that is real-world problems.

    You need to a flashplayer enabled browser to view this YouTube video

    Otherwise, I am off to sleep for another night. This week I will be working on a cross-platform launcher for Fire Dynamics Simulator, since the command line scares or hinders our users. In Python, of course. Python and Fortan, the story of my life.

    Posted in Books, Community, FDS, FORTRAN, Habits, Happiness, Productivity, Programming | No Comments »

    The clarity of Python vs. the cloud of Perl

    Posted by Kris on 10th March 2008

    I am learning the Python programming language right now, for many reasons. I need to hone in on a language so that I can write up a script in minutes to do pretty much anything that I need. Things ranging from text file processing, web CGI scripting to generate graphs from data, numerical analysis, and so on. This leaves me with a large number of options such as C++, Java, MATLAB, Python, Perl, and others.

    While I am not a programming newbie, my skill level sits somewhere in the moderate area as I have been exposed to many different programming languages at the beginner level. So when I look for programming tutorials, it leaves me somewhere between the beginner books and websites that assume that you barely know how to “download your camera to your PC” and the other side of the spectrum of which the tutorial looks about as exciting as a book of log tables:

    logTables
    (Flickr user quimby)

    That being said, that leaves us moderate programmers who want to learn - stuck at a good and bad part of our learning experience. The part where you need to practice about every day writing real-world scripts over and over and over. So, after many weeks of lagging through with Python and putting off script writing, I attacked my first real Python program. It seems really trivial and would probably be one of the first few homework problems assigned in a programming course - but I will document my learning process nonetheless for the other moderate programmers that are out there.

    Why Python? I chose Python after dabbling in each language and reading way too much information on each one and finally just trying them out for myself. Which language would be able to match my high-level idealistic mind but still be practical enough to have some power and force behind it? Well, take a look at my example program below. I wanted a program that would take in values from a CSV (comma-separated value) file, loop through a template file, and output new text files with the data from the CSV file’s rows in each output file.

    For the more visually oriented:

    pythonrep.png

    I actually had my roommate last summer help me out with a Perl version of this program, and for comparison, here it is:

    #!/usr/bin/perl
    
    if(@ARGV < 2)
    {
    print "Usage: extractData <csv> <template>\n";
    exit;
    }</template></csv>
    
    my ($file, $templateFile) = @ARGV;
    my $lastTest = "";
    my $templateString = `cat $templateFile`;
    open DF, "&lt; $file";
    
    while(<df>)
    {
    my $line = $_;
    next unless($line =~ m/(^IT)|(^\,)/);
    my ($test, undef, undef, $tray, undef, $cabletype) = split /\,/, $line;
    $test = $lastTest if($test eq "");
    $test =~ s/IT//g;</df>
    
    $lastTest = $test;
    
    print "test: $test; tray: $tray.\n";
    
    $test = sprintf("%02d", $test);
    
    (my $toPrint = $templateString) =~ s/TEST/$test/g;
    $toPrint =~ s/TRAY/$tray/g;
    $toPrint =~ s/CABLETYPE/$cabletype/g;
    
    my $outFile = "CAROLFIRE_IT_" . $test . "_Tray_" . $tray . ".fds";
    
    open OF, "&gt; $outFile";
    print OF $toPrint;
    close OF;
    }
    
    close DF;
    

    Then, here is the version that I wrote last night using Python:

    """Module docstring.
    Usage: python fdscsv.py <csv> <template> <output>
    """</output></template></csv>
    
    import csv, sys, os, re
    
    arguments = sys.argv
    input = csv.reader(open(arguments[1],"r"))
    template = open(arguments[2], "r")
    lines = template.readlines()
    counter = 1
    
    for i, j, k in input:
    output = open(arguments[3] + str(counter) + ".fds", "w")
    for line in lines:
    output.write(line.replace("IREP,JREP,KREP",(str(i) + "," + str(j) + "," + str(k))))
    counter += 1
    output.close()
    

    Now, I realize that the function of the scripts are slightly different while the primary CSV functionality that I illustrated above still remains. I am not going for a line-by-line comparison here. I do want you to just look over the code and see which one makes more sense to your mind. For me, the Python is so easy to read and almost natural to understand while the Perl takes some serious brainpower for me to decode.In conclusion, I just wanted to show where I am at in learning the Python language. It really is enjoyable at this point for me when compared to learning Perl, which was just painful for me. So I hope to add to the resounding praise of Python by posting these examples for other programmers who may be stuck in the intermediate phase of their learning and need a little push of motivation to continue on.

    Finally, if you are interested in what the Python code is actually doing, here is my commented version. Thanks for reading.

    """Module docstring.
    Usage: python fdscsv.py <csv> <template> <output>
    """</output></template></csv>
    
    import csv, sys, os, re
    
    # Reads the arguments into a list
    arguments = sys.argv
    
    # Reads in the input csv file using the module csv
    input = csv.reader(open(arguments[1],"r"))
    
    # Reads in the template file
    template = open(arguments[2], "r")
    
    # Splits the template file into lines
    lines = template.readlines()
    
    counter = 1
    
    # Labels the columns for the data read from the csv and loops through the lines in the csv
    for i, j, k in input:
    
    # Opens a new file with the user-input name plus a counter and an fds extension
    output = open(arguments[3] + str(counter) + ".fds", "w")
    
    # Loops through each line in the template file
    for line in lines:
    
    # Replaces strings in the template file with numbers from the csv file
    output.write(line.replace("IREP,JREP,KREP",(str(i) + "," + str(j) + "," + str(k))))
    
    # Increments the counter for the filename
    counter += 1
    
    output.close()
    

    Posted in FDS, Goals, Habits, Productivity, Programming, Python, School | 2 Comments »