Hey there,
It’s Robin from CFD Engine & I’ve been thinking about quick wins recently, particularly how they can boost your confidence when you’re doing something new.
I started thinking about how I could create a quick win for a new OpenFOAM user β a little something to show them that OF might not be as tricky as they first thought & that maybe they could do this after all π
That also got me wondering, what might an AWS quick win look like?
“What’s the least painful way for a newcomer to trial OpenFOAM on AWS?”
I’m still working on the OpenFOAM quick win, but I reckon I’ve got an AWS quick win for you β let’s go…
Meet Cloud9
I used to sell an online course about building your own cloud CFD workflow βThe Beginner’s Guide to OpenFOAM on AWSβ which walked you through a simplified version of the setup I use in my consulting work.
I couldn’t quite distil that course into a quick win, but I did find a way to go from zero to OpenFOAM, on AWS, in less than 10mins π
Meet AWS Cloud9 the “cloud-based integrated development environment” that we’re going to borrow for CFD.
Cloud9 gives us a little slice of compute (with storage) plus a terminal shell, a graphical text editor and a file manager, all accessed via a browser tab.
We can configure it in just a handful of clicks (with no tricky questions) & have it running in less than 5mins.
Once it’s up & running, we can use the built-in terminal to install OpenFOAM (via these 3 quick-start commands). The OF installation takes couple of minutes, but then we’re good to go.
Our very own little AWS instance, running Ubuntu & with OpenFOAM v2206 installed, all in less than 10mins β sounds like a win to me π
When we’ve had enough fun, we can close the browser tab & it will automatically shut down (after 30mins of inactivity).
And when we want to go again, we can resume our session in around a minute. We don’t need to re-install OpenFOAM & everything else (opened files, the tab layout, themes etc) are just as we left them.
Pros
- start an EC2 instance with the click of a button;
- super-simple config;
- automatically turned off after 30mins of inactivity;
- resumable sessions;
- built-in graphical text editor;
- drag & drop file upload;
- easy file download β right-click individual files in the sidebar to download (if you right-click to download a directory, it automatically tars & zips it first);
- built-in image viewer / editor (not sure if you’d use it, but it might be handy) π€·ββοΈ
Cons
- only 8GB storage space as standard (& only 2.7GB free after the OpenFOAM install) β it can be increased, but it’s a not an easy change;
- no ParaView, but you could download your results & use ParaView locally instead;
- limited instance choice β the newest instance types aren’t available via Cloud9, but there are older options with up to 48 cores & 192GB RAM, which is probably overkill for a quick test drive anyway.
Charges
It’s not free β we’ll be charged for the compute & storage while we’re using them. Compute is billed if the environment is running (not while it’s hibernating) & storage is billed whilst the environment is available, i.e. until we delete it (which we can do with a single click). There’s no extra premium for using the resources via Cloud9 though.
Give it a try?
The idea of this quick win was to give an OpenFOAM user a taste of running on AWS, including the ability to run their own cases, & to do it with no special AWS knowledge or training.
I think it hits the mark π€
Maybe I should do a quick walk-though video to show how easy it really is? Or you could just give it a go & let me know how you get on. Either way, drop me a note & tell me what you think.
Until next week, stay safe,