Jump to content

robertavarela

Members
  • Content Count

    42
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by robertavarela

  1. Alex, hello! Please find attached an example with the script and a few files for you to try out. First of all, please keep in mind that the model information is not inside this new .h3d file, therefore you need to open a model file and the created results file in HyperView if you need to visualize it. There are 2 opening modes that might be used: new and append: - new clears the .h3d file for writing - append adds new information but it cannot modify existing information, which means means that it is not possible to add datatypes, layers or values to an existing subcase The hierarchy that must be followed is this one: - Layer definition (if needed) - Datatype definition (needs the layer in case there is one) - Subcase definition (needs the datatype) - Data per se (needs the subcase, datatype and layer in case there is one) Regards, Roberta simple_only_results.h3dsimple_model.h3dsimple_only_results.oml
  2. Nils, You are right, the Help is missing for this function and it will come in the next release (v2019.3). The syntax for it would be: data = [5 5;4 6;4 7;5 8;6 8;7 7; 7 6]'; figure(1); h = polyline(1, 'polydata', data); Where the first argument is figure handle and the third one is the data set. In your case, the figure will be very small using these inputs: But if you slightly change your data set to data = [5 5;104 106;104 7;5 8;106 8;7 7; 7 106]', for instance, we'd get: Regards, Roberta
  3. Nils, Another user in the forum (Livio) has a suggestion of using Compose as a master and Activate as a slave in order to run Activate in batch to perform parameter sweep. This post: May help you to achieve your goal! Regards, Roberta
  4. Manoj, Thanks for your suggestion! I was wondering if we had something that didn't need the user intervention, since every interaction with Compose would be done by the user by the custom GUI that has been created. Let's say that the script is for someone who is totally not familiar with Compose and all he is going to do is hit "Play" to use the GUI. Cheers, Roberta
  5. Hello, community! Is there a way to automatically launch the Python variable browser? I'd like to initialize it as soon as the OML script starts running for the sake of making it faster when the actual Python script is called. I'm currently using as a workaround the creation of a dummy variable: evalpythonscript('initializePython=1'); Thanks, Roberta
  6. What was the issue that you had when you tred to import the .mat file directly using the block FromMatFile or when you loaded the .mat file and then tried to use SignalIn? Could you please share your model here? Regards, Roberta
  7. Nils, The difference is the activation of Use subplots parameter in the Scope block, as per the screenshot below: This parameter was turned off in the tutorial model, whereas it was on in the file I shared. If you turn it on, you will see that it will work and generate a plot like this for i = 1:8: If Use subplots is on, we will have one plot per input. Otherwise each input is considered to be a curve (scalar inputs) in the single plot. Regards, Roberta
  8. I'd like to share a few explanations about the differences between Model Initialization and Diagram Context: In both menus, it is possible to declare variables that will be used along the model, but there are a few fundamental differences to be understood Diagram prevails over Model Initialization In case a variable A = 1 is declared in Model Initialization and then declared in the same level A = 2 in Diagram, the value to be used on that level and downward is A = 2. A variable declared in Model Initialization may be modified in levels below, which will affect that variable all levels above Although a variable A was created in the Model Initialization, it may be modified in a certain level, affecting its value not only downwards, but also upwards A variable declared in Diagram may be modified in levels below, but this will not effect the variable in levels above Different from the Model Initialization, if a variable A was created in Diagram, it may be modified in a certain level and it will affect only its value downards, not upwards It is possible to use the SetSignal block to set a variable value locally It is possible to use the SetSignal block to set a variable value locally which has the same name of another variable declared in Model Initialization, meaning that in all levels below it will still have the same value declared in Model Initialization I hope this brief explanation will help you understand the differences between these two important features. Regards, Roberta
  9. Nils, If you open a Water Tank tutorial model (attached) to give it a try, you will see that the constant is assigned to a certain variable x: Which is declared in your Diagram Home as a static variable: Instead of having a single value, you can sweep multiple values of x by simply doing a loop like this: Your response under Scope block will show the results for all x values: Regards, Roberta watert.scm
  10. Hello, My bad! In fact a number like this may be given to set up the #ticks, but what will be out pretty soon is the customization of tick values like Nils perhaps wants - currently these values are not possible to be changed. Regards, Roberta
  11. Nils, hello! The explicit choice for the number of ticks will be available as of the next version (2019.3). Regards, Roberta
  12. Currently Compose does not support syntaxes such as subplot (2, 2, [3 4]) or subplot (4, 1, 3:4) , but this request is on the Development queue to be implemented soon. Regards, Roberta
  13. The error message does not have any ^ operator pointing to the exact position where the command fails. It seems like some kind of installation issue, since I didn't even spontaneously call this function, but I'd like help to understand what exactly it is. On top of that, the line 575 that the error mentions in file default.cfg does not it even exist, because this file only has 431 lines: Regards, Roberta
  14. Rajath, Regarding block Mux, in fact if the first input signal is a Nx1 column vector, the first entry in Input Port Sizes of this block should be set to N. And then you need to update the DiscrStateSpace block accordingly - if you click on F1 while holding the block, you will see that: Speaking of other approaches, what is not satisfactory in the current strategy that you are applying? Regards, Roberta
  15. Hello, When I load the Python command window in v2019.2 of Compose, I get the following error when typing help("modules"): Although this error pops up, I am able to see the installed modules when I hit OK. But why is this error happening? How to avoid it? Thanks, Roberta
  16. Rodrigo, That is great to know! Don't hesitate to reach out to the forum again in case of questions or issues. Regards, Roberta
  17. Rodrigo, I suggest that you try again later to access Altair Connect, because unfortunately it is not possible to share these files here. And let us know if you have any questions or if you have any issue when following the steps above. Regards, Roberta
  18. Hello Rodrigo, Except for Simscape, we are able to import Simulink blocks when we install the extension Simport available at Altair Connect (https://connect.altair.com/CP/): Then we open Activate and install Simport as a library: And we will be able to import the desired block diagram from Simulink: We are not able to import all Simscape blocks because we have our own physical-based blocks in our Modelica library, which is an open-source language to simulate physical components. We have hundreds of physical blocks in the native installation of Activate with mechanical, thermal components and many others. So in case you find issues when importing physical blocks, we may be able to substitute them with the Modelica equivalent ones. I just attached a sample model to exemplify the Simulink importation. What you will see when it is imported is the following block diagram: Regards, Roberta abs_CS9.mdl
  19. Jim, Maybe I don't understand your request, but it seems to be that this kind of application would be a good fit for Altair Embed, where your control algorithm runs in real-time on the target microcontroller. Regards, Roberta
  20. I'd like to share the seamless integration that Compose with other HyperWorks applications, such as HyperMesh and OptiStruct. In order to expose the Compose function to other HyperWorks applications, we need to register the function. This is done clicking on the right mouse button on Register Function in Compose: After this step, we may now see that the function has been registered under the same mouse click shown above under Show Registered Functions button. Once it is registered, we may now use it inside other HyperWorks softwares, and the function will be available without the need for closing and reopening the application of interest. Example in HyperMesh: Why Compose and HyperMesh? Matrix Browser queries and modifies HyperMesh and HyperView data entities without writing cumbersome TCL coding, along with a Math method developed in Compose. Example in HyperGraph: Why Compose and HyperGraph? Plotting capabilities of HyperGraph are expanded with Compose’s advanced functions and custom procedures developed by the user. Example in HyperView: Why Compose and HyperView? Advanced post-processing or special mathematical approaches may be applied directly on the model. Example in HyperStudy: Add a new output response Define a new expression Use your custom Compose function Why Compose and HyperStudy? User-defined functions to perform design exploration and optimization. Example in OptiStruct: Why Compose and OptiStruct? User-defined functions to perform optimization with DRESP3 card (desired response based on external files). Regards, Roberta
  21. I'd like to share the nice and slick synergy Compose has with Matrix Browser, a feature in HyperMesh to handle model data in table format. This is the typical use case when the model data will lead the process and Compose will play as the Math/Automation engine. Let’s assume that we have the model ExampleRib.fem (attached) and that we would like to get the central coordinates X, Y and Z of a few elements: In this example, I’d like to calculate the central distance of these elements to the point (0,0,0), which would be simply the square root of x²+y²+z². For that, I created a custom Compose function distZero (also attached): Which will receive as inputs from HyperMesh the coordinates X, Y and Z that I queried with Matrix Browser. In order to expose the Compose function to other HyperWorks applications, we need to register the function. This is done clicking on the right mouse button on Register Function in Compose: After this step, we may now see that the function has been registered under the same mouse click shown above under Show Registered Functions button. Once it is registered, we may now use it inside HyperMesh + Matrix Browser: The function will be available without the need for closing HyperMesh and reopening. Then we give the columns that will serve as arguments: And it's done! The custom Compose function calculated everything and the results are shown in a new column: Regards, Roberta ExampleRib.fem distZero.oml
  22. Brahmadev, That is correct. We can read all kinds of result files, like .h3d (OptiStruct), .op2 (Nastran), .odb (Abaqus) and so on. All entities and results inside these binary files are automatically recognized in Compose with functions such as readcae or readmultvectors. Also since we have plotting capabilities, you may perform several calculations with the data inside these results files and then plot it somehow. Regards, Roberta
  23. Saransakthi, Using the syntax I mentioned, you may put your frequency variable in variable1 and your amplitude in variable2, adjusting the decimal precision as you wish. After printing everything in your file using fprintf, it's a good practice to close your files (using fclose function in thi case) Regards, Roberta
×
×
  • Create New...