HyperGraph 2D 13.0 Tutorials
HyperGraph 2D 13.0 Tutorials
0
HyperGraph 2D Tutorials
altairhyperworks.com
www.altairhyperworks.com
Location
Telephone
Australia
64.9.413.7981
anzsupport@altair.com
Brazil
55.11.3884.0414
br_support@altair.com
Canada
416.447.6463
support@altairengineering.ca
China
86.400.619.6186
support@altair.com.cn
France
33.1.4133.0992
francesupport@altair.com
Germany
49.7031.6208.22
hwsupport@altair.de
India
91.80. 6629.4500
1.800.425.0234 (toll free)
support@india.altair.com
Italy
39.800.905.595
support@altairengineering.it
Japan
81.3.5396.2881
support@altairjp.co.jp
Korea
82.70.4050.9200
support@altair.co.kr
Mexico
55.56.58.68.08
mx-support@altair.com
New Zealand
64.9.413.7981
anzsupport@altair.com
North America
248.614.2425
hwsupport@altair.com
Scandinavia
46.46.460.2828
support@altair.se
United Kingdom
01926.468.600
support@uk.altair.com
In addition, the following countries have resellers for Altair Engineering: Colombia, Czech Republic, Ecuador, Israel, Russia,
Netherlands, Turkey, Poland, Singapore, Vietnam, Indonesia
Official offices with resellers: Canada, China, France, Germany, India, Malaysia, Italy, Japan, Korea, Spain, Taiwan, United
Kingdom, USA
Copyright Altair Engineering Inc. All Rights Reserved for:
HyperMesh 1990-2014; HyperCrash 2001-2014; OptiStruct 1996-2014; RADIOSS1986-2014; HyperView1999-2014;
HyperView Player 2001-2014; HyperStudy 1999-2014; HyperGraph1995-2014; MotionView 1993-2014; MotionSolve 20022014; HyperForm 1998-2014; HyperXtrude 1999-2014; Process Manager 2003-2014; Templex 1990-2014; TextView
1996-2014; MediaView 1999-2014; TableView 2013-2014; BatchMesher 2003-2014; HyperMath 2007-2014;
Manufacturing Solutions 2005-2014; HyperWeld 2009-2014; HyperMold 2009-2014; solidThinking 1993-2014; solidThinking
Inspire 2009-2014; solidThinking Evolve 1993-2014; Durability Director 2009-2014; Suspension Director 2009-2014;
AcuSolve 1997-2014; AcuConsole 2006-2014; SimLab2004-2014 and Virtual Wind Tunnel 2012-2014.
In addition to HyperWorks trademarks noted above, Display Manager, Simulation Manager, Compute Manager, PBS,
PBSWorks, PBS GridWorks, PBS Professional, PBS Analytics, PBS Desktop, PBS Portal, PBS Application Services,
e-BioChem, e-Compute and e-Render are trademarks of ALTAIR ENGINEERING INC.
Altair trademarks are protected under U.S. and international laws and treaties. Copyright 1994-2014. Additionally, Altair software
is protected under patent #6,859,792 and other patents pending. All other marks are the property of their respective owners.
ALTAIR ENGINEERING INC. Proprietary and Confidential. Contains Trade Secret Information. Not for use or disclosure outside of
ALTAIR and its licensed clients. Information contained inHyperWorks shall not be decompiled, disassembled, or unlocked,
reverse translated, reverse engineered, or publicly displayed or publicly performed in any manner. Usage of the software is only as
explicitly permitted in the end user software license agreement.
Copyright notice does not imply publication
.............................................................................................................................................63
Advanced
Curve Manipulation
..............................................................................................................................................................................64
HG-2000: Evaluating
Curve Data
..............................................................................................................................................................................68
HG-2010: Creating
a Plot Macro
More .............................................................................................................................................75
Plotting
..............................................................................................................................................................................76
HG-3000: Working
with Bar Charts
..............................................................................................................................................................................80
HG-3010: Working
with Complex Plots
..............................................................................................................................................................................85
HG-3020: Working
with Polar Plots
.............................................................................................................................................90
Templates
..............................................................................................................................................................................91
HG-4000: Creating
an Export Template
.............................................................................................................................................97
Customization
..............................................................................................................................................................................98
HG-5010: Customizing
the Environment
Altair Engineering
HyperGraph 2D Tutorials
File Location
All files referenced in the HyperGraph tutorials are located in the HyperWorks
installation directory under <install_directory>/tutorials/mv_hv_hg/.
2.
Plotting Basics
HG-1000: Plotting XY Data
HG-1010: Changing Curve Display Attributes
HG-1011: Perform Math on Curves Using the Plot Browser
HG-1020: Modifying Plots
HG-1021: Modifying Plots with the Plot Browser
HG-1030: Referencing and Filtering Curves
HG-1040: AVD Diagram Using Unit Scaling and Plot Browser
More Plotting
HG-3000: Working with Bar Charts
HG-3010: Working with Complex Plots
HG-3020: Working with Polar Plots
Altair Engineering
Templates
HG-4000: Creating an Export Template
Customization
HG-5010: Customizing the Environment
Altair Engineering
Plotting Basics
HG-1000: Plotting XY Data
HG-1010: Changing Curve Display Attributes
HG-1011: Perform Math on Curves Using the Plot Browser
HG-1020: Modifying Plots
HG-1021: Modifying Plots with the Plot Browser
HG-1030: Referencing and Filtering Curves
HG-1040: AVD Diagram Using Unit Scaling and Plot Browser
Altair Engineering
Tools
The Build Plots panel can be accessed one of the following ways:
Click the Build Plots icon,
OR
From the menu bar, select Curves > Build Plots.
This panel allows you to construct multiple curves and plots from a single data file. Curves can be
overlaid in a single window or each curve can be assigned to a new window.
The Advanced Options feature on the Build Plots panel allows you to apply many options at
once to the session during plotting. Curves created in this manner are added to the session in a
new layer.
Altair Engineering
From the Build Plots panel, click Adv. Options to display the Advance Plot Options dialog.
The Multiple File Plotting dialog allows you to select multiple files with intersecting data (for
example, multiple runs of a particular test) and plot the data from all files simultaneously in the
current HyperGraph session.
Altair Engineering
To access the Multiple File Plotting dialog, click the Multiple File Plotting button,
Build Plots panel.
, on the
Altair Engineering
From File menu, select New > Session to clear all contents in the HyperGraph session.
2.
3.
4.
2.
3.
4.
Under Y Request:, press and hold the CTRL key and select REQ/3 Curve 3, REQ/5 Curve 5,
REQ/7 Curve 7, and REQ/9 Curve9.
5.
6.
7.
Altair Engineering
The plots X axis is labeled Time (the X type), while the y axis is labeled Force (the Y type).
The plots title is X (the Y Component name). The curves names are the Y Request names.
2.
3.
4.
Under Y Component:, press the CTRL key and select Y and Z to add them to the already
selected X.
-OrPress the SHIFT key and select Z. This selects Z and everything between X and Z.
-OrLeft click on X and drag the mouse down to Z.
5.
From the Layout: drop-down menu, select One plot per Request.
This option creates one plot for each selected Y request. Each plot contains as many curves
as there are selected Y components. The plots title is the Y Request name. The curves label
is the Y Component name.
6.
Altair Engineering
7.
Step 4: Use Advanced Options to change the curve and plot display
attributes.
While in the Build Plots panel, do the following:
1.
2.
Altair Engineering
3.
To change the page title font, click Page Options on the left side of the dialog.
4.
Click in the Font field on the right side of the dialog. Next, click the Font icon,
the Font dialog. Change the font size to 16.
5.
6.
Click in the Header field on the right side of the dialog to activate the drop-down menu.
Deselect Y-Component.
, to display
Select Horizontal Axis from the left side of the dialog. Click in the Font field on the right side
of the dialog. Next, click the Font icon,
8.
9.
10
Altair Engineering
15. Click the Label Prefix field. Once the cursor is displayed, enter Test 17.
16. Click OK to exit the Advanced Options dialog.
17. From the Build Plots panel, click Apply.
Altair Engineering
11
You can also perform filtering on the curve. For this, retain the curve and plot modifications you
just performed.
18. From the Build Plots panel, select Adv. Options.
19. Click Curve Options on the left side of the dialog.
20. Activate Math Expression.
21. Leave Expression for x as is.
22. Enter the following filter in the Expression for y field: saefilt95(u,v,60,5,3).
23. Click OK.
24. From the Build Plots panel, click Apply.
25. From Define Curves panel,
12
, you will see the filter you applied display in the y vector field:
Altair Engineering
Step 5: Use Multiple File Plotting to plot multiples curves in one plot.
1.
From File menu, select New > Session to clear all contents in the HyperGraph session.
2.
3.
4.
.
.
Altair Engineering
13
6.
You can expand the folders in the File Browser List to display the files contained in each
folder.
You can select files from the File Browser List and click the arrow,
Selected File Set. For this tutorial, we will filter them.
7.
In the File-Filter field, enter *T01 and press ENTER. The following files are displayed:
8.
While holding the CTRL button, select the first eight files listed under File Browser List and
click the right-facing arrow, , to move them to the Selected File Set.
14
Altair Engineering
9.
Under Curve Name, leave Prefix activated and select Directory Level 2 from the drop-down
menu.
Altair Engineering
15
16. You can also view the curve Label Prefix and Label information in the Plot Browser. These
fields were edited using the Advanced Options dialog in Step 4.
16
Altair Engineering
Tools
The Headers/Footers panel can be accessed in one of the following ways:
Click the Headers/Footers panel icon
in the toolbar
Or
From the menu bar select Annotations > Headers/Footers
The Headers/Footers panel allows you to add headers and footers to your plots, specify font
style and color, position the titles, and turn them on and off.
The Curve Attributes panel can be accessed in one of the following ways:
Click the Curve Attributes panel icon
in the toolbar
Or
From the menu bar select Curves > Curve Attributes
This panel allows you to change curve attributes such as line style, color, and weight as well as
symbol style and color.
Altair Engineering
17
18
Altair Engineering
The Apply Style dialog allows you to quickly apply a plot windows attributes across all plot
windows on the current page, or on all pages in the plot.
2.
2.
3.
From the Header tab, replace the name REQ/3 curve 3 with REQ/3 force and press ENTER
to apply the change.
4.
Altair Engineering
19
5.
2.
3.
From the Line Attributes tab, change the thickness of the curves.
2.
3.
Step 5: Apply the window and curve display attributes of window 1 to the
other plot windows on page 2.
1.
In window 1, right-click and select HG ApplyStyle from the pop-up menu to open the
Apply Style dialog.
2.
3.
Activate only the attribute options Plot, Header, and Curves. Deactivate all other options.
4.
Click OK to apply the active attributes to the other plot windows on page 2.
Step 6: Create the note "Max force is {Y} at time {X}" and attach it to a
curve in window 1, on page 2.
1.
Activate window 1.
2.
3.
4.
From the Text tab, replace Note1 with Max force is.
5.
Under the Text window box, click {Y} to add the Templex string {y} to the note.
6.
20
Altair Engineering
8.
From the Attach to tab, select the option Curve to add the note to a curve.
Note: The note automatically attaches to a data point on curve 1 (the X curve). In the Notes
panel, the Curve and Point to which the note is attached is called out. The notes {X} and
{Y} Templex statements are updated to reflect the data points X and Y values.
9.
Click points on any of the curves in window 1 to update the location/curve to which the note
is attached.
Note: The {X} and {Y} values are updated automatically.
11. With Note1 highlighted in the Notes list, turn off this note by deactivating the Note box.
Activate window 3.
2.
Add a note.
3.
4.
5.
6.
Click the Next Curve button until the note is attached to curve 2 (curve Y).
Altair Engineering
21
Tools
The HyperGraph 2D Plot Browser resides on a tab in the Tab Area sidebar and allows you to view
the HyperGraph 2D plot structure.
The Plot Browser can be turned on or off using the View > Browsers > HyperGraph 2D > Plot
menu options. A check mark indicates that the HyperGraph 2D Plot Browser is activated for display
in the Tab Area.
You can use the Plot Browser tools to search, display and edit entities and their properties within
the current session.
From the Define Curves panel, you can edit existing curves and create new ones. To edit a
curve, it must first be selected either from the curve list or picked from the window.
22
Altair Engineering
The X,Y, U, and V vectors are displayed at the top of the Define Curves panel. The data sources
for these vectors are displayed in the text fields. Click the radio button for a vector or click in the
corresponding text box to select that vector for editing. In addition to the traditional X and Y
vectors, you can perform math on curves prior to plotting your data with the support of u and v
vectors. As a result, only one curve is generated in the session, whereas in the older versions of
HyperGraph, this could not be done without an initial curve.
To use math as a data source, from the Define Curves panel, select Source > Math.
Exercise:
Step 1: Open Session File demo_browser.mvw.
1.
2.
Step 2: Use the Define Curves panel to apply an SAE filter to a curve.
1.
2.
3.
4.
5.
Click Apply.
6.
7.
8.
In the y= field, enter v. This applies the v vector attributes to the y vector.
9.
Click Apply.
Altair Engineering
23
12. From the Functions dialog, select saefilt95 and click OK.
13. The saefilt95 function takes six arguments: vector1, vector2, scalar1, scalar2,
scalar3, scalar4.
14. Enter the following text in the function: saefilt95(u,v,60,20,3) and click Apply.
24
Altair Engineering
15. The result is a corrupt curve. This is because the function expects the time to be in seconds,
and our curve is in milliseconds.
Altair Engineering
25
16. To correct this, you must apply the time vector by 0.001. Enter the following in the y= field:
saefilt95(u*0.001,v,60,20,3).
The result is a properly filtered curve:
Step 3: Apply the math performed in Step 2 to all other curves in the
session via the Plot Browser.
In this step, you will apply the filter defined in Step 2 to all curves in the session using the Plot
Browser.
1.
From the Define Curves panel, highlight the y vector filter you added in step 1 and press
CTRL+C to copy it.
2.
From the Plot Browser, select the Curves icon from the top of the browser. This filters the
session information so that only the curve information is displayed in the Plot Browser.
3.
Expand the folders for page 1 (p1: Angular Acceleration), window 1 (w1:XY Plot) and
Curve by clicking the plus button next to each folder.
26
Altair Engineering
4.
6.
Altair Engineering
27
7.
Notice that all the curves in the graphics area disappear, except for the curve we have
already filtered on the Define Curves panel.
8.
Click in the Expression field and paste the filter you copied from the Define Curves panel and
press ENTER.
All curves in the session now contain the same filter and math.
9.
28
It is not required, but you can also apply math to the x vector. Similar to the steps above,
right-click on the x vector from the Plot Browser and select Select All to select all x vectors in
the session.
Altair Engineering
Altair Engineering
29
Tools
The Axes panel can be accessed one of the following ways:
Click the Axes icon
Or
From the menu bar select Annotations > Axes
This panel allows you to add multiple axes to plots. Also, axis attributes such as labels, color, and
scaling can be modified.
To access Convert Units tool, right-click on the plot axis and select Convert Units.
The Convert Units tool allows you to convert the current unit of measure of a horizontal or
vertical axis to another unit of measure. All curves associated with the axis are scaled accordingly
and the axis label is updated to reflect the new unit of measure.
The Coordinate Info panel can be accessed one of the following ways:
Click the Coordinate Info icon
Or
From the menu bar select Curves > Coordinate Info
30
Altair Engineering
This panel allows you to retrieve individual point data on any curve in the active window. When a
point is selected, its data is displayed in the panel.
To access TextView, use the Select Application menu and click TextView
The text editor window allows you to view, edit, and save text files, conduct text searches,
change text attributes, and evaluate Templex. With Templex, you can obtain curve data from the
plot window and display the results in text format in the text window
The Modify Curves panel can be accessed in one of the following ways:
Click the Modify Curves icon
Or
From the menu bar select Curves > Modify Curves.
The Modify Curves panel enables you to modify curve data pertaining to a plot. Curves can be
deleted, trimmed, bridged, or hidden within a specified range and orientation.
The Scales Offset and Axis Assignments panel can be accessed in one of the following ways:
Click the Scales Offset and Axis Assignments icon
Or
From the menu bar select Curves > Scales Offsets and Axis Assignments.
Curve scaling, offsets, and axis assignments can be applied to multiple curves using this panel.
Altair Engineering
31
2.
Step 2: Using the Convert Axis Units tool to scale the Y axis.
1.
2.
Right-click on the windows vertical axis and select Convert Units from the pop-up menu.
The current selection in the Convert Axis Units dialog defaults to Time. This is because the
unit converter did not recognize the Y axis unit.
3.
4.
5.
Open the unit converter again for the same Y axis. Force is now selected as the tool
recognizes the axis unit of measure.
6.
Above the Axes list, select Vertical from the drop-down menu.
3.
From the Text tab, change Force (kN) to Force (kiloNewtons) and press ENTER to apply
the change.
2.
32
Altair Engineering
3.
Click Add.
4.
Verify that the choice under the selection for Datum is Horizontal.
5.
6.
7.
For Position, enter the expression sin(90) +100-cos(0) and press ENTER.
8.
Click the Line Attributes tab and select a different color for the line.
2.
3.
.
. Press this button.
5.
6.
7.
8.
Under Action, click Trim to remove the data outside of the specified range for the selected
curves.
Altair Engineering
33
2.
3.
4.
5.
Create a curve for X type: Time, Y type: Force, Y Request: REQ/3 Curve3, and Y
Component: X.
6.
Create a second curve in the same plot window for X type: Time, Y type: Displacement, Y
Request: REQ/33 Curve33, and Y Component: X.
7.
8.
From the drop-down menu above the Axis list select Vertical.
9.
Click Add to create a secondary vertical axis on the plot windows right side.
An axis with the name Y1 is created and its name is highlighted (active) in the Axis list.
10. In the Axis text field above the Axis list, rename the Y1 axis to disp and press ENTER.
11. On the Text tab, rename the Y1 axis label to Comp x disp and press ENTER.
12. Go to the Scales, Offsets, and Axis Assignments panel,
13. Verify the curve REQ/33 Curve 33-X
is highlighted.
14. Under Axis assignments, click on the Y: drop down, select disp and click Apply.
The secondary vertical axis is assigned to the curve REQ/33 Curve33-x.
15. Click Fit
2.
34
Altair Engineering
3.
4.
6.
Altair Engineering
35
Axis fonts
Line style
Color
36
Altair Engineering
Tools
The HyperGraph 2D Plot Browser resides on a tab in the Tab Area sidebar and allows you to view
the HyperGraph 2D plot structure.
The Plot Browser can be turned on or off using the View > Browsers > HyperGraph 2D > Plot
menu options. A check mark indicates that the HyperGraph 2D Plot Browser is activated for display
in the Tab Area.
You can use the Plot Browser tools to search, display and edit entities and their properties within
the current session.
2.
Altair Engineering
37
These icons allow you to filter the data that is displayed in the Plot browser. For example, by
clicking the Headers/Footers icon, only the header and footer information for each curve in
your session is displayed in the browser.
2.
Expand the folders for page 1 (p1: Angular Acceleration), window 1 (w1:XY Plot) and
Header by clicking the plus button next to each folder.
3.
38
Altair Engineering
This action selects all the headers for each curve listed in the plot browser. By doing this, you
can modify a header attribute only once, but it will be applied to all headers.
4.
From the Properties Table at the bottom of the Plot Browser, select the font icon next to
Primary Font Settings.
Altair Engineering
39
5.
Step 3: Modify the legend font size and change the legend position.
1.
These icons allow you to filter the data that is displayed in the Plot Browser. For example, by
clicking the Legends icon, only the legend information for each curve in your session is
displayed in the browser.
2.
Expand the folders for page 1 (p1: Angular Acceleration), window 1 (w1:XY Plot) and
Legends by clicking the plus button next to each folder.
3.
40
Altair Engineering
This action selects all legends for each curve listed in the plot browser. By doing this, you can
modify a legend attribute only once, but it will be applied to all curve legends.
4.
From the Properties Table at the bottom of the Plot Browser, select the font icon next to
Font Settings.
6.
7.
Altair Engineering
41
These icons allow you to filter the data that is displayed in the Plot Browser. For example, by
clicking the Axes icon, only the axes information for each curve in your session is displayed in
the browser.
2.
Expand the folders for page 1 (p1: Angular Acceleration), window 1 (w1:XY Plot) and
HorizontalAxis by clicking the plus button next to each folder.
3.
From the HorizontalAxis folder, right-click on Primary and select Select All.
This action selects all horizontal axes for each curve listed in the plot browser. By doing this,
you can modify a horizontal axis attribute only once, but it will be applied to all horizontal
axes.
IMAGE
4.
From the Properties Table at the bottom of the Plot Browser, select the font icon next to
Font Settings.
The Font Selector dialog is displayed.
5.
6.
From the filter icons at the top of the Plot Browser, select the Curves icon,
2.
Expand the folders for page 1 (p1: Angular Acceleration), window 1 (w1:XY Plot) and
Curve by clicking the plus button next to each folder.
42
Altair Engineering
3.
Right-click on the curve name c1:50th% Hybrid 3 - LOWER TORSO -Res ang and select
Select All.
All curve names in the Plot Browser are selected.
The curve names contain the request and component information.
From the Properties Table, click the Label drop-down menu and deselect the Y Request
option.
The curve names shown in the graphics area now only contain the Y Component name.
5.
6.
Altair Engineering
43
Keep the Curves icon selected at the top of the Plot Browser.
2.
3.
4.
44
Altair Engineering
HyperGraph searches for all the curve names that contain a resultant and display only those in
the Plot Browser.
5.
Right-click on the first curve listed in the Plot Browser and select Select All.
6.
Delete the filter you just added by clicking the Delete Filter icon,
Altair Engineering
45
The Plot Browser displays all the other curve names that contain something other than a
resultant.
46
Altair Engineering
7.
8.
From the Properties Table, select the Line Style drop-down menu and select the dashed line
style.
Altair Engineering
47
The line style is changed to a dashed line style for all curves with component in the curve
name. The curve name that contains the resultant remains a solid line.
9.
To change the line color of only the resultant curve, click the Select Reverse icon again,
to deselect the component curves from the Plot Browser and select the resultant curve.
10. From the Properties Table, select the Line Color color square and select the color black from
the color palette.
48
Altair Engineering
Keep the Curves icon selected at the top of the Plot Browser.
2.
3.
5.
The Plot Browser displays only the curve names with resultant in the name.
5.
Right-click on the first curve name listed in the Plot Browser and select Select All to select all
the resultant curves in the Plot Browser.
6.
Again, right-click on the first curve listed in the Plot Browser and select Single Curve Math >
Max Note.
Altair Engineering
49
This adds a note to the maximum value of each curve in the session.
Next, you will use the Notes panel to modify the note.
7.
8.
In the Text tab, change Max:{Y} to this: Max of {label} = {Y} and click Apply.
The note now displays the label information.
9.
You can further edit the note display by added quotes around {label}, like this: Max of
"{label}" = {Y}. Click Apply.
10. Edit the note one more time by adding the time to it, like this:
50
Altair Engineering
Next, you will apply the note text to all the curves in the session using the Plot Browser.
11. From the Notes panel, highlight the note text and press CTRL+C to copy the text.
12. Click the Notes icon on the Plot Browser.
13. Right-click on Note 1 and select Select All to select all notes in the session.
14. From the Properties Table, click in the Text field.
15. Notice the rectangular button that appears:
16. Press CTRL+V to insert the text you copied from the Notes panel and click OK.
All max notes now have the same text string applied to them.
17. Click the Font Settings font icon and change the note font size to 12.
All notes in the session are displayed with the same note attributes.
Altair Engineering
51
Tools
The Define Curves panel can be accessed in one of the following ways:
Click on the Define Curves icon
Or
From the menu bar select Curves > Define Curves.
This panel allows you to edit existing curves and create new ones. The Define Curves panel also
provides access to the program's curve calculator.
is page 2
w3
is window 3
c4
is curve 4
is the vector
52
Altair Engineering
for y = input
field.
Select a curve vector reference from the Curves dialog, which is accessed from the Define
Curves panel.
2.
2.
3.
Change the name of the new curve from Curve 1 to SAE J211/1 FILTER in the text box over
the curve list.
4.
5.
6.
Hold the SHIFT key and click on the curve in the plot window.
The x = curve reference is p1w1c1.x.
7.
Click the y = field, and click Filter from the panel menu to display the Filter dialog.
8.
Select the filter class SAE J211/1 from the Filter Class drop-down menu.
9.
Select Filter Class: 60, Padding: Mirror padding, and Direction: Fwd-Back.
10. Click OK to complete the selection and close the Filter dialog.
Altair Engineering
53
11. Hold down the SHIFT + CTRL keys, then select the existing curve.
12. The x vector curve reference is entered in the saefilt95 function.
13. Hold down the SHIFT key and select the curve again.
Note: the curve's y vector is referenced in the saefilt95 function. The y = field should read:
saefilt95(p1w1c1.x,p1w1c1.y,60,1,3).
14. Click Apply to create the filtered curve.
54
Altair Engineering
Tools
The Build Plots panel can be accessed one of the following ways:
Click the Build Plots icon,
OR
From the menu bar select Curves > Build Plots.
This panel allows you to construct multiple curves and plots from a single data file. Curves can be
overlaid in a single window or each curve can be assigned to a new window.
The Plot Browser resides on a tab in the Tab Area sidebar and allows you to view the HyperGraph
2D plot structure. The Plot Browser tools allow you to search, display and edit entities and their
properties within the current session. The plot structure is viewed as a flat, listed tree structure
within the browser. However, if the plot has a hierarchy, then the Plot Browser accommodates
this hierarchical structure.
From the Plot Browser, you can select entities one at a time or several simultaneously using
common selection techniques. You can also use the browser's context-sensitive menus to select
entities. Using the Plot Browser, you can perform many of the operations available in the
HyperGraph 2D panels, thus allowing you to modify your plot and curve properties in one location.
Altair Engineering
55
2.
If activated, click Reset Units to clear any unit associations. If Reset Units is grayed out,
you don't need to do anything.
3.
4.
5.
56
From the Options dialog, make sure Enable Unit Scaling and Show Units Dialog are
activated.
Altair Engineering
From File menu, select New > Session to clear all contents in the HyperGraph session.
2.
3.
4.
2.
3.
4.
From the Y Request: column, press and hold the CTRL key and select Nodal Point 2500001
and Nodal Point 2500002.
5.
6.
7.
Altair Engineering
57
8.
From the Units Profile dialog, select the C radio button and click OK.
This sets the Length, Time and Mass units for the file to millimeter, milliseconds, and
kilograms, respectively.
9.
58
Altair Engineering
2.
Expand the folders for page 1 (p1: Node Data), window 1 (w1:XY Plot) and VerticalAxis by
clicking the plus button next to each folder.
3.
The following axes are listed in the VerticalAxis folder: Primary, Y1 and Y2.
4.
Altair Engineering
59
5.
From the Properties Table, located in the bottom portion of the Plot Browser, click the color
palette next to Color and select black.
6.
7.
From the Properties Table, click the color palette next to Color and select red.
8.
Next, you will rename the axes using the Plot Browser.
9.
From the Plot Browser and VerticalAxis folder, select the Primary axis.
10. From the Properties Table, click the Name field and enter the name Displacement.
11. Repeat steps 9 and 10 for the Y1 and Y2 axes. Rename them Velocity and Acceleration,
respectively.
The new vertical axes names for Primary, Y1 and Y2 are shown below:
60
Altair Engineering
2.
Expand the folders for page 1 (p1: Node Data), window 1 (w1:XY Plot) and Curve by clicking
the plus button next to each folder.
3.
Select the two Displacement curves from the list for nodal points 2500001 and 2500002
4.
From the Properties Table, next to Line Color, click the color palette and select black.
This changes the color of those two curves to black.
5.
From the same expanded Curves folder, select the X Velocity curves.
6.
7.
Select the X Acceleration curves and change their line color to blue.
8.
From the Plot window, right-click on the horizontal axis to display the following context menu:
9.
Select Convert Units and change the unit type from milliseconds to seconds (s).
10. From the Plot window, right-click in the vertical axis and select Convert Units. Change the
distance from millimeters to meters.
Altair Engineering
61
11. Repeat step 8, but for the right-side Velocity axis. Change the speed from millimeters/
milliseconds to mph.
12. You can also change the unit type for a curve by right-clicking on the curve and selecting
Enable/Change Curve Unit.
The Enable/Change Curve Unit dialog is displayed.
13. From the YVector, select the right-most drop-down menu and change the unit from millimeter/
millisecond to kph.
14. Click OK.
The final plot window is shown below:
62
Altair Engineering
Altair Engineering
63
Tools
The Define Curves panel can be accessed in one of the following ways:
Click the Define Curves icon
Or
From the menu bar select Curves > Define Curves.
This panel allows you to edit existing curves and create new ones. The Define Curves panel also
provides access to the program's curve calculator.
is page 2
w3
is window 3
c4
is curve 4
is the vector
64
Altair Engineering
SHIFT and pick the curve to get the curve x vector reference
SHIFT + CTRL and pick the curve to get the curve y vector
reference
for y =
input field
SHIFT and pick the curve to get the curve y vector reference
SHIFT + CTRL and pick the curve to get the curve x vector
reference
Select a curve vector reference from the Curves dialog, which is accessed from the Define
Curves panel.
Freeze Option
The Freeze option is available when a vectors source is Math. This option allows you to break the
association of the dependent curve(s) from their parent curve, which allows modifications to the
parent curve without updating the dependent curve(s).
2.
2.
Altair Engineering
65
3.
The Curve list displays the names of the four curves in window 3.
4.
5.
6.
7.
Hold the SHIFT key and pick the dark red curve (Req/5 Curve 5).
The x = curve reference is p2w3c2.x. This defines the page 2, window 3, curve 2, x vector.
8.
9.
With the x = field still active, hold the SHIFT + CTRL keys and pick the same curve.
The x = curve reference is p2w3c2.y. This defines the page 2, window 3, curve 2, y vector.
10. From the curve list, select Curve1 and click Cut.
11. Return to the pages original layout by clicking
66
Altair Engineering
Step 3: Create a new curve with a math expression for its y vector.
1.
2.
3.
4.
5.
6.
7.
8.
9.
Hold the SHIFT key and select any other curve in window 3.
Notice the y = field now has two y vectors separated by the + sign.
Altair Engineering
67
Tools
The Plot Macro panel can be accessed in one of the following ways:
Click the Plot Macros icon
Or
From the menu bar select Curves > Plot Macros
This panel allows you to create macros that produce curves and notes for plots. Plot macros can
be used to capture and replay frequently used curve operations such as adding two curves
together and filtering curves.
Define the parameters (variables of type curve or scalar) needed to create the curve.
2.
Plot macros created from the Plot Macros panel are saved to the session file.
68
Altair Engineering
From the menu bar select File > Load > Preference File.
2.
Select the Vehicle Safety Tools preference file and then click Load.
The vehicle safety tools (VST) are a collection of over 200 macros, Templex functions, and
external functions used by vehicle safety engineers. On appending the VST file, six new menus
that contain the macros and functions are displayed on the menu bar: Math, Filter, Units, Injury,
Misc, and Transforms.
Selecting a tool (macro) from one of these menus takes you to the Plot Macros panel.
Altair Engineering
69
2.
Click Add to create a new macro and open the Edit Plot Macro dialog.
3.
4.
In the Parameter: field, replace the name Parameter1 with raw data curve and then press
ENTER.
5.
In the Varname: field, replace the name p_1 with curve and press ENTER.
The variable name references the parameter in the macro's definition.
6.
70
Altair Engineering
2.
In the Parameter: field, replace the name Parameter2 with SAE J211/1 filter class.
3.
4.
2.
3.
4.
2.
3.
4.
2.
3.
4.
Altair Engineering
71
2.
2.
3.
4.
5.
6.
7.
8.
9.
72
Altair Engineering
Altair Engineering
73
From the menu bar select File > Open > Session and select the file
<installation_directory>/tutorials/mv_hv_hg/plotting/saefilter.mvw.
Even though a new session file is opened, the SAE J211/1 filter macro remains in the
session until HyperGraph is closed.
2.
3.
4.
In the Parameters section of the Plot Macros panel, click the raw data curve field.
5.
Hold the SHIFT key and select the curve in the plot window.
p1w1c1 is displayed in the raw data curve field.
6.
7.
8.
9.
Verify the option Layout: Place new curves in original plots is active.
74
Altair Engineering
More Plotting
HG-3000: Working with Bar Charts
HG-3010: Working with Complex Plots
HG-3020: Working with Polar Plots
Altair Engineering
75
Tools
When the plot type is set to Bar Charts (
), the Define Curves panel allows you to add and
edit bar charts in the active plot window. It can be accessed one of the following ways.
Click on the Define Curves panel button
on the toolbar
Or
From the menu bar select Curves > Define Curves
Bar charts are comprised of data and categories. Data can be entered as values, read from an
external file, or defined as a mathematical expression.
From the menu bar select File > New > Session to clear the contents of the current session.
2.
3.
4.
In the Series field above the bar chart list, rename Curve 1 to Nodal Point 1 and press
ENTER.
6.
76
Altair Engineering
7.
8.
In the panels center, under the column Nodal Point 1, type these three values:
Index 1:
563.35
Index 2:
567.22
Index 3:
423.51
Step 2: Create a bar chart by importing values from the data file
nodal_values.dat.
1.
2.
3.
4.
Click the file browser next to File: and open the file <installation_directory>/tutorial/
mv_hv_hg/plotting/nodal_values.dat.
5.
6.
7.
8.
Altair Engineering
77
From menu bar select File > Import > Session and open the session file bar_chart.mvw.
A second page containing an XY Plot window with three XY data curves is added to the
session and is currently displayed.
2.
3.
4.
5.
6.
7.
78
Altair Engineering
In the Categories column, click One, rename it x disp, and click Apply to update the bar
charts label.
2.
3.
4.
Altair Engineering
79
Tools
The Build Plots panel can be accessed in one of the following ways:
Click the Build Plots icon
Or
From the menu bar select Curves > Build Plots
The Build Plots panel constructs multiple curves and plots from a single data file. Curves can be
overlaid in a single window or each curve can be assigned to a new window. Individual curves are
edited using the Define Curves panel.
The Define Curves panel can be accessed in one of the following ways:
Click the Define Curves panel button
Or
From the menu bar select Curves > Define Curves
Existing curves can be edited individually and new curves can be added to the current plot using
the Define Curves panel. The Define Curves panel also provides access to the program's curve
calculator.
80
Altair Engineering
From the menu bar select File > New > Session to clear the contents of the session.
2.
3.
4.
5.
6.
7.
8.
9.
Altair Engineering
81
Step 2: Apply the Inverse Fast Fourier Transform (ifft) math function to the
complex data curve.
1.
2.
Set the plot type for the window on the right side to XY Plot.
4.
5.
6.
7.
8.
9.
82
Altair Engineering
2.
3.
4.
5.
6.
Step 4: Subtract the Subcase two curve from the Subcase one curve.
1.
2.
3.
4.
5.
Altair Engineering
83
6.
7.
8.
9.
84
Altair Engineering
Tools
The Build Plots panel can be accessed in one of the following ways:
Click the Build Plots button,
Or
From the menu bar select Curves > Build Plots.
The Build Plots panel constructs multiple curves and plots from a single data file. Curves can be
overlaid in a single window or each curve can be assigned to a new window. Individual curves are
edited using the Define Curves panel.
The Define Curves panel can be accessed in one of the following ways:
Click the Define Curves button,
Or
From the menu bar select Curves > Define Curves
Existing curves can be edited individually and new curves can be added to the current plot using
the Define Curves panel. The Define Curves panel also provides access to the program's curve
calculator.
Altair Engineering
85
From the menu bar select File > New > Session to clear the contents of the session.
2.
3.
4.
Use the file browser button to open the file modal_participation.f06 located in tutorials
\mv_hv_hg\plotting.
5.
6.
7.
8.
9.
86
Altair Engineering
11. Access the Frequency dialog by clicking the listed frequency value in the bottom left region
of the plot area.
12. Select the 128.0Hz frequency and click OK.
The vectors are plotted at 128Hz frequency.
2.
3.
Change the plot type for the new window to Polar Plot.
4.
5.
Add a new polar plot curve named Curve 1 by selecting Add R/I.
6.
Rename Curve 1 to Summation by typing the new name in the Curve: field and pressing the
ENTER key.
7.
8.
9.
Select the Real = radio button and then select Math as the Source.
Altair Engineering
87
88
Altair Engineering
16. Change the Type: field to Phase vs Mag. Notice how a Phase vs Magnitude curve for all
frequencies is shown as a line connecting the tips of the vectors at different frequencies.
Notice how the summation of vectors is updated in the animation for each frequency value in
the list.
Altair Engineering
89
Templates
HG-4000: Creating an Export Template
90
Altair Engineering
Tools
Export Template: is a file that contains instructions for exporting curve data into files. The
instructions contained in an Export Template file are in an uncompiled type of programming
language called Export. An Export Template tells the program in which format the data should be
written into the file.
Templex and Export Template Language Statements
The language of Export Templates follows a mixture of Templex commands plus some additional
special statements. For the export of curves only a few statements are needed:
Templex Commands
indexofmin(i)
numpts(x)
table()
for endloop
Loop
if else endif
Logics
New line
curvex(i)
X vector of curve i
curvey(i)
Y vector of curve i
curvelabel(i)
list
margins(0,30)
Length of a line
numcurves()
Altair Engineering
91
Go to <installation directory>\hw\prefinc.
2.
Open preference_plot.mvw and add the following command that registers an export template
with a session.
*BeginDefaults()
*BeginPlotDefaults()
*AddExportFormat(par1,/homes/.../_madymo_export.tpl,par2)
*EndPlotDefaults()
*EndDefaults()
92
Altair Engineering
{
Row_1="!vehicle acceleration";
nc = numcurves();
lc = nc - 1
x = curvex(i);
y = curvey(i);
t = numpts(x);
if (!numpts(x))
else
Row_1; cr();
t, %5i; cr();
table(x, y, "%10.6f %11.6f", 0, t - 1); Output Line 3 to t-1 with the table
command
endif
if (i != lc)
cr();
endif
endloop
}
Altair Engineering
93
2.
3.
4.
5.
94
Altair Engineering
2.
3.
4.
5.
Click Apply.
Plot data from the specified pages are exported to the file.
Altair Engineering
95
RESULT:
The below data file is created after exporting curves in this Madymo format:
!vehicle acceleration
151
0.000000
13.591910
1.000000
12.144580
2.000000
10.850770
3.000000
10.180930
4.000000
9.921851
5.000000
9.995111
6.000000
10.342690
7.000000
11.209030
...
...
147.000000
132.563400
148.000000
130.487300
149.000000
129.073800
150.000000
127.332800
96
Altair Engineering
Customization
HG-5010: Customizing the Environment
Altair Engineering
97
Tools
The Preference File:
A preference file is a script file that is read each time the program is started. It specifies default
user settings such as the order in which colors are assigned, the default printer, default page
layout, the auto save interval, and so on. A standard preference file can be created in the
program installation directory which is executed every time a license is activated. An additional
preference file can be created in your working directory that contains personal settings that either
overwrite the standard preference file or are added to the existing settings in the standard
preference file.
The HyperWorks installation contains two preference files located under $ALTAIR_HOME/hw:
All HyperWorks desktop products, except HyperStudy: preferences.mvw
HyperStudy only: preferences_hst.mvw
Seven include preference files are contained in the installation. These include preference files
must be included in the main preference file, as they cannot be used as independent preference
files. They are located under $ALTAIR_HOME/hw/prefinc.
Organization of the Preference File
The following describes the standard structure of the preferences file, containing five principal
blocks.
*BeginDefaults()
*EndDefefaults()
*BeginDefinitions()
*EndDefinitions()
*BeginStatsTemplates()
*EndStatsTemplates()
*BeginPlotMacros()
*EndPlotMacros()
*BeginTemplexFunctions()
*EndTemplexFunctions()
The *BeginDefaults() block is unique to a preference file while the *BeginDefintions(),
*BeginStatsTemplates(), *BeginPlotMacros(), and *BeginTemplexFunctions() blocks are the
same as those found in script files.
98
Altair Engineering
Altair Engineering
99
TextEditor defaults
TextEditor preferences including text and background color and font settings are specified in the
text editor defaults block. The block is delimited by these statements:
*BeginTextEditorDefaults()
*EndTextEditorDefaults()
Page header defaults
Page headers are specified in the page header block. The block is delimited by these statements:
*BeginHeader()
*EndHeader()
Page footer defaults
Page footers are specified in the page footer block. The block is delimited by these statements:
*BeginFooter()
*EndFooter()
To help you avoid compile problems, when you begin each block, start with the *Begin and *End
block statements, then enter the remaining statements between the block delimiters.
2.
3.
4.
Altair Engineering
2.
Set the preference file by selecting File > Load > Preference File.
This opens a window which lists all the registered preference files.
3.
4.
5.
Wait for approximately two minutes and then list the contents of your working directory.
A new file autosave.mvw will be present and contain a back up of the current session.
Altair Engineering
2.
3.
4.
After the *ResetCurveDefaults() line, add the following preference statements to set the
curve defaults:
*SetCurveDefaults(1, 7, 0, 0, 0)
*SetCurveDefaults(3, 16, 1, 0, 0)
*SetCurveDefaults(5, 24, 2, 0, 0)
*SetCurveDefaults(2, 32, 3, 0, 0)
*SetCurveDefaults(4, 40, 0, 0, 0)
*SetCurveDefaults(5, 48, 1, 0, 0)
A plotting preference block can contain several *SetCurveDefaults() statements. The
program assigns curve attributes sequentially.
5.
Altair Engineering
2.
3.
4.
5.
7.
Click Apply.
8.
Set the file new_curve_defaults.mvw as the preference file by selecting File > Load >
Preference File.
9.
10. Select new_curve_defaults.mvw from the list and click Load. Then click the red X in the
upper right corner to close the window.
11. If prompted to Update all plots current default colors, select No.
12. Click on the second plot window on this page.
13. Click Build Plots from the plotting toolbar.
Altair Engineering
2.
3.
After the *BeginPlotDefaults() line, add the following preference statements to set the
default plot colors:
*SetBackgroundColor(9)
*SetGridlineColor(6)
*SetZerolineColor(2)
*SetFrameColor(7)
*SetAxisColor(4)
*SetHeaderColor(0)
*SetFooterColor(3)
4.
Save the new preference file as new_plot_colors.mvw in your working directory. You cannot
save files back to the default directory.
Altair Engineering
Click Add Page on the toolbar to add a new page to the current session.
2.
3.
4.
Register and Load the preference file new_plot_colors.mvw. If prompted to "Update all
plots current default colors", click No.
5.
6.
2.
3.
4.
After the *SetAxisTicFont() line, add the following preference statements to set the font
defaults for the header and footer text:
*SetLine1HeaderFont("Verdana",0,0,8)
*SetLine2HeaderFont("Verdana",1,0,10)
*SetLine3HeaderFont("Verdana",0,1,12)
*SetLine1FooterFont("Tahoma",0,0,8)
*SetLine2FooterFont("Tahoma",0,1,10)
*SetLine3FooterFont("Tahoma",1,0,12)
Note: If the suggested font is not available on your system, use the name of a font available
on your system.
Altair Engineering
6.
Click Add Page on the toolbar to add a new page to the current session.
2.
3.
4.
Register and Load the file new_font_defaults.mvw. If prompted to update to the current
defaults, select No.
5.
6.
7.
Altair Engineering
2.
3.
After the *BeginPlotDefaults() line, add the following preference statement to set the
default font type, style and size for notes:
*SetNoteFont("Tahoma", 1, 1, 10)
4. After the *SetNoteFont() line, add the following preference statements to set the default for
note attachment, text alignment, and color:
*SetNoteAttachment(View)
*SetNoteAlignment(Left)
*SetNoteColor(5)
5.
Select the file new_notes_legends.mvw from the file browser in TextView window mode.
2.
After the *SetNoteColor() line, add the following preference statements to set the defaults
for legend font and legend placement:
*SetLegendFont("Tahoma",1,1,24)
*SetLegendPlacement(TopRight)
3.
Click Add Page on the toolbar to add a new page to the current session.
2.
3.
4.
5.
6.
7.
8.
Altair Engineering
9.
Add a page and select TextView from the Select Application menu.
2.
3.
After the *BeginDefaults() line, add the following preference statements to define the
*BeginHeader() block:
*BeginHeader()
*EndHeader()
4.
After the *BeginHeader() line, add the following preference statements to define portion of
the available header area:
*BeginRegion(400, 0, 600, 300)
*EndRegion()
5.
Region descriptions use a coordinate system. The arguments in the region statement
represent: the minimum X coordinate, the minimum Y coordinate, the maximum X coordinate
and the maximum Y coordinate.
If the region you were describing was the entire header area your *BeginRegion statement
would be: *BeginRegion(0,0,1000,1000).
6.
After the *BeginRegion() line, add the following preference statements to set the text font,
alignment and border for the region (update the path below to reflect where your installation is
located):
*Font("Times",0,1,12)
*Alignment(Center)
*BorderWidth(1,1,1,1)
7.
After the *BorderWidth() line, add the following preference statement to define the text in
the header region:
*Text("Project Title")
8.
Altair Engineering
2.
After the *EndHeader() line, add the following preference statements to define the
*BeginFooter() block:
*BeginFooter()
*EndFooter()
3.
After the *BeginFooter() line, add the following preference statements to define and set up
one region in the footer:
*BeginRegion(700, 0, 1000, 1000)
*Font("Times",0,1,12)
*Alignment(Center)
*BorderWidth(1,1,1,1)
*EndRegion()
The footer regions coordinate system is similar to the header region: minimum X coordinate is
0 at the left and maximum X coordinate is 1000 at the right. The minimum Y coordinate is 0 at
the base of the footer and its maximum coordinate is 1000.
4.
After the *BorderWidth() line, add the following preference statement to place text in the
region:
*Text("Your Name")
*Text("{time()} on {date()}")
*Text("Page:
5.
{pagenum}/{numpages}")
After the *EndRegion() line, add the following preference statements to define and set up a
second region within the page footer:
*BeginRegion(700, 0, 1000, 1000)
*BorderWidth(1,1,1,1)
*EndRegion()
6.
After the *BorderWidth() line, add the following preference statement to put an image in the
region:
*Image("<install_directory>/tutorials/mv_hv_hg/preferences/Altair_logo.gif")
Images, such as company logos, can be added to any region within the header or footer of a
plot. The image type must be either GIF (format 87), JPG or BMP. Images are fitted vertically
and centered horizontally.
7.
Altair Engineering
2.
If a printer is installed, you can select Print and then click OK. These headers and footers will
be seen when the session or page is printed.
Add a page and select TextView from the Select Application menu.
2.
3.
After the *BeginTextEditorDefaults() line, add the following preference statement to set
the default font type, style, and size for the text editor:
*Font("Times", 0, 1, 12)
4.
After the *Font() line, add the following preference statement to set the default text color
for the text editor window:
*TextColor(6)
5.
After the *TextColor() line, add the following preference statement to set the default
background color for the text editor window:
*BackGroundColor(23)
6.
2.
Click the Add Page icon on the toolbar to add a new page to the current session.
The updated default for the background color is displayed
3.
Click in the text window and enter text to view changes to text defaults.
Altair Engineering