Tagged: apdl, boundary-conditions, mechanical-apdl, pyansys
-
-
May 30, 2022 at 3:21 pm
a5833959
SubscriberHi all,
I am learning the MAPDL (and PyAnsys), and was wondering about the mapdl.sel() command.
So in this tutorial (https://mapdldocs.pyansys.com/examples/gallery_examples/00-mapdl-examples/3d_plate_thermal.html), they create a plate using
mapdl.block(-0.3, 0.3, -0.46, 1.34, -0.2, -0.2 + 0.02)
and resulting plot with mesh is like below:
And I am curious about the boundary condition commands:
mapdl.asel("S", vmin=3)
mapdl.nsla mapdl.d("all", "temp", 5)
mapdl.asel("S", vmin=4)
mapdl.nsla mapdl.d("all", "temp", 100)
Why the command mapdl.asel("S", vmin=3) select (y= -0.46) as boundary? And also, why the command mapdl.asel("S". vmin=4) select (y= 1.34) as boundary?
I went through ANSYS Help and PyAnsys MAPDL Commands and knew that S is to select a new set, but I am not sure about VMIN which is the minimum value of item range.
Thank you in advance for any helps!
-
May 30, 2022 at 3:38 pm
Erik Kostson
Ansys EmployeeHi,
again learn how to use mapdl (see the asel command and nsla). So you need to practice using mapdl first before you can use pymapdl. When you do that you will see how asel works (vmin is the area number by default not the coordinate/location).
Once you have done that try to do the pymapdl example based on that - for reference always look on the py ansys website and doc.
So before you write again make sure you can do and understand this example in mapdl before doing it in pymapdl.
Erik
-
May 30, 2022 at 9:32 pm
Mike Rife
Ansys EmployeeHi @x5833959 Please see the MAPDL help entry on ASEL. That example you linked to is relying on some command defaults, but then specifically using other options defaults as well, which I agree makes it confusing. What I mean is that the "S" i.e. select from full set is the default behavior of the ASEL "type of selection" but the example specifically includes this. But then the "AREA" is the default value of the "Item" field, but they don't specifically use that in the command. So it presents the command in a confusing way.
Anyway, the ITEM field defaults to "AREA" meaning we are selecting areas based on their area ID number. You would need to plot areas or volume with area numbers turned on and confirm which is area number 3 and which is number 4. Just to reassure yourself that the boundary conditions are being defined as expected.
Mike
-
May 31, 2022 at 6:41 am
Erik Kostson
Ansys Employee
Thanks for the additional input -
really though the advice is that one needs to know and be able to model things in MAPDL before using pyMAPDL. I would strongly suggest that you focus on MAPDL and learn how to use it first. Then you can easily go from a MAPDL model definition you have made say in the form of commands, to an equivalent pyMAPDL script.
All the best of luck
Erik
This post is now closed.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Saving & sharing of Working project files in .wbpz format
- Solver Pivot Warning in Beam Element Model
- Understanding Force Convergence Solution Output
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- whether have the difference between using contact and target bodies
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- Colors and Mesh Display
- User manual
- material damping and modal analysis
-
3648
-
2530
-
1745
-
1226
-
578
© 2023 Copyright ANSYS, Inc. All rights reserved.