Sei sulla pagina 1di 17

UPF Extension

Version 3 - ANSYS versions 16.0, 16.1 and 16.2


16.0, 16.1 & 16.2 Release

Anthony Dawson
anthony.dawson@ansys.com
2015 ANSYS, Inc.

Contents

Introduction

Requirements for using UPF

Installation instructions

Installing the proper compilers


Installing MS Visual Studio or SDK
Checking your installs

Using the UPF Extension

Loading the extension


Check Function (to check your system for proper UPF setup)
Using a UPF

Ensuring your UPF was invoked and used properly

Example of UPF Extension: USERMAT

2015 ANSYS, Inc.

Introduction
This extension gives users simple access to User Programmable
Features natively in the ANSYS Workbench Environment
Previously this capability only existed in the Classic environment (without
pre-compilation of a new ANSYS executable)
The extension takes care of compiling and linking your UPF to the ANSYS
MAPDL solver

UPF provides powerful options


Customize the ANSYS program to your needs

User-defined material behavior


Create your own element
Define specialized failure criterion (for composites, etc.)
Much more

For more information about UPF (including details regarding all of the
following installation instructions) reference the ANSYS UPF training material
2015 ANSYS, Inc.

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 14.0.3 compilers (aka Intel FORTRAN 2013) for ANSYS
16.0/16.1/16.2
Other compilers are not supported

Visual Studio Requirements


Visual Studio 2010 SP1 (including the MS C++ compiler) for ANSYS
16.0/16.1/16.2
There are multiple ways to not have to pay for MS Visual Studio when using UPF
See note below in installation instructions about the possibility of using the free
Microsoft SDK version
See note below in installation instructions about the possibility of MS VS Shell
being included with your FORTRAN compilers installation
2015 ANSYS, Inc.

Installation Instructions (Compilers)


Start at the Intel website:
http://software.intel.com/en-us/intel-compilers

Be sure to download and install the proper version for your version
of ANSYS
See previous page for required version
Be sure to install with Administrator Privileges
Note that on 64-bit Windows the compiler can install both 32-bit and 64-bit
compilers so the default installation directory is "C:\Program Files (x86)\",
although it will install the 64-bit compilers
You are looking for Intel Parallel Studio XE 2013
It is possible to obtain a version of these compilers that contains an
included version of MS Visual Studio Shell
This is desirable as it is all you need! (no need to install anything else)

2015 ANSYS, Inc.

Installation Instructions (MS VS)


Start at the Microsoft Visual Studio website:
http://msdn.microsoft.com/en-us/library/dd831853%28v=vs.100%29.aspx

Be sure to download and install the proper version for your version
of ANSYS
See above for required version
Be sure to install with administrative privileges

Note that if you use MS Visual Studio, you likely need to install it
first to get Intel Fortran integrated with MS VS

2015 ANSYS, Inc.

Installation Instructions (MS SDK)


Visual Studio is required for linking user programmable features on
Windows platforms. However, if you do not have Visual Studio, you
can still link user programmable features into ANSYS by
downloading Microsoft's Windows SDK
ANSYS 16.0/16.1/16.2
Microsoft's Windows SDK v7.1
http://www.microsoft.com/en-us/download/details.aspx?id=8279
Tip: If you receive an error when attempting to install MS SDK, you may need to go to
your Windows Control Panel and under Programs and Features uninstall some Microsoft
Visual C++ components (the redistributables)

2015 ANSYS, Inc.

Installation Instructions (Check Installations)


If you wish to check that your installations were integrated into
your system properly, you may follow these steps:
Check the Fortran Build environment
1. Click on the Windows Start Button and navigate to the following:

ANSYS 16.0/16.1/16.2: All Programs > Intel Parallel Studio XE 2013 > Command Prompt > Parallel Studio XE with Intel
Compiler XE v14.0 Update 1 and click on the appropriate command prompt for your version of Visual Studio

2. A command window will open


Confirm the command window gives you a prompt without any errors or warnings

Check the Visual Studio installation (if using this option)


