Showing posts with label simulation. Show all posts
Showing posts with label simulation. Show all posts

Computer researcher

Looks like computers are opening up even more areas of chemistry!

Earlier this year I posted about some software that can predict crystal growth conditions.

Now, there's new software coming out that can predict organic chemistry reactions.

Organic chemistry isn't my field, so unlike the crystal software I probably won't be able to justify a purchase to my boss, but I can still think that this is pretty amazing. The researchers spent a good solid ten years putting the sum total of all organic chemistry knowledge from the past 250 years into a database.

Not only can the computer search possible reaction pathways to make whatever compound you want, you can also filter those results. For example, pathways that use only non-toxic ingredients, or pathways with fewer reaction steps.

In one excellent example, the software came up with what they're calling a "one-pot" reaction for an asthma drug, which is normally produced with four separate reaction and separation steps. The suggested one-pot reaction said that they could put all the ingredients in the same flask in a specific order with specific timing—but with no separation steps, which are often complicated and expensive—and get the asthma drug they wanted—so they tried it.

It worked.

This software sounds like it can lead to the truly ideal case that chemical engineers wish for: faster, cheaper, and safer all at the same time. There are a lot of reactions that use dangerous chemicals, because we don't know of alternate reactions to produce the same thing. Sometimes, research eventually reveals an alternate; for an inorganic example, the production of sodium hydroxide used to involve mercury, which is very toxic even in very small amounts. Now, the mercury process is rarely if ever used, because better and safer processes have been found.

Overflowing with math

New toy!

After discussing the options with one of my co-workers, I installed SciPy and all its associated dependencies, because it was free and had more than enough computational power to do what I wanted to play with. I don't know enough about any of the computer-math programs to make a case for work buying me one of the very expensive programs, and I couldn't rationalize buying such a program for myself at home to play with, so open source it is.

My first "project", such as it was, was both somewhat practical and relevant to my work, while still being easy enough for a first project: calculating how long it takes for the flow to reach steady state in a series of tanks with a pump at one end (step change input) and gravity flow all the way through.

Crystal habits

I am fascinated by crystals, particularly by their regularity. They basically consist of a unit cell that repeats over and over again, identically, across the whole span of the crystal. And if the crystal is big enough to see with the naked eye, that's a very large number of unit cells.

Very simple crystals, for example table salt (NaCl), have a tiny unit cell consisting of 4 atoms of Na and 4 atoms of Cl, arranged in alternating rows, a structure that is called face-centred cubic, because on each face of the cube, there's an atom in the centre of the same type as the atoms on the corners of the unit cell.

An interesting quirk of the simple 1:1 ratio cubic crystal structure is that you can define either Na or Cl as the corners of your unit cell, and it'll still be face-centred cubic.

Diamond's structure is also simple: every carbon atom has four links to four other carbon atoms, arranged in a tetrahedral shape around it. Because unit cells are defined as cubic or rectangular shapes, however, the diamond unit cell is less simple, even if the structure itself is simple.

Airplane-induced snow

An airplane made that hole.

Not by just flying through it and swirling the visible cloud out of the way, that makes a different pattern which doesn't last nearly as long.

It turns out that in certain conditions, airplanes can actually induce rain or snow in a localized region of a cloud, and the precipitation is what clears the hole - the water droplets that make up the cloud fall because of the airplane.

Simulated Failure

Simulating normal operation is something that's been done for a while now, ever since computers got powerful enough to do it. Once validated, a model of, say, a stirred tank, will let an engineer consider where two liquids being mixed are not mixing properly, or where fragile solids are likely to be broken because the shear is high, and adjust the design accordingly before the manufacturer ever cuts metal.

I started by talking about fluid dynamics simulation because that and chemical reaction simulation are the two aspects I'm most likely to work with. Other simulations which could affect me but are outside of my field are materials and mechanical related - pipe and tank fractures, for example. The stresses and weak points of a piece of equipment are something I have to trust to a mechanical engineer, but I have to think about it at least a bit, because what's inside those tanks and pipes is sometimes hot, sometimes toxic, sometimes corrosive, or other forms of dangerous and undesirable to have present outside the equipment, and I have to know what kind of safety features and procedures I have to put in place, from sensors to detect a small leak to secondary containment to prevent a catastrophic spill from escaping and doing even more damage.