Server context#

When using a DPF Server released after Ansys 2023 R1, a distinction is introduced between two types of interaction with Ansys licenses:

  • When the Premium DPF Server context is active, underlying operations check if a valid Ansys license exists, and are allowed to check-out this license if needed. This means that all DPF features are available, but a license may be checked-out.

  • When the Entry DPF Server context is active, underlying operations check if a valid Ansys license exists, but are not allowed to check-out any license. This means that operations requiring to check-out a license are not be available and raise an error.

By default, using PyDPF-Post starts a DPF Server with the Premium context active. To learn more, see the PyDPF-Core documentation.

Change the default server context#

The default context for the server is Premium. You can change the context using the ANSYS_DPF_SERVER_CONTEXT environment variable. For more information, see the ServerContext class documentation. You can also change the server context with this code:

from ansys.dpf import post
post.set_default_server_context(post.AvailableServerContexts.entry)

Release history#

The Entry server context is available in server version 6.0 (Ansys 2023 R2) and later.

With a server version earlier than 6.0 (Ansys 2023 R1 and earlier), Premium is the default server context and all features are available, depending only on their release date.