1. Click on the Windows Start Button and navigate to All Programs > Microsoft Visual Studio 2010
> Visual Studio Tools and click on Visual Studio 2010 x64 Win64 Command Prompt
2. A command window will open
Confirm the command window gives you a prompt without any errors or warnings

Check the MS SDK installation (if using this option)


1. Click on the Windows Start Button and navigate to All Programs > Microsoft Windows SDK
v7.1 and click on Windows SDK 7.1 Command Prompt
2. A command window will open
Confirm the command window gives you a prompt without any errors or warnings
2015 ANSYS, Inc.

Loading the UPF Extension


Place the .wbex file in an accessible location on your system

From the ANSYS Workbench Project Schematic page, browse to:


Extensions > Install Extension
Point to the .wbex file

The extension is now installed, but must be loaded for it to appear


in Workbench Mechanical
Choose Extensions > Manage Extensions
See the list of extensions and check Load for the UPF extension
If you wish to have this extension load by default, you can right-click on the
extension and choose Load as Default

Tip: If you would like the extension to be saved with a project (so colleagues you send
the project to can utilize it), see the Extension settings under Workbench Tools > Options
2015 ANSYS, Inc.

Using the Check Function


You will find a new toolbar in your Mechanical application titled
User Programmable Features
This toolbar will have two buttons: Check UPF Setup and Use a
UPF

Clicking the Check UPF Setup button will perform several tasks
Check your compiler installation
Check your MS Visual Studio, MS SDK or MS VS Shell installation
Check to make sure your ANSYS installation supports the use of UPF

2015 ANSYS, Inc.

10

Using a UPF
The Use a UPF button will insert a new object into your tree

This object will indicate that you wish to solve a particular analysis
branch while invoking a UPF
The only option you need to set in the details section of the UPF object is
declaring what UPF file you would like to use (generally a FORTRAN .f file)
You may insert and use more than one UPF object/file in a given analysis
However, you may not use more than one specific UPF routine per analysis
For example, you may use a USERMAT routine and a USERCREEP routine but
you may not use two USERMAT routines
Note that the UPF extension is using the name of the given file (and nothing
more) to decide which routine it is associated with

To effectively use your UPF, you must declare TB,USER (or similar) with the
proper material definitions for your UPF in a geometry commands object
2015 ANSYS, Inc.

11

Ensuring your UPF was invoked and used


To confirm that your solve
successfully referenced your
UPF you can view the solve.out
file and check for the lines:
User Link path (ANS_USER_PATH)

and
Note - This ANSYS version was linked by Licensee

These lines have been bolded


in this example image
If you see these lines, your UPF
was referenced in the solve

2015 ANSYS, Inc.

12

Ensuring your UPF was invoked and used


As a final confirmation, to verify that your UPF subroutine has
been fully and properly utilized in your solve, a common practice is
to insert a write statement in the UPF file that will subsequently
appear in the solve.out file
If this unique statement appears in the solve.out file, it is certain
that your code was invoked in the ANSYS solve

2015 ANSYS, Inc.

13

Example of UPF Extension: USERMAT


A simple bilinear plasticity material model, identical to
TB,BISO, is used to demonstrate the user material
subroutine usermat.F.
The example is a two-element test case under simple
tension. One element has material defined using the
TB,BISO option, while the other has material defined
using the TB,USER option inputted via the UPF ACT
extension.
Once the model has been set up, we can start working with
the selected UPF following the procedure described in the
following slides.

2015 ANSYS, Inc.

14

Example of UPF Extension: USERMAT


1. Check UPF setup
Informative messages
confirm that the UPF
working environment
has been correctly
installed/set up. We can
then move on and
choose the UPF we
would like to consider. In
this case we will use
USERMAT

2015 ANSYS, Inc.

15

Example of UPF Extension: USERMAT


2. Use USERMAT
by specifying the folder where it is located

3. Define the appropriate APDL syntax to specify material


properties

4. Request state variable output if needed

2015 ANSYS, Inc.

16

Example of UPF Extension: USERMAT


5. Run the analysis and check the results

2015 ANSYS, Inc.

17

Potrebbero piacerti anche