|
[Sponsors] |
[ICEM] Replay Scripts: create curve from points |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 16, 2015, 06:13 |
Replay Scripts: create curve from points
|
#1 |
New Member
Join Date: Jan 2015
Posts: 29
Rep Power: 11 |
Dear all,
I've been trying to use ICEM's scripting feature to automate mesh generation. My geometry (curve) comes from a .dat file of (x,y,z) coordinates of points, and I'd like to create my curves "from points". However, in the .rpl file I find the line to be sth like: ic_curve point GEOM crv.00 {{0.00000000 0.30000000 0.00000000} {0.00492865 0.30000876 0.00000000} .... , rather than saying "import from <filename.dat>". My question is then: is it possible to use .rpl file to directly import points from another file, or I have to input the points (manually) every time? Thanks! |
|
February 17, 2015, 13:10 |
|
#2 |
Senior Member
Sebastian Engel
Join Date: Jun 2011
Location: Germany
Posts: 566
Rep Power: 20 |
Hello evan247,
the .rpl scripts use a language called tcl. That's why you can use that language's features. To answer your question, no you don't have to input them all manually. But.. you have to write a few extra lines in your replay script to load the data file. I suggest you to read a short tutorial on tcl. To give you a kick start, have a look at the following code snippet. I assume your data file uses a comma as separator. Code:
# read file set fp [open "filename.dat" r] set file_data [read $fp] close $fp # define empty list set xyzlist {} # process data set data [split $file_data "\n"] foreach line $data { lappend xyzlist [split $line ","] } # create line by point list ic_curve point GEOM crv.00 $xyzlist Sebastian |
|
February 17, 2015, 13:50 |
|
#3 | |
New Member
Join Date: Jan 2015
Posts: 29
Rep Power: 11 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Create geometry from mesh points in ICEM-CFD | David Arthur | Main CFD Forum | 3 | October 25, 2014 12:19 |
[snappyHexMesh] determining displacement for added points | CFDnewbie147 | OpenFOAM Meshing & Mesh Conversion | 1 | October 22, 2013 09:53 |
Create 2D hexa block from points | alexey | CFX | 1 | June 22, 2006 07:49 |
Normal to Line - Curve Equ. from Points | A.S. | Main CFD Forum | 5 | July 5, 2005 02:41 |
CFX4.3 -build analysis form | Chie Min | CFX | 5 | July 12, 2001 23:19 |