Data Elements, Requests and Variables
General Data Elements
General data elements are elements whose values are stored in property files.
The general data elements group includes:
General Parameters
The general parameter is an Adams View variable whose real value is based on a value stored in a property file data block. The property file must be in the neutral file format of your template-based product. When your template-based product reads the property files, it updates the general parameter variable entity with the appropriate real value stored in the property file. The data block and attribute names in the Create General Parameter dialog box identify the data that is being accessed from the property file.
Adams Car uses a general parameter to model the piston area within a steering system. The steering system includes a data block as follows:
$------------------------------------------------GENERAL_PARAMETER
[GENERAL_PARAMETER]
USAGE = 'rack_piston_area'
SYMMETRY = 'single'
PROPERTY_FILE = 'mdids://acar_shared/steering_assists.tbl/mdi_steer_assist.ste'
DATA_BLOCK = 'STEERING_ASSIST'
ATTRIBUTE_NAME = 'piston_area'
The parameter DATA_BLOCK refers to the sub-block (steering_assist) in which the parameter can be found. The USAGE keyword describes the name of the attribute whose value must be located. The example below shows the data for the piston_area referenced above:
$----------------------------------------------------STEERING_ASSIST
[STEERING_ASSIST]
piston_area <area> = 490.87
In this case, the general parameter variable (rack_piston_area) is set to 490.87.
If your template-based product does not find the specified data blocks in the selected property file, then it issues a warning and the general parameter retains its default value (0.0).
To create or modify a general parameter:
1. From the Build menu, point to General Data Elements, point to Parameter, and then select New/Modify.
3. Select OK.
General Splines
The general spline is a spline whose values are stored in a property file. The property file must be in the neutral file format of your template-based product. This method of creating splines allows great flexibility: you can define the splines in your model depending on the numerical content of the selected property files. When your template-based product reads the property files, it updates the spline entities with the appropriate referenced values stored in the property files. The data that is being accessed from the property file is identified by the data block and data sub-block names in the Create General Spline dialog box. This allows for a very quick and efficient way to modify your data, without manually modifying the data within an Adams spline.
For example, you could store the boost curve characteristics of many different steering systems in separate property files and then test different steering systems by referencing those property files. If your template-based product does not find the specified data blocks in the selected property file, then it issues a warning and the spline retains its default values.
You can also create a spline using the Build -> Data Element -> Spline menus.This spline differs from the general spline in a couple of subtle different ways:
■A data element spline stores its data within the template and does not reference an external data file defined by the neutral file format (TeimOrbit). Therefore, simple changes in data require that you manually manipulate this spline in the Template Builder.
■Because you cannot make variations to the spline data within the standard user environment, you cannot carry out what-if scenarios, which you can easily do with the general spline.
Adams Car uses a general spline to model steering characteristics. The steering subsystem includes a data block as follows:
$----------------------------------------------------GENERAL_SPLINE
[GENERAL_SPLINE]
USAGE = 'steering_assist'
SYMMETRY = 'single'
TYPE = 'two_dimensional'
PROPERTY_FILE = 'mdids://acar_shared/steering_assists.tbl/mdi_steer_assist.ste'
CURVE_NAME = 'steering_assist'
(COMMENTS)
{comment_line}
'Example of a steering assist spline'
Adams The parameter steering_assist then refers to a sub-block of information within your property file. When your product reads the property file, it populates the general spline with the data. The following shows the data block for the steering_assist spline:
$----------------------------------------------------STEERING_ASSIST
[STEERING_ASSIST]
piston_area <area> = 490.87
(XY_DATA)
{tbar_deflection <angle> delta_pressure <MPa>}
-3.00 -4.00
-2.20 -4.00
-1.80 -3.60
-1.50 -3.00
-1.00 -2.00
-0.50 -1.00
0.00 0.00
0.50 1.00
1.00 2.00
1.50 3.00
1.80 3.60
2.20 4.00
3.00 4.00
This mechanism lets you generate and use both 2D and 3D splines with data stored within your database structure by simply selecting the property file that stores the data and defining the data block.
An example a 3D spline data block is shown below:
$--------------------------------------------------------------------WHEEL_LOADS
[WHEEL_LOADS]
(Z_DATA)
{coord_ref}
1.0
2.0
3.0
4.0
5.0
6.0
(XY_DATA)
{ time <sec> fx <newton> fy <newton> fz <newton> tx <Nmm> ty <Nmm> tz <Nmm> }
0.0000 0.00 0.00 0.00 0.00 0.0 0.00
0.0050 0.10 0.00 0.00 0.00 5.1 0.00
0.0100 0.20 0.00 0.00 0.00 10.5 0.00
0.0150 0.30 0.00 0.00 0.00 26.1 0.00
0.0200 1.00 0.00 0.00 0.00 42.1 0.00
0.0250 2.00 0.00 0.00 0.00 62.3 0.00
0.0300 3.00 0.00 0.00 0.00 90.7 0.00
0.0350 4.00 0.00 0.00 0.00 131.5 0.00
0.0400 5.00 0.00 0.00 0.00 608.4 0.00
0.0450 6.00 0.00 0.00 0.00 235.7 0.00
To create or modify a general spline:
1. From the Build menu, point to General Data Elements, point to Spline, and then select New/Modify.
3. Select OK.
General Variables
The general variable is an Adams Solver (data element) variable whose real value is stored in a property file data block. The property file must be in the neutral file format of your template-based product. When your template-based product reads the property files, it updates the general variable entity with the appropriate real value stored in the property file. The data block and attribute names in the Create General Variable dialog box identify the data that is being accessed from the property file.
The mechanism described for the
general parameter is equally applicable to the general variable.
If your template-based product does not find the specified data blocks in the selected property file, then it issues a warning and the general variable function retains its default value (0.0).
To create or modify a general variable:
1. From the Build menu, point to General Data Elements, point to Variable, and then select New/Modify.
3. Select OK.
Parameter Variables
You can use parameter variables to parameterize various elements and entities in your template-based product. There are three types of parameter variables:
■String - Does not contain units information, only a string value.
■Integer - Does not contain units information, only an integer value.
■Real - Can contain both a real value and a units specification.
Regardless of the parameter variable type, you can choose to hide the parameter variable from the standard user. When you designate a parameter variable as hidden, the standard user will not be able to access it using the Modify Parameter Variable dialog box in the Standard Interface.
For the parameter variable of type integer, you can choose to add a Custom Macro command. This supports execution of macro commands with no parameter or with three parameters, for example, subsystem name, activity and error flag. You may have many parameters in the macro, however these should have default values as this feature does not provide an automated way to communicate these parameters with the macro.
Here is an example of a macro that makes use of three parameters:
!
! $subsystem:t=model(car@subsystem@*)
! $active:t=integer:d=1
! $error_variable:t=variable:d=.ACAR.variables.errorFlag
!
!END_OF_PARAMETERS
!
Refer to
Automating Your Work Using Macros to learn more about Adams View macros.
Design Options
You can use Design Options to change various topological options at the subsystem level. In prior versions of Adams Car, you could change various topology by changing activity of a group. With this new functionality, the framework for displaying design options is now available in the subsystem (template). You can explicitly do the following:
■Specify verbose names for the choices associated with integer values
■Associate available parameter variable to the design options (integer parameter variable of type single) so that it gets displayed in the design options dialog box in the Standard Interface.
Set Design Options
When working in Template Builder, you can define design options with choices and values along with dependent parameter variables. When working in Standard Interface, you can select the available choices from the option menu. Learn about the
Interface Modes.
To define design options in the Template Builder:
1. From the Build menu, point to Custom Gui, and then select Design Options.
3. Select OK.
To set design options in the Standard Interface:
1. From the Adjust menu, select Design Options.
2. Press
F1 and then follow the instructions in the dialog box help for
Set Design Options.
3. Select OK.
Requests
You can use the Create Request dialog box to create a request statement and auxiliary variables used by your template-based product. A request statement indicates a set of data you want Adams Solver to output in the request file (.req). You can explicitly do the following:
■Output a set of displacements, velocities, accelerations, or forces with respect to existing markers in your template.
Learn about markers.
■Define the generic request function
■Use the user-written subroutine REQSUB to define nonstandard output. For information on user-written subroutines, see Adams Solver Subroutines.
For information on creating requests, see the
Adams View online help.
Data Elements
Data elements include arrays, curves, splines, matrices, and strings.
For information on data elements, see the
Adams View online helpSystem Elements
System elements let you create general differential and/or algebraic equations.
For information on system elements, see the
Adams View online help