Applying increasing force over time in a specific point #3021
-
Hi everybody, I have applied the following boundary conditions to the structure and where the pink arrow is, is where I have added a constant force to my structure. I want to now change that constant force to a force that gets bigger over time (until a certain failure criteria, that I haven't decided on yet). Is there a way I can do that in a "static" analysis? The force is currently added like so,
I have tried adding in substeps like so, but its not really working as intended, mapdl.run("/SOLU") #Activate non-linear geometry #Request substeps Also, I would really like to be able to plot a force-displacement plot for the node where the force is applied. Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
Hi @Deternanna I think what you are asking is can you increase the load at the end of the solution in the case that the load was not large enough for your failure criteria? If so there are a few paths that could be taken: restart vs applying huge load and stopping the solve when some criteria is met. Which to use depends on the end goal. In a static analysis if we make the end time equal to the applied load, then time history plots are also load history plots. If not that then in the time history post processor the XVAR command sets what the X axis variable is. By default it is time (or frequency if harmonic) but you can point it to use some other variable. |
Beta Was this translation helpful? Give feedback.
-
Hi @Deternanna So two things; the big one first is that sub-step 999999 means that the solution did not fully converge and the 'non converged' results written to the result file at sub step 999999. Is this structure collapsing? Or intended to collapse? PyMAPDL has a command to check the convergence of a solve: see here When post processing using the post1 processor a good practice is to read the results in from the result file to the MAPDL database (in memory). So try: mapdl.post1()
mapdl.set('last')
mapdl.post_processing.plot_nodal_displacement("Y", cmap="jet", cpos="xy") Mike |
Beta Was this translation helpful? Give feedback.
-
I should add a P.S. that the native PyMAPDL post processing plots the results on the as-defined geometry and not the deformed geometry. The PyMAPDL Reader has an option to show the deformed mesh on the result plot. Or, as I prefer, we can use the upcoord, mesh.grid, and standard PyMAPDL results to make our own PyVista plot of a result on an deformed geometry. |
Beta Was this translation helpful? Give feedback.
-
Here is a small example using a generic solid model of a cantilever beam. from ansys.mapdl.core import launch_mapdl
import matplotlib.pyplot as plt
import pyvista as pv
mapdl = launch_mapdl(port=50056)
mapdl.units('bin')
mapdl.clear()
mapdl.prep7()
mapdl.et(1, 185)
mapdl.mp('EX', 1, 1E7)
mapdl.tb('plas', 1, 1, 1, 'biso')
mapdl.tbdata(1, 50_000, 5E6)
mapdl.blc4(0, 0, 24, 0.5, 1)
mapdl.esize(0.25)
mapdl.vmesh(1)
mapdl.nsel('s', 'loc', 'x', 0)
mapdl.cp(1, 'all', 'all')
node_bc = mapdl.queries.ndnext(0)
mapdl.allsel()
mapdl.finish()
mapdl.slashsolu()
mapdl.d(node_bc, 'all', 0)
mapdl.nsel('s', 'loc', 'y', 0.5)
mapdl.sf('all', 'pres', 20)
mapdl.allsel()
mapdl.time(20)
mapdl.nsubst(20, 100, 20)
mapdl.nlgeom('on')
mapdl.outres('all', 'all')
mapdl.solve()
mapdl.finish()
mapdl.post1()
mapdl.set('last')
# standard result plot
mapdl.post_processing.plot_nodal_displacement('NORM', cpos='iso', cmap='jet')
result = mapdl.post_processing.nodal_displacement('NORM')
mesh_1 = mapdl.mesh.grid
mapdl.upcoord(1)
mesh_2 = mapdl.mesh.grid
mapdl.upcoord(-1)
plot = pv.Plotter()
plot.add_mesh(mesh_1, color='b', style='wireframe')
plot.add_mesh(mesh_2, scalars=result, cmap='jet')
plot.show(cpos='iso')
# let's do a XY graph too as why not
mapdl.finish()
mapdl.post26()
mapdl.file('file', 'rst')
mapdl.nsel('s', 'loc', 'x', 24)
node_load = mapdl.queries.ndnext(0)
mapdl.allsel()
mapdl.rforce(3, node_bc, 'f', 'y')
mapdl.nsol(4, node_load, 'u', 'y')
mapdl.vget("FYN", 3)
mapdl.vget("UYN", 4)
plt.plot(abs(mapdl.parameters["UYN"]), mapdl.parameters["FYN"])
plt.xlabel("Displacement inch")
plt.ylabel("Reaction Force lbf")
plt.show()
mapdl.finish()
mapdl.exit() |
Beta Was this translation helpful? Give feedback.
Here is a small example using a generic solid model of a cantilever beam.