c ***************************************************************************
c ***************************************************************************
c ** COPYRIGHT (C) 1996-2013 XYZ Scientific Applications, Inc.                 **
c **                                                                       **
c ** These coded instructions, statements, and computer programs  contain  **
c ** unpublished  proprietary information of XYZ Scientific Applications,  **
c ** Inc., and are protected by Federal copyright law.  They  may  not be  **
c ** disclosed  to  third  parties  without  the prior written consent of  **
c ** XYZ Scientific Applications, Inc.                                     **
c ***************************************************************************
c ***************************************************************************
include template
sdint off dasd rsd 500 rsd 502 dacd rest rx -90 center
c some additional parameters that probably do not need to be changed
  para
     rinside    20    c a radius that is much smaller than the nacelle
     routside  %rmax  c a radius that is larger than the nacelle
     niter     100    c volume Thomas-Middlecoff iterations
     niter1     40    c volume Thomas-Middlecoff for non-critical regions
     nacsurf   101    c surface number reserved for the nacelle
     spinsurf  102    c surface number reserved for the spinner
  ;

c a small curve to circumvent the singularity near the tip of the spinner 
  sd 502 cyli 0 0 0 0 0 1 [0.1*%spinlsiz]
  curd 27 twsurf [%spinsurf] 502
          [ 2*%spinlsiz] 0 0
          0 [ 2*%spinlsiz] 0
          [-2*%spinlsiz] 0 0 ; ;

c planes at 0, 45, 90, 135 degrees
  sd 601 plan 0 0 0  0 1 0
  sd 602 plan 0 0 0 -1 1 0
  sd 603 plan 0 0 0  1 0 0
  sd 604 plan 0 0 0  1 1 0

c create center curve at the top lip of the nacelle.
c In the process, 36 points are created which are
c spaced at regular intervals of 5 degrees, starting at 0.
c
c NEW PARAMETERS CREATED
c     x0, z0
c     x1, z1
c     x2, z2
c     x3, z3
c      . 
c      .
c      .
c    x36,z36
c    ztopnac
c
  include /users/d/BOEING1/findcrv

c copy the curves, offset them, and project some
c of them back to the nacelle.
  curd 2 cpcds 1 ; xsca .8 ysca .8 mz 5;
  curd 3 cpcds 1 ; xsca 1.2 ysca 1.2 mz 5;
  curd 4 projcur 2 %nacsurf;
  curd 5 projcur 3 %nacsurf;
  curd 6 cpcds 1 ; mz 10;

c create approximate normal offset curves from the
c nacelle and the spinner.
c
c NEW PARAMETERS CREATED
c
c    iradnac - an average inner radius of the nacelle at the bottom
c    oradnac - an average outer radius of the nacelle at the top
c    radspin - an average radius of the spinner at the bottom
c
  include /users/d/BOEING1/offset

c PAUSE HERE TO VERIFY THE GEOMETRY
  merge dasd rsd 500 sdint off dacd rest rx -90 center

c find number of elements for region above boundary layer
c and for the number of elements around the top of the nacelle
  para nabove [nint((%zmax-min(%z0,%z36)-10)/%elemsize)]
       around [max(3,nint((1.5*0.4*%x0/%elemsize)/2))];

cylinder 1 [1+%around] [1+2*%around];
         1 9 17 25 33;
         1 [1+%naclayer] [1+%naclayer+%nabove];
         0 0 0;
         0 45 90 135 180;
         0 0 0;

c position points using previously generated coordinates
  pb 1 1 1 1 1 3 xz [0.8*%x0] [%z0+5]
  pb 2 1 1 2 1 3 xz [%x0] [%z0]
  pb 3 1 1 3 1 3 xz [1.2*%x0] [%z0+5]

  pb 1 2 1 1 2 3 xz [0.8*%x9] [%z9+5]
  pb 2 2 1 2 2 3 xz [%x9] [%z9]
  pb 3 2 1 3 2 3 xz [1.2*%x9] [%z9+5]

  pb 1 3 1 1 3 3 xz [0.8*%x18] [%z18+5]
  pb 2 3 1 2 3 3 xz [%x18] [%z18]
  pb 3 3 1 3 3 3 xz [1.2*%x18] [%z18+5]

  pb 1 4 1 1 4 3 xz [0.8*%x27] [%z27+5]
  pb 2 4 1 2 4 3 xz [%x27] [%z27]
  pb 3 4 1 3 4 3 xz [1.2*%x27] [%z27+5]

  pb 1 5 1 1 5 3 xz [0.8*%x36] [%z36+5]
  pb 2 5 1 2 5 3 xz [%x36] [%z36]
  pb 3 5 1 3 5 3 xz [1.2*%x36] [%z36+5]

c move the center regions up
  mb 2 1 2 2 5 3 z 10

c attach all j-the edges to curves
  curs 1 1 1 1 5 1 4
  curs 2 1 1 2 5 1 1
  curs 3 1 1 3 5 1 5

  curs 1 1 2 1 5 2 2
  curs 2 1 2 2 5 2 6
  curs 3 1 2 3 5 2 3

c make sure the part is generated before using
c the intrinsic y(.,.,.), which returns the coordinates
c of a vertex of the mesh.  These commands adjust points
c to keep them in-plane
  mb 1 2 1 1 2 1 y [45-y(1,2,1)]
  mb 3 2 1 3 2 1 y [45-y(3,2,1)]
  mb 1 3 1 1 3 1 y [90-y(1,3,1)]
  mb 3 3 1 3 3 1 y [90-y(3,3,1)]
  mb 1 4 1 1 4 1 y [135-y(1,4,1)]
  mb 3 4 1 3 4 1 y [135-y(3,4,1)]
  pb 1 1 3 3 5 3 z 100
  mb 1 1 3 1 5 3 x -5
  mb 3 1 3 3 5 3 x 5

c interpolate face (offset from the nacelle) using spline interpolation
  splint 1 1 2 3 5 2 i 00

c zone the area near the nacelle using absolute spacing
  as 1 1 1 3 5 2 k 0 %naclsiz

c project the bottom to the nacelle
  sfi ;; -1;sd %nacsurf

c use transfinite interpolation on zoned faces
  tfi 1 2; -1 0 -2 0 -3 0 -4 0 -5; 1 2;
  tfi 2 3; -1 0 -2 0 -3 0 -4 0 -5; 1 2;
  tfi -1 0 -2 0 -3; 2 3 0 4 5; 1 2;
  tfi -1 0 -2 0 -3; 1 2 0 3 4; 1 2;

c use transfinite in the volume (helps tmei, too)
  tfi 2 3; 2 3 0 4 5; 1 2;
  tfi 2 3; 1 2 0 3 4; 1 2;
  tfi 1 2; 1 2 0 3 4; 1 2;
  tfi 1 2; 2 3 0 4 5; 1 2;

c use Thomas Middlecoff on the interior solid regions
  tmei 1 2; 2 3 0 4 5; 1 2;%niter1 0 1
  tmei 2 3; 2 3 0 4 5; 1 2;%niter1 0 1
  tmei 1 2; 1 2 0 3 4; 1 2;%niter1 0 1
  tmei 2 3; 1 2 0 3 4; 1 2;%niter1 0 1

c export faces as block boundaries for subsequent parts
  bb 1 1 1 1 5 2 1;     c inside boundary layer
  bb 1 1 2 1 5 3 2;     c inside top
  bb 3 1 1 3 5 2 3;     c outside boundary layer
  bb 3 1 2 3 5 3 4;     c outside top

endpart

 cylinder 1 2 6;
          1 9 17 25 33;
          1 21 31 [31+%nabove];
          %radspin [%radspin+%doff] %iradnac ;
          0 45 90 135 180 ;
          %zmin [%doff*sin(45)] %ztopnac %zmax ;

