Motion View Template -activate/deactivate Forces

Michael_22393
Michael_22393 Altair Community Member
edited February 2023 in Community Q&A

Hello erveryone,

 

for a motion simulation i wrote a Template to deactivate a force at a specific timestep an activate a new force. It didnt work as i wanted, because the first force stays the the whole Time.

Maybe someone see the problem and can help

here the Template

<Simulate
    analysis_type       = "Transient"
    end_time            = "0.5"
    print_interval      = "0.01"
/>
<Deactivate 
 element_type = "Force"  
 element_id   = "{frc_0.idstring}"

/>
<Activate 
 element_type = "Force"  
 element_id   = "{frc_1.idstring}"
/>
<Simulate
    analysis_type       = "Transient"
    end_time            = "0.8"
    print_interval      = "0.01"


/>
<Stop/>

Answers

  • Praful
    Praful
    Altair Employee
    edited February 2023

    Hello Michael - Are you getting any warnings or errors either in MotionView or MotionSolve ?

    Without having a look at the model, it is hard to pinpoint where the problem is. Here are some pointers

    1. When you turn of the Edit checkbox on the template, are there any errors? does the element id gets the right id number?
    2. Could you please verify that the type of template is of type "Solver Command"
    3. Can you try changing "Force" to "FORCE" for the element_type? (I dont think this is the cause though)
    4. Does the second force activate successfully?

    Can you post a snap of your model tree showing the model heirarchy, as to where the force is and where the template is defined

    Regards

    Praful

     

  • Michael_22393
    Michael_22393 Altair Community Member
    edited February 2023

    Hello Michael - Are you getting any warnings or errors either in MotionView or MotionSolve ?

    Without having a look at the model, it is hard to pinpoint where the problem is. Here are some pointers

    1. When you turn of the Edit checkbox on the template, are there any errors? does the element id gets the right id number?
    2. Could you please verify that the type of template is of type "Solver Command"
    3. Can you try changing "Force" to "FORCE" for the element_type? (I dont think this is the cause though)
    4. Does the second force activate successfully?

    Can you post a snap of your model tree showing the model heirarchy, as to where the force is and where the template is defined

    Regards

    Praful

     

    Hello Praful Prabhu,

     

    thank you for your help. I found the problem the template was not in the type " Solver command".
    I tought i choose it but it wasnt.

     

    Thanks