🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Import of point coordinates (.dat File) directly into Hypermesh possible?

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Hi there!

 

I have the following issue: In order to model a 2D airfoil with the help of several points I would like to import a '.dat file' that contains all the point coordinates for the airfoil surface. Is there a possible way to import these data directly without any file transformation?

 

In addition, I would really like to know if it's possible, and if yes how, to connect all the airfoil surface points together with a SMOOTH and nice spline instead of strange linear splines?

 

 

Thank you very much for your help!

 

Kind regards

 

Martin

Find more posts tagged with

Sort by:
1 - 16 of 161
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Can't you find a cad software to do that?

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hi tinh, thank you very much for your quick answer!

    For the spline construction, a CAD software would be more appropriate, that's true. Nethertheless I would like to know if there is a way to import dat. file into Hypermesh?

     

    Thank you and Greetings

     

    Martin

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hypermesh can import STL data

    if you have only coordinates x, y, and z, I think a bit modification is needed

    like this:

    *NODE

    1,x1,y1,z1

    2,x2,y2,z2

    3,x3,y3,z3

     

    ...

     

     

    => import the file as LsDyna file

    User: "tinh"
    Altair Community Member
    Updated by tinh

    You can modify it easily in Excel

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Or a simple tcl script can do it

    example your original point_coord.dat file is:

    x1  y1  z1

    x2  y2  z2

    x3  y3  z3

     

    a script like this will generate key file

    User: "tinh"
    Altair Community Member
    Updated by tinh
     proc Dat2Key {FilePath} {       set fpt [open $FilePath]       set buf [read -nonewline $fpt]       close $fpt       set buf [string map [list \n \n1, ' ' ,] $buf]      set fpt [open $FilePath.key w]       puts -nonewline $fpt *NODE\n1,       puts -nonewline $fpt $buf       close $fpt  }

     

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Okay thank you! So one cannot avoid a modification of the data like this for the .dat file?

    The key-file can be then  imported to HyperMesh?

     

    Again, thank you for your help!

    User: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    Show your .dat file? your 'key-file'? LS-DYNA key ?

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    This is my dat-file (coordinates of points) which I would really like to import into HyperMesh with the least amount of effort/ data conversion...

    Unable to find an attachment - read this blog

    User: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    Only Y-coordinate ?

     A2_NASA_SC2_0712_t2c11,01.dat (y-Koordinaten des Ausgangs-Profils 'NASA_SC2_0712_t2c11,03.dat' mit Faktor 0,998323 multipliziert)	 1,000000	-0,010655 0,993734	-0,009000 0,983123	-0,006276 0,971048	-0,003295 0,957627	-0,000136 0,943066	0,003118 0,927606	0,006405 0,911494	0,009675 0,894934	0,012885

     

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Maybe all z coords are zero

    Try this proc :  

     

    Capture.PNG.ad95c3ab10a2e85d4e1cbf558a4c3166.PNG

     

    Unable to find an attachment - read this blog

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Exactly, all z coords = 0.

    Perfect, that picture shows the result I'm looking for.

     

    Sorry for asking, but how should I apply the tcl file with my dat to import the data into HyperMesh?

     

    Again, thank you all very much for the excellent support!

     

    Regards

    User: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    Here's complet script based on Tinh's script:

     proc p_ReadCloudPointFile {FilePath} { 	set fpt [open $FilePath] 	set buf [string map {, .} [read $fpt]] 	close $fpt 	set lines [split $buf \n] 	foreach line $lines { 		if {[scan $line '%f %f' x y]==2} { 			*createnode $x $y 0 		} 	} }  set fileTypes { 		{'Data'		{.dat} } 		{'All files'	  *    } } 	 set file_name  [tk_getSaveFile -filetypes $fileTypes -title 'DataFile' ] p_ReadCloudPointFile $file_name;

     

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Thank you so much! I just ran the script in HyperMesh and it worked :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' /> 

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    am facing the following problem, i couldnt import my iges file into my hypermesh 2017 version, please suggest me the solution for this problem.

    User: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    am facing the following problem, i couldnt import my iges file into my hypermesh 2017 version, please suggest me the solution for this problem.

    Try another format, like STEP, Parasolid,...