-
-
December 11, 2018 at 8:17 pm
ALEXANDRE COSTA
SubscriberHi All,
I am stuck in executing an apdl script inside the Structural Workbench using apdl command objects (see the figs). I am also attaching the .wbpz, .dat and .F if somebody can give a try. Basically I exported the .iges from the APDL and started a structural model setup. When I hit solve, errors are displayed.
Any output is very welcome.
Alex
-
December 11, 2018 at 8:42 pm
Sandeep Medikonda
Ansys EmployeeNot everyone is allowed to download the files. Can you post inline pictures and maybe you can explain what error you are seeing and what is your special need to use command snippets?
Regards,
Sandeep
Guidelines on the Student Community -
December 11, 2018 at 9:53 pm
ALEXANDRE COSTA
Subscriberhi Sandeep
thanks for the reply. How can i post inline pictures?
-
December 11, 2018 at 10:29 pm
-
December 11, 2018 at 11:30 pm
-
December 12, 2018 at 12:18 am
Sandeep Medikonda
Ansys EmployeeWhat is the error you are seeing? That message really cuts away the errors? What does your solution output say and how does your force convergence plot look?
It looks like you are passing parameters to a user material subroutine. The problem could be coming from there. This will be hard to debug just from the images, maybe someone else on the community who has permissions might be able to help. Please, note that user-defined features are not generally supported.
Also, this is really not the way you set up an analysis in Mechanical. Please take some time to do a few examples provided in the Cornel Learning Modules. See this Post.
Regards,
Sandeep -
December 12, 2018 at 2:05 pm
ALEXANDRE COSTA
SubscriberHi Sandeep
Ansys staff not being able to download from this forum is really a huge setback on the purpose behind this forum.
Could you at least try the first lines printed in the picture in the Structural Mechanical ?
Best
Alex
-
December 12, 2018 at 3:25 pm
jj77
SubscriberAs Sandeep says the way you model and include apdl commands in workbench is not as ideal. Follow the links and tutorials as indicated and practise.
Now for the model:
- Make the cube in say Design Modeler
- Include command for the material part only (see image below - yellow marking, and command on the main window). Make sure to have the sub. routine in the same folder as the workbench files.
- Apply the displacements yourself in workbench (see red marking bellow). Apply the enforced disp. gradually (10 steps of 0.1 m)
- Use the analysis settings as shown below.
- Use coarse mesh (say 0.5 m sides on HEX el.).
That works.
-
December 12, 2018 at 5:53 pm
-
December 12, 2018 at 5:56 pm
-
December 12, 2018 at 6:49 pm
Sandeep Medikonda
Ansys EmployeeThe error says that you don't have any loads in the model? Like jj77 says, apply a displacement using boundary conditions over a few steps.
-
December 12, 2018 at 6:55 pm
ALEXANDRE COSTA
SubscriberSorry. What do you mean by "apply a displacement using boundary conditions over a few steps" ?
Could you show a picture of that ?
Thanks a lot.
-
December 12, 2018 at 10:45 pm
Sandeep Medikonda
Ansys Employeedesouza,
Please see this post by Peter. He demonstrates this for multiple loading cases, but you would just use incremental loading. So, instead of values of Z as 0, 2, -1 etc. you might want to use 0, 0.1, 0.2 ....and so on.
Regards,
Sandeep -
December 13, 2018 at 5:36 pm
-
December 18, 2018 at 5:57 pm
ALEXANDRE COSTA
SubscriberHey peterozman
help us. We are in complete darkness about this issue.
-
December 18, 2018 at 7:31 pm
peteroznewman
SubscriberHey desouzadacosta,
Is your goal to run an apdl script? I'm not skilled in that area.
Is you goal to shear a cube of material with a neo-hookean material model? I can help you with that in Mechanical.
I followed jj77's advice above and just included the code for the material.
Regards,
Peter
ANSYS 19.2 archive attached.
-
December 18, 2018 at 10:01 pm
ALEXANDRE COSTA
SubscriberHi Peter
Thanks a lot for the reply. We are trying to hook the usermat.f for hyperelastic material and apply the loads, but we are stuck in the errors above. The reason for using mechanical instead mechanical apdl is because we intend to do some coupled fsi with fluent.
Any of your great output would be very welcome.
Best
Alex -
December 19, 2018 at 1:36 am
peteroznewman
SubscriberHi Alex,
Do you have all of the following three compilers installed on your system?
- Microsoft Visual Studio Professional 2015 update 3 (including the MS C++ compiler)
- Intel C++ 17.0.4
- Intel Visual FORTRAN 17.0.4 compilers
You can't compile source code without them. I don't have a FORTRAN compiler, so I won't be able to compile the usermat.f source code.
If you have compilers, before linking UPFs, make sure that the INCLUDE, LIB, and PATH environment variables are set correctly for the required C/C++ and Intel Fortran compilers.
Regards,
Peter -
December 19, 2018 at 1:37 am
peteroznewman
SubscriberHi Alex,
The /UPF command offers the simplest method for linking user programmable features into Mechanical APDL. The format of the command is:
/UPF, RoutineName
where
RoutineName
is the name of the user routine (filename.ext) that you want to link. The specified routine must reside in the current working directory.
Following are prerequisites for using the /UPF command method on a Windows system:
A script named findUPF.bat is used to detect the /UPF command. You must include the path to this script in your system PATH variable. This script is typically located in Program FilesAnsys IncV192ansysbin<
platform
> where <platform
> is a directory that uniquely identifies the hardware platform version: “Winx64” for 64-bit Windows.
Before starting Mechanical APDL, you must set the ANS_USE_UPF environment variable to TRUE. This causes the program to search for /UPF in the input file. This environment variable is required only on Windows systems and only when using the /UPF command method for linking UPFs. The ANS_USE_UPF environment variable should not be set when using other methods to link UPFs.
Have you done the above?
Regards,
Peter -
December 19, 2018 at 2:10 pm
ALEXANDRE COSTA
SubscriberHi Peter,
I am going to try installing the fortran compiler. Is there some kind of native fortran compiler when using mechanical apdl (not mechanical workbench) ?
The .dat runs till the end when reading the .dat in the mechanical apdl interface.
Best,
Alex
-
December 19, 2018 at 3:13 pm
Rohith Patchigolla
Ansys EmployeeHi Desouzadacosta,
Please try this using "User Programmable Features v4" ACT extension available for free in the APP store at the below link (extensions available for all versions from v17.1 to v19.2).
https://catalog.ansys.com/product/5b3bc6857a2f9a5c90d32ee0/user-programmable-features
This app will make things a lot easier for you (for example, it has options to check your compiler installation and MS Visual studio installation, directly scope the usermat file etc.). The extension documentation is also very good.
Hope this helps.
Best regards,
Rohith
-
December 19, 2018 at 3:18 pm
peteroznewman
SubscriberHi Alex,
Yes, the file runs for me too, but I don't believe it is using the usermat.f routine since I don't have the FORTRAN compiler.
The installation instructions for ANSYS says these compilers are required for UPF code use.
If you are a student, you can get Intel FORTRAN for free.
Regards,
Peter -
December 19, 2018 at 5:21 pm
ALEXANDRE COSTA
SubscriberHi Peter,
I said about a "fortran native compiler" (i.e., installed with ANSYS) because for fluent there is
an option of hooking an "interpreted" udf.c file, using a C compiler installed during ANSYS instalation(not the Visual Studio C++ required for compiled fluent udf).
Maybe the ANSYS guys from the forum could clarify more about that.
Best,
Alex
-
December 19, 2018 at 6:41 pm
peteroznewman
SubscriberHi Rohith,
(1) If Alex has FORTRAN source code, usermat.f, does he need to install a FORTRAN compiler to use that code in a UPF?
(2) Does the ANSYS media include a FORTRAN compiler?
(3) Is the free student version of the Intel FORTRAN compiler, Intel® ParallelStudIo Xe 2019, compatible with ANSYS UPF linking?
Update: I found 2019 is version 19, but the ANSYS Help says to get version 17, so I downloaded an older version. Installing that is not simple as I don't have the Prerequisites.
Thanks in advance,
Peter -
December 19, 2018 at 8:14 pm
peteroznewman
SubscriberHi Alex,
Here is a zip file for you.
Regards,
Peter -
December 19, 2018 at 9:03 pm
David Weed
Ansys EmployeeHi Peter/Alex,
1) Since Alex is using the /UPF command (that is also the command that the UPF ACT app uses under the hood) he will need the IFORT compiler installed on his system. Essentially, every time you issue the /UPF command, it compiles and links to the MAPDL source code. It's a sort of "compile/link on the fly' method.
2) ANSYS does not offer users an IFORT compiler; they need to purchase this separately (the same goes for Microsoft Visual Studios)
3) Intel PS 2019 is not supported by ANSYS; if the user is in R19.2, they need IFORT 17.0.4. and MS VS 2015 Professional w/ update 3: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v192/ai_instl/win_compilers.html?q=fortran%20compiler
-
December 19, 2018 at 10:22 pm
ALEXANDRE COSTA
SubscriberHi David
Is ifort 17.0.4 contained within intel ps 2017?
-
December 19, 2018 at 10:22 pm
ALEXANDRE COSTA
SubscriberThxs
-
December 19, 2018 at 11:38 pm
-
December 20, 2018 at 12:14 am
peteroznewman
SubscriberAlex,
The supported MS VS Professional 2015 Update 3 will run as a Trial version.
If you want to use after the trial period, the Retail cost of an annual subscription at the MS Store is $1,199 for the first year and $799 per year afterward.
I wonder if the free MS VS Community (instead of Professional) would work with ANSYS. After you see the /UPF actually working, you can uninstall Professional and install Community and see if it still works.
To get a MS C++ Compiler, I downloaded this:
but when I ran the installer, it said it could not install this since Visual Studio was installed, and to uninstall that to install this!
This is why I am glad I am not a software developer...
Alex, I have to ask, how much do you want to run that usermat.f code? It seems like a huge effort to get your computer ready to run it. I've only now got two of the four items required.
Regards,
Peter -
December 20, 2018 at 2:21 pm
David Weed
Ansys EmployeeHi Peter,
The Intel web page and 17.0.4. compiler that you've shown are correct. Alex will need an Intel account so that he can access that site.
-
December 20, 2018 at 5:52 pm
peteroznewman
SubscriberHi David,
Do you know if I uninstall VS Professional 2015 so that I can first install MS Visual C++ Build Tools 2015, will I then be able to install VS Pro 2015, or are they mutually exclusive? I can try it a see, it's just the waiting time. Or do I have the wrong package for MS C++?
Regards,
Peter
-
December 20, 2018 at 6:44 pm
ALEXANDRE COSTA
SubscriberHi Peter,
Thxs again. The effort is because me and my partner have a master degree subject to develop.
-
December 20, 2018 at 7:07 pm
ALEXANDRE COSTA
SubscriberFrom the upf extension manual it requires a bit older versions of ifort and msvc :
Requirements for using UPF
• Installation Requirement
– You must install ANSYS with the ‘Customization Files’ option checked during
installations
? Note that this is NOT default when installing ANSYS
• Compiler Requirements
– Intel FORTRAN 15.0.2 compilers for ANSYS
? Other compilers are not supported
• Visual Studio Requirements
– Visual Studio 2012 (including the MS C++ compiler) for ANSYS
-
December 20, 2018 at 8:32 pm
peteroznewman
SubscriberAlex, what version of ANSYS are you using?
For ANSYS 19.2, the versions are newer than you are listing above.
-
December 20, 2018 at 8:49 pm
-
December 20, 2018 at 9:22 pm
-
December 20, 2018 at 10:04 pm
peteroznewman
SubscriberI went into the Free Software Tools link in blue text, and registered with a .edu email address.
-
January 14, 2019 at 7:26 pm
-
January 15, 2019 at 1:22 am
peteroznewman
SubscriberPlease delete the duplicate post. It looks like you are putting the same error message in four times. I don't see the difference.
-
January 15, 2019 at 1:24 pm
ALEXANDRE COSTA
SubscriberHi Peter,
Thanks for the reply.
My apologies, some how I uploaded the same figs. I am going to upload the different ones.
Best,
Alex Costa
-
January 15, 2019 at 5:57 pm
-
January 15, 2019 at 8:28 pm
peteroznewman
SubscriberAlex,
I recommend you change the BCs on this cube.
Put a X=0 displacement and all others Free on one face normal to the X axis.
Put a Y=0 displacement and all others Free on one face normal to the Y axis.
Put a Z=0 displacement and all others Free on one face normal to the Z axis.
Instead of a Force, use a non-zero X displacement on the face opposite the one with X=0.
The advantage of these BCs is that it creates a pure normal stress in the X direction and zero stress in Y and Z directions.
Finally, set the mesh size so you mesh with exactly 1 element. You can even set it to a linear element so there are only 8 nodes.
Now you know the exact strain in X because it is set by the displacement and you can calculate what the X stress should be from that strain and the equations used to write code for the material subroutine.
Regards,
Peter -
January 16, 2019 at 3:13 pm
ALEXANDRE COSTA
SubscriberHi Peter,
Thanks for the clue. I will work on that.
My feeling is that the fortran compiler is not compiling the usermat.f , and assuming some wrong "default" material (same situation as you described when ran
td38 input file inside Mechanical APDL without the fortran compiler installed).
Alex
-
- The topic ‘apdl script within structural workbench’ is closed to new replies.
- The legend values are not changing.
- LPBF Simulation of dissimilar materials in ANSYS mechanical (Thermal Transient)
- Convergence error in modal analysis
- APDL, memory, solid
- How to model a bimodular material in Mechanical
- Meaning of the error
- Simulate a fan on the end of shaft
- Real Life Example of a non-symmetric eigenvalue problem
- Nonlinear load cases combinations
- How can the results of Pressures and Motions for all elements be obtained?
-
4007
-
1461
-
1287
-
1124
-
1021
© 2025 Copyright ANSYS, Inc. All rights reserved.