|
[Sponsors] |
September 2, 2017, 12:37 |
Remeshing for Rotation in CFX via ICEMCFD
|
#1 |
Member
Georgy
Join Date: Apr 2011
Location: Russia
Posts: 32
Rep Power: 15 |
Dear All,
Could anyone please help me to make remeshing for rotation in ANSYS CFX through ICEMCFD. I know how to do it for linear motion, but I would like to understand how to do remeshing for rotation. In order to do linear motion of a body with remeshing I use two scripts: 1st script looks like this: Code:
set MeshFile {*.mesh} set MeshReplayFile {*.rpl} set ICEMCFDInst {C:/Program Files/ANSYS Inc/v145/icemcfd/win64_amd} set ResFile {*/res} set GeomFile {*.tin} set ScalarParam(ICEM\ CFD\ Geometry\ Scale) 1.00000000e+000 set GeomCtrlFile {*/icemcfd_GeomCtrl.rpl} set Displacement(INTER_CUBE) {0.430043637752533 0.430043637752533 0.430043548345566} The last two lines are the most important: “set GeomCtrlFile {*/icemcfd_GeomCtrl.rpl}” shows path to the rpl-script for ICEM CFD. “set Displacement(INTER_CUBE) {0.430043637752533 0.430043637752533 0.430043548345566}” says that we need to do displacement. Question #1: how to change command “Displacement” to rotation? Do I need just to write “Rotation”? For rotation, it is necessary to define axis and rotation origin. Script “icemcfd_GeomCtrl.rpl” looks like this: Code:
# ICEM CFD geometry update script # Set geometry scaling factor based on Scalar Parameter if [info exists ScalarParam(ICEM\ CFD\ Geometry\ Scale)] { set geoscale $ScalarParam(ICEM\ CFD\ Geometry\ Scale); } else { set geoscale 1.0; } mess "Geometry scale for ICEM CFD: $geoscale \n"; # Loop over all moving parts foreach part [array names Displacement] { for {set i 0} {$i < 3} {incr i} {set disp($i) [expr [lindex $Displacement($part) $i] / $geoscale ]}; mess "Motion displacements for part $part: $disp(0) $disp(1) $disp(2) \n"; set offset(0) 0; set offset(1) 0; set offset(2) 0; if { [info exists ScalarParam(OFFSET\ X\ $part)] } {set offset(0) [expr $ScalarParam(OFFSET\ X\ $part) / $geoscale ]}; if { [info exists ScalarParam(OFFSET\ Y\ $part)] } {set offset(1) [expr $ScalarParam(OFFSET\ Y\ $part) / $geoscale ]}; if { [info exists ScalarParam(OFFSET\ Z\ $part)] } {set offset(2) [expr $ScalarParam(OFFSET\ Z\ $part) / $geoscale ]}; mess "Motion offsets for part $part: $offset(0) $offset(1) $offset(2) \n"; set disp(0) [expr $disp(0) + $offset(0)]; set disp(1) [expr $disp(1) + $offset(1)]; set disp(2) [expr $disp(2) + $offset(2)]; mess "Move part $part: $disp(0) $disp(1) $disp(2) \n"; set item [ic_geo_get_objects surface $part ]; if {[llength $item] > 0} { ic_move_geometry surface names $item translate "$disp(0) $disp(1) $disp(2)"; mess "Part $part: move surfaces\n"}; set item [ic_geo_get_objects curve $part ]; if {[llength $item] > 0} { ic_move_geometry curve names $item translate "$disp(0) $disp(1) $disp(2)"; mess "Part $part: move curves\n"}; set item [ic_geo_get_objects point $part ]; if {[llength $item] > 0} { ic_move_geometry point names $item translate "$disp(0) $disp(1) $disp(2)"; mess "Part $part: move points\n"}; set item [ic_geo_get_objects body $part ]; if {[llength $item] > 0} { ic_move_geometry body names $item translate "$disp(0) $disp(1) $disp(2)"; mess "Part $part: move bodies\n"}; } Question #2: What should I write in order to make rotation? As a result of all actions, I should have a body that rotates. At each time step, mesh must be reconstructed automatically (remeshing). Sliding interfaces should not be considered. Any other options to make rotation are also welcome. Thank you! |
|
September 2, 2017, 14:55 |
|
#2 |
Senior Member
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 15 |
Isn't it just the same problem, only instead of linear displacement you have circumferential displacement described in two axis by something like:
x=-sin(omega*t) y=cos(omega*t) Where omega is your rotational speed and t is simulation time. |
|
September 4, 2017, 02:01 |
|
#3 |
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
What you are describing looks like ICEM Replay Resmeshing and it only works for translation and not rotation (according to the manual). I would consider going for User Defined Remeshing instead. A bit more scripting, but way more flexible. See the reference guide.
|
|
September 23, 2017, 13:29 |
|
#4 |
Member
Georgy
Join Date: Apr 2011
Location: Russia
Posts: 32
Rep Power: 15 |
Dear JuPa,
thank you for your answer. I also thought in this way. However, it was necessary to change the command "displacement" or to apply it for each cell, which is a separate domain. Dear Lance, thank you for the answer. User Defined Remeshing looks good alternative (the only one). |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Having problems with Remeshing in CFX | cote2714 | CFX | 12 | February 21, 2017 03:53 |
[ICEM] Simple pipe meshing - problems with y+ in CFX | Keizers | ANSYS Meshing & Geometry | 23 | January 15, 2015 09:00 |
cfx remeshing by icem | MUMMED | CFX | 6 | February 5, 2013 11:58 |
IcemCFD 4CFX-How to fix domain | Ahmed | CFX | 6 | March 9, 2004 19:38 |
CFX 4.4 installation problem | Pandu Sattvika | CFX | 1 | December 1, 2001 05:07 |