Forces defined using the Live Parts for SOLIDWORKS Add-in may have static values for the magnitude and direction elements, but you can also use the Add-in's built-in expression language to define Forces that incorporate time and direction.
For example, the following expression defines a Force whose magnitude increases as a step function over time. When the time transitions from 500 to 501 cycles, the Force magnitude jumps from 200 to 400, and when the time transitions from 700 to 701 cycles, the Force magnitude jumps from 400 to 600.
- "(t < 500) ? 200 : (t < 700) ? 400 : 600"
Users can also define a Force’s direction as a set of time variant expressions. For example, the following expressions create a circular oscillating Force in the Y/Z plane.
- X: "0.0"
- Y: "-1.0*cos(0.4*t)"
- Z: "1.0*sin(0.4*t)"
Live Parts uses the exprtk expression library. To define Force values as expressions, enclose the expression text in quotes. Otherwise, Live Parts expects Force values to be in the form of numbers.
Defining dynamic forces in SOLIDWORKS
- Follow the steps as outlined in our Defining forces page.
- During Step 3 in the Axis Method or Step 5 of the Sketched Entity method, instead of entering a value for the Force, enter an expression using the guidelines above.
While dynamic Forces can be pre-defined in your Live Parts model within SOLIDWORKS, you can also adjust the Forces in real-time during the Live Parts growth process in one of several ways after selecting the relevant Force ID from the force tree ("Select Force ID") in the advanced controls window.
- You can click and drag the Force Multiplier slider bar in the advanced controls window to simply multiply the gravity forces pre-defined using the SOLIDWORKS Add-in.
- You can click and drag the Magnitude slider bar in the advanced controls window to specifically set the magnitude of the selected force. This action will automatically check the Override Magnitude button above the slider and set the value of the force to the static value of the slider bar.
- You can click and drag the Force X/Y/Z slider bars in the advanced controls window to individually adjust the X/Y/Z components of the selected force pre-defined using the SOLIDWOKRS Add-in. This action will automatically check the Override Direction button above the sliders, and set the value of the each direction component to the static value in the slider bar.
- You can CTRL + Left Click on the Force X/Y/Z sliders in the advanced controls window to edit the expression value for dynamic gravity forces if they are pre-defined as expressions using the SOLIDWORKS Add-in.
For more information, please visit our Advanced controls window article.