The Autodesk Simulation CFD Scripting language uses elements that are common to many programming languages. The language is based on a series of classes, each with their own properties and methods.
A class is a pre-defined data type that is a “building block” for a Autodesk Simulation CFD analysis. Every class contains properties, which describe certain aspects of the class, as well as methods, which are class operations that either change an object’s internal state or provide information about the state. An object is a specific instance of a class.
An example of a class is BoundaryConditions. Properties that define a boundary condition object are things like the type of condition (velocity, pressure, etc.), and the units. Examples of methods of a boundary condition object are commands to assign the value and to assign a reference temperature:
bc1 = new BoundaryCondition("velocity");
The class is BoundaryCondition, and bc1 is an object (specific instance) of this class. “new BoundaryCondition” is a method that creates a new condition, and Velocity is the value of the Type property.
To then set the value of bc1, we would use the setValue method:
bc1.setValue(5, "in/s");
bc1 is the object, setValue is the method, 5 is the value of the value property (which is the value of the velocity condition), and “in/s” is the value of the units property.
The Autodesk Simulation CFD Scripting class types and their associated properties and methods are listed below. Most of the class, property, and method names are modeled after those used in the Autodesk Simulation CFD User Interface. Familiarity with the UI will make understanding the scripting language much easier.
Here is a description of the naming conventions used throughout the language: