TrueGrid® Command File for a Curved Pipe
title Simple pipe mesh with two elbows c center curve of pipe surface curd 1 lp3 0 0 0;; arc3 seqnc rt 0 0 60 rt 0 [45+45*sin(-67.5)] [60+45*cos(-67.5)] rt 0 [45+45*sin(-45)] [60+45*cos(-45)]; arc3 cmplt rt 0 [45+45*sin(-45)+15*cos(45)] [60+45*cos(-45)+15*sin(45)] rt 90 [45+45*sin(-45)+15*cos(45)] [60+45*cos(-45)+15*sin(45)] rt 45 [45+45*sin(-45)+60*cos(45)] [60+45*cos(-45)+60*sin(45)]; c define pipe surface along curve sd 1 pipe 1 15 0 8 .25 8 .75 15 1;; c extract 4 outer curves from surface curd 2 contour 1.1.1 1.0.1; curd 3 contour 1.1.28 1.0.28; curd 4 contour 1.1.55 1.0.55; curd 5 contour 1.1.82 1.0.82; c interpolate 4 inner curves from outer curves curd 6 intcur 2 4 .25; curd 7 intcur 2 4 .75; curd 8 intcur 3 5 .25; curd 9 intcur 3 5 .75; c initialize 9 block part block 1 8 15 21;1 8 15 21;1 65; -10 -10 10 10 -10 -10 10 10 0 150 c remove four corner blocks dei 1 2 0 3 4; 1 2 0 3 4;; c rotate mesh 45 to align with curves tr 0 0 0 0 0 0 rz 45 ; c attach outer edges to curves cure 4 2 1 4 2 2 2 cure 3 1 1 3 1 2 2 cure 1 2 1 1 2 2 3 cure 2 1 1 2 1 2 3 cure 1 3 1 1 3 2 4 cure 2 4 1 2 4 2 4 cure 4 3 1 4 3 2 5 cure 3 4 1 3 4 2 5 c attach edges of inner block to curves cure 3 2 1 3 2 2 6 cure 2 3 1 2 3 2 7 cure 2 2 1 2 2 2 8 cure 3 3 1 3 3 2 9 c relative zoning of nodes for boundary region res 1 2 1 2 3 2 i [1/.9] res 3 2 1 4 3 2 i .9 res 2 1 1 3 2 2 j [1/.9] res 2 3 1 3 4 2 j .9 c project the outer 4 faces to the pipe sfi -1 -4; -1 -4;;sd 1 c use the elliptic solver for best results tmei 2 3;;-1 -2;10 0 1 tmei ;2 3;-1 -2;10 0 1 tmei 1 2 0 3 4;2 3;;100 0.0001 1 tmei 2 3;1 2 0 2 3 0 3 4;;100 0.0001 1 endpart merge Home Page Questions, comments, suggestions Copyright © 1996-2013 XYZ Scientific Applications, Inc. All rights reserved. |