@@ -42,6 +42,12 @@ these commands (e.g. ``"/SOLU"``):
4242 mapdl.run(' /SOLU' )
4343 mapdl.solve()
4444
45+ You can use the alternative:
46+
47+ .. code :: python
48+
49+ mapdl.slashsolu()
50+
4551 Some commands can only be run non-interactively from within in a
4652script. PyMAPDL gets around this restriction by writing the commands
4753to a temporary input file and then reading the input file. To run a
@@ -139,76 +145,55 @@ You can run several MAPDL commands as a unified block using
139145This is useful when using PyMAPDL with older MAPDL scripts. For
140146example:
141147
148+ .. code :: python
149+
142150 >> > cmd = ''' /prep7
143151 ! Mat
144152 MP,EX,1,200000
145153 MP,NUXY,1,0.3
146154 MP,DENS,1,7.85e-09
147155 ! Elements
148156 et,1,186
149- et,2,154
150157 ! Geometry
151158 BLC4,0,0,1000,100,10
152159 ! Mesh
153160 esize,5
154161 vmesh,all
155- nsel,s,loc,x,0
156- d,all,all
157- nsel,s,loc,x,999,1001
158- type,2
159- esurf
160- esel,s,type,,2
161- nsle
162- sfe,all,3,pres,,-10
163- allsel
164- /solu
165- antype,0
166- solve
167- /post1
168- set,last
169- plnsol,u,sum
170162 '''
163+
171164 >> > resp = mapdl.run_multiline(cmd)
172165 >> > resp
173166
174- You have already entered the general preprocessor (PREP7).
167+ You have already entered the general preprocessor (PREP7 ).
175168
176- MATERIAL 1 EX = 200000.0
169+ MATERIAL 1 EX = 200000.0
177170
178- MATERIAL 1 NUXY = 0.3000000
171+ MATERIAL 1 NUXY = 0.3000000
179172
180- MATERIAL 1 DENS = 0.7850000E-08
173+ MATERIAL 1 DENS = 0.7850000E-08
181174
182- ELEMENT TYPE 1 IS SOLID186 3-D 20-NODE STRUCTURAL SOLID
183- KEYOPT( 1- 6)= 0 0 0 0 0 0
184- KEYOPT( 7-12)= 0 0 0 0 0 0
185- KEYOPT(13-18)= 0 0 0 0 0 0
175+ ELEMENT TYPE 1 IS SOLID186 3 - D 20 - NODE STRUCTURAL SOLID
176+ KEYOPT( 1 - 6 )= 0 0 0 0 0 0
177+ KEYOPT( 7 - 12 )= 0 0 0 0 0 0
178+ KEYOPT(13 - 18 )= 0 0 0 0 0 0
186179
187- CURRENT NODAL DOF SET IS UX UY UZ
188- THREE-DIMENSIONAL MODEL
180+ CURRENT NODAL DOF SET IS UX UY UZ
181+ THREE - DIMENSIONAL MODEL
189182
190- ELEMENT TYPE 2 IS SURF154 3-D STRUCTURAL SURFACE
191- KEYOPT( 1- 6)= 0 0 0 0 0 0
192- KEYOPT( 7-12)= 0 0 0 0 0 0
193- KEYOPT(13-18)= 0 0 0 0 0 0
183+ CREATE A HEXAHEDRAL VOLUME WITH
184+ X - DISTANCES FROM 0.000000000 TO 1000.000000
185+ Y - DISTANCES FROM 0.000000000 TO 100.0000000
186+ Z - DISTANCES FROM 0.000000000 TO 10.00000000
194187
195- CURRENT NODAL DOF SET IS UX UY UZ
196- THREE-DIMENSIONAL MODEL
188+ OUTPUT VOLUME = 1
197189
198- CREATE A HEXAHEDRAL VOLUME WITH
199- X-DISTANCES FROM 0.000000000 TO 1000.000000
200- Y-DISTANCES FROM 0.000000000 TO 100.0000000
201- Z-DISTANCES FROM 0.000000000 TO 10.00000000
190+ DEFAULT ELEMENT DIVISIONS PER LINE BASED ON ELEMENT SIZE = 5.00
202191
203- OUTPUT VOLUME = 1
192+ GENERATE NODES AND ELEMENTS IN ALL SELECTED VOLUMES
204193
205- DEFAULT ELEMENT DIVISIONS PER LINE BASED ON ELEMENT SIZE = 5.00
206-
207- GENERATE NODES AND ELEMENTS IN ALL SELECTED VOLUMES
208-
209- NUMBER OF VOLUMES MESHED = 1
210- MAXIMUM NODE NUMBER = 45765
211- MAXIMUM ELEMENT NUMBER = 8000
194+ NUMBER OF VOLUMES MESHED = 1
195+ MAXIMUM NODE NUMBER = 45765
196+ MAXIMUM ELEMENT NUMBER = 8000
212197
213198 Alternatively, you can simply write the commands to a file and then
214199run it using :func: `Mapdl.input() <ansys.mapdl.core.Mapdl.input> `. For
0 commit comments