How to Actuate MotionView Hydraulic Cylinder from Altair Activate

Ironman123
Ironman123 Altair Community Member

Hello Everyone, I am very new to MotionView, I have this simple model:

I wanted to make that hydraylic cylinder extend and retract using Altair Activate, but am really confused about what all this FMU stuff is. If someone can make me a simple Altair Activate model, or give me a step by step decription that would really help. I have uploaded this model.

Answers

  • Vishvam
    Vishvam
    Altair Employee

    Hello @Ironman123

    FMU (Functional Mock-up Unit) is a file that contains a simulation model that adheres to the Functional Mock-up Interface (FMI) standard. FMUs are used to exchange models between tools.

    So in your case, a detailed 1D Hydraulic model is created in Altair Twin Activate, which is taking dynamic inputs like force, displacement, velocity etc. But these inputs instead of being given manually in Activate, can be taken from the MBD tool Motionsolve.

    So in order to communicate between the 2 softwares, we export the Activate model as an FMU and import it in Motionview. Or the vice-versa is also possible for exporting Motionsolve model as FMU in Activate.

    Here are few hydraulic based models using similar approach:

    landing-gear-simulation-with-hydraulic-control-in-motionsolve-and-twin-activate
    wheel-loader-performance-optimization-using-motionsolve-and-twin-activate-co-simulation

    If you are new to these tools I'd suggest to go through the following eLearnings:
    Activate - Systems Simulation & Controls
    MotionView/MotionSolve Introduction v2023
    Introduction to Twin Activate v2023

    Hope this helps!

  • Ironman123
    Ironman123 Altair Community Member

    Hello @Vishvam, I had a few more questions:

    1. I've built my model, and everytime I run it, I get this error:

    2) This is currently what my model looks like:

    What I would like to do is get a displacement from the hydraulic cylinder in Altair Activate, and actuate the cylinder in my motionview model, is there another way to do this instead of using a spring? Currently I have Force as an input variable but I would like my input variable to be displacement amount of the cylinder, as in how much I want to extend or retract my cylinder.

    My cylinder is 32in, I would like the inital value of the cylinder location in my MotionView model to be 11in every time, how can I do this?

    I would like my output variable to be the position of A, as shown in the photo, to see the translation of that surface and its position change as the cylinder retracts/extends. How can I do this?

  • Vishvam
    Vishvam
    Altair Employee

    @Ironman123
    The error you are seeing might be due to couple of reasons. Please check the following:

    1. Do you have hwdesktop, hwsolvers i.e., (Motionview and Motionsolve) of same version installed?
    2. Open MotionView from the windows menu, go to Help -> Updates & system information, then verify that you have the following installed
    3. Also check the environment variables and paths that are important for cosimulation. Refer to the following post for the same

    Regarding the requirements of modelling, those can be easily achieved by creating the appropriate solver variables, and using them in the Motion entity in Motionview for giving the displacements directly. The same has been done in the demo models shared in my earlier comment. Please refer to them.

  • Ironman123
    Ironman123 Altair Community Member

    Does 2024 and 2024.1 count as different versions?

  • Vishvam
    Vishvam
    Altair Employee
    edited January 30

    Yes. All the software versions need to be same
    You can download the 2024.1 version for all, including Twin activate from the marketplace

  • Orestis_YB
    Orestis_YB
    Altair Employee

    Hello @Ironman123,

    as per the error I believe that path in Twin Activate (File→ Preferences) is the issue as @Vishvam already suggested. This is a common error when installing each software standalone. In the future it could be avoided by downloading all products and by using Product Installer to install them all at once. Regarding your MotionView model:

    1) Using Displacement as input in MotionView from Twin Activate must be avoided. When connecting a model with Twin Activate, Force must always be the input to your Multibody Dynamics model. In your case you could output the velocity of the cylinder and connect it to cylinder component in Twin Activate then get the force to use in MotionView. In the above shared example you can see how to create such a connection. To control the amount of displacement you could use a controller on Twin Activate side.


    2) Moving the mechanism inside MotionView could be done by parametrizing the coordinates of points. In your case you are using CAD and therefore you need to define the graphic position with respect to custom markers. This routine would be much easier if you used primitive graphics (i.e. Cylinders) so that when moving the points these would update as well.

    3) To monitor the output of end A you can add an output of type displacement. As Body 1 pick the part , Body 2 the Ground, Point 1 a point at the end A and point 2 Global Origin.

    About sharing a MotionView model keep in mind that other files may be refered in there as well (i.e. graphics). The proper way to share a model is from File→ Export→Model and then check archive and zip options. Doing this the paths used inside your model (i.e. graphics, csv etc.) will be updated to relative and all the needed files will be contained int the zip.


    Hope this helps!

    Best regards,
    Orestes.

  • Ironman123
    Ironman123 Altair Community Member

    Hello @Vishvam @Orestis_YB Thank you so much for your help. I have created a succsefull model and tried integrating it in Altair Activate, and am getting this error:

    I followed all the advice and I uninstalled eveything, reinstalled it using the product installer, and seems like my paths are fixed:

    I also have created a model that I am certain it works:

  • Orestis_YB
    Orestis_YB
    Altair Employee

    Hello @Ironman123,

    it seems that the paths are not properly set. I suspect that some preferences were still there in your machine before the reinstall. I would suggest to modify them manually. This is what they should look like:

    The error you are getting is due to wrong path for MotionSolve. By the way I would advise you to check models like the landing gear in Twin Activate where there is a hydraulics-MotionSolve connection. In your model above you have connected the force on the cylinder to MotionSolve but there is no feedback from the MBD model. Except from that you model seems very nice! Good job!

    Best regards,
    Orestes

  • Ironman123
    Ironman123 Altair Community Member

    Hello @Orestis_YB It has finally worked! Thank you so much.

    I had 1 last question for you, my collegue has built a control system in Altair that outputs a certain cylinder displacement, or how much it should extend based on a few conditions. Currently I have Force as an input in my MotionView, is there really no way to use displacement as an input fot MotionView? I was thinking something like using a motion joint, then setting displacement for the motion joint as an input variable.

    Thanks!

    Sumeet Thukral

  • GTT Adam
    GTT Adam
    Altair Employee

    Hi @Ironman123,

    Yes, a Motion is how you would assert this displacement from a Twin Activate model.

    Motions can be defined using a Joint or a pair of Markers.

    Hope this helps!

    Adam Reid

  • Ironman123
    Ironman123 Altair Community Member

    Hello @Orestis_YB, my model finally works! I had one t question, I was a little confused on how to do this that you mentioned in your message earlier:

    "To monitor the output of end A you can add an output of type displacement. As Body 1 pick the part , Body 2 the Ground, Point 1 a point at the end A and point 2 Global Origin."

    My Altair activate is controlling the motionview as it should be which is evident from the hyperworks animation, however I am not able to output the displacement of Point A.

  • Orestis_YB
    Orestis_YB
    Altair Employee

    Hello @Ironman123,

    I am very happy to hear that you have a working model. Great job! Regarding the outputs there are different ways you can do it.

    1) From the Analyze tab you can add an output of type displacement. As Body 1 select the rod (the one which end is at point A), as Body 2 the Ground, as Point 1 select point A and as Point 2 select the Global origin. By doing this you will get in the results file all the components (X,Y,Z) of the relative displacement of body 1 to body 2 at point A.

    2) Again you can use an output of type Expression and you can build the expression by yourself. To do this, you'll need to first add a marker that belongs to body rod and it's origin is at point A. Then at the expressions of the output you can use MotionSolve Function DX() (and later DY(), DZ() etc) and as marker I select the one you created and marker J the global frame. In the results file you should have the same behavior as the above.

    In case you want to output these metrics in Twin Activate, and not just have them in the results file, you need to create a solver variable of type expression and use the same expression as in 2nd method.

    I attached a model of a simple falling sphere where a I created the displacement output of a point in the perimeter using the above methods.



    Hope this helps!

    Best regards,
    Orestes