Difference between revisions of "Phasta Meshing"

From PHASTA Wiki
Jump to: navigation, search
Line 33: Line 33:
 
*To save and quit the changes you've made to BLattr.inp, get back to visual mode and type ":wq" and hit enter.
 
*To save and quit the changes you've made to BLattr.inp, get back to visual mode and type ":wq" and hit enter.
  
 +
== Creating an Initial Mesh==
 +
*FIRST, MAKE SURE YOU ARE CONNECTED TO ONE OF THE VIZ NODES AND NOT PORTAL0!!
 +
*To do this, type:
 +
  "vglconnect viz001" or "vglonnect viz002". You should also type "top" to see who is currently working and that enough memory is available
 +
*cd back to your working directory and type
 +
  /users/mrasquin/develop/Meshing/bin/x86_64_linux/BLMesher geom.xmt_txt geom_ver63.sms 0.05 1 BLattr.inp BLMesher.log
 +
or cp runBLMesher.sh into your working directory and type
 +
  ./runBLMesher.sh geom.xmt_txt geom_ver63.sms 0.05 1 BLattr.inp BLMesher.log
 +
*This creates geom_ver63.sms.  If it aborts immediately, look at BLMesher.log to get a sense of where in BLattr.inp it failed.
 +
*Next, you need to convert geom_ver63.sms into geom_ver2.sms so that the BL can be trimmed later. cp runConvertSMSVersion.sh to your working directory and type:
 +
  ./runConvertSMSVersion.sh
 +
 +
 
 
        
 
        
  

Revision as of 20:53, 19 January 2012


Creating the Boundary Layer Attribute File

  • To begin, we need a geometry model. It can be created using commercial softwares such as SolidWorks or NX and saved as *.x_t
  • Create a new directory, which will contain the new geometric model and boundary layer attribute file (BLattr.inp). Make a link to the geometric model:
  ln -s "model_name.x_t" geom.xmt_txt

Now copy whichever BLattr.inp file you wish to start from to your working directory.

  • Each face of the geometric model needs specific mesh and boundary layer characteristics. This is the purpose of BLattr.inp. Open it by typing:
  vim BLattr.inp

A vim command cheat sheet can be found at http://www.tuxfiles.org/linuxhelp/vimcheat.html

  • To create attributes for each model entity, two lines in the following format are being used.
 <entity dimension> <entity tag> <size type> <attribute type> <extra> 
 <value or expression for mesh size on this entity>
  • Note that a blank line between these two lines is not allowed.
  • The parameters in the first line, respectively are:
- Entity dimension:          This will be 2 if the BL is being specified on a face
- Entity tag:                     You can find the entity tag using simapps
- Size type on entity:       1 for absolute mesh size and 2 for relative mesh size
- Attribute type on entity:  
                             0 just imposes the size on entity. <extra> field is NULL
                             1 for entity with boundary layers. <extra> field is explained below.
                             2 for periodic entity: In this case, <extra> field is followed with slave entity tag
                             3 for refinement source. Specify entity dimension as -1 in this case. <extra> field is explained below.

For Boundary layer:

   the <extra> field consists of (a) faceSide/useDir (BL orientation), (b) numEndEnts (==0, layers with fixed heigths), (c) firstLayerHeight, (d) totalHeight, 
  (e) nLayers, (f) blMixed, (g) blBlends, (h) blPropagate and (i) edgeBLFaceTag (only if 2D BL on edge)
  • You can insert text by hitting the "a" or "i" keys. Hit escape to go back to visual mode
  • You can comment out lines or parts of lines by placing a # symbol before the text you want to comment out. This is useful for suppressing BL's and

assigning names to the face numbers

  • To save and quit the changes you've made to BLattr.inp, get back to visual mode and type ":wq" and hit enter.

Creating an Initial Mesh

  • FIRST, MAKE SURE YOU ARE CONNECTED TO ONE OF THE VIZ NODES AND NOT PORTAL0!!
  • To do this, type:
  "vglconnect viz001" or "vglonnect viz002". You should also type "top" to see who is currently working and that enough memory is available
  • cd back to your working directory and type
  /users/mrasquin/develop/Meshing/bin/x86_64_linux/BLMesher geom.xmt_txt geom_ver63.sms 0.05 1 BLattr.inp BLMesher.log

or cp runBLMesher.sh into your working directory and type

  ./runBLMesher.sh geom.xmt_txt geom_ver63.sms 0.05 1 BLattr.inp BLMesher.log
  • This creates geom_ver63.sms. If it aborts immediately, look at BLMesher.log to get a sense of where in BLattr.inp it failed.
  • Next, you need to convert geom_ver63.sms into geom_ver2.sms so that the BL can be trimmed later. cp runConvertSMSVersion.sh to your working directory and type:
  ./runConvertSMSVersion.sh




  • You need the BLMesher code which can be found at:
  /users/mrasquin/develop/Meshing/bin/x86_64_linux/BLMesher