Code

It’s probably not your reflex to think of code as beautiful.

Actually, it’s probably not your reflex to think of code at all.

The magic of using custom software in the design process is that it lets computers do the computey-things that they’re designed for, and allows your brain get back to being creative and clever, which it’s designed for.

What?

Okay, back a step.

One of the myriad challenges of complex design is managing the data. Especially managing connections in the data. Each individual discipline in the design process is complex enough, but managing the regions where they overlap can be complex and stressful.

Sure, the stability looks good, but are you using the current weight estimate data? Oh, and does that weight estimate accurately reflect the last design change request from the client, and did that request lead to appropriate updates in the specification and schedule? And did moving the chiller plant get updated in the weight data? Yes? Good, did was the stability re-run accordingly? Were the compartment visualisations updated and sent to the client?

Managing the dynamics of the design data, particularly when the vessel is being built in parallel with final design is a particularly fraught time, and if there are ways of automating and optimising the process then it leads to a better result for all.

For example a structural design with strength and weight optimised using finite element analysis (FEA), the analysis will be run dozens of times. Automating as much of the import-mesh-apply materials-apply loads-analyse results cycle means that the designer can focus on the main game - optimising the design.

At times like this, code can indeed be a thing of beauty.

Okay, so what do you mean by ‘code’?

At Elan Design when we talk about code, the solutions fall into three rough groups: macros, node-graph systems, and traditional software development.

Macros tend to be smaller scale ways of making your day easier. They generally depend on application-specific languages (such as ANSYS’ APDL, Microsoft’s VBA or even hacking Creo’s trail files) but the field also extends to trickery such as automating the mouse and keyboard of your computer to make repetitive tasks automatic. Macros tend to involve only a few files of code, with few interdependencies.

Tasks like iterative CFD mesh generation, data conversion and more complex spreadsheet algorithms are all good contenders for macro-based automation.

Node graphs are a way of representing the flow of data. Also knows as ‘visual scripting’, they appear in all sorts of places from audio synthesis systems such as Native instruments’ Reaktor to video post-processing tools like DaVinci Resolve’s Fusion subsystem to visualisation systems like Blender’s shader graphs and Unreal Engines’ blueprints system (and now even Unity!). They allow user-defined control of complex systems, which facilitates quick design updates and iteration.

The image on the right shows one of our standard systems for evaluating hull characteristics as the design is being created and modified. This real-time feedback means that the designs require fewer updates and corrections later in the design process. Parameters and geometric information is fed in to the left hand side of the graph, and outputs (geometry, mathematical analyses etc) are at the output stages to the right.

nodeGraph.png

Traditional software generally involves using tools closer to computer science labs than the naval architecture studio. At Elan we lean most heavily on Python, C++ and C#. Each come with their own strengths and frustrations.

Python’s magic is it’s ability to provide glue between systems. This allows us to integrate statistical weight analysis with our in-house stability system, displaying the results simply and neatly in a web page. This system leverages data science tools such as pandas (not those pandas) and Jupyter.

C++ is fast. It’s great for time critical applications (like CFD and FEA), but doesn’t have Python’s wide availability of libraries. It is also used in visualisation tools such as Unreal Engine. C# is used to provide code inside our node graph design tools (there are blocks of custom C# code in the graph above) as well as being used in our visualisation tools like Unity.

These traditional coding languages also allow for handy tracking of changes and revisions to the code using systems like GitHub.

In short, coding means that your brain is freed up a little from the minutiae of managing the ever-expanding complexities of today’s sophisticated design and build challenges, and can focus on adding real value.

It means that you can be confident that the data you’re depending on is current, and that the design team, build team and the client are all on the same page.

And that is a beautiful thing.

Take care,

Nick.

Previous
Previous

Tools of the trade - CAD

Next
Next

Hull design - CFD