Transition from revolute joint to contact
Good afternoon everyone.
I would like to simulate a joint with two transitions:
Which command will be suitable to apply these restrictions?
Best regards.
Best Answer
-
Hello Jose - "Is this a one sided transition ? That is initially there is a revolute joint and Distance just increases ?"
In that case you can use a Sensor to track the Distance. Once the Distances surpasses x, the revolute joint can be deactivated and contact activated.
The process in MotionView would be
1. Create a Sensor that tracks the Distance and set it to Return when the sensor is triggered
2. Create the revolute joint and the contact
3. Create a Solver command template that does the following through MotionSolve xml command statements
- <Deactivate Contact
- <Simulate for some time (which is larger than when distance is expected to reach x value)
- Deactivate Revolute joint
- <Activate Contact
- <Simulate further
- Set "Scripted simulation" in Run settings
If the part behavior would be such that the Distance goes back and forth between <x and > x, then it would need some other way of representation.
Good luck.
Regards
Praful
2
Answers
-
Hello Jose - "Is this a one sided transition ? That is initially there is a revolute joint and Distance just increases ?"
In that case you can use a Sensor to track the Distance. Once the Distances surpasses x, the revolute joint can be deactivated and contact activated.
The process in MotionView would be
1. Create a Sensor that tracks the Distance and set it to Return when the sensor is triggered
2. Create the revolute joint and the contact
3. Create a Solver command template that does the following through MotionSolve xml command statements
- <Deactivate Contact
- <Simulate for some time (which is larger than when distance is expected to reach x value)
- Deactivate Revolute joint
- <Activate Contact
- <Simulate further
- Set "Scripted simulation" in Run settings
If the part behavior would be such that the Distance goes back and forth between <x and > x, then it would need some other way of representation.
Good luck.
Regards
Praful
2 -
Praful Prabhu_20784 said:
Hello Jose - "Is this a one sided transition ? That is initially there is a revolute joint and Distance just increases ?"
In that case you can use a Sensor to track the Distance. Once the Distances surpasses x, the revolute joint can be deactivated and contact activated.
The process in MotionView would be
1. Create a Sensor that tracks the Distance and set it to Return when the sensor is triggered
2. Create the revolute joint and the contact
3. Create a Solver command template that does the following through MotionSolve xml command statements
- <Deactivate Contact
- <Simulate for some time (which is larger than when distance is expected to reach x value)
- Deactivate Revolute joint
- <Activate Contact
- <Simulate further
- Set "Scripted simulation" in Run settings
If the part behavior would be such that the Distance goes back and forth between <x and > x, then it would need some other way of representation.
Good luck.
Regards
Praful
Sorry, I meant to ask "Is this a one sided transition ? That is intially there is a revolute joint and Distance just increases ?"
Sorry for the typo
0 -
Praful Prabhu_20784 said:
Hello Jose - "Is this a one sided transition ? That is initially there is a revolute joint and Distance just increases ?"
In that case you can use a Sensor to track the Distance. Once the Distances surpasses x, the revolute joint can be deactivated and contact activated.
The process in MotionView would be
1. Create a Sensor that tracks the Distance and set it to Return when the sensor is triggered
2. Create the revolute joint and the contact
3. Create a Solver command template that does the following through MotionSolve xml command statements
- <Deactivate Contact
- <Simulate for some time (which is larger than when distance is expected to reach x value)
- Deactivate Revolute joint
- <Activate Contact
- <Simulate further
- Set "Scripted simulation" in Run settings
If the part behavior would be such that the Distance goes back and forth between <x and > x, then it would need some other way of representation.
Good luck.
Regards
Praful
Hello Praful.
Thanks a lot for your response.
It is only a one side transition. The body 2 will rotate in regard to the joint and after an opening distance is reached the joint will change to contact.
I created two markers at the following points to measure de distance between them during the opening:
With the command DM I measured the distance between them (DM(id marker 1,id marker 2)):
and compared with a defined distance:
After looking for the suitable command to activate/deactive the joint/contact I could not find a suitable one. My idea is to find an expression to activate/deactivate the joint/contact:
Is there any command to do that only with one sensor?
Best regards and thanks for your help in advance.
0 -
José Antonio_21853 said:
Hello Praful.
Thanks a lot for your response.
It is only a one side transition. The body 2 will rotate in regard to the joint and after an opening distance is reached the joint will change to contact.
I created two markers at the following points to measure de distance between them during the opening:
With the command DM I measured the distance between them (DM(id marker 1,id marker 2)):
and compared with a defined distance:
After looking for the suitable command to activate/deactive the joint/contact I could not find a suitable one. My idea is to find an expression to activate/deactivate the joint/contact:
Is there any command to do that only with one sensor?
Best regards and thanks for your help in advance.
Hello Jose
You should be able to deactivate the joint using
<Deactivate
element_type = "JOINT"
element_id = "joint id"
/>
E.g. If I presume the variable name of the joint to be j_rev, then you can have something like this:
<Deactivate
element_type = "JOINT"
element_id = "{j_rev.id}"
/>
Similarly, contact can be deactivated using
<Deactivate
element_type = "CONTACT"
element_id = "contact id"
/>
Few more pointers
1. You may want to use a DX or DY or DZ function if the criteria is vertical distance.
2. Set the response to "Return to command file" in the Response tab
3. You should also deactivate the sensor first when it gets triggered. else, the sensor being active, gets triggered continuously.
Your command template could look something like this.
<Deactivate
element_type = "CONTACT"
element_id = "{con_1.id}"
/>
<Simulate
analysis_type = "Transient"
end_time = "5.0"
print_interval = "0.01"
/>
<!-- Deactivate sensor on trigger and deactivate joint -->
<Deactivate
element_type = "SENSOR"
element_id = "{sensor.id}"
/>
<Deactivate
element_type = "JOINT"
element_id = "{j_rev.id}"
/>
<!-- Activate contact -->
<Activate
element_type = "CONTACT"
element_id = "{con_1.id}"
/>
<Simulate
analysis_type = "Transient"
end_time = "10.0"
print_interval = "0.01"
/>
<Stop/>
<!-- Deactivate contact first -->0 -
Praful Prabhu_20784 said:
Hello Jose - "Is this a one sided transition ? That is initially there is a revolute joint and Distance just increases ?"
In that case you can use a Sensor to track the Distance. Once the Distances surpasses x, the revolute joint can be deactivated and contact activated.
The process in MotionView would be
1. Create a Sensor that tracks the Distance and set it to Return when the sensor is triggered
2. Create the revolute joint and the contact
3. Create a Solver command template that does the following through MotionSolve xml command statements
- <Deactivate Contact
- <Simulate for some time (which is larger than when distance is expected to reach x value)
- Deactivate Revolute joint
- <Activate Contact
- <Simulate further
- Set "Scripted simulation" in Run settings
If the part behavior would be such that the Distance goes back and forth between <x and > x, then it would need some other way of representation.
Good luck.
Regards
Praful
Hi Praful.
Thanks a lot for your support. It helped me a lot.
Now I am facing an issue with the simulation.
I attached an image with the code sequence. As I could check, the distance between markers reaches the defined distance (10) and then the sensor triggers. At this point the simulation stops and does not continue with the sequence.
Do you have an idea why it does not continue?
Best regards and thank you in advance.
0 -
José Antonio_21853 said:
Hi Praful.
Thanks a lot for your support. It helped me a lot.
Now I am facing an issue with the simulation.
I attached an image with the code sequence. As I could check, the distance between markers reaches the defined distance (10) and then the sensor triggers. At this point the simulation stops and does not continue with the sequence.
Do you have an idea why it does not continue?
Best regards and thank you in advance.
Hi Jose
Could you please share the log file ? and if possible, the model itself? How is the part rotating ? If its a motion on the joint, that may what is troubling after the joint deactivation !
If you have concerns about confidentiality of your model, please use the filedrop link below to share the model securely. It will be treated as confidential.
Regards
Praful
Sr. Program Manager MotionView
Altair
0 -
Praful Prabhu_20784 said:
Hi Jose
Could you please share the log file ? and if possible, the model itself? How is the part rotating ? If its a motion on the joint, that may what is troubling after the joint deactivation !
If you have concerns about confidentiality of your model, please use the filedrop link below to share the model securely. It will be treated as confidential.
Regards
Praful
Sr. Program Manager MotionView
Altair
Hello Praful.
I decided to run the simulation removing the transition from revolute joint to a contact and using finally only a contact and removing the revolute joint.
The result was acceptable so I will stay in this path.
Thanks a lot for your support.
Best regards.
0