Tagged: spaceclaim
-
-
March 24, 2021 at 11:29 am
Elzubeir
SubscriberI have generated a box of ellipsoidal particles by DEM, and I got the positions in (x, y, z) and orientations for every single ellipse in the Excel sheet. I need to reconstruct these particles in SpaceClaim by modelling one ellipse and copy it to the new positions with different orientations. My question is how can I read data that is recorded in my Excel into the script then I can run the code?. -
March 24, 2021 at 12:56 pm
Keyur Kanade
Ansys EmployeeCan you please explain more. As I understand you have xyz for each particle. Now you want to create ellipse for each particle in SpaceClaim?nWhy do you want to create particles in SpacClaim? You can define them in Fluent. nIn SpacClaim please check pattern command. nPlease go through help manual for more details nRegards,nKeyurnHow to access Ansys Online Help DocumentnHow to show full resolution imagenGuidelines on the Student CommunitynHow to use Google to search within Ansys Student Communityn -
March 24, 2021 at 1:23 pm
Elzubeir
SubscriberThanks,nYes I want to model a box of particles in order to simulate it in Fluent. A you see below, this particles I got from DEM therefore I have xyz for each particle and orientation in Excel sheet. I wrote a code in the script to model a master particle in order to copy it to new position. Due to huge number of particles I ask for a way or function to used excel sheet data as input. I hope you got my point!nRegardnElzubeirnnn
-
March 25, 2021 at 3:56 am
Keyur Kanade
Ansys EmployeeYou may want to explore python for scripting in SpaceClaim. nAlso you can import txt in SpaceClaim as following. nIn SCDM, we can open a text file (*.txt) containing the points coordinates of curves. It will generate automatically the curves.nFrom the menu File > Open, select All Files filter and select a .txt file.nnThe syntax in the file for 2D curves is the following:nnpolyline=falsen1 1.5 2.0n1 1.0 3.2n1 0.5 2.1n2 0.3 4.2n2 4.8 1.9nnThe first column contains the number (ID) of the generated line, the second column the x-coordinate and the third column the y-coordinate.nnThe file format for 3D curve is the following:nnpolyline=falsen3d=truen0 0 1n0 1.5 1.2n1.5 0 2.3n1 1.5 4.2nn1.5 1.2 5.1n2.3 4.2 6.2n5.7 3.1 2.6nnWith the option 3d=true, the different curves are delimited by a linebreak. The first column contains the z-coordinate, the second column the x-coordinate and the third column the y-coordinate of the points.n -
March 25, 2021 at 12:13 pm
Elzubeir
SubscriberAfter I modeled the master particle, I have wrote this code to copy it to other position (x,y,z). The issue is I am looking for a function to read these values from text or excel file as input to be changed till end of the columns nthe codenresult = Copy.ToClipboard(Selection.Create(GetRootPart().Bodies[master particle]))nresult = Paste.FromClipboard()nselection = Selection.Create(GetRootPart().Bodies[1])noptions = MoveOptions() nmoveType = TransformType.RotateX nresult = Move.Execute(selection, globalSystem, moveType, DEG(value1), options) nselection = Selection.Create(GetRootPart().Bodies[1])nmoveType = TransformType.RotateZ nresult = Move.Execute(selection, globalSystem, moveType, DEG(value 2), options) nselection = Selection.Create(GetRootPart().Bodies[1])noptions = MoveOptions() nmoveType = TransformType.TranslateX nresult = Move.Execute(selection, globalSystem, moveType, MM(value 3), options) nselection = Selection.Create(GetRootPart().Bodies[1])noptions = MoveOptions() nmoveType = TransformType.TranslateY nresult = Move.Execute(selection, globalSystem, moveType, MM(value 4), options) nselection = Selection.Create(GetRootPart().Bodies[1])noptions = MoveOptions() nmoveType = TransformType.TranslateZ nresult = Move.Execute(selection, globalSystem, moveType, MM(value 5), options) nresult = Copy.ToClipboard(Selection.Create(GetRootPart().Bodies[master particle]))nresult = Paste.FromClipboard()Thanksn
-
Viewing 4 reply threads
- You must be logged in to reply to this topic.
Ansys Innovation Space

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.
Trending discussions
- How to work with STL file?
- Using Symmetry in DesignModeler and Expanding the Results
- Rotate tool in ANSYS Design Modeler
- drawing a geometry by importing a table of points
- section plane
- material properties
- ANSYS FLUENT – Operation would result in non manifold bodies
- Geometry scaling
- Parameters not imported into Workbench 18.2 from Solidworks/Inventor
- Convert Surface body to solid
Top Contributors
-
2616
-
2098
-
1323
-
1108
-
461
Top Rated Tags
© 2023 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.