Jump to content

robertavarela

Members
  • Content Count

    68
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by robertavarela

  1. It's necessary to add these APIs after getting the input data: nevprt=vssGetEventCode(block); if flag == vssBlockInitializeFlag elseif flag == vssBlockReinitializeFlag elseif flag == vssBlockTerminateFlag elseif flag == vssBlockOutputUpdateFlag And before the end of the function: vssSetOutputData(block,1,y1,vssGetOutputDataType(block,1)); end Kudos to Patrick Goulding who solved the problem (he is in the forum but I'm not sure about his username)! Regards, Roberta
  2. Once you create your figure that will receive the uicontrol entities, you could set the position of the external image with position property. An example: img = 'OptiStruct.png'; figure(1); myimg = imread(img); imshow(myimg,'units','normalized','position',[0.1 0.1 0.5 0.3]); And the output is: Regards, Roberta
  3. Deb, In Compose v2020, you can use composedir function and in previous versions you can use getenv('ALTAIR_HOME') to get the environment variable that points to Compose installation folder. Regards, Roberta
  4. Hello all, As you already know, OML (Open Matrix Language) has a syntax compatible with other matrix-based languages, such as Octave. This compatibility leverages both the reuse of legacy data and syntax knowledge of these other softwares. It means that it’s possible to have a non-disruptive adoption of Compose and it can coexist with existing Math tools. Please find attached a video explaining the main differences that you may encounter when trying to use your past scripts in Compose and how to overcome them. Regards, Roberta LegacyData_AltairCompose.mp4
  5. Based on the same script, @Kosuke IKEDA created an example connecting OptiStruct Activate, where K, M and C matrices were converted from OS to ABCD matrices (state-space system): Which may be imported in Activate then. The impulse response results match OS transient: Regards, Roberta hm_plate_cms_AX.pch io_def.txt stc_DMIGPCH2ABCD_rev1.oml
  6. In this case, you'd need to use list function again in those tuples inside the list: l[0] = list(l[0]) Which would generate this variable: [['my', 'name'], 'is', 'mr', 'tuple'] With getpythonvar, the output would be a cell within a cell: Regards, Roberta
  7. What you can do is to convert your tuple into list. An example: t = ('my', 'name', 'is', 'mr', 'tuple') l = list(t) And then use getpythonvar to retrieve the variable. Regards, Roberta
  8. Hello, community. @Kosuke IKEDA and I recently worked on a DMIGPCH reader for OML. It is an output file from OptiStruct with reduced M (mass), K (stiffness) and C (damping) matrices that can be fed into external data files to be used in subsequent analyses. These are ASCII files whose tags MAAX, KAAX and BAAX identify what is data from mass, stiffness and damping, respectively: Each value represents the nodal real value of the matrix. With it, it's possible to compute the eigen values and energy distribution of each degree of freedom. Regards, Roberta stc_readDMIGPCH_rev3.oml forum_sample_AX.pch
  9. Hello all, I wanted to share with you a tool to digitize plots in images using OML and Python. The aim is to convert plots that are introduced in text books like Analysis and Design of Flight Vehicle Structures (Bruhn, 1973): Such plots are commonly used in industries like Aerospace to calculate constants and other parameters that assess Margins of Safety of components and systems. Finally, we can do a polynomial curve fitting to use these curves and compute these constants without the need to look at the plots everytime they must be applied. The steps of the attached scripts are: 1) Give the axes bounds, degree of polynomial curve fitting and image whose plot will be digitized 2) Hit Start in the OML script (it will automatically call the Python script) 3) Give a first click with the mouse button to start selecting the corners of the plot 4) Select the corners 5) Give another click to select the points 6) Select as many points as you want 7) Double click with any key to finish the selection 8) Plot is generated and polynomial coefficients are computed and printed Regards, Roberta PlotDigitizer.oml ginput_plot.py
  10. 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
  11. 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
  12. I guess you should use tanh(u1/u2) instead of tanh(u(1)/u(2)) Regards, Roberta
  13. 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
  14. Sparse*sparse multiplication is not yet supported but will be in v2020 (using both operators). Regards, Roberta
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. Have you tried to look at the tutorial models in Activate installation? Regards, Roberta
  21. 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
  22. 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
  23. 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
  24. 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
×
×
  • Create New...