![]() |
ICEM Scripting Issues
Hey,
Having a few issues with ICEM and getting scripting to work. As per the Ansys tutorial on youtube (the 3 part series) I've made a mesh with ICEM (with a few more blocks and a better mesh etc). The problem is that when I go and change the formatted data point file in the scripting to another aerofoil and run it in a new project, it will do all the scripting fine, but when I look at the mesh near the wing...it sort of works, but also doesn't. Basically the mesh does conform to SOME of the new aerofoil, but some of it still conforms to the old one which I meshed everything off. Do you have any ideas as to why this may be happening/suggestions around it. Ideally I want to be able to change the file it imports the data points from and the filename of the one it outputs to and be able to run it and have it work for all the aerofoils I test. (To ensure it does work I am only using naca airfoils with 51 points per spline and 2 splines) Thanks for your help |
update
Hey,
Played around with the software/scripting a little more to get a mesh that works better HOWEVER scripting now has elements all over the aerofoil. I have no idea why its doing this so your help would be great. I've attached pictures (hopefully and I apologize if the pictures are too large) of what it should look like, and a different aerofoil which has been made using the script. If I use the same airfoil it works fine when scripting (which makes sense seeing as its just replaying what I have done). Any help would be great as I'm really stuck here. Thanks Tyler What its supposed to look like http://imageshack.us/photo/my-images/191/meshf.png/ Scripting with another airfoil http://imageshack.us/photo/my-images/593/mesh2.png/ http://http://imageshack.us/photo/my...593/mesh2.png/ |
The most common mistake people make with scripting is to use commands that are not parametric... For instance, they may split based on a screen select instead of by a percentage or by a point location. Look for commands that are based on XYZ or interactive selections rather than being based on the underlying (and changing) geometry points.
Your second problem appears to be that the edge which should be projecting to the lower curve is instead projecting to the other side... In other words, both the upper and lower edge are projecting to the same side (the concave side) of the airfoil... Perhaps your curve has one name all the way around so the association is projecting to the nearest side and you need to use some sort of split with an association to a particular point to bring things back under control. |
may be putting autoupdate command solve this problem in addition to snap command
|
Thanks for those replies. Here is the code where its stuffing up. The bits in Red (they were in red, before I put them in quotes) are where I think it may be having problems, however I am unsure exactly what the difference between a percentage selection, point selection or screen selection would look like in the code. When I look at either wing (the one I designed it with, or the different series which stuffed up) they both say the top and bottom spline are different curves. i.e. curve 1 on the top and curve 0 on the bottom.
Code:
1. ic_geo_cre_geom_input {C:/MAJOR PROJECT - Copy/naca9210.dat} 0.001 input PNTS pnt CRVS crv SURFS {}One other thing...is it possible to have it so that the "name" it uses to save everything is a variable or something? That way I only have to change 1 line of code for it to do another aerofoil? I have read some stuff on it however it went over my head, but if someone knows the code which I could just drop in that would be great. This isn't critical, but it would be a nice feature. Thanks for the speedy replies as well. Tyler |
I am also new in this field. Just following Simon's suggestions on the scripting. I have run your code and still working on it. I recommend you to mention the name of file and directory explicitly and should be the current directory where files are .
Just give you details soon. |
Quote:
As for the directories, everything is saved in the same directory for simplicity and this directory won't change. When it comes time to do simulations the necessary files will be copied to another computer however this won't affect the creation of the geometry and mesh. Thanks again for your help Tyler UPDATE: After doing one line at a time and trying a few of the lines manually I've narrowed it down to line 174. This line is where I associate one of the edges of the block at the leading edge of the wing to the two parts of the wing (top and bottom curve). Even if I do this manually it stuffs up. Here are pictures of what it looks like after line 173, and 174. http://imageshack.us/photo/my-images/19/173zq.png/ http://imageshack.us/photo/my-images/6/174un.png/ Obviously I need to associate edge to curve, however even if I do this manually it stuffs up. All other curves are associated. Any suggestions on how to fix this? Can upload the files if required. |
you can include the edge split commands after line 174 : e.g.
1. spline 2. Automatic Linear etc. |
Quote:
I still need to associate the edge to a curve, otherwise it just cuts a section off the wing by meshing to the line, rather than the curve. Lines 175 onwards work fine, its just that I need to associate the edge of the block to the curve. Do you have any suggestions on how to do this? Thanks Tyler |
could you post a pic?
You get the problem after associating the edge to curve or before it? If you are getting problem after association then just go to edit edge > make it spline or automatic linear and things will not be messed up. |
Quote:
http://imageshack.us/photo/my-images/19/173zq.png/ After: http://imageshack.us/photo/my-images/6/174un.png/ I get the problem after associating edge to curve. Even if I edit edge and make it automatic linear, the edge does follow the curve, but the mesh still goes straight over the aerofoil just like in the second picture (except the second picture shows it without the automatic linear on the block near the leading edge). Could it be to do with line 173 where it joins the two curves into the one curve? I have tried running the script from line 1 to 172, associating edge to curve, and then running line 173, then 175 onwards however this didn't work either. I also tried 1-172, associating edge to curve and then 175 onwards. From what i can gather, lines 1-172 work fine, the problem is one or both of 173/174. Any other idea's? Thanks again for quick responses Tyler |
1 Attachment(s)
Files uploaded. 4 files in total, 2 .dat files which are for the airfoils. NACA9210 is what the script was created on, and NACA9608 is the airfoil which is most dissimilar to this that I was planning on testing.
2 scripting files. The replay_file5_output_clean.rpl is the one I posted before, the replay_file5_output_updated(clean).rpl was where I changed a couple of the earlier processes from screen select to percentage so that it was related to the curve. I have not fully tested this second script to make sure it works up to line 172 however I'm still fairly confident that it works. Thanks for your help Tyler |
Edge split problem
I found the problem and is the same as I suspected earlier. . Debugging the script, shall upload as I get it corrected.
http://img811.imageshack.us/img811/5946/97854561.png http://img233.imageshack.us/img233/5645/83486980.png http://img827.imageshack.us/img827/1944/76609414.png |
1 Attachment(s)
Here is the corrected script along with older one. I have modified the script after the second last line. This is temporary solution and you should put these lines and/or commands at the appropriate place.
|
Far,
Thanks so much for your help. It works great now and I couldn't have done it without you. I wish you the best of luck with learning the scripting language but if you've picked it up this fast to find my problem I'd say you'll be fine. Thanks again Tyler |
Than-you Tyler for appreciation.
Actually this happen because of general ICEM learning, which is due to Simon's mentor-ship. :) I just started the recording after 2nd last line and first solved the problem manually (first without recording and after confirmation with recording) and then saved the script. But these commands should be placed in centre of script where you are making other operations on blocking. :cool: Please do post the your final scripting and other problems here. :) |
1 Attachment(s)
Try this. This time adjustments are made at appropriate place
|
Thanks again for all of your help Far. After some tweaking and removing unnecessary lines of code, the final code is as follows:
Code:
1. ic_geo_cre_geom_input {C:/MAJOR PROJECT/DAE31.dat} 0.001 input PNTS pnt CRVS crv SURFS {}Thanks again Tyler |
| All times are GMT -4. The time now is 22:29. |