Jump to content

Livio Mariano

Members
  • Content Count

    12
  • Joined

  • Last visited

  • Days Won

    1

Livio Mariano last won the day on September 15

Livio Mariano had the most liked content!

About Livio Mariano

  • Rank
    Beginner

Profile Information

  • Country
    Italy
  • Are you University user?
    No

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi Andy, I don't know how to do it with a command... "overlay" isn't an option like you wrote but "new" (and then at the end you save scopes manually) should be a workaround to get what you want. Liv
  2. 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
  3. Ciao Rocket, modifications should have effect on all units => you create a library with your basic units. When you do so, if you change anything in the library, this will affect all the models which are using that library => you get what you want (if I've well understood). Supermodel of unit, that may be stored in a library (no common update of model possible): you are probably speaking about superblocks here, if you mask them then they can be placed into a library. Common update is possible in libraries. It is not possible when you create a Palette which is slightly different. the interface ports of my drive unit should be Activate signal ports and Modelica ports: no problem for this I would use a library rather than an include diagram. Liv
  4. Ciao Minoru, I'm not able to download your examples. Anyway, in Activate there are many options to reach your goal, I've chosen the below one: Enclosed the file. Note that variable threshold is set under Model-> initialization Regards, Liv threshold_trigger.scm
  5. Hi Minoru, to know in which directory you are you can use command pwd. To change working directory command cd.
  6. Hi Yugang, of course it is possible ;-)! You need to create a Modelica Custom Component for it. This component allows you to leverage the existing modelica components by creating your own customization. Enclosed you find an example with the component you ar looking for. I'm switching the mass between 1 and 2 kg according to the displacement. Best Regards, Liv Mechanical_VariableMass.scm
  7. Ciao Saurya, Please here you find a possible solution implemented using Activate 2019. 1- Open Activate2019 go under tools->oml editor and load Master2019.oml. This file is the master that will generate a new input file (input2019.csv) for the Activate model (Slave2019.scm) at any iteration of the for cycle and will run in batch mode the Activate model Slave2019.scm. 2- Slave2019.scm will generate a different csv file for each run (authomatically named run1.csv, run2.csv... so that it is easy for You to identify which run the data refers at) 3- To run the example just remember to adjust the paths according to your installation (also inside the *.bat file). 4- Unfortunately for the moment isn't possible to append the data in the same .csv. A possible solution for that may be to do only 1 run longer (final time= time for a run * runs number) and change input when (simulation time) / (time for a run)=integer number. Best Regards, Liv Master2019.oml runActivate2019.bat Slave2019.scm
  8. Ciao Yubuchi-san, "I guess that it was caused because the MathExpression block provides zero as a stiffness value in the first step, but I don't know how to avoid it." Yes, the problem is that in the MathExpression block you divide a number by 0 at the beginning of the simulation. Remember that even if the condition isn't satisfied the block perform the calculation anyway (it is similar but different from an if.. else statement where if the condition isn't satisfied you do not process the script inside) . Enclosed 2 possible solutions... Regards, Liv NLSpring_DispForcev1.scm NLSpring_DispForcev2.scm
  9. Ciao, is there any way to extract the string vector of the elements ID when quering a *.h3d file? Thanks Liv
  10. Ciao Yubichi-san, enclosed another solution for what you are looking for. Note: In Activate, you need to correct the absolute path in initialization "to tell" Activate where the csv file is. Best Regards, Liv Mechanical_VariableSpring_bis.csv Mechanical_VariableSpring_bis.scm
  11. Hi Yubuchi-san. "we have to customize the Modelica code of the linear spring" Yes and we do it using the modelica custom component. Please find enclosed the model you are looking for together with other examples related to other physics. Best Regards, Liv Electrical_VariableResistance.scm Mechanical_VariableSpring.scm Thermal_VariableCapacitor.scm Thermal_VariableConductor.scm
  12. From: Yubichi-San An Activate user would like to model a nonlinear spring in Activate using Modelica, where the nonlinearity simply come from nonlinear relationship between force and displacement. In my understanding, the Modelica library in Activate has only linear spring. If we would like to introduce such a nonlinear spring, we have to customize the Modelica code of the linear spring, don't we? Are there anyone who has developed such a nonlinear Modelica spring?
×
×
  • Create New...