AnsysParser¶
- class persalys.AnsysParser(*args)¶
Class used to read Ansys project files.
- Attributes:
thisown
The membership flag
Methods
generateTemplate
(*args)Reads the project file and fills in variables information.
Returns formatted ansys version (vXXX) to help generate default ansys solver path.
Accessor to the object's name.
Returns ansys solver file name.
Returns ansys version as found in the project file
Returns input variables.
Returns the project file name.
Returns the design point file name.
Returns output variables.
Returns ansys journal template file name.
loadData
(fileName)Reads the project file and fills in variables information.
populateCouplingStep
(*args)Sets ansys solver file name.
setExecutableFileName
(fileName)Sets ansys solver file name.
setInputVariables
(inputs)Sets input variables.
setModelFileName
(fileName)Sets the project file name.
setOutputFileName
(fileName)Sets the design point file name.
setOutputVariables
(outputs)Sets output variables.
setTemplateFileName
(fileName)Sets ansys journal template file name.
- __init__(*args)¶
- generateTemplate(*args)¶
Reads the project file and fills in variables information.
- Parameters:
- templateFileNamestr
Name of the template to generate. By default, a template file named input.txt.in is created next to the project (.wbpj) file
- outputFileNamestr
Name of the Ansys design point output file. By default: output.csv
- getAnsysVersion()¶
Returns formatted ansys version (vXXX) to help generate default ansys solver path.
- Returns:
- ansysVersionstr
Formatted ansys version (ex: returns ‘v202’ for full version ‘2020 R2’).
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getExecutableFileName()¶
Returns ansys solver file name.
- Returns:
- executableFileNamestr
Ansys solver file name.
- getFullAnsysVersion()¶
Returns ansys version as found in the project file
- Returns:
- fullAnsysVersionstr
Full ansys version used to create the project (ex: ‘2020 R2’).
- getModelFileName()¶
Returns the project file name.
- Returns:
- modelFileNamestr
Project file name.
- getOutputFileName()¶
Returns the design point file name.
- Returns:
- outputFileNamestr
Ansys design point file name.
- getTemplateFileName()¶
Returns ansys journal template file name.
- Returns:
- templateFileNamestr
Ansys template replay file name.
- loadData(fileName)¶
Reads the project file and fills in variables information.
- Parameters:
- fileNamestr
Name of the project file
- populateCouplingStep(*args)¶
Sets ansys solver file name.
- Parameters:
- model
CouplingPhysicalModel
Model that contains the step to be populated.
- indStepint
Index of the step to be populated.
- templateFileNamestr
Input template file path to be generated (Optional, defaults to input.txt.in in the directory containing the ansys project file).
- model
- setExecutableFileName(fileName)¶
Sets ansys solver file name.
- Parameters:
- executableFileNamestr
Ansys solver file name.
- setModelFileName(fileName)¶
Sets the project file name.
- Parameters:
- modelFileNamestr
Project file name.
- setOutputFileName(fileName)¶
Sets the design point file name.
- Parameters:
- outputFileNamestr
Ansys design point file name.
- setOutputVariables(outputs)¶
Sets output variables.
- Parameters:
- outputssequence of
Output
Output variables
- outputssequence of
- setTemplateFileName(fileName)¶
Sets ansys journal template file name.
- Parameters:
- templateFileNamestr
Ansys template replay file name.
- property thisown¶
The membership flag