I am new to FEMAP, and was wondering if there is a way to define what I would call a "global variable" meaning that I could define a variable say X=5, then build my model using X, then if X were to change to say X=6 the model would update accordingly..
Is this possible to do in FEMAP or does one have to rebuild everything as soon as any base dimension changes?
Solved! Go to Solution.
I am sorry to tell you but FEMAP can not use parameters in this way because FEMAP is not parametric. What you can do in FEMAP is to define variables using command FILE > TOOLS > VARIABLES.
Variables are used in FEMAP to store a numerical value or an equation with your model. Throughout FEMAP, at any time a numerical value is required, you can specify a variable, or an equation which contains variables, instead of a number. Before you can use variables however, they must first be created.
For example, if you apply a pressure load using Method = variable and click in the button ADVANCED ....
you will see a new window where you can define an equation using the defined variables (or parameters). Here you can enter in the EQUATION EDITOR using the Ctrl-E keys of your keyboard.
If you later redefine the value of any variable used in the above equation, then the pressure loading that receive the FE model will be updated accordly, OK?.
You can use varibles to define the geometry, the FE model, etc.. but modifying the value of any variable will not cause the refinition of the geometry or mesh.
If your model is reasonably simple, it is possible to record a macro (Program File) of your model construction, and then replace the specific values in the text of the macro and replay the macro.
This can be extended in scope by using the #ASK macro command to produce a dialog box which asks a question and assigns the answer to a variable (eg. "length"). Then in the recorded macro, you can replace the value you recorded with !length. Each time you run the macro you can use the #ASK command to create the variable(s) you would like to have incorporated into your model building. It works well enough for fairly simple topologically consistent cases, but once things start getting more "general", then this method requires a fair amount of work to be robust.
I'm trying to use variables in my model to vary the cross-section of a beam element.
Attached find a simple model with a circular beam constrained on one end and with a force on the other. I have a variable 'A' set as '0.1' that I want to map to the 'Radius' field in the cross-section definition of my beam element. As you can see, I put the variable in there.
After I hit OK, and go back in, I now have the following:
The Radius correctly takes the value of variable 'A'. However, if I now change the value of 'A' in the variable editor, it doesn't update the Radius field.
Is this a limitation of the software? Or is there a different method for maintaining the reference to the variable?
Any help you can provide would be greatly appreciated. Thanks!
When you use Femap variables to define a value, the variable is only used to calculate the value of a variable or an equation that contains a variable . In your beam property example, the radius is stored 6, or the value of !A. Femap does not store equations or variables as attributes of entities.
Thanks for the reply.
That's unfortunate that it stores the value of the variable instead of the actual variable.
What I'm trying to do is run several analyses, changing the value of one property between iterations (beam radius, plate thickness, etc.)
An example of this is a circular beam that's fixed at one end. The plot below shows the beam stress as a function of the beam radius.
My intended approach was to use a simple macro that changes the value of a variable, then performs the desired analysis. I would wrap this routine in a loop so that it would perform it for several values. I have the macro working... my only issue is that changing the variable isn't updating the property, as I've mentioned.
Do you have any suggestions for achieving this? I would rather not customize the macro too much, because I want it to be as generic as possible to share it between different models.
If this is something that you will be doing on a repeating basis, I would recommend an API script instead of a macro where you could input a starting and ending radius for the beam along with an increment. At each loop in the API, the beam radius would be modified and an NX Nastran job is submitted. This script could also modify the name of the Analysis Set to comply with the radius of the beam for better organization of results.
You could also do this by creating multiple properties with different beam radii, then replace the beam property with the property.
Finally, there is an optional NX Nastran module, Design Optimization where you can specify a range of values for a property, the number of design iterations, and goal(s) for the analysis.