c position some key vertices
 pbs 3 1 3 3 1 3 xyz 4.1
 pbs 3 5 3 3 5 3 xyz 4.0
 curs 3 1 3 3 5 3 4

 mb 3 1 2 3 1 2 z [(z(3,1,3)-z(3,1,2))/3]
 mb 3 2 2 3 2 2 z [(z(3,2,3)-z(3,2,2))/3]
 mb 3 3 2 3 3 2 z [(z(3,3,3)-z(3,3,2))/3]
 mb 3 4 2 3 4 2 z [(z(3,4,3)-z(3,4,2))/3]
 mb 3 5 2 3 5 2 z [(z(3,5,3)-z(3,5,2))/3]

 pb 1 1 2 1 5 4 x 0
 pb 2 1 2 2 5 2 x [%doff*cos(45)]

c attach the vertical edges at the boundary layer of the spinner
c to the offset curves
 curs 2 1 1 2 1 2 21   
 curs 2 2 1 2 2 2 22   
 curs 2 3 1 2 3 2 23   
 curs 2 4 1 2 4 2 24   
 curs 2 5 1 2 5 2 25   

c insert a boundary layer partition just before the nacelle
 insprt 1 1 3 1

c delete the region above the boundary layer
 dei 3 4; 1 5; 3 4;

c attach to the previous part
 bb 3 1 3 4 5 3 1;
 bb 3 1 3 3 5 4 2;

c attach edges of the boundary layer to the offset curves
 curs 3 1 1 3 1 3 11   
 curs 3 2 1 3 2 3 12   
 curs 3 3 1 3 3 3 13   
 curs 3 4 1 3 4 3 14   
 curs 3 5 1 3 5 3 15   

c insert a partition just below the tip of the spinner
 para noff [nint(20*%doff/(z(2,1,2)-z(2,1,1)))];
 insprt 1 5 2 %noff

c position the partitions around the spinner
 pb 1 1 2 1 5 2 x %radspin           c above the spinner
 pb 2 1 4 2 5 5 x [%dtot*cos(45)]    c just below the spinner
 pb 1 1 3 1 5 3 xz .0001 0           c tip of the spinner

c deal with the singularity near r=0 at the top of the spinner
 pbs 1 1 3 1 1 3 xyz 27.1
 pbs 1 5 3 1 5 3 xyz 27.0
 curf 1 1 3 1 5 3 27                 c freeze the edge on a curve

c project to the spinner and the nacelle
 sfi -4;; 1 4;sd %nacsurf
 sfi -1;; 1 3;sd %spinsurf

c zone in the boundary regions
 as 3 1 1 4 5 4 i 1 %naclsiz
 as 1 1 1 2 5 5 i 0 %spinlsiz

c adjust densities according to the specified element size
 para dd [z(4,1,2)-z(4,1,1)]
      nkadd1 [nint(%dd/%elemsize)-(20-%noff)];
 para dd [z(4,1,3)-z(4,1,2)]
      nkadd2 [nint(%dd/%elemsize)-%noff];
 para dd [z(3,1,4)-z(3,1,3)]
      nkadd3 [nint(%dd/%elemsize)-10];
 para dd [x(3,1,1)-x(2,1,1)]
      niadd1 [%spinlayer-1]
      niadd2 [nint(%dd/%elemsize)-3]
      niadd3 [%naclayer-1];

 mseq i %niadd1 %niadd2 %niadd3
 mseq k %nkadd1 %nkadd2 %nkadd3 0

c add a layer just above the spinner
 para noff1 [nint(%doff*(%nkadd3+10)/(z(3,1,4)-z(3,1,3)))];
 insprt 1 6 3 %noff1
 mseq k 0 [%spinlayer-%noff1] [%spinlayer-%noff] 0 0
 pb 1 1 4 1 5 4 z [0.2*(z(2,1,4)+z(2,2,4)+z(2,3,4)+z(2,4,4)+z(2,5,4))]
 pb 1 1 4 1 5 6 x [0.1*%spinlsiz]

c zone toward the tip of the spinner
 as 1 1 2 4 5 3 k 1 %spinlsiz
 as 1 1 3 4 5 4 k 0 %spinlsiz

