## General Mechanical

#### APDL Boundary Condition mapdl.asel()

• a5833959
Subscriber
Hi 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!

• Erik Kostson
Ansys Employee
Hi,
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
• Mike Rife
Ansys Employee
Hi @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
• 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.