Introduction to Analyst

Analyst is our advanced tool for model creation. Unlike Designer, which features a visual interface, Analyst models are created by writing commands.

If that sounds complicated, don't worry: the good news is that all Analyst models follow a very similar structure, and here in the Help Center you can find a whole bunch of simulation guides and example models that you can use a starting point for your own work. You can freely use these models and edit them as you require.

In this introductory article, we'll cover just enough to get you up and running with Analyst.

The Interface

The Analyst interface looks as so:

analyst-interface.png

At the top you have the ribbon, which consists of four tabs: Home, Tools, Workspace and Help.

Everything below that is your workspace, which consists of various windows that can be hidden or rearranged as you wish. To hide windows, use the Workspace tab of the ribbon. To move a window, click and drag its title bar.

In this article we'll focus on the main area of the workspace, which is where you write your script.

Comments

The best way to get going is by taking one of our example models as a starting point.

In any of our examples you'll find comments. Comments aren't part of the script itself; instead they're just there to explain to a human reader what's going on. In Analyst any line that begins with a c is a comment. Comments can also appear on the same line as a command, after /*.

c ************************************************************************************* 
c 
c 	Calculated Properties 
c 
c *************************************************************************************
c 
c 	By default, Flex only calculates the minimum required data set, typically this 
c	means only velocities. This is done for memory efficiency. Should other 
c	properties be required (e.g. displacements, stresses, strains, pressure), then 
c	these must be requested by the CALC command.
c 
c *************************************************************************************

calc
	pres acoustic 		 /* calculate acoustic pressure
	disp y 		 /* calculate displacements
	max ydsp none ydmx  		 /* calculate min/max Y-Displacement
	end

Primary Commands and Subcommands

In the example above there is one primary command: calc. The calc (calculate) command is used to instruct OnScale to calculate and store particular properties during the execution of the simulation.

In this case the calc command is followed by three of its possible subcommands: pres (calculate pressure values), disp (calculate displacement) and max.

In this example each of these subcommands has an argument. (In fact max has three arguments: ydsp, none and ydmx.) If we take disp y as an example, this subcommand is instructing OnScale to calculate the y displacement component (and not the x or z components).

The end of the calc primary command is indicated by the word end.

Note: Where a primary command has only a single subcommand, this can occur on the same line as the primary command. In this case the word end is unnecessary.

Command Reference

The comments in our example files should help you to get a good idea of what's going on, but you may not always be able to understand exactly what a particular primary command or subcommand is doing. No problem!

From Analyst, you can right-click any primary command or subcommand and select Show Help for ... This will open up the command in our Command Reference, where you can learn exactly what it does and how it should be used.

The Command Reference also lists all the possible parameters of a command. Parameters and arguments are more or less the same thing. If we go back to our example of calc disp, this has a parameter called component that has three possible values: x, y or z. When we use the command calc disp y, technically speaking we're passing the "argument" y for the "parameter" component.

Flex, Review, Build and Symbol

You can open different types of file in Analyst, and each file type has its own set of primary commands and subcommands that can be used.

The Command Reference is split into four sections, to reflect which commands can be used in which files:

  • Flex Commands lists commands that can be used in files with extension .flxinp. This is the main file type you'll use.
  • Review Commands lists commands that can be used in files with extension .revinp. Review is used for information about snapshot and time history.
  • Build Commands lists commands that can be used in files with extension .bldinp. You'll only need to use Build if you want to use skewed partition grids.
  • Symbol Commands are a little different. Symbol commands can be used in any of the other three file types. Symbol is a programming language that lets you use variables, loops, branching and so on. You don't have to know Symbol to use Analyst, but for advanced users Symbol offers a lot of benefits.

Note: Strictly speaking "Symbol" refers just to those commands listed in the Symbol Command section of the Command Reference. That being said, here at OnScale we sometimes loosely use "Symbol" to refer to anything written in Analyst.

What Next?

We've only covered the absolute basics here, but it should be enough to get started with. If you've not already, browse through our example models, download one or two and take a look through the scripts. You can also find a lot more information about how Analyst works in our Analyst documentation.