c make sure critical edges are in-plane
 sfi -1; -1 0 -5; 1 3;sd 601
 sfi -1; -2     ; 1 3;sd 602
 sfi -1; -3     ; 1 3;sd 603
 sfi -1; -4     ; 1 3;sd 604

 sfi -4; -1 0 -5; 1 5;sd 601
 sfi -4; -2     ; 1 5;sd 602
 sfi -4; -3     ; 1 5;sd 603
 sfi -4; -4     ; 1 5;sd 604

c interpolate all faces affected by zoning
 tfi -1 0 -2 0 -3 0 -4;1 2 0 3 4; 2 3;     c vertical faces
 tfi -1 0 -2 0 -3 0 -4;2 3 0 4 5; 2 3;
 tfi -1 0 -2 0 -3 0 -4;1 2 0 3 4; 3 4;
 tfi -1 0 -2 0 -3 0 -4;2 3 0 4 5; 3 4;

 tfi 1 2; 1 2 0 3 4; -1 -2 -3;             c z-slices in the spinner boundary layer
 tfi 1 2; 2 3 0 4 5; -1 -2 -3;
 tfi 3 4; 1 2 0 3 4; -1 -2 -3 -4;          c z-slices in the nacelle boundary layer
 tfi 3 4; 2 3 0 4 5; -1 -2 -3 -4;

 tfi 1 2; -1 0 -2 0 -3 0 -4 0 -5; 1 2 0 3 4 0 5 6; c theta-slices at spinner boundary
 tfi 1 2; -1 0 -2 0 -3 0 -4 0 -5; 2 3 0 4 5;
 tfi 3 4; -1 0 -2 0 -3 0 -4 0 -5; 2 3 0 4 5;       c theta-slices at nacelle boundary
 tfi 3 4; -1 0 -2 0 -3 0 -4 0 -5; 1 2 0 3 4;

 tfi 2 3; -1 0 -2 0 -3 0 -4 0 -5; 2 3;             c composite faces above spinner
 tfi 2 3; -1 0 -2 0 -3 0 -4 0 -5; 3 4;

 tfi 1 2; 1 2 0 3 4; -3 0 -4 0 -5 0 -6;        c radial wedges aimed at center
 tfi 1 2; 2 3 0 4 5; -3 0 -4 0 -5 0 -6;

c touch up where double zoning occurs near spinner tip
 tmei 1 2; -1 0 -2 0 -3 0 -4 0 -5; 2 3;40 0 1

c a touch up job at the top
 tmei 2 3; -1 0 -2 0 -3 0 -4 0 -5; 2 4;10 0 1
 tmei 1 3; -1 0 -2 0 -3 0 -4 0 -5; 3 6;10 0 1

c volume transfinite
 tfi 1 2; 1 2 0 3 4; 1 2 0 3 4 0 5 6;
 tfi 1 2; 1 2 0 3 4; 2 3 0 4 5;
 tfi 1 2; 2 3 0 4 5; 1 2 0 3 4 0 5 6;
 tfi 1 2; 2 3 0 4 5; 2 3 0 4 5;
 
 tfi 3 4; 1 2 0 3 4; 1 2 0 3 4;
 tfi 3 4; 2 3 0 4 5; 1 2 0 3 4;
 tfi 3 4; 1 2 0 3 4; 2 3 0 4 5;
 tfi 3 4; 2 3 0 4 5; 2 3 0 4 5;

 tfi 2 3; 1 2 0 3 4; 2 3;
 tfi 2 3; 2 3 0 4 5; 2 3;
 tfi 2 3; 1 2 0 3 4; 3 4;
 tfi 2 3; 2 3 0 4 5; 3 4;

