Open Modelica, Python, and LaTeX installation on my Mac

After spending nearly a day getting Open Modelica running on my MacBook, I decided to write things down to hopefully help others in the group avoid the problems and ambiguities I encountered. My Mac operating system is OS X 10.11.6 at this time.

At the start of the installation, I had two accounts on my computer: Admin and ray, with admin and regular user privileges, respectively. Following directions on the Open Modelica download page, I downloaded MacPorts, skipping the Xcode installation entirely without any problems so far. I used my own account but made sure MacPorts installed in the root directory. Next,

echo rsync://build.openmodelica.org/macports/ >> /opt/local/etc/macports/sources.conf

which would not work even from the Admin account – permission was denied because the file sources.conf was owned by wheel and so I could not append the path above. To solve this, I enabled my root account, logged into it, and finally was able to execute this command. I then switched to Admin, enabled admin privileges for ray to add that account to the sudo list. I then went back to account ray and did everything from there (not from root as specified on the OpenModelica page). I then

sudo port selfupdate
sudo port install gcc44
sudo port install openmodelica-devel +libraries

which all went well except for some warnings during the gcc installation.

At this point, Modelica was installed as basically a set of libraries – looking in /Applications/MacPorts, no applications were found. So then I went to to the OpenModelica OMEdit page and downloaded from nightly builds/mac/binaries/release the 1.12.0 version .mkpg and installed that. That not only gave me OMEdit.app but also OMNotebook.app, OMShell.app, and Python 2.7 – more on that next. Note that all of the Modelica software above takes about 6-7 GB of space.

To check if things are working, the following should produce a plot of a bouncing ball (note that the location of BouncingBall.mo may be different for you). To start, click on OMShell.app and then enter

loadModel(Modelica)
loadFile(“/opt/openmodelica/share/doc/omc/testmodels/BouncingBall.mo”)
list(BouncingBall)
simulate(BouncingBall, stopTime=3.0)
plot({h})

To test my own ODE model, I first created the file test.mo located on my desktop and containing:

model firstODE “First order initial value problem”
  Real x “State variable”;
initial equation
  x = 2 “Initial condition”;
equation
  der(x) = 1-x;
end firstODE;

and then

cd(“/Users/ray/desktop”)
loadFile(“test.mo”)
simulate(firstODE, startTime=0, stopTime=3)
plot(x)

Note that loadFile() will return a false if there are syntax errors or special characters in the test.mo file.

Python

After adding a 0.5 TB SSD to my laptop I needed to reinstall Python. I’ve used the Enthought distribution in that past because the version of Python that comes with OS X does not have PyLab and other packages we use. Since the previous time I installed it, Enthought seems to have wrapped its Python distribution with a deployment manager environment EDM. This works well for me because I always use Python from the command-line interface. After installation of EDM, I needed to install the packages we use by opening a terminal window and

edm install

to install the edm shell and then

edm install scipy
edm install matplotlib
edm install pyside
edm install networkx

and more. Note that pyside is needed for matplotlib to work because it provides the GUI toolkit Qt necessary to display the plots. To run a python script

edm python myscript.py

and to use python interactively

edm shell
python

LaTeX

I have been using the same distribution of LaTeX for 10 years. Therefore, I’m going to try MacTeX 2018 since it seems to include every package we use (including ChemFig?) and TeXShop as the front end. After downloading and installing it, everything worked perfectly.

Alan Uy passes RAE

Alan on the roof of Team Maryland's 2017 Solar Decathlon house.Alan Uy, a PhD student in our research group, passed the ChBE Department Research Aptitude Exam (RAE) this week, clearing the way for Alan to focus on his thesis research. Alan received his BS and MS in ChE from Maryland; his MS thesis research Systems Engineering-Based Model Development: Application to Predictive Simulation of a Net-zero Home was vital to the success of our 2017 Solar Decathlon house automation system, work that is currently being continued by new MSSE student Akanksha Bhat. Alan’s current PhD research is supported by the NASA Goddard Space Flight Center and combines modeling and reactor development work for Atomic Layer Deposition of thin films for optical telescope applications.

New year, reactor, and material system

Results of the first run of our new ALD reactor producing SnO2 particles and highly nonuniform filmsFar more uniform film was produced after ALD purge period optimizationDuring the first days of 2018, we have been working on a new Atomic Layer Deposition (ALD) reactor system as well as an entirely new material system for our group: tin (IV) oxide (SnO2). Given the novelty of both the reactor and the precursors (ozone and tetrakis(ethylamino) tin), it is not surprising that the first film produced by the reactor showed evidence of gas-phase particle production and high spatial non uniformity (see the left image).

The production of tin oxide particles was key to tracking down the source of our problems – insufficient purge time, as measured by our reactor pressure sensor, resulted in some residual precursor in the reactor chamber after each purge period, leading to gas-phase nucleation and particle growth in the reactor. After doubling the post-Sn and tripling the post-O3 purge periods, a visually uniform and particle-free film was produced (right image).

This work is part of a collaboration with Dr. Vivek Dwivedi of the NASA GSFC, is supported by NASA, and represents part of the PhD thesis research of Hossein Salami and Alan Uy.

SD 2017

Since January of 2016, nearly everyone in our research group has participated as a member of Team Maryland for the 2017 Solar Decathlon, a biennial competition sponsored by the US DoE in which student teams design and build solar-powered homes.

