Innovation Intelligence ® 1 Chapter 6: The Plotting Client.

Slides:



Advertisements
Similar presentations
JustinMind: Dynamic Panels
Advertisements

Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
Chapter 3: Engage! Android User Input, Variables, and Operations
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 20P. 1Winter Quarter Propulsion Lab with MATLAB Lecture 20.
1 A Balanced Introduction to Computer Science, 2/E David Reed, Creighton University ©2008 Pearson Prentice Hall ISBN Chapter 17 JavaScript.
IS 1181 IS 118 Introduction to Development Tools VB Chapter 06.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 14 – Student Grades Application: Introducing.
Chapter 5: Loops and Files.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Innovation Intelligence ® 1 Chapter 3: HyperMesh Automation with HyperMesh Macros.
Innovation Intelligence ® 1 Chapter 6: Interfacing with HyperMesh Solver Templates.
Viewbox 4 Tutorial How to create a Template Please view this tutorial as a Slide Show in PowerPoint, because it contains animations that will not appear.
OBJECTIVES 2.6 Introduction to Algebra and Expressions Slide 1Copyright 2012, 2008, 2004, 2000 Pearson Education, Inc. aEvaluate an algebraic expression.
Intelligent Tutoring System Mobile Communication Team Drew Boatwright Nakul Dureja Richard Liou.
Enhanced Shipping & Handling A Feature of D-Plus An Enhancement For iSeries 400 DMAS from  Copyright I/O International, 2005 Skip Intro.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Exploring Formulas.
Chapter 8 Printing 1. In COBOL you send data to the printer by writing data to a file. In COBOL, the printer is defined as a file, and it is opened, closed,
 2004 Prentice Hall, Inc. All rights reserved. Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
Chapter 7: Arrays. In this chapter, you will learn about: One-dimensional arrays Array initialization Declaring and processing two-dimensional arrays.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Six Repeating Program Instructions.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
Innovation Intelligence ® 1 Chapter 5: Retrieving Data from HyperMesh Entities.
REVIEW 2 Exam History of Computers 1. CPU stands for _______________________. a. Counter productive units b. Central processing unit c. Copper.
Introduction to Matlab & Data Analysis
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Microsoft Office Excel Copyright © 2008 Pearson Prentice Hall. All rights reserved
JavaScript: Functions © by Pearson Education, Inc. All Rights Reserved.
Multi-Part Requests/ Parent & Child Service Items.
Chapter 12: How Long Can This Go On?
ECE 1304 Introduction to Electrical and Computer Engineering Section 1.1 Introduction to MATLAB.
Innovation Intelligence ® 1 Chapter 7: The MotionView Client.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
Introduction to Java Applications Part II. In this chapter you will learn:  Different data types( Primitive data types).  How to declare variables?
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 5 – Dental Payment Application: Introducing.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 9 Arrays.
10/24/20151 Chapter 2 Review: MATLAB Environment Introduction to MATLAB 7 Engineering 161.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter Six The Do Loop and List Boxes.
PHP Form Introduction Getting User Information Text Input.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Java™ How to Program, 10/e © Copyright by Pearson Education, Inc. All Rights Reserved.
Introduction to Matlab & Data Analysis 2015 In this tutorial we will: Build a practical application using GUIDE Learn more about graphical user interface.
S6-1 ADM703, Section 6, August 2005 Copyright  2005 MSC.Software Corporation SECTION 6 OVER-RUNNING PULLEY.
Chapter 2: Introduction to HyperMesh Process Auomation
1 CS161 Introduction to Computer Science Topic #9.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Innovation Intelligence ® Section 15 Contact Modeling.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
Innovation Intelligence ® 1 Chapter 4: Using TCL to Control the HyperMesh Session.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 7 - Introduction to Common Gateway Interface (CGI) Outline 7.1Introduction 7.2A Simple HTTP Transaction.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Introduction to Files in VB Chapter 9.1, 9.3. Overview u Data Files  random access  sequential u Working with sequential files  open, read, write,
 2003 Prentice Hall, Inc. All rights reserved. Chapter 7 - JavaScript: Introduction to Scripting Outline 7.1 Introduction 7.2 Simple Program: Printing.
