1. Define parameters

Custom parameters in ANSA are relatively simple. Right-click in the input box to open the menu and select List variables, then create a new variable in the A_PARAMETERs dialog and assign a name to that variable.

For example, here the material parameter is assigned as a custom parameter:

  1. Right-click to select the list variables.

    1710a219-f3ec-4b94-8118-737a0de05c66

  2. Create a new variable.

    20853e89-e4cd-48b1-97b3-23e4842a6579

  3. Define variable parameters.

    ccd6dee9-d580-4146-bfdb-cb96b268697f

  4. Assign variable.

    535594dc-d382-4231-bfa3-bcde019c84a0

The final custom parameters can be viewed in the left panel.

840d8f43-8713-4982-ab8a-dabf15f4ac7d

This method allows you to easily define some variables that need frequent adjustments.

If Abaqus is used as the solver, the parameters will be embedded into the .inp file.

*PARAMETER
density = 8e-9

When solving, .par and .pes files will be generated. The .pes file is the version of the .inp file expanded without parameters; the actual solution is done on the .pes file.

2. Define formula

In addition to parameters with fixed values, we can also define formulas, which will use some built-in functions. The dialog box below provides commonly used formulas, making it easier for users to look up and edit frequently used functions.

ca245bf6-47f9-4d7e-8bfc-d7811e2f3f9e

If you need to define some variable loads that are related to node or cell coordinates, you need to use some specially marked functions (see the figure below).

5bd10c21-433e-4a78-bd1a-901a41ee1de6

This information can be found in the PDF help documents that came with version 24 and earlier; when ANSA was updated to version 25, it switched to HTML help documents, and this information could no longer be found.

The documents also list which solvers correspond to which boundary conditions that can use these markers.

a8ef899d-4699-4217-bc87-4a2a0c6ba87e

3. Example

We define a non-uniform surface pressure that varies according to the coordinates, with a numerical value equal to the square root of the sum of the x and y coordinates of the cell. Please note the units: ANSA’s default length unit is mm, which corresponds to a pressure unit of MPa.

sqrt(xel(@EID@)+yel(@EID@))*1e-6

Here, the formula is defined through parameters.

fb261360-049f-4362-be57-6844727d70a8

Note that the load must be defined using set. You can define the formula through parameters or enter the formula directly in the dialog box.

ecd164db-436d-4bf8-8448-8556c4c31b7c

However, after setting it up, there is no visible difference in the graphics displayed in ANSA; all the vector arrows are the same size.

bb05bd61-ff12-4fae-8a8d-fe221950f9f8

The pressure values can only be seen in the .inp file; when outputting the solution file, the variables with special marker functions have already been expanded.

083d9ec3-f5f4-4790-a95e-16e6272f5351

After the solution is completed, you can view the applied load distribution in META using the PDLOAD keyword.

c0dc55d6-d65e-424d-b75f-8421a985cca3

Stress distribution of the solution results.

29d69a85-13ab-49b2-9b74-08f4fc37f4a6