Skip to main content

SAVE PARAMETERS IN APDL TO USE IN POST-SOLVE

Often times, you define some parameters/variables using command snippets in ANSYS Mechanical's geometry or boundary commands. Scenarios exists when you need to use these variables to evaluate results in the Results section of the Mechanical. Now, usually when you run the entire Mechanical at once, these parameters get evaluated by MAPDL. However, when the problem takes long time to solve, and you would like to make changes to command snippets in the results section only, it's inconvenient to solve the whole model again just to evaluate the new results. Usually, MAPDL handles this by just issuing POST-SOLVE commands only. But, now since the parameters we defined earlier are out of scope here, the results utilizing these parameters are not properly evaluated. The remedy is the following commands:


Step 1 :
At the end of the pre-processing command snippet, use the command PARSAV to store parameters to file:

Step 2:
Prior to using other commands in the Results section's command snippet, use PARRES to restore parameters:

Now, your parameters will be evaluated properly even when evaluating results only in the Mechanical with the POST-SOLVE only commands.


Thanks.


Comments

Popular posts from this blog

USERMAT Compilation Fix for ANSYS with Intel oneAPI

 Issue with USERMAT Intel updated the Intel Parallel Studio XE  2019 to Intel oneAPI. Academic community relying on the free compiler license from Intel stopped getting renewed and are forced to use the newer oneAPI package. As a result the Fortran compiler+link for ANSYS stopped working with the new oneAPI (Well, "technically" compiler works, but the connection between ANSYS and Intel Package got broken).     So,  the line#109 within ANSUSERSHARED.BAT should be modified for the existing ANSYS installation to work with the new Intel oneAPI upgrade. I am assuming you know about the ANSUSERSHARED.BAT (and where to find it) since you have been compiling USERMAT before this Intel's update. TESTED WORKING SETUP  This tweak is tested only for the following setup: - Previous installation of Intel Parallel Studio XE 2019 update 3 - Current installation of Intel oneAPI 2021.1 (BaseKit + HPCKit) - ANSYS 2020 R1 Thanks.