CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > ANSYS Meshing & Geometry

[ICEM] Scripting - For loops, expr function, integration

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 19, 2018, 13:44
Default Scripting - For loops, expr function, integration
  #1
New Member
 
Alex
Join Date: Mar 2018
Posts: 4
Rep Power: 8
ayoung94 is on a distinguished road
I am having trouble generating point geometry based around a curve equation. I wish to create several points to describe the curve, and want to do this via a for loop, as part of a project on automating geometry and mesh for given input parameters.

However, my current code returns several errors, including the For loop not being closed, and the 'integralExpr' function not being a valid command.

Code:
ic_geo_new_family GEOM
ic_empty_tetin
set d_throat 0.1288
set d_ef 0.1524
set n_profiles 6
set x_duct 0.4572
set l_curve 0.481613
for {set i 0} {$i<$n_profiles} {set i [expr $i+1]} {
set x_l [expr $i / ($n_profiles - 1)]
set x_curve [expr $l_curve * $x_l]
set x_global [integralExpr 0 $x_curve 10 sqrt(1 + (0.0225 * 3.14159 * 3.14159 * sin(3.14159 * $x_l) * sin(3.14159 * $x_l)))]
set y_global 0
set z_global [expr -0.15 * $x_duct * (1 - cos(3.14159 * $x_l))]
ic_point {} GEOM pnt.1 $x_global,$y_global,$z_global
}
Any suggestions and corrections are most welcome. Thanks in advance.
ayoung94 is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 10:51
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42
how to write an integration function in fluent self_shattered FLUENT 1 May 31, 2011 16:04
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 06:27


All times are GMT -4. The time now is 07:19.