You can create cutoff values for independent domains in a formula field by using IF statements in the formula expression. Here is an example of a pressure that ramps linearly with z, but is bounded by a start and end value for z:
If (z>LoadStart && z<LoadEnd) PressureRamp else 0.0
LoadStart and LoadEnd are expressions defined as a length in mm. In the expression above, they are interpreted as z coordinates in the field's coordinate system. PressureRamp is another expression that linearly ramps a pressure with respect to z.
The key for you is that the formula is evaluated only between z values LoadStart and LoadEnd. For all other Z values, the pressure is set to zero.
For reference, I used NX 10. Older versions support IF statements in formula fields as well.
Simulation Product Management
Simulation and Test Solutions
Siemens Industry Sector
Siemens Product Lifecycle Management Software Inc.
Thank you for your reply.
I tried the following:
if (z<0) -0.000001025[kg/mm^3]*9.81[m/sec^2]*z else 0.0
-0.000001025[kg/mm^3]*9.81[m/sec^2]*z being the function I want
And all positive values of z cut-off.
But I'm afraid that didn't work. Can you maybe tell me what I'm doing wrong in this example?
I reproduced your error as well with that expression. NX is getting confused by z<0 where there is no unit assigned to 0. Add a length unit to 0, such as 0[mm], and the expression should work.
NX should have issued an Alert with the application of the expression without the unit on 0. It did for me:
Dimension mismatch (binary operation)
That is hinting at a dimension error in the expression. When in doubt, spell out units explicitly on all numerical values in the expression. I think NX was incorrectly interpreting 0 as a pressure rather than as a length. I will submit a PR for development to review this. I don't think you should have needed the unit on 0.
I'm glad to see that you are able to move forward with your model. I did get feedback from development regarding the measure/units issue on the conditional statement. The expressions system currently assumes that the conditional statement's measure matches the measure of the expression itself. So, the expression measure is pressure, which means the conditional statement's assumed measure is also pressure. My PR turned into an enhancement request such that the conditional statement's assumed measure would match the measure of the left hand side of the conditional statement (length in your example). For now, you will have to specify the unit of conditional statement quantities.