Skip to content

Commit 23eee09

Browse files
committed
Add misspelled words in Python files to get Vale check to pass
1 parent 64d33de commit 23eee09

File tree

7 files changed

+123
-111
lines changed

7 files changed

+123
-111
lines changed

doc/styles/Vocab/ANSYS/accept.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,11 @@ APIs
2222
postprocessing
2323
PyDPF-Post
2424
subpackages
25-
venv
25+
venv
26+
inout
27+
propt
28+
setyp
29+
solf
30+
sourth
31+
embeded
32+
outputed

src/ansys/dyna/core/pre/README.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
# pyDyna-pre
1+
# PyDYNA ``pre`` service
22

3-
The PyDyna-pre provide the ability to create keyword inputdeck through gRPC framework.
3+
The PyDYNA ``pre`` service provide the ability to create a keyword input deck through the gRPC framework.
44

5-
## Running pyDyna-pre in virtualenv
5+
## Run the ``pre`` service in a virtual environment
66

7-
virtualenv is a CLI tool that needs a Python interpreter to run.
7+
A virtual environment is a CLI tool that must have a Python interpreter to run.
88

9-
Install virtualenv
9+
Install virtualenv:
1010

1111
```
1212
pip install virtualenv
1313
```
1414

15-
Create a python virtual environment of the same version as virtualenv,installed into the subdirectory "venv"
15+
Create a Python virtual environment of the same version as ``virtualenv``,installed into the subdirectory "venv":
1616

1717
```
1818
virtualenv venv
1919
```
2020

21-
Activate venv on Windows by running command:
21+
Activate the ``venv`` environment on Windows by running these commands:
2222

2323
```
2424
cd venv
2525
./Scripts/activate
2626
```
2727

28-
Activate venv on Linux by running command:
28+
Activate the ``venv`` environment on Linux by running these commands:
2929

3030
```
3131
cd venv
3232
source bin/activate
3333
```
3434

35-
Copy pyDyna package in venv folder
35+
Copy the PyDYNA package into the ``venv`` folder:
3636

