TAGGED: #ANSYSworkbench #ANSYS #StaticStructural, coding, link, subroutine, upf, usermat
-
-
September 17, 2023 at 6:32 am
sorena shahbazi
SubscriberHello friends
This is the first time I want to link and work with UPF and I have encountered a problem. I use Ansys 19.0 and I linked Visual Studio 14 (2015) and Fortran 17 with it, and apparently the link has been established. Because when I click on Chek UPF Setup, everything is ok, and also after solving, subroutine reading messages are given in the Solution Information section.
But I have a problem when solving the problem
I wrote a very simple tbelastic subroutine, I defined only two properties of Young's modulus and Poisson's ratio with a constant value and gave it to mechanical workbench. command is also written correctly:
*tbdele, all
*tb, elastic, 1,, 2, user
But when I solve the simple problem, it is clear from the results that it was not read from my code... the strange thing is that by changing the properties of the material in the code and engineering data, the results do not change. Apparently, the software reads the mechanical properties from another place and probably from another code that I don't know where!!!
Does anyone know where the problem comes from? And sometimes, even though I have given him the subroutine in another folder, why and where does he read subroutine?note1: When I change the value of 1 to two or more in the command, the software reads the properties from the engineering data!
*tb, elastic, 2,, 2, usernote2: This is how I did the linking process
Step 1- Visual installation
Step 2- Installing Fortran
Step 3- Install Ansys
Step 4- New definition in environment variables
*ans_use_upf
*ans_user_path
Step 5- Download and install ACT UPF4note3: This problem also exists for me in version 18.2
-
September 18, 2023 at 10:39 pm
David Weed
Ansys EmployeeHello Sorena,
The supported MS VS and Intel Fortran versions for R19.0 are the following:
Visual Studio 2012 (including the MS C++ compiler) and Intel FORTRAN 15.0.7 compiler
It appears that you are using different versions which are not supported. In this case, unfortunately we cannot troubleshoot issues that may be a result of using these unsupported software versions. I would suggest to install the supported versions, recompile/link and see if that resolves the issue.
-
September 26, 2023 at 8:16 am
sorena shahbazi
SubscriberHello David,
Thank you for your response,
The reason for using these versions of Fortran and Visual Studio is that when I install the recommended versions (Fortran 2015 and Visual Studio 2012), in the mechanical environment when i click on Check UPF Setup, I encounter an error and it says that Visual Studio14 and appropriate Fortran must be installed, (similar to versions 19.1 and 19.2), and when I installed them, it seems to be OK.
But apart from this, I saw exactly the same problem (reading code) in other versions such as 18.2 and even 2023 (with suggested versions).
Of course, I must mention that Visual Studio and Fortran installed in the same year are the same, but in terms of updates, they may be slightly different. Is this important? For example, due to the fact that the Fortran 15.0.7 version was not available, another update of 2015 was used, and similar to this article for other versions (my opinion was that it is not very effective).Can I tell you the linking process that I go through so that you can see if this process is complete or if something else needs to be done?
1- Visual installation
2- Installing Fortran
3- Installing Ansys
(Question: These three steps were sometimes carried out interchangeably. Does this cause problems?)4- New definition in environment variables
*ans_use_upf
*ans_user_path5- Download and install ACT UPF4
After that, I use the following command in the geometry section for subroutine "USER_TBELASTIC" :
*tbdele, all
*tb, elastic, 1, , 2, user-
September 29, 2023 at 10:34 pm
David Weed
Ansys EmployeeWe require that the user have the MS VS and IFORT versions documented in the installation guide due to the fact that the MAPDL code itself is also compiled/linked with those versions. I have seen mixed results in terms of users being able to successfully compile/link with different versions than those listed in the documentation, so we generally don’t suggest doing that. The Intel site has changed a bit and I know that it can be difficult finding specific older versions, so you may want to consider reaching out to Intel support to see if they can help locate them.
Regarding the procedural steps that you listed, you will need to install MS VS first so that the Intel Fortran software suite can detect and integrate with it correctly. Doing it the other way around will prevent this integration and any subsequent compiling/linking procecedure will fail.
When you install ANSYS software, make sure to check the box to install the customization features. If this is installed correctly, then you should have a path like the following:
C:\Program Files\ANSYS Inc\v190\ansys\custom\user\winx64
There is also a ‘customize’ folder, but you want to make sure that the ‘custom’ folder is there as well because this is where the batch files for invoking the compiler and MS VS for compiling/linking are stored.
If you are using the /UPF method (this is used by the ACT app), then you’ll only want to define ANS_USE_UPF = TRUE. You can delete ANS_USER_PATH for now. Also, make sure that all WB sessions are closed when defining that variable so that when WB is re-opened, the variable will be properly recognized by WB.
You technically don’t need the ACT app to use a UPF inside of WB Mechanical, though the GUI does provide some convience. Instead, you can just use the /UPF command in a command object under the Analysis/Static Structural branch within Mechanical. The user routine should also reside in the Solver Files Directory (you can access this by right-clicking on Solution and choosing “Open Solver Files Directory”). Also, make sure the issue OUTRES,ALL,ALL and OUTRES,SVAR,ALL, so that you can plot state variables.
Let me know if you have any additional questions.
-
-
-
September 26, 2023 at 9:34 am
Raida Maisa
SubscriberThanks for sharing this informative forum with us and allowing us to read it. One of my friends from Dissertation Help Dubai is interested in UPF linking and invoking a subroutine. He is very intelligent. I have no idea about that but he told me that It appears that you are using different versions which are not supported. In this case, unfortunately, we cannot troubleshoot issues that may be a result of using these unsupported software versions
-
September 27, 2023 at 4:44 am
sorena shahbazi
SubscriberHello Raida
Thank you for your attention and follow up on this matter
It seems that in the first step, I have to install the exact same update of the Visual Studio and Fortran versions for a desired version of Ansys to be sure about this.
I will try to find and install the appropriate updates for a desired version, and I will announce the result here again.
Hope to solve this problem :)
-
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Solver Pivot Warning in Beam Element Model
- Saving & sharing of Working project files in .wbpz format
- Understanding Force Convergence Solution Output
- User manual
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- whether have the difference between using contact and target bodies
- Defining rigid body and contact
- Colors and Mesh Display
-
7742
-
4502
-
2961
-
1449
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.