Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by robertavarela

  1. Rok, I see now what you mean. I suggest the following steps then: 1) Use Compose and its OML Math functions to create whatever inputs you need in Flux: as Flux has a native interface with Python, these arguments could be simply written in a .py file that can be loaded in Flux 2) Create a batch file in Compose calling Flux and passing these parameters: the executable is located at C:\Program Files\Altair\<your_version>\flux\Flux and you can pass a .py file as an extra argument 3) Post-process the results once the simulation is finished using Compose: Flux may output .h3d format that is natively understood by Compose with functions such as readcae. If you have questions about how to import the results, you can load your .h3d file in readvectorbuilder and see how the entities were written: With this, you drastically reduce the post-processing time by loading all relevant information with just a few commands. Regards, Roberta
  2. Rok, The most appropriate coupling in this case would be with Activate, our system simulation tool that allows co-simulation with Flux. One example can be seen here at Regards, Roberta
  3. I guess you should use tanh(u1/u2) instead of tanh(u(1)/u(2)) Regards, Roberta
  4. Hello, In OptiStruct material data can only be modified through cards DVMREL1 (linear) and DVMREL2 (equation). You should check whether DVMREL2 works, because it relates Design Variables to model material properties. Depending on how the thickness changes the Young's modulus, DVMREL2 probably solves your problem. Regards, Roberta
  5. Sparse*sparse multiplication is not yet supported but will be in v2020 (using both operators). Regards, Roberta
  6. Have you watched the Arduino Series at Altair Embed website? It is a good source of information to start with: https://solidthinking.com/resource/9673/?weight=2 Regards, Roberta
  7. Unfortunately it is not possible, because the CAE readers behave exactly like HyperGraph's and in HyperGraph there is no such way to retrieve corner data. Regards, Roberta
  8. Hello, You may use a master-slave strategy between Compose and Activate, as described by our forum colleague Livio Mariano in this topic: Regards, Roberta
  9. If you are already in the directory where you should look for the H3D files, you may use the function dir followed by .h3d extension: myfiles = dir('*.h3d') It will return a list of .h3d files. length(myfiles) --> total number of .h3d files myfiles(i).name --> access to the .h3d file name according to the index i, which ranges from 1 to the number of files And other details about these files are also available, such as date of creation, size etc. Regards
  10. I've used pyaudio in the past to create .wav files, which is a package that is able to input/output audio. Steps to install the package: Open the command window (cmd) as Administrator Type cd C:\<Compose_installation_folder>\common\python\python3.5\win64 Type python.exe -m pip install pyaudio There are some examples at GitHub: https://gist.github.com/mabdrabo/8678538 https://gist.github.com/fopina/3cefaed1b2d2d79984ad7894aef39a68 And pyaudio documentation is at https://people.csail.mit.edu/hubert/pyaudio/docs/ - the class stream probably achieves what you are looking for. Regards, Roberta
  11. Have you tried to look at the tutorial models in Activate installation? Regards, Roberta
  12. Adriano, In the attached file, you can see an example of function: [setIDlist, elemIDlist, elemprop, propmat, matparam] = readset_prop_mat(modelfile,inputSet) Inputs: modelfile: .fem file name (string) inputSet: set ID (number) Outputs: setIDlist: list of set IDs (eg: 1, 2, 3, 4) elemIDlist: list of element IDs in a way that Compose/HyperGraph readers understand them (eg: E1, E2, E3, E4) elemprop: list of element IDs with respective properties (current version looks for CQUAD4 and CTRIA3 only) propmat: list of properties that have been queried based on the elements and respective materials matparam: list of materials that have been queried based on the properties and respective parameters (considering MAT8 with 5 parameters) The step by step is: A certain set is parsed based on the input ID The element list stored in that set is parsed Those elements are searched in order to determine their properties Those properties are searched in order to determine their materials Those materials are searched in order to determine their parameters Regards, Roberta readset_prop_mat.oml
  13. Unfortunately it is not possible, because these readers behave exactly like HyperGraph's. And in HyperGraph there is no such way to retrieve data in the material system. My suggestion is to create a simple parser to read coordinate systems from the .fem model and then transform these results in Compose. These parsers are fairly simple and I can share an example here in the forum depending on your need. Regards, Roberta
  14. Hello, Did you try to open the same file with HyperGraph? Because Compose borrows HyperGraph readers, which means that probably it won't open there either. Depending on how the file has been written by the solver, some results are not available in HyperGraph, which leads for them not to be available in Compose as well. Regards, Roberta
  15. What if you create an OML script to be the master and call the simulation in Activate as a slave? There are a couple strategies to do so in the topic Then you use in OML the command try catch to skip the error. Everytime the command executed in the try block fails, the catch block will become active and will be executed. Regards, Roberta
  16. OML (Open-Matrix Language) is one of Compose's languages, which is a derivation of HyperMath. HyperMath will be discontinued as of 2020 and therefore OML must be used instead. The latest versions of HyperWorks already support OML scripts in applications such as HyperMesh, HyperView and so on. Please refer to this topic for more information on this matter: The languages are very similar, again because OML was born from HyperMath. Therefore there is a utility called H2O, which is a tool used to convert scripts from Altair HyperMath HML language to Altair Compose OML language. H2O is an assistant to convert the scripts, because there are some minor differences in syntax and supported functions between HML and OML. Regards, Roberta
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  • Create New...