Multiple Latch Simulation in MotionView

d_con13
d_con13 Altair Community Member
edited November 2023 in Community Q&A

I have been attempting to run a deployment simulation, and am curious if the procedure from MV-2021: Simulate an Automotive Door Closure Event can be modified to sense multiple latch closure events in the same simulation run. 

My understanding of the process outlined is that when the latch condition is met, the sensor kicks the simulation to the next XML step - in this case activating the fixed joint for the latch, and then continuing the simulation. My question, then, is, if there are multiple latches, is there any way to tie the sensor activation to a specific next step/joint to fix? In other words, I want sensor 3 being triggered to kick to the command file and activate joint 3, but that could be before or after any of the other latch joints/closure events in the model. So I don't think a sequential process like that laid out in MV-2021 would work, because I don't know in which order the sensors may activate for any given run.

Conceptually what I am trying to achieve is this:

  1. Deactivate all N fixed joints
  2. Activate all N sensors
  3. Loop the following:
    1. Simulate for 3 seconds or until sensor i is triggered (where i is any sensor 1 thru N)
    2. If sensor i, activate fixed joint i and deactivate sensor i.
    3. Continue simulation for 5 more seconds or until any another active sensor j is triggered
    4. If sensor j, activate fixed joint j and deactivate sensor j.
  4. Stop simulation

 

Answers

  • Praful
    Praful
    Altair Employee
    edited November 2023

    Hello d_con13

    What you are trying to achieve is feasible and is along the lines described in the tutorial, except that there is an extra sensor and additional simulate command in your case.

    1. The joints should be defined separately using templates between 2 markers. they should be oriented such that when ultimately the latch position is achieved, the 2 markers are co-incident in position and orientation. If the orientation cannot be guaranteed, a different approach could be to use an action-reaction force instead of joint.

    2. They should be deactivated to begin with.

    3. The sensor signal is the distance between 2 markers.

    4. The sensor has to be deactivated upon trigger.

     

    You may also be able to achieve the same using contacts, without the need for all these "tricks".

    Good luck !

     

    Praful

     

  • d_con13
    d_con13 Altair Community Member
    edited November 2023

    Hello d_con13

    What you are trying to achieve is feasible and is along the lines described in the tutorial, except that there is an extra sensor and additional simulate command in your case.

    1. The joints should be defined separately using templates between 2 markers. they should be oriented such that when ultimately the latch position is achieved, the 2 markers are co-incident in position and orientation. If the orientation cannot be guaranteed, a different approach could be to use an action-reaction force instead of joint.

    2. They should be deactivated to begin with.

    3. The sensor signal is the distance between 2 markers.

    4. The sensor has to be deactivated upon trigger.

     

    You may also be able to achieve the same using contacts, without the need for all these "tricks".

    Good luck !

     

    Praful

     

    Thanks Praful!

    I did give a contact approach a shot, but found it a little cumbersome to tune and not ideal for my representation or the compute times. Would love to know more about the action-reaction force though and how to apply it to something like this!

    I think I have all of these things you listed out. I am just unsure how to structure the sequential sim commands in the XML to ensure that the trigger for sensor 1 jumps to the activate joint action for latch 1, irrespective of when in the sequence it occurs relative to the other sensors/latch activations. 

    For example, the below would be my understanding if I had two sensors/latches. See the comments for how I understand the run file to execute, let me know if I am misunderstanding the sequential nature and how the sensors kick out to the command file:

    <Deactivate element_type = "JOINT" element_id   = "1001" /><br /><Deactivate element_type = "JOINT" element_id   = "1002" /><br /><br /><Simulate analysis_type  = "Transient" end_time       = "1.0" print_interval = "0.001" /><br /><span style="color: #ba372a;">!This block will simulate until one of the two sensors is triggered! When <em><strong>either</strong></em><em> </em>sensor is triggered, solve will jump to the next line which has to be <em><strong>either </strong></em>Joint 1 or 2 and is not tied to whatever triggered the jump. I want it to be an either/or specific to that triggered sensor. </span><br /><Activate     element_type = "JOINT" element_id   = "1001" /> <Deactivate element_type = "SENSOR" element_id   = "{the_model.sen_0.idstring}" /><br /> <Simulate analysis_type  = "Transient" end_time       = "2.5" print_interval = "0.001" /><br /><span style="color: #ba372a;">!This block will continue the simulation until the remaining of the two sensors is triggered, but because I don't know the order of the triggers, the wrong joint may be active </span><br /><Activate     element_type = "JOINT" element_id   = "1002" /> <Deactivate element_type = "SENSOR" element_id   = "{the_model.sen_1.idstring}" /><br /> <Simulate analysis_type  = "Transient" end_time       = "2.5" print_interval = "0.001" /><br /><span style="color: #ba372a;">! This block will simulate with both latches/joints active for the remainder of the time.</span><br /> <Stop/><br /><br /><br />