Jump to content

robertavarela

Members
  • Content Count

    53
  • Joined

  • Last visited

  • Days Won

    5

Reputation Activity

  1. robertavarela liked a post in a topic by NilsWaap in Create N instances of a component and connect ports with a loop   
    Hello community,
    if you like to instantiate a certain number of a model/class/component and connect the ports with a for-loop you can do it like in the picture below:
     

    In this example a specified number of the "HeatedPipe" component is created.
    One for-loop is connecting the flow ports and the other one is connecting the heat ports.
     
    regards
     
    Nils
  2. sharkonguyen liked a post in a topic by robertavarela in Simulate Robot Arm by using Activate   
    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
  3. Debdatta Sen liked a post in a topic by robertavarela in Get of files containing filenames only from a given directory   
    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
  4. sharkonguyen liked a post in a topic by robertavarela in What is the difference between the Compose and the Hypermaths in Hyperworks?Are there any similarities also?   
    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
  5. Livil Lyle liked a post in a topic by robertavarela in Mircophone access   
    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
  6. NilsWaap liked a post in a topic by robertavarela in Mircophone access   
    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
  7. robertavarela liked a post in a topic by Jan Grasmannsdorf in Altair Challenge Data and Document   
    Dear Altair Teams,
    please find attached the starting document and data for the science hack this weekend. We would like to wish you a good start.
    Post your questions within this Forum. You might also upload data or models within this Forum.
    Thomas, Lorenzo, Jan and the Altair Team
    Altair_Climate_Model_StartHere.pdf ChallengeData.xlsx
  8. robertavarela liked a post in a topic by yugang in How to ignore the solver error during batching solving   
    Hello, 
    Thanks for your reply.
    Yes, I have read your post, and follow excatlly the same way as shown in the topics.
    I will add try catch loop into my master script.
    If any progress, or interesting finding, I will add here.
    Have a nice day.
  9. robertavarela liked a post in a topic by Livio Mariano in How to do a parameter sweep in activate?   
    Let me add another approach that I've just learned.
     
    There are many options to perform it but I’ve found this method very simple, flexible and self-explanatory.
     
    Summary:
    In the example, watertank.oml is the master file.
    It:
    changes the input parameters (controller gains) runs (repeatedly) the file Watertank_parm.scm (slave) collects results doing post-processing (plot) at the end.  
    I’ve created a quick video to summarize how to run the demo.
    Present working directory must be where you save the files (the video shows how to select the pwd).
    Otherwise use an absolute path in the oml file.
     
    Liv
     
    ParameterSweeping.mp4 watertank.oml watertank_param.scm
  10. Livil Lyle liked a post in a topic by robertavarela in Work with H3D files   
    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
  11. robertavarela liked a post in a topic by Livio Mariano in Frequency analyses using Altair Activate   
    With the last Activate version 2019.2, under Model we have the new “Finalization” tab
    where we can type an oml script that is executed at the end of the simulation.
    I’ve found this capability extremely useful for frequency analyses...
     
    I’ve created a simple model where we run a co-simulation between Activate & Motion
    (the approach works also using Activate in standalone mode but with the Motion integration is definitely more interesting).
    All the related files and the video are enclosed.
     
    In the example, we have a system of 2 masses: mass1 and mass2. The input to the Multi-body System is the force on mass2 while the output is the displacement of mass1.
     
    Force and displacement are respectively passed as Input1 and Input2 to the FrequencyWorld superblock in the Activate diagram.
     
    When you run the Activate model a dialog box appears.
    Here you can set the sampling frequency (be careful to aliasing issues since the value will affect the Nyquist frequency)
    and the type of analysis:
    Turn 0 to 1 the options if you want to analyse in frequency input 1, input 2 and/or the Transfer Function input1/input2.
    When you turn 1 the last option, the file TF.mat with the transfer function information is generated in the same model folder to be used for further analyses in Compose (e.g. LTI ROM generation…).
     
    For each input, the model calculates the fft together with the PSD.
    The calculation is made in Model-Finalization where we also handle the various options.
    The script is a bit articulated to properly handle every scenario (even/odd number of the sampling data, leakage, normalization…)
     
    Scripts and FrequencyWorld superblock can obviously be re-used for other applications (and easily improved e.g adding filters ...).
     
    Best,
     
    Liv
     

    FFT_PSD_TF.mp4  
     
    FFT_PSD_TF.zip
  12. NilsWaap liked a post in a topic by robertavarela in How to draw a polyline?   
    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
     
  13. NilsWaap liked a post in a topic by robertavarela in How to do a parameter sweep in activate?   
    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
  14. NilsWaap liked a post in a topic by robertavarela in How to control number of tics with xTick   
    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
  15. NilsWaap liked a post in a topic by robertavarela in How to do a parameter sweep in activate?   
    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
     
  16. robertavarela liked a post in a topic by Fady Nassif in Model Initialization versus Diagram Context   
    Roberta,
    I am not sure I understand correctly what you mean.
    The scoping rule of Activate is semi-global, so A variable defined at a level n is known at the level n and recursively in all the subsystems of that level (until it is redefined). 
     
    What is the difference between the Model Initialization and the top level diagram Context?
    A variable defined in the model initialization can be used by the simulation parameters, but a variable defined at the context level cannot be used by the simulation parameters.
    A variable defined in the model initialization can be redefined by an external context, but this is not the case for a variable defined in the diagram context. The external context is an argument of the simulation function when it is called from OML.
    vssRunSimulation(model,external_context,workspace,...)
     
    So the scripts are executed in that order:
    ModelInitialization
    ExternalContext
    SimulationParameters
    DiagramContext
     
    All those scripts run at the evaluation level.
    The SignalIn block reads the value at runtime from the workspace. When you call the function from OML, the workspace can be any environment.
    When you run the simulation from the GUI:
    the external context is an empty structure, the workspace is the base environment.
     
    I hope that this clarify the difference between the Model Initialization and the diagram context.
     
    Thanks
     
    Fady
     
     
  17. NilsWaap liked a post in a topic by robertavarela in How to control number of tics with xTick   
    Nils, hello!
     
    The explicit choice for the number of ticks will be available as of the next version (2019.3).
     
    Regards,
     
    Roberta
  18. NilsWaap liked a post in a topic by robertavarela in Create subplot that spans multiple grid positions   
    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
  19. robertavarela liked a post in a topic by RodrigoPG in How to import a simulink file and run at activate?   
    Hi Roberta,
     
    Actually the simport is available at portal for Activate Basic too.
     
    I tried to import your model and some of my own models and the import work.
     
    I believe this is the first software able to import a simulink file and run. Both simulink formats are supported (mdl (legacy) and slx).
     
     
     
  20. Toan Nguyen liked a post in a topic by robertavarela in Integration of Compose and HyperWorks softwares   
    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. stmaster liked a post in a topic by robertavarela in Integration of Compose and HyperWorks softwares   
    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




  22. Livil Lyle liked a post in a topic by robertavarela in Synergy between Compose and Matrix Browser   
    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
  23. brahmadev liked a post in a topic by robertavarela in COMPOSE TCL HM   
    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
  24. NikolasNA liked a post in a topic by robertavarela in FEKO - MATLAB communication by DOS commands   
    Nikolas,
     
    What could be done in this case to use FEKO + Compose would be to run a Lua script while calling POSTFEKO in batch. This Lua script would have not more than a few lines which would be standard for any model whose results you'd like to extract afterwards.
     
    The workflow I'd suggest in this case would be:
    1) To do everything in batch in Compose
    2) To ask Compose to write the Lua script which will be called along with POSTFEKO (passing the output file name at the same time, so POSTFEKO will understand which file it will refer to)
    3) To create a while loop in Compose to keep searching for the .tr file that will be exported from this Lua script. Once the .tr file is found in the folder, your Compose function may carry on doing what it needs to do and accessing this .tr file to fetch the results.
     
    Regards,
     
    Roberta
  25. brahmadev liked a post in a topic by robertavarela in COMPOSE TCL HM   
    Brahmadev,
     
    Compose is a multilanguague (OML, Python and TCL) environment for doing Math calculations, data manipulating and visualizing. This includes CAE output files (.h3d, .op2, .odb...) or test results (.ascii, .uff, .unv....).
     
    With Compose you can program using the languages that I just mentined and debug your scripts. There are bridges between these languages too (OML-Python and OML-TCL) that gives you much flexibility to work with the best of each language.
     
    Since Compose works with TCL as well, you can write your scripts for HyperMesh with it, or even more: you may leverage the multilanguage possibilities of Compose. An example: let's say you have a CAE result file and would like to pass information from it to HyperMesh, in order to create load collectors cards, for example. You can use OML (Compose's primary language) to get the CAE result data and then pass these variables to the TCL environment using functions such as exporttotcl. Then you call your TCL script with evaltclscript and use the variables that have just been passed.
     
    Regards,
     
    Roberta
×
×
  • Create New...