November 18, 2020 at 1:18 pmSimonSimonSubscriber
Hi,nnI am trying to export the laminate forces in all elements associated with a given named selection from ACP.nFor this I have written a first script in APDL which selects the elements in the name selection and export their ID and centroid location to a csv file.nThis csv file is then read in ACP and for each elements I create a sampling point at the centroid location and retrieve the dictionary of laminate forces.nThis is the main loop I use to do so (with Node_Num, Node_x, Node_y and Note_z read from the csv file):nnfor i in range(0,len(Node_Num)) :n Name = ('SamplingPoint'+'.'+str(i))n db.models['ACP Model'].create_sampling_point(name=Name)n db.models.sampling_points[Name].point = (Node_x,Node_y,Node_z)n db.models.sampling_points[Name].direction =(0,0,1)n db.models.sampling_points[Name].use_default_reference_directionn db.models.sampling_points[Name].solution_set = (db.models.solutions,-1)n db.models.update(objects=[db.models.sampling_points[Name]])n Lam_Forces.append(db.models.sampling_points[Name].clt_query(query = 'laminate_forces')Now my problem is that in the places where elements from 2 different parts overlap the wrong element gets selected and I get the results for the wrong ModellingPly.nnI have tried to set the element id using :ndb.models.sampling_points[Name].element_id = xxxxxnbut I get a "Cannot Set Attribute" error, so I guess this is a non editable field.nI have also tried to set the modelling ply I want using :ndb.models.sampling_points[Name].plies = xxxxx but similarly this is not an editable field I believe.nnThe last thing I have tried is to simply deactivate the Modelling Plies which I do not want using :ndb.models.modeling_groups[‘Modeling_Group'].plies.active = False.nBut in this case some sampling points simply remain empty (i.e the coordinates are correct but no ModellingPly is selected and no laminate forces are exported.nnI have seen that there exists a command model.select_elements which would let me select all elements attached to a ModellingPly but I am not sure how I could use it in any useful way. Thank you
from other posts I have seen, I believe this might be your area of expertise !
December 8, 2020 at 2:37 pmGovindan NagappanAnsys EmployeenCan you loop over the elements of an Element Set in ACP directly instead of using element ID and centroid from an ADPL generated text?nWhat element type are you using? Can you check and see if the laminate forces are available for that element in APDL smisc results?n
- 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.
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
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- whether have the difference between using contact and target bodies
- Defining rigid body and contact
- Colors and Mesh Display
- A solver pivot warning or error has been detected
© 2023 Copyright ANSYS, Inc. All rights reserved.