Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


robertavarela last won the day on June 16

robertavarela had the most liked content!

About robertavarela

  • Rank
    Advanced User

Profile Information

  • Are you University user?

Recent Profile Visitors

1903 profile views
  1. There is a more elegant (and MUCH faster, only a few seconds) solution using readmultvectors with a datacell as input: Regards, Roberta
  2. The problem is that creating testvar is very slow, because it's done inside a for loop for 90k+ elements. Thanks, Roberta
  3. Hello all, Is there a smart way to read elements with different time channels? In my CAE result file, there are elements with no time steps associated with it, whereas others have several time steps. I'd like to read those that have data but using this approach: testvar = gettimesteplist(caefile1,1,resulttype,i,component); if min(testvar) > 0 %Check if there are 0 time steps for that specific element listelements = [listelements i]; %Append element to list of elements of interest end is very inefficient. Does anyone have a suggestion of what's best to do? Thanks, Roberta
  4. Hello, Is there a way to set a generic GUI size with normalized units that resize properly on different displays? Because even when I use normalized as an argument for units in user-defined GUIs, depending on the screen there is an overlap of GUI entities. Thank you, Roberta
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  • Create New...