-
-
April 28, 2022 at 10:36 am
aldamo
SubscriberHi All,
So i have to add a 4000N force over the selected surface. I'm currently able to identify the surface and select the magnitude, but I have problems with the force direction. The code I wrote is the following:
April 28, 2022 at 10:50 amErKo
Ansys EmployeeHi
To use these directions just use the record option inside the scripting console, and see how it works.
For instance to define it in the x direction would be:
threadForce = ExtAPI.DataModel.Project.Model.Analyses[0].AddForce
threadForce_scoping = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities)
threadForce_scoping.Ids = [4]
threadForce.DefineBy = LoadDefineBy.Components
threadForce.Location = threadForce_scoping
threadForce.XComponent.Output.DiscreteValues=[Quantity(400,"N")]
Erik
May 17, 2022 at 12:01 pmaldamo
SubscriberThanks EriK!
Viewing 2 reply threads- The topic ‘Ansys Scripting – Add Force along Cylindrical surface’ is closed to new replies.
Innovation SpaceTrending discussionsTop Contributors-
6465
-
1906
-
1458
-
1308
-
1022
Top Rated Tags© 2026 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-
The Ansys Learning Forum is a public forum. You are prohibited from providing (i) information that is confidential to You, your employer, or any third party, (ii) Personal Data or individually identifiable health information, (iii) any information that is U.S. Government Classified, Controlled Unclassified Information, International Traffic in Arms Regulators (ITAR) or Export Administration Regulators (EAR) controlled or otherwise have been determined by the United States Government or by a foreign government to require protection against unauthorized disclosure for reasons of national security, or (iv) topics or information restricted by the People's Republic of China data protection and privacy laws.