Introduction to Java Applications Part II. In this chapter you will learn:  Different data types( Primitive data types).  How to declare variables?
Introduction to Programming in Corvid EXSYS-Corvid is an intelligent systems programming environment General order of tasks: Enter and define Variables.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
Arrays. Topics to be Covered... Arrays ◦ Declaration ◦ Assigning values ◦ Array manipulation using loops Multi-dimensional arrays ◦ 2D arrays ◦ Declaration.
Innovation Intelligence ® 1 Chapter 4: The Animation Client.
Innovation Intelligence ® Section 20 Flux and Convection.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
1-2 What is the Matlab environment? How can you create vectors ? What does the colon : operator do? How does the use of the built-in linspace function.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Innovation Intelligence ® 1 Chapter 2: The HyperWorks Desktop Environment.
Matlab Training Session 4: Control, Flow and Functions
MATLAB: Structures and File I/O
User Defined Functions
Chapter 3 Introduction to Classes, Objects Methods and Strings
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
Presentation transcript:

Innovation Intelligence ® 1 Chapter 6: The Plotting Client

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 22 The Plotting Client – Overview Plotting Window Defining Curves from Data File Defining Curves from Math Expressions Adding Notes to a Plot Introduction to Templex Functions

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 33 The Plotting Client – Plotting Window Use SetClientType on the window handle to create the plot object page1 GetWindowHandle win1 1 win1 SetClientType plot After setting the client type you can access the plotting client and get full access to its functionality using the GetClientHandle command page1 GetWindowHandle win1 1 win1 GetClientHandle plot1 Object Hierarchy for pltIPlot (or plotting client) The prefix “pltI” is used internally for naming the classes within the plotting client and it stands for “plot Interface”.

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 44 Defining Curves from Data Files Add empty curve to plotting window Need a valid curve id Get the vector handles for the curve Set the type of curve to file Define the datatype, request, and component for the x and y vector Draw the curve in the plot window

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 55 Defining Curves from Data Files Add empty curve to plotting window using AddCurve command on the plot object This command adds an empty curve and returns the curve index Get the curve handle using GetCurveHandle on the plot object GetCurveHandle requires two arguments Handle name which can be any name the user desires Valid curve id which can be specified by either the AddCurve command or hard coding an index You can use these two commands together to add the empty curve to a session: set curve_index [plot1 AddCurve] plot1 GetCurveHandle curve1 $curve_index

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 66 Next step is to get the vector handle using GetVectorHandle command on the curve handle GetVectorHandle requires two arguments Handle name which can be any name the user desires A string indicating which vector to get – x, y, or time The vector handle is where the curve data is actually stored curve1 GetVectorHandle xvector1 x curve1 GetVectorHandle yvector1 y Defining Curves from Data Files

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 77 Defining Curves from Data Files Next we need to set the type of vectors to file using the SetType command on the vector handle SetType can be set to file, math, or values Also, we need to reference the data file using SetFilename We will do this by setting a variable which points to the file and then use this variable in the SetFilename command. xvector1 SetType file yvector1 SetType file set filename nodout xvector1 SetFilename $filename yvector1 SetFilename $filename

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 88 Defining Curves from Data Files Need to define the data type, request, and component, just like we do in the Build Plots panel within HyperGraph. Done by using the SetDataType, SetRequest, and SetComponent commands on the vector handle xvector1 SetDataType "Time" xvector1 SetRequest "Time" xvector1 SetComponent "Time“ yvector1 SetDataType "Node Data" yvector1 SetRequest "Nodal Point 26742" yvector1 SetComponent "X Displacement"

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 99 Defining Curves from Data Files Final step is to tell the window to calculate the curve and draw it The Recalculate command forces the plot to regenerate all calculated data and reread all file data The Autoscale command forces the plot to recompute the minimum and maximum values for its axes May be necessary to call Recalculate first for recent data changes to be considered The Draw command actually draws the plot with the curves on the window Changes made by other methods may not be displayed properly until Draw is called A common practice is to make multiple changes and then call Draw only once, limiting the number of redraws plot1 Recalculate plot1 Autoscale plot1 Draw

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 10 Defining Curves from Math Expressions First need to understand how curves are referenced x and y vector expressions are used to reference any curve vector in a session A curve vector reference defines the x or y vector by page, window, and curve number An example of a curve vector reference is p2w3c4.x, where: p2 is page 2 w3is window 3 c4 is curve 4 x is the vector Similarly you have p2w3c4.y for the y vector

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 11 Defining Curves from Math Expressions Once you have the curve and vector handles, the SetType command can be set to math xvector1 SetType math yvector1 SetType math Need to define the expressions to be used on x and y vectors using the SetExpression command Our example we are adding curves with id 1 and 2 X vector expression is simply defined as one of the x vectors from the two we are summing Y vector expression is the summation of the two y vectors xvector1 SetExpression p1w1c1.x yvector1 SetExpression p1w1c1.y+p1w1c2.y

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 12 Adding Notes to a Plot Add a note to the plotting window with AddNote command on plotting client handle You also need to get the note handle using GetNoteHandle The GetNoteHandle requires two arguments The first is the handle name The second is a valid note id We can use the GetNoteHandle and AddNote commands together: win1 GetClientHandle plot1 plot1 GetNoteHandle note1 [plot1 AddNote]

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 13 Adding Notes to a Plot Now that we have adding a note and have the note handle, we can set the name of the note and add text to the node Setting the name is done with SetName command on note handle Adding text is done with the SetText command on the note handle note1 SetName “My Note” note1 SetText “This is my note” If you wish to find the name or text of a note, you can use the GetName and GetText commands on the note handle note1 GetName returns: My Note note1 GetText returns: This is my note

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 14 Adding Notes to a Plot Notes can be attached to a curve, window, view, or point Done with the SetAttachment command on the note handle note1 SetAttachment curve If curve is selected, we also have to set which curve the note is attached to using the SetAttachToCurveIndex command on the note handle Below is an example where we are attaching to a curve with index of 2 note1 SetAttachToCurveIndex 2 We also need to supply the index of the point that the note is attached to using the SetAttachToPointIndex command on the note handle Setting the Point Index to 0 attaches the note at the first point of the curve note1 SetAttachToPointIndex 0

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 15 Introduction to Templex Statements What is Templex? Templex is a general purpose text and numeric processor Can be used to create fully annotated notes and labels capable of performing data analysis and curve statistics within a plot window How do we attach a note to the last point of a curve Use the index number of the point –you need to know what this number is Use a Templex statement to tell you the number of points in a curve and calculate the index numpts Templex statement reports the number of element in an expression The result is always a scalar We can use statement to calculate the index

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 16 Introduction to Templex Statements Using numpts statement to get the number of elements in a curve numpts(p1w1c2.y ) SetAttachToPointIndex requires the final index be specified which is different than the number of elements Indexing starts with 0 Counting starts with 1 note1 SetAttachment curve note1 SetAttachToCurveIndex 2 note1 SetAttachToPointIndex “numpts(p1w1c2.y)-1”

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 17 Introduction to Templex Statements Using Templex Statements in the text of a note Need to use { } around Templex statement when it is used inside a text field Templex statement(s) that are inside the { } are automatically evaluated so that in the note you see the numerical value For example, let’s report the maximum value of a curve inside a note: note1 SetText "maximum value is {max(p1w1c2.y)}"

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 18 Exercise 6.1 Creating Plots and Notes with Templex inside the Notes

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 19 The Plotting Client - Exercise Exercise 6a Description: Load in the data file demo.dat and create a curve using the following YType, Y Request, and Y Component vs Time: Y Type:Force Y Request: REQ/13 Curve 13 Y Component: Z Then in the same window, create a second curve using the following vs. Time: Y Type:Force Y Request: REQ/18 Curve 18 Y Component: Z Update the X axis so that the label is “Time (seconds)” and the Y axis label is “Force (Newtons)”. Handles used session, project, page, window, client, curve, vector TCL/TK commands used AddCurve, SetFilename, SetType, SetDataType, SetRequest, SetComponent Hints Try loading the demo.dat file into HyperGraph to see how the Y Type, Y Request, or Y Component are defined.

Copyright © 2012 Altair Engineering, Inc. Proprietary and Confidential. All rights reserved. 20 The Plotting Client - Exercise Exercise 6b Description: Using the 2 curves created in Exercise 5a, add those two curves together. Update the title of the curve to be “Sum Fz Request 13 and 18”. Add a note which reports the minimum of the new curve. Attach the note to the minimum as well. Handles used session, project, page, window, client, curve, vector, note TCL/TK commands used SetType, SetExpression, AddNote, SetAttachment Hints To attach a note to the curve at the same point as the minimum, try using the Templex command indexofmin.