This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
Coexecution.py
181 lines (153 loc) · 8.39 KB
/
Coexecution.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
from abaqusConstants import *
from .Job import Job
class Coexecution:
"""The Coexecution object contains a set of jobs as associated parameters to define a
co-simulation analysis.
Attributes
----------
name: str
A String specifying the name of the new job. The name must be a valid Abaqus/:py:class:`~.CAE` object
name.
type: SymbolicConstant
A SymbolicConstant specifying the type of analysis to execute for the co-execution.
Possible values are ANALYSIS, SYNTAXCHECK, RECOVER, and RESTART. The default value is
ANALYSIS.
masterAnalysisProduct: SymbolicConstant
A SymbolicConstant specifying the analysis product type of the master model for the
co-execution. The default value is ABAQUS.
waitHours: int
An Int specifying the number of hours to wait before submitting the co-execution. This
argument is ignored if **queue** is set. The default value is 0.This argument works in
conjunction with **waitMinutes**. **waitHours** and **atTime** are mutually exclusive.
waitMinutes: int
An Int specifying the number of minutes to wait before submitting the job. This argument
is ignored if **queue** is set. The default value is 0.This argument works in conjunction
with **waitHours**. **waitMinutes** and **atTime** are mutually exclusive.
status: SymbolicConstant
A SymbolicConstant specifying the status of the co-execution. Possible values are
SUBMITTED, RUNNING, ABORTED, TERMINATED, COMPLETED, CHECK_SUBMITTED, CHECK_RUNNING, and
CHECK_COMPLETED.If the **message** member of all the jobs are empty, **status** is set to
NONE.
queue: str
A String specifying the name of the queue to which to submit the co-execution. The
default value is an empty string.Note:You can use the **queue** argument when creating a
:py:class:`~abaqus.Job.Coexecution.Coexecution` object on a Windows workstation; however, remote queues are available only
on Linux platforms.
atTime: str
A String specifying the time at which to submit the co-execution. If **queue** is empty,
the string syntax must be valid for the Linux `at` command. If **queue** is set, the
syntax must be valid according to the system administrator. The default value is an
empty string.Note:You can use the **atTime** argument when creating a :py:class:`~abaqus.Job.Coexecution.Coexecution` object
on a Windows workstation; however, the `at` command is available only on Linux
platforms.
jobs: dict[str, Job]
A repository of :py:class:`~abaqus.Job.Job.Job` objects specifying the jobs that comprise this co-execution.
slaveModels: tuple
A tuple of Strings specifying the names of the slave models for the co-execution.
slaveAnalysisProducts: SymbolicConstant
A tuple of SymbolicConstants specifying the analysis product types of the slave
models for the co-execution. The default value is an empty sequence.
masterModel: str
A String specifying the name of the master model for the co-execution.
Notes
-----
This object can be accessed by:
.. code-block:: python
import job
mdb.coexecutions[name]
The corresponding analysis keywords are:
- HEADING
- PREPRINT
"""
# A String specifying the name of the new job. The name must be a valid Abaqus/CAE object
# name.
name: str = ""
# A SymbolicConstant specifying the type of analysis to execute for the co-execution.
# Possible values are ANALYSIS, SYNTAXCHECK, RECOVER, and RESTART. The default value is
# ANALYSIS.
type: SymbolicConstant = ANALYSIS
# A SymbolicConstant specifying the analysis product type of the main model for the
# co-execution. The default value is ABAQUS.
mainAnalysisProduct: SymbolicConstant = ABAQUS
# An Int specifying the number of hours to wait before submitting the co-execution. This
# argument is ignored if *queue* is set. The default value is 0.This argument works in
# conjunction with *waitMinutes*. *waitHours* and *atTime* are mutually exclusive.
waitHours: int = 0
# An Int specifying the number of minutes to wait before submitting the job. This argument
# is ignored if *queue* is set. The default value is 0.This argument works in conjunction
# with *waitHours*. *waitMinutes* and *atTime* are mutually exclusive.
waitMinutes: int = 0
# A SymbolicConstant specifying the status of the co-execution. Possible values are
# SUBMITTED, RUNNING, ABORTED, TERMINATED, COMPLETED, CHECK_SUBMITTED, CHECK_RUNNING, and
# CHECK_COMPLETED.If the *message* member of all the jobs are empty, *status* is set to
# NONE.
status: SymbolicConstant = None
# A String specifying the name of the queue to which to submit the co-execution. The
# default value is an empty string.Note:You can use the *queue* argument when creating a
# Coexecution object on a Windows workstation; however, remote queues are available only
# on Linux platforms.
queue: str = ""
# A String specifying the time at which to submit the co-execution. If *queue* is empty,
# the string syntax must be valid for the Linux `at` command. If *queue* is set, the
# syntax must be valid according to the system administrator. The default value is an
# empty string.Note:You can use the *atTime* argument when creating a Coexecution object
# on a Windows workstation; however, the `at` command is available only on Linux
# platforms.
atTime: str = ""
# A repository of Job objects specifying the jobs that comprise this co-execution.
jobs: dict[str, Job] = dict[str, Job]()
# A tuple of Strings specifying the names of the secondary models for the co-execution.
secondaryModels: tuple = ()
# A tuple of SymbolicConstants specifying the analysis product types of the secondary
# models for the co-execution. The default value is an empty sequence.
secondaryAnalysisProducts: SymbolicConstant = None
# A String specifying the name of the main model for the co-execution.
mainModel: str = ""
# A SymbolicConstant specifying the type of license type being used in case of DSLS
# SimUnit license model. Possible values are DEFAULT, TOKEN, and CREDIT. The default value
# is DEFAULT.If the license model is not DSLS SimUnit then the licenseType is not
# available.
licenseType: SymbolicConstant = DEFAULT
def kill(self):
"""This method kills the analysis of a co-execution."""
pass
def submit(
self,
consistencyChecking: Boolean = ON,
datacheckJob: Boolean = False,
continueJob: Boolean = False,
):
"""This method submits a co-execution for analysis.
Parameters
----------
consistencyChecking
A Boolean specifying whether to perform consistency checking for the individual jobs.
The default value is ON. It is not recommended to turn the consistency checking off
unless you are absolutely sure the models are all consistent.
datacheckJob
A Boolean specifying whether to run the co-execution as a datacheck analysis. The
default value is False. The *datacheckJob* and *continueJob* arguments cannot both be
True.
continueJob
A Boolean specifying whether to run the co-execution as a continuation analysis. The
default value is False. The *datacheckJob* and *continueJob* arguments cannot both be
True.
"""
pass
def writeInput(self, consistencyChecking: Boolean = ON):
"""This method writes an input file for each analysis in the co-execution.
Parameters
----------
consistencyChecking
A Boolean specifying whether to perform consistency checking for the individual jobs.
The default value is ON. It is not recommended to turn the consistency checking off
unless you are absolutely sure the models are all consistent.
"""
pass
def waitForCompletion(self):
"""This method interrupts the execution of the script until the end of all the analyses. If
you call the waitForCompletion method and the *status* member is neither SUBMITTED nor
RUNNING, Abaqus assumes the analysis has either completed or aborted and returns
immediately.
"""
pass