CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [DesignModeler] Creating surfaces from points data (https://www.cfd-online.com/Forums/ansys-meshing/167333-creating-surfaces-points-data.html)

alibaig1991 February 28, 2016 11:52

Creating surfaces from points data
 
Hello, I am trying to do CFD analysis of NACA-2424 airfoil. I have coordinate data in the format.. #Group #Point x y z. I am using only 1 group for points on both upper and lower portion of airfoil. When I import coordinates data in Ansys Design Modeler, it shows discrete points. Is there a way to create curves/lines between points to complete airfoil?

Kapi February 28, 2016 16:38

Yes Ali,

you need to create script for that. Create your points, lines and curves thru scripting. Read about it in Help section on Ansys. If you dont understand then I will send you a sample of geometry not airfoil tho!

Cheers
KAPI

alibaig1991 March 3, 2016 20:28

Hi, Kappi!
I have trying to create airfoil from the coordinates. I go to Concept->3D Curve in Ansys Desing Modeler and browse to the file containing coordinates. The coordinates are in txt file and the coordinates are arranged as below:
#NACA 2424 Airfoil Coordinates
#Group #Point #X #Y #Z
1 1 0.000000 0.000000 0
1 2 0.008550 0.038920 0
1 3 0.020120 0.054490 0
1 4 0.043800 0.075520 0
1 5 0.068200 0.090520 0
1 6 0.093000 0.102150 0
1 7 0.143330 0.118880 0
1 8 0.194270 0.129590 0
1 9 0.245550 0.135930 0
1 10 0.297000 0.138740 0
1 11 0.400000 0.136060 0
1 12 0.501180 0.125320 0
1 13 0.602030 0.109030 0
1 14 0.702440 0.088240 0
1 15 0.802330 0.063520 0
1 16 0.901610 0.035020 0
1 17 0.950980 0.019300 0
1 18 1.000000 0.000000 0
1 19 0.016150 -0.036460 0
1 20 0.029880 -0.049650 0
1 21 0.056200 -0.066140 0
1 22 0.081800 -0.076920 0
1 23 0.107000 -0.084650 0
1 24 0.156670 -0.094500 0
1 25 0.205730 -0.099590 0
1 26 0.254450 -0.101550 0
1 27 0.303000 -0.101240 0
1 28 0.400000 -0.096060 0
1 29 0.498820 -0.086440 0
1 30 0.597970 -0.073470 0
1 31 0.697560 -0.058240 0
1 32 0.797670 -0.041300 0
1 33 0.898390 -0.022800 0
1 34 0.949020 -0.012920 0
1 35 1.000000 0.000000 0

I have tried a number of times and everytime error message pops up "Error reading Coordiantes file." What mistake I am making?
Thank you

Kapi March 3, 2016 23:34

Hi Ali,

this is how co-ordinates are written in script
Code:

function planeSketchesOnly1 (p)
{
p.Plane  = agb.GetActivePlane();
p.Origin = p.Plane.GetOrigin();
p.XAxis  = p.Plane.GetXAxis();
p.YAxis  = p.Plane.GetYAxis();
p.Sk1 = p.Plane.NewSketch();
p.Sk1.Name ="Sketch1";
with (p.Sk1)
{
p.Ln1= Line(0.33127,0.10845,0.37098,0.10845);
p.Cr3= ArcCtrEdge(0.36984,0.11073,0.37098,0.10845,0.37212,0.10959);



}
with (p.Plane)
{
}
p.Plane.EvalDimCons();
return p;
}
var ps1 = planeSketchesOnly1 (new Object());
agb.Regen();


save this code in .js file and go to DM and File>Run Script
You will see how it is creating line and small curve.

Use similar way to write your script JS file and run it.

Hope it helps

Cheers
KAPI


All times are GMT -4. The time now is 17:55.