solution_variables#

Wrappers over SVAR gRPC service of Fluent.

Classes:

SolutionVariableData(service, ...)

Provides access to Fluent SVAR data on zones.

SolutionVariableInfo(service)

Provide access to Fluent SVARs and Zones information.

SolutionVariableService(channel, metadata)

SVAR service of Fluent.

Exceptions:

SvarError(solution_variable_name, allowed_values)

Exception class for errors in solution variable name.

ZoneError(zone_name, allowed_values)

Exception class for errors in Zone name.

Functions:

extract_svars(solution_variables_data)

Extracts SVAR data via a server call.

class ansys.fluent.core.services.solution_variables.SolutionVariableData(service, solution_variable_info)#

Bases: object

Provides access to Fluent SVAR data on zones.

Classes:

Data(domain_name, zone_id_name_map, ...)

Solution variable data.

Methods:

__init__(service, solution_variable_info)

create_empty_array(solution_variable_name, ...)

Get numpy zeros array for the SVAR on a zone.

get_data(solution_variable_name, zone_names)

Get SVAR data on zones.

get_svar_data(svar_name, zone_names[, ...])

Get solution variable data.

set_data(solution_variable_name, ...[, ...])

Set SVAR data on zones.

set_svar_data(svar_name, zone_names_to_svar_data)

Set solution variable data.

class Data(domain_name, zone_id_name_map, solution_variable_data)#

Bases: object

Solution variable data.

Methods:

__init__(domain_name, zone_id_name_map, ...)

Attributes:

data

Solution variable data.

domain

Domain name.

zones

Zone name.

__init__(domain_name, zone_id_name_map, solution_variable_data)#
property data#

Solution variable data.

property domain#

Domain name.

property zones#

Zone name.

__init__(service, solution_variable_info)#
create_empty_array(solution_variable_name, zone_name, domain_name='mixture')#

Get numpy zeros array for the SVAR on a zone.

This array can be populated with values to set SVAR data.

get_data(solution_variable_name, zone_names, domain_name='mixture')#

Get SVAR data on zones.

Parameters:
solution_variable_namestr

Name of the SVAR.

zone_names: List[str]

Zone names list for SVAR data.

domain_namestr, optional

Domain name. The default is mixture.

Returns:
SolutionVariableData.Data

Object containing SVAR data.

get_svar_data(svar_name, zone_names, domain_name='mixture')#

Get solution variable data.

set_data(solution_variable_name, zone_names_to_solution_variable_data, domain_name='mixture')#

Set SVAR data on zones.

Parameters:
solution_variable_namestr

Name of the SVAR.

zone_names_to_solution_variable_data: Dict[str, np.array]

Dictionary containing zone names for SVAR data.

domain_namestr, optional

Domain name. The default is mixture.

Returns:
None
set_svar_data(svar_name, zone_names_to_svar_data, domain_name='mixture')#

Set solution variable data.

class ansys.fluent.core.services.solution_variables.SolutionVariableInfo(service)#

Bases: object

Provide access to Fluent SVARs and Zones information.

Classes:

SolutionVariables(solution_variables_info)

Class containing information for multiple solution variables.

ZonesInfo(zones_info, domains_info)

Class containing information for multiple zones.

Methods:

__init__(service)

get_svars_info(zone_names[, domain_name])

Get solution variables info.

get_variables_info(zone_names[, domain_name])

Get SVARs info for zones in the domain.

get_zones_info()

Get Zones info.

class SolutionVariables(solution_variables_info)#

Bases: object

Class containing information for multiple solution variables.

Classes:

SolutionVariable(solution_variable_info)

Class containing information for single solution variable.

Methods:

__init__(solution_variables_info)

Attributes:

solution_variables

Solution variables.

svars

Solution variables.

class SolutionVariable(solution_variable_info)#

Bases: object

Class containing information for single solution variable.

Methods:

__init__(solution_variable_info)

__init__(solution_variable_info)#
__init__(solution_variables_info)#
property solution_variables: List[str]#

Solution variables.

property svars: List[str]#

Solution variables.

class ZonesInfo(zones_info, domains_info)#

Bases: object

Class containing information for multiple zones.

Classes:

ZoneInfo(zone_info)

Class containing information for single zone.

Methods:

__init__(zones_info, domains_info)

domain_id(domain_name)

Get domain id.

Attributes:

domains

Get domain names.

zones

Get zone names.

class ZoneInfo(zone_info)#

Bases: object

Class containing information for single zone.

Classes:

PartitionsInfo(partition_info)

Class containing information for partitions.

Methods:

__init__(zone_info)

Attributes:

count

Get zone count.

class PartitionsInfo(partition_info)#

Bases: object

Class containing information for partitions.

Methods:

__init__(partition_info)

__init__(partition_info)#
__init__(zone_info)#
property count: int#

Get zone count.

__init__(zones_info, domains_info)#
domain_id(domain_name)#

Get domain id.

property domains: List[str]#

Get domain names.

property zones: List[str]#

Get zone names.

__init__(service)#
get_svars_info(zone_names, domain_name='mixture')#

Get solution variables info.

get_variables_info(zone_names, domain_name='mixture')#

Get SVARs info for zones in the domain.

Parameters:
zone_namesList[str]

List of zone names.

domain_name: str, optional

Domain name.The default is mixture.

Returns:
SolutionVariableInfo.SolutionVariables

Object containing information for SVARs which are common for list of zone names.

get_zones_info()#

Get Zones info.

Parameters:
None
Returns:
SolutionVariableInfo.ZonesInfo

Object containing information for all zones.

class ansys.fluent.core.services.solution_variables.SolutionVariableService(channel, metadata)#

Bases: object

SVAR service of Fluent.

Methods:

__init__(channel, metadata)

__init__ method of SVAR service class.

get_data(request)

GetSvarData RPC of SVAR service.

get_variables_info(request)

GetSvarsInfo RPC of SVAR service.

get_zones_info(request)

GetZonesInfo RPC of SVAR service.

set_data(request)

SetSvarData RPC of SVAR service.

__init__(channel, metadata)#

__init__ method of SVAR service class.

get_data(request)#

GetSvarData RPC of SVAR service.

get_variables_info(request)#

GetSvarsInfo RPC of SVAR service.

get_zones_info(request)#

GetZonesInfo RPC of SVAR service.

set_data(request)#

SetSvarData RPC of SVAR service.

exception ansys.fluent.core.services.solution_variables.SvarError(solution_variable_name, allowed_values)#

Bases: ValueError

Exception class for errors in solution variable name.

__init__(solution_variable_name, allowed_values)#
exception ansys.fluent.core.services.solution_variables.ZoneError(zone_name, allowed_values)#

Bases: ValueError

Exception class for errors in Zone name.

__init__(zone_name, allowed_values)#
ansys.fluent.core.services.solution_variables.extract_svars(solution_variables_data)#

Extracts SVAR data via a server call.