In addition to helping design and construct the electrical, mechanical, and other house engineering subsystems, our group was responsible for developing a highly detailed, physically based house dynamic simulator and most of the home automation systems. Virtual reACT runs every morning and predicts the house states over the day based on local weather forecasts. This ability to forecast future energy needs and generating capability was crucial to the success of our house achieving nearly perfect net-zero electrical power performance during the October Decathlon competition period in Denver, where Team Maryland took second place overall and first in US teams.

Hossein advances to candidacy

This has been a busy semester of thesis and thesis proposal defenses in our group. Most recently, Hossein Salami defended his PhD thesis proposal A mechanistic framework for reaction network analysis of atomic layer deposition processes with application to titania thin-film manufacturing. While shown here working on our new, NASA-sponsored ALD reactor system, Hossein’s work primarily focuses on the theoretical and computational aspects of using invariants (the linear combinations of deposition reaction species that are constant with respect to time) of reaction networks (RN) to determine whether a well-posed and “proper” simulation can be created using that RN. This approach is crucial to the successful formulation of ALD and CVD simulators that incorporate reaction mechanisms and kinetics data from studies that typically focus only on one fragment of the overall deposition process. More information can be found in the two papers Hossein has authored. This research is sponsored by the CBET division of the National Science Foundation.

Two new MS graduates from the group

At the end of the spring 2017 semester, Harika Vakkantula and Alan Uy both successfully defended their Chemical Engineering MS theses. Harika’s thesis Modeling of Thin Films for Self-Cleaning Purposes examined the surface reaction mechanisms responsible for the transition of ALD TiO2 films from superhydrophobic to superhydrophilic under exposure to UV radiation. Her experimental work confirmed this transition for ALD TiO2 deposited using a TDMAT/water precursor system.Alan’s thesis Systems Engineering-Based Model Development: Application to Predictive Simulation of a Net-Zero Home describes his work in creating a numerical simulator that predicts the performance of Team Maryland’s reACT Solar Decathlon house as a function of local weather forecasts and anticipated homeowner energy demands. The model forms the basis of Virtual reACT.

6 December 2017 update: In yesterday’s CHBE department graduate seminar series, the seminar speaker spoke on the design of superomniphobic surfaces. Some of his work on TiO2 surfaces had interesting parallels with Harika’s thesis research – in particular, how the UV radiation-induced hydrophobicity changes can be exploited for sorting and sensing of liquid drops.

Hossein receives award at G.R.A.D. 2017

Hossein Salami, a ChE Ph.D. student in our group, won first place for his presentation “Using reaction network graphs to study the dynamic behavior of chemically reactive systems: Application to chemical vapor deposition processes” at the 2017 Graduate Research Appreciation Day here at the University of Maryland. Hossein’s talk was part of the Energy and Technology session of the event and the 1st place award comes with a $500 travel grant. Hossein’s work focuses of chemical reaction network analysis for ALD and CVD processes and is supported by the the CBET division of the National Science Foundation.

Self-cleaning surfaces

A new area that our research group is exploring has to do with solar-powered, self-cleaning surfaces, such as the external windows of a building. It has been known for some time that semiconductor coatings can be used for photo-catalyzed reactions that are effective in oxidizing organic compounds, thus making the surface self-cleaning. Likewise, some of these semiconductor surfaces have more recently been found to transition from hydrophobic to hydrophilic in the presence of UV light, allowing rainwater to more effectively clean the surface. In our group, MS ChBE student Harika Vakkantula has been studying the surface reconstruction mechanisms of TiO2 films deposited by atomic layer deposition (ALD). She has been using a combination of reaction path analysis to understand the chemical mechanisms at work in the hydrophobic/hydrophilic transition and has been assessing the effectiveness of different ALD processes at producing films that demonstrate this transition.

PhD proposal defense by Aisha

On February 2, Aisha Alobaid defended her PhD thesis proposal on the topic of conversion of solar energy to storable hydrogen and oxygen. At first glance, this seems to be a research area outside of the scope of work normally done by our group, but in reality it is not: thin-film solar-active materials are used for the water splitting process and reaction graph analysis of the aqueous-solution  reactions that take place in this system put it squarely into the domain of what we do. Aisha is pursuing both experimental and computational approaches to designing these processes and anticipates graduating with her PhD in 2018.

Alumni updates

This year ends with good news regarding three of our research group’s recent alumni. First, David Arana-Chavez (PhD 2015) has taken an Assistant Professor position at the Upper Technological Institute of Abasolo, a relatively new university in Guanajuato, Mexico. He is working in the Department of Renewable Energy Engineering, which focuses on biofuel and PV technologies. David has been teaching linear algebra, material and energy balances, and other engineering courses and is working on establishing his research program. Second, Krishnaprasath (KP) Ramakrishnan (MS 2016) has recently accepted a position in the San Francisco Bay area with Vibrant Genomics, a company developing semiconductor-based tools for genomic analysis and the biomedical applications. David and KP both worked in the area of reaction network analysis and are now finding completely new application areas for their research. Finally, Pranay Gupta (ME 2016) has recently taken a solar-energy related position as a Field Performance Engineer for Sunpreme, also located in the Bay area. Congratulations to KP, David, and Pranay on their well-deserved success.