c volume elliptic
 tmei 1 2; 1 2 0 3 4; 1 2 0 3 4 0 5 6;%niter 0 1
 tmei 1 2; 1 2 0 3 4; 2 3 0 4 5;%niter 0 1
 tmei 1 2; 2 3 0 4 5; 1 2 0 3 4 0 5 6;%niter 0 1
 tmei 1 2; 2 3 0 4 5; 2 3 0 4 5;%niter 0 1
 
 tmei 3 4; 1 2 0 3 4; 1 2 0 3 4;%niter 0 1
 tmei 3 4; 2 3 0 4 5; 1 2 0 3 4;%niter 0 1
 tmei 3 4; 1 2 0 3 4; 2 3 0 4 5;%niter 0 1
 tmei 3 4; 2 3 0 4 5; 2 3 0 4 5;%niter 0 1

 tmei 2 3; 1 2 0 3 4; 2 3;%niter 0 1
 tmei 2 3; 2 3 0 4 5; 2 3;%niter 0 1
 tmei 2 3; 1 2 0 3 4; 3 4;%niter 0 1
 tmei 2 3; 2 3 0 4 5; 3 4;%niter 0 1

endpart

cylinder 1 2;
         1 9 17 25 33;
         1 2 [2+%nabove];
         [%x0+10] %rmax;
         0 45 90 135 180;
         %zmin [%z0+5] %zmax;

 pbs 1 1 1 1 1 1 xyz 16.0
 pbs 1 2 1 1 2 1 xyz 17.0
 pbs 1 3 1 1 3 1 xyz 18.0
 pbs 1 4 1 1 4 1 xyz 19.0
 pbs 1 5 1 1 5 1 xyz 20.0
 pbs 1 1 2 1 1 2 xyz 16.1
 pbs 1 2 2 1 2 2 xyz 17.1
 pbs 1 3 2 1 3 2 xyz 18.1
 pbs 1 4 2 1 4 2 xyz 19.1

 para nkadd1 [(max(%z0,%z36)+5-%zmin)/%elemsize];
 mseq k %nkadd1 0

 pb 2 1 2 2 1 2 z [%z0+10]
 pb 2 2 2 2 2 2 z [%z9+10]
 pb 2 3 2 2 3 2 z [%z17+10]
 pb 2 4 2 2 4 2 z [%z25+10]
 pb 2 5 2 2 5 2 z [%z33+10]

 curs 1 1 1 1 1 2 16
 curs 1 2 1 1 2 2 17
 curs 1 3 1 1 3 2 18
 curs 1 4 1 1 4 2 19
 curs 1 5 1 1 5 2 20

 insprt 1 5 2 [%nkadd1*.25]
 insprt 1 6 1 [0.5*%nkadd1]
 insprt 1 1 1 [%naclayer]

 dei 1 2;; 4 5;
 pbs 1 1 4 1 1 4 xyz 5.1
 pbs 1 5 4 1 5 4 xyz 5.0

 bb 1 1 4 2 5 4 3;
 bb 2 1 4 2 5 5 4;
 sfi -1;; 1 4;sd %nacsurf
 as 1 1 1 2 5 4 i 0 %naclsiz

 para niadd2 [(%rmax-max(x(1,1,1),x(1,5,1)))/(1.5*%elemsize)];
 mseq i 0 %niadd2

 tfi 1 2; -1 0 -2 0 -3 0 -4 0 -5; 1 2 0 3 4;
 tfi 1 2; -1 0 -2 0 -3 0 -4 0 -5; 2 3;
 tfi 1 2; 1 2 0 3 4; -1 0 -2 0 -3;
 tfi 1 2; 2 3 0 4 5; -1 0 -2 0 -3;

 tfi 1 2; 1 2 0 3 4; 1 2 0 3 4;
 tfi 1 2; 1 2 0 3 4; 2 3;
 tfi 1 2; 2 3 0 4 5; 2 3;
 tfi 1 2; 2 3 0 4 5; 1 2 0 3 4;

 tmei 1 2; 1 2 0 3 4; 1 2 0 3 4; %niter 0 1
 tmei 1 2; 1 2 0 3 4; 2 3; %niter 0 1
 tmei 1 2; 2 3 0 4 5; 2 3; %niter 0 1
 tmei 1 2; 2 3 0 4 5; 1 2 0 3 4; %niter 0 1

endpart

merge

TrueGrid   Home Page

Questions, comments, suggestions


Copyright © 1996-2013 XYZ Scientific Applications, Inc. All rights reserved.