3737
```
3838
venv/
@@ -49,24 +49,25 @@ venv/
4949

5050
## Requirements
5151

52-
Go to pyDyna/requirements/pythonxx according to your Python version.
53-
Then running command:
52+
Go to ``pyDyna/requirements/python[xx]``, where ``[xx]`` is your Python version.
53+
Then, run these commands:
5454

5555
```
5656
cd pyDyna/requirement/pythonxx
5757
pip install -r requirements.txt
5858
```
5959

60-
## Starting the Server
60+
## Start the Server
6161

62-
So far, Python 3.6/3.8/3.9 is used to start server, make sure this like below:
62+
So far, Python 3.6 through 3-8 can be used to start server. Validate by running
63+
these commands:
6364

6465
```
6566
(venv) C:\pyDyna\examples\pre> C:\python36\python.exe --version
6667
Python 3.6.8
6768
```
6869

69-
Here is the minimal content in Server folder
70+
Here is the minimal content in the ``Server`` folder:
7071
```
7172
Server/
7273
kwserver.py
@@ -81,29 +82,31 @@ Server/
8182
cp39/keywordreader.pyd
8283
```
8384

84-
### Starting the Server on Windows:
85+
### Start the server on Windows
86+
87+
Start the server on Windows by running these commands:
8588

86-
Start server by running command:
8789
```shell
8890
(venv) C:\pyDyna\ansys\dyna\pre\Server> python .\kwserver.py
8991
kwgrpc Server listening on: localhost:50051
9092
```
9193

92-
### Starting the server on Linux:
94+
### Start the server on Linux
9395

94-
Start server by running command:
96+
Start the server on Linux by running these commands:
9597

9698
```
9799
(venv) :~/pyDyna/ansys/dyna/pre/Server> python kwserver.py
98100
```
99101

100-
## Running pyDyna-pre client
102+
## Run the PyDYNA ``pre`` service
101103

102-
See the examples in the examples folder for some basic example. More will be added later.
104+
See the ``Examples`` folder for some basic usage examples. More
105+
examples are to be added later.
103106

104107
### Structure ALE demo
105108

106-
Go to pyDyna/examples/pre,and run sale_efp.py:
109+
Go to the ``pyDyna/examples/pre`` directory and run the ``sale_efp.py`` file:
107110

108111
```
109112
(venv) C:\pyDyna\examples\pre> python .\sale_efp.py
@@ -127,7 +130,7 @@ Go to pyDyna/examples/pre,and run sale_efp.py:
127130
2022-07-05 08:19:43 : efpcase.k is outputed...
128131
```
129132

130-
At the same time, corresponding information will be printed in the server side.
133+
Corresponding information is printed on the server side:
131134

132135
```
133136
Load model: C:\pyDyna\ansys\dyna\pre\Server\input\efpcase.k
@@ -159,7 +162,8 @@ Database GLSTATCreated...
159162
Saved Successfully!
160163
```
161164

162-
After running this file,the result file will be save in pyDyna/ansys/dyna/pre/Server/output
165+
After running the ``sale_efp.py`` file, the result file is saved in the
166+
``pyDyna/ansys/dyna/pre/Server/output`` directory.
163167

164168
```
165169
(venv) C:\pyDyna\ansys\dyna\pre\Server> cd .\output\
@@ -174,4 +178,4 @@ Mode LastWriteTime Length Name
174178
-a---- 2022/7/5 8:19 2436058 efpcase.k
175179
```
176180

177-
Submit the result file, efpcase.k, to LS-Dyna for simulation results.
181+
Submit the result file, ``efpcase.k``, to Ansys LS-DYNA for simulation results.

src/ansys/dyna/core/pre/dynabase.py

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ class Curve:
109109
"""
110110
Defines a curve as a function of time.
111111
112-
For example, ``load (ordinate value)``.
113-
112+
For example, ``load (ordinate value)``.
113+
114114
"""
115115

116116
def __init__(self, sfo=1, x=[], y=[], func=None):
@@ -286,7 +286,7 @@ def set_accuracy(
286286
Implicit accuracy flag.
287287
explicit_accuracy_flag : float
288288
Explicit accuracy parameter.
289-
289+
290290
- EQ.0.0: Off
291291
- GT.0.0: On
292292
@@ -326,25 +326,25 @@ def set_energy(
326326
Hourglass energy calculation option.
327327
rigidwall_energy : int
328328
Rigidwall energy dissipation option.
329-
329+
330330
- EQ.1: Energy dissipation is not computed.
331331
- EQ.2: Energy dissipation is computed.
332-
332+
333333
sliding_interface_energy : int
334334
Sliding interface energy dissipation option.
335-
335+
336336
- EQ.1: Energy dissipation is not computed.
337337
- EQ.2: Energy dissipation is computed.
338-
338+
339339
rayleigh_energy : int
340340
Rayleigh energy dissipation option.
341-
341+
342342
- EQ.1: Energy dissipation is not computed.
343343
- EQ.2: Energy dissipation is computed.
344-
344+
345345
initial_reference_geometry_energy : int
346346
Initial reference geometry energy option.
347-
347+
348348
- EQ.1: Initial reference geometry energy is not computed.
349349
- EQ.2: Initial reference geometry energy is computed.
350350
@@ -382,16 +382,16 @@ def set_output(
382382
The default is ``True``, which means that none of these are printed: nodal
383383
coordinates, element connectivities, rigid wall definitions, nodal SPCs,
384384
initial velocities, initial strains, adaptive constraints, and SPR2/SPR3
385-
constraints. If ``False``, no supression occurs.
385+
constraints. If ``False``, no suppression occurs.
386386
print_suppression_echo : OutputEcho
387387
Print suppression setting during the input phase flag for the echo file.
388388
Options are:
389-
389+
390390
- ALL_DATA_PRINTED: All data is printed.
391391
- SUPPRESSED_NODAL_PRINTING: Nodal printing is suppressed.
392392
- SUPPRESSED_ELEMENT_PRINTING: Element printing is suppressed.
393393
- SUPPRESSED_NODAL_AND_ELEMENT_PRINTING : Both nodal and element printing is suppressed.
394-
394+
395395
"""
396396
if print_suppression_d3hsp:
397397
npopt = 1
@@ -568,10 +568,10 @@ def create_control_solid(
568568
esort : int, optional
569569
Automatic sorting of tetrahedral and pentahedral elements to avoid
570570
use of degenerate formulations for these shapes. The default is ``0``.
571-
571+
572572
- EQ.0: No sorting
573573
- EQ.1: Sort
574-
574+
575575
fmatrx : int, optional
576576
Method to use in the calculation of the deformation gradient matrix.
577577
The default is ``1``.
@@ -669,7 +669,7 @@ def create_control_contact(self, rwpnal, shlthk=0, orien=1, ssthk=0, ignore=0, i
669669

670670
def create_damping_global(self, lcid=0, valdmp=0.0):
671671
"""Define mass-weighted nodal damping.
672-
672+
673673
Mass-weighted nodal damping applies globally to the
674674
nodes of deformable bodies and to the mass center of
675675
rigid bodies.
@@ -853,6 +853,7 @@ def get_nid(self):
853853

854854
class SetType(Enum):
855855
"""Contains the enums for setting types."""
856+
856857
SHELL = "SET_SHELL"
857858
SOLID = "SET_SOLID"
858859
BEAM = "SET_BEAM"
@@ -862,7 +863,7 @@ class SetType(Enum):
862863

863864
class NodesetGeneral(BaseSet):
864865
"""Includes nodal points of element sets.
865-
866+
866867
Element sets are defined by ``SET_XXXX_LIST``,
867868
where ``XXXX`` can be ``SHELL``, ``SOLID``, ``BEAM``,
868869
``TSHELL`` or ``DISCRETE``.
@@ -1147,7 +1148,7 @@ def set_property(self):
11471148
class BeamPart(Part):
11481149
"""
11491150
Defines a beam part.
1150-
1151+
11511152
A beam part definition consists of the combined material information,
11521153
section properties, hourglass type, thermal properties, and a flag
11531154
for part adaptivity.
@@ -1192,7 +1193,7 @@ def set_property(self):
11921193

11931194
class ShellPart(Part):
11941195
"""Defines a shell part.
1195-
1196+
11961197
A shell part definition consists of the combined material information,
11971198
section properties, hourglass type, thermal properties, and a flag
11981199
for part adaptivity.
@@ -1308,7 +1309,7 @@ def set_property(self):
13081309
class IGAPart(Part):
13091310
"""
13101311
Defines an isogeometric shell part.
1311-
1312+
13121313
The part definition consists of the combined material information,
13131314
section properties, hourglass type, thermal properties, and a flag
13141315
for part adaptivity.
@@ -1354,7 +1355,7 @@ def set_property(self):
13541355
class SolidPart(Part):
13551356
"""
13561357
Defines a solid part.
1357-
1358+
13581359
The part definition consists of the combined material information,
13591360
section properties, hourglass type, thermal properties, and a flag
13601361
for part adaptivity.
@@ -1400,7 +1401,7 @@ class DRO(Enum):
14001401

14011402
class DiscretePart(Part):
14021403
"""Defines a discrete part.
1403-
1404+
14041405
The part definition consists of the combined material information,
14051406
section properties, hourglass type, thermal properties, and a flag
14061407
for part adaptivity.
@@ -1429,7 +1430,7 @@ def set_property(self):
14291430
pid=self.id,
14301431
secid=self.secid,
14311432
mid=self.mid,
1432-
eosid=self.eosid,hysical properties
1433+
eosid=self.eosid,
14331434
hgid=self.hgid,
14341435
grav=self.grav,
14351436
adpopt=self.adpopt,
@@ -1797,7 +1798,7 @@ def set_contact_thickness(self, thickness):
17971798

17981799
def set_penalty_stiffness_scale_factor(self, scalefactor=1.0):
17991800
"""Set the scale factor on the default surface penalty stiffness.
1800-
1801+
18011802
Parameters
18021803
----------
18031804
scalefactor : int, optional
@@ -1836,7 +1837,7 @@ def __init__(
18361837

18371838
def set_mortar(self):
18381839
"""Set the mortar contact.
1839-
1840+
18401841
A mort contact is a segment-to-segment, penalty-based contact.
18411842
"""
18421843
self.mortar = True
@@ -1846,7 +1847,7 @@ def set_mortar(self):
18461847

18471848
def set_tiebreak(self):
18481849
"""Set the contact allow for failure.
1849-
1850+
18501851
A tieback is a special case of this. After failure, the contact
18511852
usually becomes a normal one-way, two-way, or single surface version.
18521853
"""
@@ -1868,7 +1869,7 @@ def set_friction_coefficient(self, static=0, dynamic=0):
18681869

18691870
def set_active_time(self, birth_time=0, death_time=1e20):
18701871
"""Set the birth and death time to active and deactivate the contact.
1871-
1872+
18721873
Parameters
18731874
----------
18741875
birth_time : int, optional
@@ -2072,7 +2073,7 @@ def create_joint_spherical(self, nodes, relative_penalty_stiffness=1.0, damping_
20722073

20732074
def merge_two_rigid_bodies(self, lead_rigidbody=0, constrained_rigidbody=0):
20742075
"""Merge two rigid bodies.
2075-
2076+
20762077
One rigid body, called the constrained rigid body,
20772078
is merged into another rigid body, called the lead rigid body.
20782079
@@ -2398,7 +2399,7 @@ class RigidwallCylinder:
23982399
Coordinates of the head of the normal vector.
23992400
The default is ``(0, 0, 0)``.
24002401
radius : float, optional
2401-
Radius of the cylinder. The defaut is ``1``.
2402+
Radius of the cylinder. The default is ``1``.
24022403
length : float, optional
24032404
Length of cylinder. The default is ``10``.
24042405
"""
@@ -2494,7 +2495,7 @@ class GravityOption(Enum):
24942495

24952496
class Gravity:
24962497
"""Defines body force loads using global axes directions.
2497-
2498+
24982499
Body force loads are due to a prescribed base acceleration or
24992500
angular velocity.
25002501
"""

0 commit comments

Comments
 (0)