This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
AdaptivityProcess.py
155 lines (129 loc) · 5.64 KB
/
AdaptivityProcess.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
from abaqusConstants import *
from .AdaptivityIteration import AdaptivityIteration
from ..Job.ModelJob import ModelJob
class AdaptivityProcess:
"""The AdaptivityProcess object defines a series of jobs that will be submitted for
analysis. Abaqus performs adaptive remeshing between each job.
Attributes
----------
status: SymbolicConstant
A SymbolicConstant specifying the status of the adaptivity process. Possible values are
SUBMITTED, RUNNING, ABORTED, TERMINATED, and COMPLETED.
iterations: dict[int, AdaptivityIteration]
A repository of :py:class:`~abaqus.Adaptivity.:py:class:`~abaqus.Adaptivity.AdaptivityIteration.AdaptivityIteration`.:py:class:`~abaqus.Adaptivity.AdaptivityIteration.AdaptivityIteration`` objects specifying the :py:class:`~abaqus.Adaptivity.:py:class:`~abaqus.Adaptivity.AdaptivityIteration.AdaptivityIteration`.:py:class:`~abaqus.Adaptivity.AdaptivityIteration.AdaptivityIteration`` objects
received during running the adaptivity process.
Notes
-----
This object can be accessed by:
.. code-block:: python
import job
mdb.adaptivityProcesses[name]
"""
# A SymbolicConstant specifying the status of the adaptivity process. Possible values are
# SUBMITTED, RUNNING, ABORTED, TERMINATED, and COMPLETED.
status: SymbolicConstant = None
# A repository of AdaptivityIteration objects specifying the AdaptivityIteration objects
# received during running the adaptivity process.
iterations: dict[int, AdaptivityIteration] = dict[str, AdaptivityIteration]()
def __init__(
self, name: str, job: ModelJob, maxIterations: int = 3, jobPrefix: str = ""
):
"""This method creates an AdaptivityProcess object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.AdaptivityProcess
Parameters
----------
name
A String specifying the name of the Adaptivity Process.
job
A ModelJob object specifying a job to be used as the prototype for all analysis jobs run
by the adaptivity process.
maxIterations
An Int specifying the maximum number of analysis jobs that will be run by the Adaptivity
Process. Abaqus performs adaptive remeshing between each analysis. The default value is
3.
jobPrefix
A String specifying the prefix to use for jobs created by the adaptivity process. An
empty string indicates that the name of the adaptivity process should be used. The
default value is an empty string.
Returns
-------
An AdaptivityProcess object.
Raises
------
AbaqusException.
"""
pass
def submit(
self,
waitForCompletion: Boolean = OFF,
datacheckJob: Boolean = False,
continueJob: Boolean = False,
):
"""This method begins the process of analysis and adaptive remeshing.
Parameters
----------
waitForCompletion
A Boolean specifying whether to interrupt the execution of a script until the end of the
adaptive remeshing process is reached.
datacheckJob
A Boolean specifying whether to run the adaptivity 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 adaptivity as a continuation analysis. The
default value is False. The datacheckJob and continueJob arguments cannot both be True.
"""
pass
def setValues(self, maxIterations: int = 3, jobPrefix: str = ""):
"""This method modifies the AdaptivityProcess object.
Parameters
----------
maxIterations
An Int specifying the maximum number of analysis jobs that will be run by the Adaptivity
Process. Abaqus performs adaptive remeshing between each analysis. The default value is
3.
jobPrefix
A String specifying the prefix to use for jobs created by the adaptivity process. An
empty string indicates that the name of the adaptivity process should be used. The
default value is an empty string.
"""
pass
def AdaptivityIteration(
self,
iteration: int,
jobName: str,
modelName: str,
odbPath: str,
remeshingErrors: int,
) -> AdaptivityIteration:
"""This method creates an AdaptivityIteration object.
Notes
-----
This function can be accessed by:
.. code-block:: python
mdb.AdaptivityProcess
Parameters
----------
iteration
An Int specifying the sequence number for this iteration in the adaptivity process.
jobName
A String specifying the name of the job that was run for this iteration.
modelName
A String specifying the name of the model that was analyzed and remeshed in this
iteration.
odbPath
A String specifying the path to the ODB file that was created for this iteration.
remeshingErrors
An Int specifying the number of part instances which generated errors while remeshing
the model in this iteration of the adaptivity process.
Returns
-------
An AdaptivityIteration object.
"""
self.iterations[iteration] = iteration = AdaptivityIteration(
iteration, jobName, modelName, odbPath, remeshingErrors
)
return iteration