-
-
December 9, 2024 at 6:26 pmdc3g20Subscriber
I have a Workbench system as shown:Â
A Fluent file provides a CFD pressure load to a wing model. To import this manually, I go to Mechanical > Static Structural > Imported Load (B3) and Insert Pressure. In the settings dropdown I then select which CFD surface I want as shown below, then apply that to the skin of my wing.
I wish to automate this process for many wing models. However, I cannot find the function in Mechanical scripting to call a given 'CFD Surface' and import the associated pressure as a load. I tried using the 'Record' function and setting it up manually, which gives this code, but it gives an error 'AttributeError: 'NoneType' object has no attribute 'AddImportedPressure'':
#region Context Menu Action
imported_load_group_140 = DataModel.GetObjectById(140)
imported_pressure_141 = imported_load_group_140.AddImportedPressure()
#endregion#region Details View Action
selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities)
selection.Ids = [30]
imported_pressure_141.Location = selection
#endregionimported_load = DataModel.GetObjectById(141)
imported_load.ImportLoad()
#ÂÂ
Can anyone help me debug this code??
-
December 10, 2024 at 8:25 amErik KostsonAnsys Employee
Â
Â
Â
Hi
Do not think that (choose cfd surface) is exposed .
I believe the imported pressure load picks up the first cfd surface (in alphabetic order) from your named selections (ns) in the cfd simulation so if you call it acfdsurface it should pick it up automatic (the rest would be wall, inlet, and outlet ns so it will be first in that order and will be asigned to the imported pressue load added and under cfd surface).
All the best
Erik
Â
Â
Â
Â
Â
Â
-
- You must be logged in to reply to this topic.
- Problem with access to session files
- Ayuda con Error: “Unable to access the source: EngineeringData”
- Reaction forces and moments during random vibration at local coordinate systems
- At least one body has been found to have only 1 element in at least 2 directions
- Using APDL to extract stresses on a beam element.
- How to select the interface delamination surface of a laminate?
- Geometric stiffness matrix for solid elements
- Error when opening saved Workbench project
- Timestep range set for animation export
- Computation Accleration
-
1156
-
488
-
486
-
225
-
201
© 2024 Copyright ANSYS, Inc. All rights reserved.