<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://fluid.colorado.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chitak</id>
		<title>PHASTA Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://fluid.colorado.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chitak"/>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php/Special:Contributions/Chitak"/>
		<updated>2026-04-14T06:56:59Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Remote_Desktop&amp;diff=447</id>
		<title>Remote Desktop</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Remote_Desktop&amp;diff=447"/>
				<updated>2013-09-10T03:11:08Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: Created page with &amp;quot;if you want to work with solidworks or NX remotely, you need to access the windows machines. For that open an ssh connection by:   ssh -L3389:phasta-pc:3389 username@jumpgate-pha...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;if you want to work with solidworks or NX remotely, you need to access the windows machines. For that open an ssh connection by:&lt;br /&gt;
&lt;br /&gt;
 ssh -L3389:phasta-pc:3389 username@jumpgate-phasta.colorado.edu&lt;br /&gt;
&lt;br /&gt;
Then start remote desktop connection application/program from your laptop/PC. Put &amp;quot;localhost&amp;quot; in the Computer name and then press okay. Username is your username of the system, password is your main password (not VNC) and Domain is PHASTA.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt&amp;diff=412</id>
		<title>PhParAdapt</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt&amp;diff=412"/>
				<updated>2013-07-30T04:39:21Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: Replaced content with &amp;quot;phParAdapt-SCOREC

phParAdapt-Simmetrix&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[phParAdapt-SCOREC]]&lt;br /&gt;
&lt;br /&gt;
[[phParAdapt-Simmetrix]]&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/Simmetrix&amp;diff=411</id>
		<title>PhParAdapt/Simmetrix</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/Simmetrix&amp;diff=411"/>
				<updated>2013-07-30T04:39:06Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Coming soon!&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/Simmetrix&amp;diff=410</id>
		<title>PhParAdapt/Simmetrix</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/Simmetrix&amp;diff=410"/>
				<updated>2013-07-30T04:38:52Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[phParAdapt-SCOREC]]&lt;br /&gt;
&lt;br /&gt;
[[phParAdapt-Simmetrix]]&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/Simmetrix&amp;diff=409</id>
		<title>PhParAdapt/Simmetrix</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/Simmetrix&amp;diff=409"/>
				<updated>2013-07-30T04:38:43Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: Created page with &amp;quot;phParAdapt-SCOREC phParAdapt-Simmetrix&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[phParAdapt-SCOREC]]&lt;br /&gt;
[[phParAdapt-Simmetrix]]&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/SCOREC&amp;diff=408</id>
		<title>PhParAdapt/SCOREC</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/SCOREC&amp;diff=408"/>
				<updated>2013-07-30T04:37:53Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-----------------------------------------------&lt;br /&gt;
== Download and compile (viz nodes) ==&lt;br /&gt;
This sections is inspired from &amp;lt;http://redmine.scorec.rpi.edu/projects/pumi/wiki/Build_Instructions&amp;gt;. Please read it first before continuing, as some information on this wiki page are not repeated.&lt;br /&gt;
The SCOREC tools now build against CMake. Only Parma, the PHASTA utilities and phParAdapt still build against Autotools.&lt;br /&gt;
From a termonal, run the following commands:&lt;br /&gt;
  soft add +cmake&lt;br /&gt;
  soft add +git&lt;br /&gt;
  cd ~&lt;br /&gt;
  mkdir SCOREC.develop&lt;br /&gt;
  cd SCOREC.develop&lt;br /&gt;
  git clone ssh://your_username@jumpgate-phasta.colorado.edu/users/mrasquin/SCOREC.develop/compilation &lt;br /&gt;
&lt;br /&gt;
The git command will download these instructions, along with a checkout and compile script for Parma and phParAdapt. The next commands are to compile the whole stack with the GNU compiler on the viz nodes are:&lt;br /&gt;
  soft add +gcc-4.8.1&lt;br /&gt;
  soft add +openmpi-gnu&lt;br /&gt;
  mkdir install-gcc-O2 //all the libraries and executable will go there&lt;br /&gt;
  mkdir build-gcc-O2 // this is where you will run the cmake commands&lt;br /&gt;
  cd build-gcc-O2&lt;br /&gt;
  cmake ../CMake.SCOREC -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/users/mrasquin/SCOREC.develop/install-gcc-O2 -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx &lt;br /&gt;
&lt;br /&gt;
This will create the Makefiles. To compile the actual code you need to&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
inside the build-gcc-O2 directory.&lt;br /&gt;
&lt;br /&gt;
Do not forget to update the path to PREFIX according to your install directory.&lt;br /&gt;
By default, it compiles with meshmodel. See the redmine link above about how to compile with parasolid or other geometric model.&lt;br /&gt;
The cmake command downloads the parmetis package inside the build-gcc-O2 directory. If you want to use 64 bit integer in parmetis, which is only useful for big meshes in serial, edit &lt;br /&gt;
&lt;br /&gt;
  parmetis-4.0.2/metis/include/metis.h&lt;br /&gt;
&lt;br /&gt;
and set &lt;br /&gt;
&lt;br /&gt;
  #define IDXTYPEWIDTH 64&lt;br /&gt;
&lt;br /&gt;
Now, compile the SCOREC tools (in serial only for now - do not try make -j 8 for instance):&lt;br /&gt;
&lt;br /&gt;
  make 2&amp;gt;&amp;amp;1 | tee log_cmake_make.dat&lt;br /&gt;
  make install 2&amp;gt;&amp;amp;1 | tee log_cmake_install.dat&lt;br /&gt;
  cd .. #back to SCOREC.develop&lt;br /&gt;
&lt;br /&gt;
Now you should have the pumi tools installed in SCOREC.develop/install-gcc-O2. It is time to download and compile the Parma library. From SCOREC.develop, &lt;br /&gt;
  mkdir Autotools.SCOREC&lt;br /&gt;
  cd Autotools.SCOREC&lt;br /&gt;
  cp ../compilation/parma_install.sh .&lt;br /&gt;
&lt;br /&gt;
Edit and update the script parma_install.sh. In particular, edit PREFIX to the same path used in the cmake command above. Other parameters you need to update are the compilation options (DEBUG), the svn username if you have one, etc. Then:&lt;br /&gt;
  ./parma_install.sh checkout_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_checkout.dat&lt;br /&gt;
  ./parma_install.sh setup_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_setup.dat&lt;br /&gt;
  ./parma_install.sh intall_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_install.dat&lt;br /&gt;
&lt;br /&gt;
For phParAdapt (and PHASTA utilites), the procedure is similar:&lt;br /&gt;
  cp ../compilation/phParAdaptBuild.sh&lt;br /&gt;
  edit path to PREFIX in parma_install.sh + other parameters&lt;br /&gt;
  ./phParAdaptBuild.sh checkout_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_checkout.dat&lt;br /&gt;
  ./phParAdaptBuild.sh setup_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_setup.dat&lt;br /&gt;
  ./phParAdaptBuild.sh install_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_install.dat&lt;br /&gt;
&lt;br /&gt;
Your phParAdapt executable should be in ~/SCOREC.develop/install-gcc-O2/bin/phParAdapt&lt;br /&gt;
&lt;br /&gt;
== Convert geom_ver63.sms to FMDB format==&lt;br /&gt;
*This can be done in same directory in which you created geom_ver63.sms. You first need to convert geom_ver63.sms to FMDB format. The executable that will do this is at /users/jema6380/runSimMesh2FMDB.sh&lt;br /&gt;
*Make a link from the output file, geom_FMDB.sms, to geom.sms (ln -s geom_FMDB.sms geom.sms)&lt;br /&gt;
&lt;br /&gt;
==Create geom.spj==&lt;br /&gt;
*If you have not done so already, create geom.spj. This is not done with Simulation Maker as was done previously, but can simply be done with a vim editor. See the file /users/jema6380/Models/Boeing/BetaScale2CaltechTunnel/CT_Open32_B0_D30_U20/9-A0-24jets/geom.spj for some guidance. As a quick example, if your boundary condition is a velocity of 20 i_hat m/s (comp3) on the inlet face (which let's say has a face number of 1651), then you would enter:&lt;br /&gt;
   comp3: 1651 2 20 1 0 0&lt;br /&gt;
where the &amp;quot;2&amp;quot; designates that we are talking about a face, which has 2 dimensions; the &amp;quot;20&amp;quot; is the speed; and the &amp;quot;1 0 0&amp;quot; is the direction.&lt;br /&gt;
*Michel created a script that will make this process faster, which is desirable if you have a large number of faces. If you want to use the script, then first use the executable at /users/jema6380/getFaceList.sh to create a list of faces. From the terminal type:&lt;br /&gt;
   ./getFaceList.sh &amp;quot;input_file&amp;quot;&lt;br /&gt;
where &amp;quot;input_file&amp;quot; is the file that contains the face numbers, which presumably does not already list them consecutively. This might be BLattr.inp, for exmple. &lt;br /&gt;
*Now create a new directory called &amp;quot;FacesModelAttributes&amp;quot; and put all of the boundary conditions in .dat files. See the files in /users/jema6380/Models/Boeing/BetaScale2CaltechTunnel/CT_Open32_B0_D30_U20/Simplified_SPJ_file/FacesModelAttributes/ for guidance. Make sure all the .dat files have a name that begins with &amp;quot;attr_&amp;quot; . &lt;br /&gt;
*copy /users/jema6380/buildSimplifiedAttrFile.sh to the Simplified_SPJ_file directory and do:&lt;br /&gt;
   ./buildSimplifiedAttrFile.sh&lt;br /&gt;
*This should create a file called result.spj, which contains all of the boundary conditions. cd back to your working mesh directory and make a link from result.spj to geom.spj. Also make a link from result.spj to geomNOIC.spj&lt;br /&gt;
&lt;br /&gt;
==Partition geom_ver63.sms==&lt;br /&gt;
*Make sure you have geom.xmt_txt in your working directory.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/SCOREC&amp;diff=407</id>
		<title>PhParAdapt/SCOREC</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/SCOREC&amp;diff=407"/>
				<updated>2013-07-30T04:36:15Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-----------------------------------------------&lt;br /&gt;
== Download and compile (viz nodes) ==&lt;br /&gt;
This sections is inspired from &amp;lt;http://redmine.scorec.rpi.edu/projects/pumi/wiki/Build_Instructions&amp;gt;. Please read it first before continuing, as some information on this wiki page are not repeated.&lt;br /&gt;
The SCOREC tools now build against CMake. Only Parma, the PHASTA utilities and phParAdapt still build against Autotools.&lt;br /&gt;
From a termonal, run the following commands:&lt;br /&gt;
  soft add +cmake&lt;br /&gt;
  soft add +git&lt;br /&gt;
  cd ~&lt;br /&gt;
  mkdir SCOREC.develop&lt;br /&gt;
  cd SCOREC.develop&lt;br /&gt;
  git clone ssh://your_username@jumpgate-phasta.colorado.edu/users/mrasquin/SCOREC.develop/compilation &lt;br /&gt;
&lt;br /&gt;
The git command will download these instructions, along with a checkout and compile script for Parma and phParAdapt. The next commands are to compile the whole stack with the GNU compiler on the viz nodes are:&lt;br /&gt;
  soft add +gcc-4.8.1&lt;br /&gt;
  soft add +openmpi-gnu&lt;br /&gt;
  mkdir install-gcc-O2 //all the libraries and executable will go there&lt;br /&gt;
  mkdir build-gcc-O2 // this is where you will run the cmake commands&lt;br /&gt;
  cd build-gcc-O2&lt;br /&gt;
  cmake ../CMake.SCOREC -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/users/mrasquin/SCOREC.develop/install-gcc-O2 -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx &lt;br /&gt;
&lt;br /&gt;
This will create the Makefiles. To compile the actual code you need to&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
inside the build-gcc-O2 directory.&lt;br /&gt;
&lt;br /&gt;
Do not forget to update the path to PREFIX according to your install directory.&lt;br /&gt;
By default, it compiles with meshmodel. See the redmine link above about how to compile with parasolid or other geometric model.&lt;br /&gt;
The cmake command downloads the parmetis package inside the build-gcc-O2 directory. If you want to use 64 bit integer in parmetis, which is only useful for big meshes in serial, edit &lt;br /&gt;
&lt;br /&gt;
  parmetis-4.0.2/metis/include/metis.h&lt;br /&gt;
&lt;br /&gt;
and set &lt;br /&gt;
&lt;br /&gt;
  #define IDXTYPEWIDTH 64&lt;br /&gt;
&lt;br /&gt;
Now, compile the SCOREC tools (in serial only for now - do not try make -j 8 for instance):&lt;br /&gt;
&lt;br /&gt;
  make 2&amp;gt;&amp;amp;1 | tee log_cmake_make.dat&lt;br /&gt;
  make install 2&amp;gt;&amp;amp;1 | tee log_cmake_install.dat&lt;br /&gt;
  cd .. #back to SCOREC.develop&lt;br /&gt;
&lt;br /&gt;
Now you should have the pumi tools installed in SCOREC.develop/install-gcc-O2. It is time to download and compile the Parma library. From SCOREC.develop, &lt;br /&gt;
  mkdir Autotools.SCOREC&lt;br /&gt;
  cd Autotools.SCOREC&lt;br /&gt;
  cp ../compilation/parma_install.sh .&lt;br /&gt;
&lt;br /&gt;
Edit and update the script parma_install.sh. In particular, edit PREFIX to the same path used in the cmake command above. Other parameters you need to update are the compilation options (DEBUG), the svn username if you have one, etc. Then:&lt;br /&gt;
  ./parma_install.sh checkout_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_checkout.dat&lt;br /&gt;
  ./parma_install.sh setup_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_setup.dat&lt;br /&gt;
  ./parma_install.sh intall_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_install.dat&lt;br /&gt;
&lt;br /&gt;
For phParAdapt (and PHASTA utilites), the procedure is similar:&lt;br /&gt;
  cp ../compilation/phParAdaptBuild.sh&lt;br /&gt;
  edit path to PREFIX in parma_install.sh + other parameters&lt;br /&gt;
  ./phParAdaptBuild.sh checkout_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_checkout.dat&lt;br /&gt;
  ./phParAdaptBuild.sh setup_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_setup.dat&lt;br /&gt;
  ./phParAdaptBuild.sh install_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_install.dat&lt;br /&gt;
&lt;br /&gt;
Your phParAdapt executable should be in ~/SCOREC.develop/install-gcc-O2/bin/phParAdapt&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/SCOREC&amp;diff=406</id>
		<title>PhParAdapt/SCOREC</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/SCOREC&amp;diff=406"/>
				<updated>2013-07-30T04:35:23Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: Created page with &amp;quot;== Download and compile (viz nodes) == This sections is inspired from &amp;lt;http://redmine.scorec.rpi.edu/projects/pumi/wiki/Build_Instructions&amp;gt;. Please read it first before continuin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Download and compile (viz nodes) ==&lt;br /&gt;
This sections is inspired from &amp;lt;http://redmine.scorec.rpi.edu/projects/pumi/wiki/Build_Instructions&amp;gt;. Please read it first before continuing, as some information on this wiki page are not repeated.&lt;br /&gt;
The SCOREC tools now build against CMake. Only Parma, the PHASTA utilities and phParAdapt still build against Autotools.&lt;br /&gt;
From a termonal, run the following commands:&lt;br /&gt;
  soft add +cmake&lt;br /&gt;
  soft add +git&lt;br /&gt;
  cd ~&lt;br /&gt;
  mkdir SCOREC.develop&lt;br /&gt;
  cd SCOREC.develop&lt;br /&gt;
  git clone ssh://your_username@jumpgate-phasta.colorado.edu/users/mrasquin/SCOREC.develop/compilation &lt;br /&gt;
&lt;br /&gt;
The git command will download these instructions, along with a checkout and compile script for Parma and phParAdapt. The next commands are to compile the whole stack with the GNU compiler on the viz nodes are:&lt;br /&gt;
  soft add +gcc-4.8.1&lt;br /&gt;
  soft add +openmpi-gnu&lt;br /&gt;
  mkdir install-gcc-O2 //all the libraries and executable will go there&lt;br /&gt;
  mkdir build-gcc-O2 // this is where you will run the cmake commands&lt;br /&gt;
  cd build-gcc-O2&lt;br /&gt;
  cmake ../CMake.SCOREC -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/users/mrasquin/SCOREC.develop/install-gcc-O2 -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx &lt;br /&gt;
&lt;br /&gt;
This will create the Makefiles. To compile the actual code you need to&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
inside the build-gcc-O2 directory.&lt;br /&gt;
&lt;br /&gt;
Do not forget to update the path to PREFIX according to your install directory.&lt;br /&gt;
By default, it compiles with meshmodel. See the redmine link above about how to compile with parasolid or other geometric model.&lt;br /&gt;
The cmake command downloads the parmetis package inside the build-gcc-O2 directory. If you want to use 64 bit integer in parmetis, which is only useful for big meshes in serial, edit &lt;br /&gt;
&lt;br /&gt;
  parmetis-4.0.2/metis/include/metis.h&lt;br /&gt;
&lt;br /&gt;
and set &lt;br /&gt;
&lt;br /&gt;
  #define IDXTYPEWIDTH 64&lt;br /&gt;
&lt;br /&gt;
Now, compile the SCOREC tools (in serial only for now - do not try make -j 8 for instance):&lt;br /&gt;
&lt;br /&gt;
  make 2&amp;gt;&amp;amp;1 | tee log_cmake_make.dat&lt;br /&gt;
  make install 2&amp;gt;&amp;amp;1 | tee log_cmake_install.dat&lt;br /&gt;
  cd .. #back to SCOREC.develop&lt;br /&gt;
&lt;br /&gt;
Now you should have the pumi tools installed in SCOREC.develop/install-gcc-O2. It is time to download and compile the Parma library. From SCOREC.develop, &lt;br /&gt;
  mkdir Autotools.SCOREC&lt;br /&gt;
  cd Autotools.SCOREC&lt;br /&gt;
  cp ../compilation/parma_install.sh .&lt;br /&gt;
&lt;br /&gt;
Edit and update the script parma_install.sh. In particular, edit PREFIX to the same path used in the cmake command above. Other parameters you need to update are the compilation options (DEBUG), the svn username if you have one, etc. Then:&lt;br /&gt;
  ./parma_install.sh checkout_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_checkout.dat&lt;br /&gt;
  ./parma_install.sh setup_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_setup.dat&lt;br /&gt;
  ./parma_install.sh intall_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_install.dat&lt;br /&gt;
&lt;br /&gt;
For phParAdapt (and PHASTA utilites), the procedure is similar:&lt;br /&gt;
  cp ../compilation/phParAdaptBuild.sh&lt;br /&gt;
  edit path to PREFIX in parma_install.sh + other parameters&lt;br /&gt;
  ./phParAdaptBuild.sh checkout_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_checkout.dat&lt;br /&gt;
  ./phParAdaptBuild.sh setup_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_setup.dat&lt;br /&gt;
  ./phParAdaptBuild.sh install_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_install.dat&lt;br /&gt;
&lt;br /&gt;
Your phParAdapt executable should be in ~/SCOREC.develop/install-gcc-O2/bin/phParAdapt&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt&amp;diff=405</id>
		<title>PhParAdapt</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt&amp;diff=405"/>
				<updated>2013-07-30T04:33:36Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Download and compile (viz nodes) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-----------------------------------------------&lt;br /&gt;
== Download and compile (viz nodes) ==&lt;br /&gt;
This sections is inspired from &amp;lt;http://redmine.scorec.rpi.edu/projects/pumi/wiki/Build_Instructions&amp;gt;. Please read it first before continuing, as some information on this wiki page are not repeated.&lt;br /&gt;
The SCOREC tools now build against CMake. Only Parma, the PHASTA utilities and phParAdapt still build against Autotools.&lt;br /&gt;
From a termonal, run the following commands:&lt;br /&gt;
  soft add +cmake&lt;br /&gt;
  soft add +git&lt;br /&gt;
  cd ~&lt;br /&gt;
  mkdir SCOREC.develop&lt;br /&gt;
  cd SCOREC.develop&lt;br /&gt;
  git clone ssh://your_username@jumpgate-phasta.colorado.edu/users/mrasquin/SCOREC.develop/compilation &lt;br /&gt;
&lt;br /&gt;
The git command will download these instructions, along with a checkout and compile script for Parma and phParAdapt. The next commands are to compile the whole stack with the GNU compiler on the viz nodes are:&lt;br /&gt;
  soft add +gcc-4.8.1&lt;br /&gt;
  soft add +openmpi-gnu&lt;br /&gt;
  mkdir install-gcc-O2 //all the libraries and executable will go there&lt;br /&gt;
  mkdir build-gcc-O2 // this is where you will run the cmake commands&lt;br /&gt;
  cd build-gcc-O2&lt;br /&gt;
  cmake ../CMake.SCOREC -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/users/mrasquin/SCOREC.develop/install-gcc-O2 -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx &lt;br /&gt;
&lt;br /&gt;
This will create the Makefiles. To compile the actual code you need to&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
inside the build-gcc-O2 directory.&lt;br /&gt;
&lt;br /&gt;
Do not forget to update the path to PREFIX according to your install directory.&lt;br /&gt;
By default, it compiles with meshmodel. See the redmine link above about how to compile with parasolid or other geometric model.&lt;br /&gt;
The cmake command downloads the parmetis package inside the build-gcc-O2 directory. If you want to use 64 bit integer in parmetis, which is only useful for big meshes in serial, edit &lt;br /&gt;
&lt;br /&gt;
  parmetis-4.0.2/metis/include/metis.h&lt;br /&gt;
&lt;br /&gt;
and set &lt;br /&gt;
&lt;br /&gt;
  #define IDXTYPEWIDTH 64&lt;br /&gt;
&lt;br /&gt;
Now, compile the SCOREC tools (in serial only for now - do not try make -j 8 for instance):&lt;br /&gt;
&lt;br /&gt;
  make 2&amp;gt;&amp;amp;1 | tee log_cmake_make.dat&lt;br /&gt;
  make install 2&amp;gt;&amp;amp;1 | tee log_cmake_install.dat&lt;br /&gt;
  cd .. #back to SCOREC.develop&lt;br /&gt;
&lt;br /&gt;
Now you should have the pumi tools installed in SCOREC.develop/install-gcc-O2. It is time to download and compile the Parma library. From SCOREC.develop, &lt;br /&gt;
  mkdir Autotools.SCOREC&lt;br /&gt;
  cd Autotools.SCOREC&lt;br /&gt;
  cp ../compilation/parma_install.sh .&lt;br /&gt;
&lt;br /&gt;
Edit and update the script parma_install.sh. In particular, edit PREFIX to the same path used in the cmake command above. Other parameters you need to update are the compilation options (DEBUG), the svn username if you have one, etc. Then:&lt;br /&gt;
  ./parma_install.sh checkout_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_checkout.dat&lt;br /&gt;
  ./parma_install.sh setup_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_setup.dat&lt;br /&gt;
  ./parma_install.sh intall_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_install.dat&lt;br /&gt;
&lt;br /&gt;
For phParAdapt (and PHASTA utilites), the procedure is similar:&lt;br /&gt;
  cp ../compilation/phParAdaptBuild.sh&lt;br /&gt;
  edit path to PREFIX in parma_install.sh + other parameters&lt;br /&gt;
  ./phParAdaptBuild.sh checkout_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_checkout.dat&lt;br /&gt;
  ./phParAdaptBuild.sh setup_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_setup.dat&lt;br /&gt;
  ./phParAdaptBuild.sh install_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_install.dat&lt;br /&gt;
&lt;br /&gt;
Your phParAdapt executable should be in ~/SCOREC.develop/install-gcc-O2/bin/phParAdapt&lt;br /&gt;
&lt;br /&gt;
== Convert geom_ver63.sms to FMDB format==&lt;br /&gt;
*This can be done in same directory in which you created geom_ver63.sms. You first need to convert geom_ver63.sms to FMDB format. The executable that will do this is at /users/jema6380/runSimMesh2FMDB.sh&lt;br /&gt;
*Make a link from the output file, geom_FMDB.sms, to geom.sms (ln -s geom_FMDB.sms geom.sms)&lt;br /&gt;
&lt;br /&gt;
==Create geom.spj==&lt;br /&gt;
*If you have not done so already, create geom.spj. This is not done with Simulation Maker as was done previously, but can simply be done with a vim editor. See the file /users/jema6380/Models/Boeing/BetaScale2CaltechTunnel/CT_Open32_B0_D30_U20/9-A0-24jets/geom.spj for some guidance. As a quick example, if your boundary condition is a velocity of 20 i_hat m/s (comp3) on the inlet face (which let's say has a face number of 1651), then you would enter:&lt;br /&gt;
   comp3: 1651 2 20 1 0 0&lt;br /&gt;
where the &amp;quot;2&amp;quot; designates that we are talking about a face, which has 2 dimensions; the &amp;quot;20&amp;quot; is the speed; and the &amp;quot;1 0 0&amp;quot; is the direction.&lt;br /&gt;
*Michel created a script that will make this process faster, which is desirable if you have a large number of faces. If you want to use the script, then first use the executable at /users/jema6380/getFaceList.sh to create a list of faces. From the terminal type:&lt;br /&gt;
   ./getFaceList.sh &amp;quot;input_file&amp;quot;&lt;br /&gt;
where &amp;quot;input_file&amp;quot; is the file that contains the face numbers, which presumably does not already list them consecutively. This might be BLattr.inp, for exmple. &lt;br /&gt;
*Now create a new directory called &amp;quot;FacesModelAttributes&amp;quot; and put all of the boundary conditions in .dat files. See the files in /users/jema6380/Models/Boeing/BetaScale2CaltechTunnel/CT_Open32_B0_D30_U20/Simplified_SPJ_file/FacesModelAttributes/ for guidance. Make sure all the .dat files have a name that begins with &amp;quot;attr_&amp;quot; . &lt;br /&gt;
*copy /users/jema6380/buildSimplifiedAttrFile.sh to the Simplified_SPJ_file directory and do:&lt;br /&gt;
   ./buildSimplifiedAttrFile.sh&lt;br /&gt;
*This should create a file called result.spj, which contains all of the boundary conditions. cd back to your working mesh directory and make a link from result.spj to geom.spj. Also make a link from result.spj to geomNOIC.spj&lt;br /&gt;
&lt;br /&gt;
==Partition geom_ver63.sms==&lt;br /&gt;
*Make sure you have geom.xmt_txt in your working directory.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=NSPre&amp;diff=381</id>
		<title>NSPre</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=NSPre&amp;diff=381"/>
				<updated>2013-07-17T21:52:55Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are currently many versions of NSpre out there.&lt;br /&gt;
&lt;br /&gt;
The oldest version of NSpre which should work with any meshes created with Simmetrix versions prior to 7.2-120626, uses geom.spj file (old attribute file format, created with simappssdk). This vesion can also use version_2 meshes. You need to have geom.xmt_txt, geom.spj, geom.sms files in the directory where you run this. &lt;br /&gt;
To use this NSpre (if you still have geom.spj files), use&lt;br /&gt;
&lt;br /&gt;
 /users/kjansen/NSpre-Parasolid_Serial-mpich1-O&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have crated your mesh with a version later than 7.2 libraries, most probably above version is going to fail. Also, if you have used SimModeler to create your attribute file (*.smd), above version is not going to work. There is another executable for this. You need to have geom.xmt_txt, geom.smd, geom.sms files in the directory where you run it. The path is: &lt;br /&gt;
&lt;br /&gt;
 /users/chitak/Executables/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
&lt;br /&gt;
This version requires a geom.smd file as the attribute file, so if you still have a geom.spj file, you can convert it to smd format (check [[SimModeler]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If by very remote chance, you are experimenting and you have created your mesh with some 8.0 version libraries, chances are even above executable is going to crash. If that is the case, try out&lt;br /&gt;
&lt;br /&gt;
 /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are counterparts for these executables which use discrete model (*-Discrete_*). You can use the same parallel NSpre executable from&lt;br /&gt;
&lt;br /&gt;
 /users/kjansen/NSpre_Parallel-mpich1-O&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=NSPre&amp;diff=380</id>
		<title>NSPre</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=NSPre&amp;diff=380"/>
				<updated>2013-07-17T21:50:45Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are currently many versions of NSpre out there.&lt;br /&gt;
&lt;br /&gt;
The oldest version of NSpre which should work with any meshes created with Simmetrix versions prior to 7.2-120626, uses geom.spj file (old attribute file format, created with simappssdk). This vesion can also use version_2 meshes. You need to have geom.xmt_txt, geom.spj, geom.sms files in the directory where you run this. &lt;br /&gt;
To use this NSpre (if you still have geom.spj files), use&lt;br /&gt;
&lt;br /&gt;
 /users/kjansen/NSpre-Parasolid_Serial-mpich1-O&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have crated your mesh with a version later than 7.2 libraries, most probably above version is going to fail. Also, if you have used SimModeler to create your attribute file (*.smd), above version is not going to work. There is another executable for this. You need to have geom.xmt_txt, geom.smd, geom.sms files in the directory where you run it. The path is: &lt;br /&gt;
&lt;br /&gt;
 /users/chitak/Executables/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
&lt;br /&gt;
This version requires a geom.smd file as the attribute file, so if you still have a geom.spj file, you can convert it to smd format (check [[SimModeler]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If by very remote chance, if you are experimenting and you have created your mesh with some 8.0 version libraries, chances are even above executable is going to crash. If that is the case, try out&lt;br /&gt;
&lt;br /&gt;
 /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=NSPre&amp;diff=379</id>
		<title>NSPre</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=NSPre&amp;diff=379"/>
				<updated>2013-07-17T21:50:31Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are currently many versions of NSpre out there.&lt;br /&gt;
&lt;br /&gt;
The oldest version of NSpre which should work with any meshes created with Simmetrix versions prior to 7.2-120626, uses geom.spj file (old attribute file format, created with simappssdk). This vesion can also use version_2 meshes. You need to have geom.xmt_txt, geom.spj, geom.sms files in the directory where you run this. &lt;br /&gt;
To use this NSpre (if you still have geom.spj files), use&lt;br /&gt;
&lt;br /&gt;
 /users/kjansen/NSpre-Parasolid_Serial-mpich1-O&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have crated your mesh with a version later than 7.2 libraries, most probably above version is going to fail. Also, if you have used SimModeler to create your attribute file (*.smd), above version is not going to work. There is another executable for this. You need to have geom.xmt_txt, geom.smd, geom.sms files in the directory where you run it. The path is: &lt;br /&gt;
&lt;br /&gt;
/users/chitak/Executables/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
&lt;br /&gt;
This version requires a geom.smd file as the attribute file, so if you still have a geom.spj file, you can convert it to smd format (check [[SimModeler]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If by very remote chance, if you are experimenting and you have created your mesh with some 8.0 version libraries, chances are even above executable is going to crash. If that is the case, try out&lt;br /&gt;
&lt;br /&gt;
/users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=NSPre&amp;diff=378</id>
		<title>NSPre</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=NSPre&amp;diff=378"/>
				<updated>2013-07-17T21:42:58Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: Created page with &amp;quot;There are currently many versions of NSpre out there.  The oldest version of NSpre which should work with any meshes created with Simmetrix versions prior to 7.2-120626, uses geo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are currently many versions of NSpre out there.&lt;br /&gt;
&lt;br /&gt;
The oldest version of NSpre which should work with any meshes created with Simmetrix versions prior to 7.2-120626, uses geom.spj file (old attribute file format, created with simappssdk). This vesion can also use version_2 meshes. &lt;br /&gt;
To use this NSpre (if you still have geom.spj files), use&lt;br /&gt;
&lt;br /&gt;
 /users/kjansen/NSpre-Parasolid_Serial-mpich1-O&lt;br /&gt;
&lt;br /&gt;
If you have crated your mesh with a version later than 7.2 libraries, most probably above&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=268</id>
		<title>Opening a Simmetrix ticket</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=268"/>
				<updated>2012-10-29T02:05:21Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To open a ticket with simmetrix, use the following support form.&lt;br /&gt;
&lt;br /&gt;
 ====Simmetrix Support Form====&lt;br /&gt;
 &lt;br /&gt;
 Customer ID: jan001&lt;br /&gt;
 Platform: linux&lt;br /&gt;
 Simmetrix Product: MeshSim&lt;br /&gt;
 Product Version: 7.2 (edit this to whichever version you are using)&lt;br /&gt;
 Type [Question,Bug,Feature Request]: Question/Bug/Feature request&lt;br /&gt;
 Priority [High,Medium,Low]: High/Medium/Low&lt;br /&gt;
 Summary: (e.g. BL gets destroyed in initial meshing at some places.)&lt;br /&gt;
 &lt;br /&gt;
 Description:&lt;br /&gt;
 &lt;br /&gt;
 Here, put a brief description of the bug or question you have for Simmetrix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put the Summary above as the subject in your email. The email should be sent to &amp;quot;support@simmetrix.com'. Remember, for the email to get registered as a support ticket, the delimiter ( ====Simmetrix Support Form====) has to be before all the content of the email and has to be exactly &lt;br /&gt;
 ====Simmetrix Support Form==== &lt;br /&gt;
&lt;br /&gt;
If this is not followed, you will get an email from Simmetrix saying &amp;quot;Delimiter not found&amp;quot;.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=267</id>
		<title>Opening a Simmetrix ticket</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=267"/>
				<updated>2012-10-29T01:58:47Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To open a ticket with simmetrix use the following support form.&lt;br /&gt;
&lt;br /&gt;
 ====Simmetrix Support Form====&lt;br /&gt;
 &lt;br /&gt;
 Customer ID: jan001&lt;br /&gt;
 Platform: linux&lt;br /&gt;
 Simmetrix Product: MeshSim&lt;br /&gt;
 Product Version: 7.2 (edit this to whichever version you are using)&lt;br /&gt;
 Type [Question,Bug,Feature Request]: Bug&lt;br /&gt;
 Priority [High,Medium,Low]: High/Medium/Low&lt;br /&gt;
 Summary: (e.g. BL gets destroyed in initial meshing at some places.)&lt;br /&gt;
 &lt;br /&gt;
 Description:&lt;br /&gt;
 &lt;br /&gt;
 Put a brief description of the bug or question you have for Simmetrix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put the Summary above as the subject in your email. The email should be sent to support@simmetrix.com. Remember, for the email to get registered as a support ticket, the delimiter ( ====Simmetrix Support Form====) has to be before all the content of the email and has to be exactly ====Simmetrix Support Form====&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=266</id>
		<title>Opening a Simmetrix ticket</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=266"/>
				<updated>2012-10-29T01:58:09Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To open a ticket with simmetrix use the following support form.&lt;br /&gt;
&lt;br /&gt;
 ====Simmetrix Support Form====&lt;br /&gt;
 &lt;br /&gt;
 Customer ID: jan001&lt;br /&gt;
 Platform: linux&lt;br /&gt;
 Simmetrix Product: MeshSim&lt;br /&gt;
 Product Version: 7.2 (edit this to whichever version you are using)&lt;br /&gt;
 Type [Question,Bug,Feature Request]: Bug&lt;br /&gt;
 Priority [High,Medium,Low]: High/Medium/Low&lt;br /&gt;
 Summary: (e.g. BL gets destroyed in initial meshing at some places.)&lt;br /&gt;
 &lt;br /&gt;
 Description:&lt;br /&gt;
 &lt;br /&gt;
 Put a brief description of the bug or question you have for Simmetrix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put the Summary above as the subject in your email. The email should be sent to support@simmetrix.com. Remember, for the email to get registered as a support ticket, the delimiter ( ====Simmetrix Support Form====) has to be before all the content of the email.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=265</id>
		<title>Opening a Simmetrix ticket</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=265"/>
				<updated>2012-10-29T01:57:59Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To open a ticket with simmetrix use the following support form.&lt;br /&gt;
&lt;br /&gt;
 ====Simmetrix Support Form====&lt;br /&gt;
 Customer ID: jan001&lt;br /&gt;
 Platform: linux&lt;br /&gt;
 Simmetrix Product: MeshSim&lt;br /&gt;
 Product Version: 7.2 (edit this to whichever version you are using)&lt;br /&gt;
 Type [Question,Bug,Feature Request]: Bug&lt;br /&gt;
 Priority [High,Medium,Low]: High/Medium/Low&lt;br /&gt;
 Summary: (e.g. BL gets destroyed in initial meshing at some places.)&lt;br /&gt;
 &lt;br /&gt;
 Description:&lt;br /&gt;
 &lt;br /&gt;
 Put a brief description of the bug or question you have for Simmetrix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put the Summary above as the subject in your email. The email should be sent to support@simmetrix.com. Remember, for the email to get registered as a support ticket, the delimiter ( ====Simmetrix Support Form====) has to be before all the content of the email.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=264</id>
		<title>Opening a Simmetrix ticket</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=264"/>
				<updated>2012-10-29T01:57:45Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To open a ticket with simmetrix use the following support form.&lt;br /&gt;
&lt;br /&gt;
 ====Simmetrix Support Form====&lt;br /&gt;
 Customer ID: jan001&lt;br /&gt;
 Platform: linux&lt;br /&gt;
 Simmetrix Product: MeshSim&lt;br /&gt;
 Product Version: 7.2 (edit this to whichever version you are using)&lt;br /&gt;
 Type [Question,Bug,Feature Request]: Bug&lt;br /&gt;
 Priority [High,Medium,Low]: High/Medium/Low&lt;br /&gt;
 Summary: (e.g. BL gets destroyed in initial meshing at some places.)&lt;br /&gt;
 Description:&lt;br /&gt;
 Put a brief description of the bug or question you have for Simmetrix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put the Summary above as the subject in your email. The email should be sent to support@simmetrix.com. Remember, for the email to get registered as a support ticket, the delimiter ( ====Simmetrix Support Form====) has to be before all the content of the email.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=263</id>
		<title>Opening a Simmetrix ticket</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=263"/>
				<updated>2012-10-29T01:57:18Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To open a ticket with simmetrix use the following support form.&lt;br /&gt;
&lt;br /&gt;
 ====Simmetrix Support Form====&lt;br /&gt;
 Customer ID: jan001&lt;br /&gt;
 Platform: linux&lt;br /&gt;
 Simmetrix Product: MeshSim&lt;br /&gt;
 Product Version: 7.2 (edit this to whichever version you are using)&lt;br /&gt;
 Type [Question,Bug,Feature Request]: Bug&lt;br /&gt;
 Priority [High,Medium,Low]: High/Medium/Low&lt;br /&gt;
 Summary: (e.g. BL gets destroyed in initial meshing at some places.)&lt;br /&gt;
&lt;br /&gt;
 Description:&lt;br /&gt;
&lt;br /&gt;
 Put a brief description of the bug or question you have for Simmetrix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put the Summary above as the subject in your email. The email should be sent to support@simmetrix.com. Remember, for the email to get registered as a support ticket, the delimiter ( ====Simmetrix Support Form====) has to be before all the content of the email.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=262</id>
		<title>Opening a Simmetrix ticket</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=262"/>
				<updated>2012-10-29T01:57:08Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To open a ticket with simmetrix use the following support form.&lt;br /&gt;
&lt;br /&gt;
 ====Simmetrix Support Form====&lt;br /&gt;
&lt;br /&gt;
 Customer ID: jan001&lt;br /&gt;
 Platform: linux&lt;br /&gt;
 Simmetrix Product: MeshSim&lt;br /&gt;
 Product Version: 7.2 (edit this to whichever version you are using)&lt;br /&gt;
 Type [Question,Bug,Feature Request]: Bug&lt;br /&gt;
 Priority [High,Medium,Low]: High/Medium/Low&lt;br /&gt;
 Summary: (e.g. BL gets destroyed in initial meshing at some places.)&lt;br /&gt;
&lt;br /&gt;
 Description:&lt;br /&gt;
&lt;br /&gt;
 Put a brief description of the bug or question you have for Simmetrix.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can put the Summary above as the subject in your email. The email should be sent to support@simmetrix.com. Remember, for the email to get registered as a support ticket, the delimiter ( ====Simmetrix Support Form====) has to be before all the content of the email.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=261</id>
		<title>Opening a Simmetrix ticket</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=261"/>
				<updated>2012-10-29T01:51:54Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Simmetrix Support Form */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To open a ticket with simmetrix use the following support form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ====Simmetrix Support Form====&lt;br /&gt;
&lt;br /&gt;
Customer ID: jan001&lt;br /&gt;
Platform: linux&lt;br /&gt;
Simmetrix Product: MeshSim&lt;br /&gt;
Product Version: 7.2 (edit this to whichever version you are using)&lt;br /&gt;
Type [Question,Bug,Feature Request]: Bug&lt;br /&gt;
Priority [High,Medium,Low]: High/Medium/Low&lt;br /&gt;
Summary: (e.g. BL gets destroyed in initial meshing at some places.)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
&lt;br /&gt;
Put a brief description of the bug or question you have for Simmetrix.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=260</id>
		<title>Opening a Simmetrix ticket</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Opening_a_Simmetrix_ticket&amp;diff=260"/>
				<updated>2012-10-29T01:50:38Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: Created page with &amp;quot;To open a ticket with simmetrix use the following support form.  ====Simmetrix Support Form====  Customer ID: jan001 Platform: linux Simmetrix Product: MeshSim Product Version: 7...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To open a ticket with simmetrix use the following support form.&lt;br /&gt;
&lt;br /&gt;
====Simmetrix Support Form====&lt;br /&gt;
&lt;br /&gt;
Customer ID: jan001&lt;br /&gt;
Platform: linux&lt;br /&gt;
Simmetrix Product: MeshSim&lt;br /&gt;
Product Version: 7.2 (edit this to whichever version you are using)&lt;br /&gt;
Type [Question,Bug,Feature Request]: Bug&lt;br /&gt;
Priority [High,Medium,Low]: High/Medium/Low&lt;br /&gt;
Summary: (e.g. BL gets destroyed in initial meshing at some places.)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
&lt;br /&gt;
Put a brief description of the bug or question you have for Simmetrix.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Janus_Cheat_Sheet&amp;diff=223</id>
		<title>Janus Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Janus_Cheat_Sheet&amp;diff=223"/>
				<updated>2012-07-27T13:20:05Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Running Jobs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Login ==&lt;br /&gt;
  ssh your_identikey_user@login.rc.colorado.edu&lt;br /&gt;
  [pin][token]&lt;br /&gt;
&lt;br /&gt;
== Running Jobs ==&lt;br /&gt;
Environment Setup:&lt;br /&gt;
  use Torque&lt;br /&gt;
  use Moab&lt;br /&gt;
  use Git&lt;br /&gt;
  use .openmpi-1.4.3_intel-12.0_ib&lt;br /&gt;
  use Graphviz&lt;br /&gt;
  use Subversion&lt;br /&gt;
&lt;br /&gt;
available nodes/cores:&lt;br /&gt;
&lt;br /&gt;
  pbsnodes -a&lt;br /&gt;
  showbf&lt;br /&gt;
Jobscript Template:&lt;br /&gt;
&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  #PBS -N name_of_job&lt;br /&gt;
  #PBS -l walltime=0:20:00&lt;br /&gt;
  #PBS -l nodes=1:ppn=12&lt;br /&gt;
  . /curc/tools/utils/dkinit&lt;br /&gt;
  reuse .openmpi-1.4.3_intel-12.0_ib&lt;br /&gt;
  &lt;br /&gt;
   mpirun /path/to/executable&lt;br /&gt;
&lt;br /&gt;
Submission:&lt;br /&gt;
&lt;br /&gt;
  qsub -q janus-debug jobscript.sh&lt;br /&gt;
&lt;br /&gt;
Status&lt;br /&gt;
&lt;br /&gt;
  checkjob job_id&lt;br /&gt;
  showq -u $USER&lt;br /&gt;
&lt;br /&gt;
Cancel:&lt;br /&gt;
&lt;br /&gt;
  qdel job_id&lt;br /&gt;
&lt;br /&gt;
Large Memory, Interactive:&lt;br /&gt;
&lt;br /&gt;
  qsub -I -l nodes=1:ppn=32,walltime=1:00:00 -q himem&lt;br /&gt;
&lt;br /&gt;
Interactive, for debugging (with totalviewer)&lt;br /&gt;
&lt;br /&gt;
  qsub -X -I -l nodes=1:ppn=12,walltime=1:00:00 -q janus-debug&lt;br /&gt;
&lt;br /&gt;
Non Default allocation:&lt;br /&gt;
&lt;br /&gt;
  qsub -A UCBXXXXXXX job.sh&lt;br /&gt;
&lt;br /&gt;
or in the job script:&lt;br /&gt;
  #PBS -A UCBXXXXXXX&lt;br /&gt;
&lt;br /&gt;
== Allocation Status == &lt;br /&gt;
  use Crc-allocations&lt;br /&gt;
  check_allocation.py&lt;br /&gt;
  use Moab&lt;br /&gt;
  showstats -u $USER&lt;br /&gt;
&lt;br /&gt;
==[[GridFTP]]==&lt;br /&gt;
  export MYPROXY_SERVER_DN=$MYPROXY_SERVER_DN&amp;quot;/C=US/O=Globus Consortium/OU=Globus Connect Service/CN=842a610a-4de7-11e1-9674-123138151443&amp;quot;&lt;br /&gt;
  myproxy-logon -T -b -s gridftp-00.rc.colorado.edu -v -l bema1643&lt;br /&gt;
&lt;br /&gt;
  globus-url-copy -v -r -cd -rst -rst-retries 0 -fast -vb -p 64 -stripe -tcp-bs 4M -g2 -ss '/C=US/O=Globus Consortium/OU=Globus Connect Service/CN=842a610a-4de7-11e1-9674-123138151443' gsiftp://gridftp-00.rc.colorado.edu/lustre/janus_scratch/bema1643/test.img sshftp://matthb2@jumpgate-phasta.colorado.edu/scratch/matthb2/foo/&lt;br /&gt;
&lt;br /&gt;
 globus-url-copy -v -r -cd -rst -rst-retries 0 -fast -vb -p 64 -stripe -tcp-bs 4M -g2 -ds '/C=US/O=Globus Consortium/OU=Globus Connect Service/CN=842a610a-4de7-11e1-9674-123138151443' sshftp://matthb2@jumpgate-phasta.colorado.edu/scratch/mrasquin/416M/ gsiftp://gridftp-00.rc.colorado.edu/lustre/janus_scratch/bema1643/&lt;br /&gt;
&lt;br /&gt;
(note: -ss to specify that the source server has a non-standard DN, -ds for the destination)&lt;br /&gt;
&lt;br /&gt;
==Queues/Policy==&lt;br /&gt;
https://www.rc.colorado.edu/crcdocs/queues&lt;br /&gt;
https://www.rc.colorado.edu/policies/janus-jobs&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=183</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=183"/>
				<updated>2012-05-04T07:41:26Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Example 8: Global BL attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 BLAttr.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option with the executable to view the complete list of the options and their meaning. Note that the order of these flags is extremely important. Other than the executable, there are 11 other command line inputs which can be given. These can be given in Run.sh with the executable.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are specifying a 2D BL on a model edge, then at the end of the line, you have to give a target face tag, to which face you want that BL attribute applied.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
== Example 8: Global BL attributes ==&lt;br /&gt;
&lt;br /&gt;
These can be set globally as follows. Only 1 attribute can be set at a time. &lt;br /&gt;
&lt;br /&gt;
 -1 7 attribute_type&lt;br /&gt;
 value&lt;br /&gt;
 &lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (7) (attribute_type)&lt;br /&gt;
 (value)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 for setting global attributes&lt;br /&gt;
 (7): for setting BL global attribute &lt;br /&gt;
 (attribute_type): type of BL attribute you want to set. It can be one of the following: &lt;br /&gt;
             1: smoothing distance&lt;br /&gt;
             2: layer edge aspect ratio&lt;br /&gt;
             3: exposed aspect ratio (opposite of aspect ratio, look at the documentation MS_minExposedAspectRatio for more info)&lt;br /&gt;
 (value): value for the above attribute&lt;br /&gt;
&lt;br /&gt;
.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=182</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=182"/>
				<updated>2012-05-04T07:41:05Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Example 8: Global BL attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 BLAttr.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option with the executable to view the complete list of the options and their meaning. Note that the order of these flags is extremely important. Other than the executable, there are 11 other command line inputs which can be given. These can be given in Run.sh with the executable.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are specifying a 2D BL on a model edge, then at the end of the line, you have to give a target face tag, to which face you want that BL attribute applied.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
== Example 8: Global BL attributes ==&lt;br /&gt;
&lt;br /&gt;
These can be set globally as follows. Only 1 attribute can be set at a time. &lt;br /&gt;
&lt;br /&gt;
 -1 7 attribute_type&lt;br /&gt;
 value&lt;br /&gt;
 &lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (7) (attribute_type)&lt;br /&gt;
(value)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 for setting global attributes&lt;br /&gt;
 (7): for setting BL global attribute &lt;br /&gt;
 (attribute_type): type of BL attribute you want to set. It can be one of the following: &lt;br /&gt;
             1: smoothing distance&lt;br /&gt;
             2: layer edge aspect ratio&lt;br /&gt;
             3: exposed aspect ratio (opposite of aspect ratio, look at the documentation MS_minExposedAspectRatio for more info)&lt;br /&gt;
 (value): value for the above attribute&lt;br /&gt;
&lt;br /&gt;
.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=181</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=181"/>
				<updated>2012-05-04T07:40:36Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Example 8: Global BL attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 BLAttr.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option with the executable to view the complete list of the options and their meaning. Note that the order of these flags is extremely important. Other than the executable, there are 11 other command line inputs which can be given. These can be given in Run.sh with the executable.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are specifying a 2D BL on a model edge, then at the end of the line, you have to give a target face tag, to which face you want that BL attribute applied.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
== Example 8: Global BL attributes ==&lt;br /&gt;
&lt;br /&gt;
These can be set globally as follows. Only 1 attribute can be set at a time. &lt;br /&gt;
&lt;br /&gt;
 -1 7 attribute_type&lt;br /&gt;
value&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (7) (attribute_type)&lt;br /&gt;
(value)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 for setting global attributes&lt;br /&gt;
 (7): for setting BL global attribute &lt;br /&gt;
 (attribute_type): type of BL attribute you want to set. It can be one of the following: &lt;br /&gt;
             1: smoothing distance&lt;br /&gt;
             2: layer edge aspect ratio&lt;br /&gt;
             3: exposed aspect ratio (opposite of aspect ratio, look at the documentation MS_minExposedAspectRatio for more info)&lt;br /&gt;
 (value): value for the above attribute&lt;br /&gt;
&lt;br /&gt;
.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=180</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=180"/>
				<updated>2012-05-04T07:39:37Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Example 8: Global BL attributes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 BLAttr.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option with the executable to view the complete list of the options and their meaning. Note that the order of these flags is extremely important. Other than the executable, there are 11 other command line inputs which can be given. These can be given in Run.sh with the executable.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are specifying a 2D BL on a model edge, then at the end of the line, you have to give a target face tag, to which face you want that BL attribute applied.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
== Example 8: Global BL attributes ==&lt;br /&gt;
&lt;br /&gt;
These can be set globally as follows. Only 1 attribute can be set at a time. &lt;br /&gt;
&lt;br /&gt;
 -1 7 attribute_type&lt;br /&gt;
value&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (7) (attribute_type)&lt;br /&gt;
(value)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 for setting global attributes&lt;br /&gt;
 (7): for setting BL global attribute &lt;br /&gt;
 (attribute_type): type of BL attribute you want to set:&lt;br /&gt;
     This can be either:&lt;br /&gt;
             1: smoothing distance&lt;br /&gt;
             2: layer edge aspect ratio&lt;br /&gt;
             3: exposed aspect ratio (opposite of aspect ratio, look at the documentation MS_minExposedAspectRatio for more info)&lt;br /&gt;
(value): value for the above attribute&lt;br /&gt;
&lt;br /&gt;
.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=179</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=179"/>
				<updated>2012-05-04T07:38:29Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 BLAttr.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option with the executable to view the complete list of the options and their meaning. Note that the order of these flags is extremely important. Other than the executable, there are 11 other command line inputs which can be given. These can be given in Run.sh with the executable.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are specifying a 2D BL on a model edge, then at the end of the line, you have to give a target face tag, to which face you want that BL attribute applied.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
== Example 8: Global BL attributes ==&lt;br /&gt;
 -1 7 attribute_type&lt;br /&gt;
value&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (7) (attribute_type)&lt;br /&gt;
(value)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 for setting global attributes&lt;br /&gt;
 (7): for setting BL global attribute &lt;br /&gt;
 (attribute_type): type of BL attribute you want to set:&lt;br /&gt;
     This can be either:&lt;br /&gt;
             1: smoothing distance&lt;br /&gt;
             2: layer edge aspect ratio&lt;br /&gt;
             3: exposed aspect ratio (opposite of aspect ratio, look at the documentation MS_minExposedAspectRatio for more info)&lt;br /&gt;
(value): value for the above attribute&lt;br /&gt;
&lt;br /&gt;
.&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=170</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=170"/>
				<updated>2012-01-31T00:30:02Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Example 6: Boundary layer mesh , constant thickness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 BLAttr.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option with the executable to view the complete list of the options and their meaning. Note that the order of these flags is extremely important. Other than the executable, there are 11 other command line inputs which can be given. These can be given in Run.sh with the executable.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are specifying a 2D BL on a model edge, then at the end of the line, you have to give a target face tag, to which face you want that BL attribute applied.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=169</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=169"/>
				<updated>2012-01-31T00:29:47Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Example 6: Boundary layer mesh , constant thickness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 BLAttr.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option with the executable to view the complete list of the options and their meaning. Note that the order of these flags is extremely important. Other than the executable, there are 11 other command line inputs which can be given. These can be given in Run.sh with the executable.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are specifying a 2D BL on a model edge, then at the end of the line, you have to give a target face tag, to which face you want that BL attribute applied.&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=108</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=108"/>
				<updated>2011-11-21T00:56:00Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 BLAttr.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option with the executable to view the complete list of the options and their meaning. Note that the order of these flags is extremely important. Other than the executable, there are 11 other command line inputs which can be given. These can be given in Run.sh with the executable.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=107</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=107"/>
				<updated>2011-11-21T00:50:59Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Files needed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 BLAttr.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option with the executable to view the complete list of the options and their meaning. Note that the order of these flags is extremely important. Other than the executable, there are 11 other command line inputs which can be given. These can be given in Run.sh with the executable.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=106</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=106"/>
				<updated>2011-11-21T00:50:25Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Files needed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 Attributes.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option with the executable to view the complete list of the options and their meaning. Note that the order of these flags is extremely important. Other than the executable, there are 11 other command line inputs which can be given. These can be given in Run.sh with the executable.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=105</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=105"/>
				<updated>2011-11-21T00:48:43Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/anonsvn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 Attributes.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option to view the complete list of the options and their meaning.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=104</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=104"/>
				<updated>2011-11-21T00:47:18Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
* If you have read only access to phasta project on redmine, then use:&lt;br /&gt;
  svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 Attributes.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option to view the complete list of the options and their meaning.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=103</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=103"/>
				<updated>2011-11-21T00:46:03Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
   svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 Attributes.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option to view the complete list of the options and their meaning.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=102</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=102"/>
				<updated>2011-11-21T00:45:39Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on svn:&lt;br /&gt;
&lt;br /&gt;
svn co https://redmine.scorec.rpi.edu/svn/phasta/BLMesher&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 Attributes.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option to view the complete list of the options and their meaning.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=101</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=101"/>
				<updated>2011-11-21T00:44:38Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* You need the BLMesher code which is available on&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 Attributes.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option to view the complete list of the options and their meaning.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=100</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=100"/>
				<updated>2011-11-21T00:43:31Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Visualize the mesh */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 Attributes.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option to view the complete list of the options and their meaning.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /usr/local/simapps/&amp;lt;simapps version&amp;gt;/simapps ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=99</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=99"/>
				<updated>2011-11-21T00:41:56Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Files needed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/chitak/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher-0 geom.xmt_txt geom.sms 1 0.1 Attributes.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh). &lt;br /&gt;
Lets call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
Other flags like optimization and smoothing can also be given in this line. Use -h option to view the complete list of the options and their meaning.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /net/common/meshSim/simapps.exe ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=98</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=98"/>
				<updated>2011-11-21T00:35:12Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: /* Start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/osahni/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher geom.xmt_txt geom.sms 1 0.1 Attributes.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh)&lt;br /&gt;
Let call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /net/common/meshSim/simapps.exe ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=97</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=97"/>
				<updated>2011-11-21T00:34:06Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[Category:PHASTA Tutorials]]&lt;br /&gt;
[[Category:Phasta]]&lt;br /&gt;
&lt;br /&gt;
How to create the mesh '''using script'''&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
== Start ==&lt;br /&gt;
* To begin, we need a geometry model. It can be created using commercial softwares such as Solid Work and saved as *.x_t&lt;br /&gt;
* If the mesh size is large, use a large memory machine such as piglet or hog. &lt;br /&gt;
* You need a 64-bit library (for hog and piglet). You can check the library:&lt;br /&gt;
 echo $LD_LIBRARY_PATH &lt;br /&gt;
* If it's not correct, define the proper one:&lt;br /&gt;
 export LD_LIBRARY_PATH=/net/common/meshSim/latest/lib/x64_rhel5_gcc41/psKrnl:$LD_LIBRARY_PATH&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
==Files needed ==&lt;br /&gt;
Create a folder and copy all these files into it.&lt;br /&gt;
* Geometry model file               (geom.xmt_txt or geom.x_t)&lt;br /&gt;
* Mesh generation attribution file  (Attributes.inp)&lt;br /&gt;
* exe file                          (Run.sh)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File Attributes.inp is the script that defines the mesh generation characteristics for different entities of the model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Run.sh is an exe file including commands as below: &lt;br /&gt;
  PATH=/users/osahni/develop/Meshing/BLMesher&lt;br /&gt;
  $PATH/bin/x86_64_linux/BLMesher geom.xmt_txt geom.sms 1 0.1 Attributes.inp&lt;br /&gt;
It defines the proper path for mesh generator. It also defines that geom.xmt_txt is the model file and the mesh must be created using the attributes defined in Attributes.inp and the mesh data must be written into geom.sms &lt;br /&gt;
&lt;br /&gt;
In the second line of the Run.sh file, the value before attributes.inp (in this case, 0.1) is the size of the boxes that are created before the the final mesh generation. (In fact, BLMesher tries to divide the whole domain into small boxes and then divide these boxes to create the mesh)&lt;br /&gt;
Let call the characteristic size of the domain, d, and the size of the boxes  E.  &lt;br /&gt;
&lt;br /&gt;
You must choose E as below and use it in Run.sh:&lt;br /&gt;
 &amp;lt;math&amp;gt; E=\frac{d}{2^{(m+1)}} &amp;lt;/math&amp;gt;  or  &amp;lt;math&amp;gt; E=\frac{d}{2^m} &amp;lt;/math&amp;gt; &lt;br /&gt;
m is an integer.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Edit the script ==&lt;br /&gt;
* The first line is the version number (for future use). For eg.: version 1&lt;br /&gt;
* Use &amp;quot;#&amp;quot; to comment a line or disable it.&lt;br /&gt;
* To create attributes for each model entity, two lines in the following format are being used.  &lt;br /&gt;
  &amp;lt;entity dimension&amp;gt; &amp;lt;entity tag&amp;gt; &amp;lt;size type&amp;gt; &amp;lt;attribute type&amp;gt; &amp;lt;extra&amp;gt; &lt;br /&gt;
  &amp;lt;value or expression for mesh size on this entity&amp;gt;&lt;br /&gt;
* Note that a blank line between these two lines is not allowed.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create the mesh ==&lt;br /&gt;
* After preparing the script, execute the file Run.sh. It creates the mesh and write the data to geom.sms (as you defined in Run.sh). &lt;br /&gt;
* Note that after executing the Run.sh, you must use command &amp;quot;top&amp;quot; to check the memory usage. If you find out that memory usage is huge and is increasing, you must kill the job before the machine crashes&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Visualize the mesh ==&lt;br /&gt;
To see the generated mesh, you can use simapps:      &lt;br /&gt;
   /net/common/meshSim/simapps.exe ThreeDViewer &amp;amp;&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Define the mesh characteristics in attribute file ==&lt;br /&gt;
The parameters in the first line, respectively are: &lt;br /&gt;
 - Entity dimension:          2 for 2-D cases and 3 for 3-D cases&lt;br /&gt;
 - Entity tag:                You can find the entity tag using simapps&lt;br /&gt;
 - Size type on entity:       1 for absolute mesh size and 2 for relative mesh size&lt;br /&gt;
 - Attribute type on entity:  &lt;br /&gt;
                              0 just imposes the size on entity. '''&amp;lt;extra&amp;gt; field''' is NULL&lt;br /&gt;
                              1 for entity with boundary layers. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
                              2 for periodic entity: In this case, '''&amp;lt;extra&amp;gt; field''' is followed with slave entity tag&lt;br /&gt;
                              3 for refinement source. Specify entity dimension as -1 in this case. '''&amp;lt;extra&amp;gt; field''' is explained below.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;extra&amp;gt; field:'''&lt;br /&gt;
&lt;br /&gt;
 For Boundary layer: &lt;br /&gt;
    is followed with (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)   &lt;br /&gt;
    is followed with (a) faceSide/useDir (BL orientation), (b) numEndEnts (==2, to vary height linearly between two end/bounding entities), (c) varyDirection, (d) endEntTag1 , (e) firstLayerHeight1, (f) totalHeight1, (g) endEntTag2, (h) firstLayerHeight2, (i) totalHeight2, (j) nLayers, (k) blMixed, (l) blBlends, (m) blPropagate and (n) edgeBLFaceTag (only if 2D BL on edge)&lt;br /&gt;
&lt;br /&gt;
 For refinement: &lt;br /&gt;
    is followed with (a) ref. source type (1-cube, 2-cylinder etc.), (b) source info. as Simmetrix APIs (like radius, length, center and normal in case of cylinder, and center, wdir, hdir and ddir in case of cube/parallelepiped)&lt;br /&gt;
&lt;br /&gt;
* Note if entity dimension is -1, (in case of refinement)  do not specify the entity tag and size type.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Uniform mesh ==&lt;br /&gt;
Simple uniform mesh on region with tag 205&lt;br /&gt;
 3 205 1 0&lt;br /&gt;
 2e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (3) (205) (1) (0)&lt;br /&gt;
 (2e-4)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension. It's a 3-D region.&lt;br /&gt;
 (205): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
 (2e-4): Mesh size (This is in the second line) &lt;br /&gt;
Note: The second line (Mesh size) can be a value or an expression such as:&lt;br /&gt;
 0.0125+0.1*(1.0-exp(-3.0*sqrt(($x-0.0)^2+($y-0.0)^2+($z-0.5)^2)))&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 2: Refinement in a cylindrical region ==&lt;br /&gt;
 -1 3 1 1.5e-3 1 2 0.3 0 0 0 1&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (1) (1.5e-3) (1) (2 0.3 0) (0 0 1)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension, for refinement cases&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (1): For refinement in a cylindrical region&lt;br /&gt;
 (1.5e-3 ): Radius &lt;br /&gt;
 (1): Length of the Cylinder (Half)&lt;br /&gt;
 (2 0.3 0): The center of the circle &lt;br /&gt;
 (0 0 1): Axis&lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 3: Refinement in a box region ==&lt;br /&gt;
 -1 3 2 6e-3 5e-3 0.0 1.5e-3 0.0 0.0 0.0 5.0e-4 0.0 0.0 0.0 5.0e-4&lt;br /&gt;
 2.5e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (-1) (3) (2) (6e-3 5e-3 0.0) (1.5e-3 0.0 0.0) (0.0 5.0e-4 0.0) (0.0 0.0 5.0e-4)&lt;br /&gt;
 (2.5e-4)&lt;br /&gt;
&lt;br /&gt;
 (-1): Entity dimension. -1 only for refinement cases.&lt;br /&gt;
 (3): Attribute type. in this case, refinement.&lt;br /&gt;
 (2): For refinement in a box region&lt;br /&gt;
 (6e-3 5e-3 0.0): The center of the box &lt;br /&gt;
 (1.5e-3 0.0 0.0): x-Half length  &lt;br /&gt;
 (0.0 5.0e-4 0.0): y-Half length  &lt;br /&gt;
 (0.0 0.0 5.0e-4): z-Half length  &lt;br /&gt;
 (2.5e-4): mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 4: Refine the mesh along 3 lines on face with tag 5 ==&lt;br /&gt;
 3 5 1 0&lt;br /&gt;
 (0.5e-03) +0.1*(1.0-exp(-2.0*sqrt(($x-1.9)^2+($y-0.36)^2)))*(1.0-exp(-10.0*sqrt(($x-1.77)^2+($y-0.42)^2)))*(1.0-exp(-6.0*sqrt(($x-1.8)^2+($y-0.43)^2)))&lt;br /&gt;
The first line can be divided as below:&lt;br /&gt;
 (3) (5) (1) (0)&lt;br /&gt;
&lt;br /&gt;
 (3): Entity dimension, 3-D&lt;br /&gt;
 (5): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (0): Attribute type on entity. 0 just imposes the size on entity. &amp;lt;extra&amp;gt; field is NULL&lt;br /&gt;
&lt;br /&gt;
This is an example of an expression that will make the mesh fine in three lines. e.g., x=1.9 y=0.36 on model entity number 5.&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 5: Periodic mesh ==&lt;br /&gt;
&lt;br /&gt;
If periodic BC is used at two faces, the mesh must be identical in both of them.&lt;br /&gt;
&lt;br /&gt;
In this case, faces 1 and 81 are periodic&lt;br /&gt;
&lt;br /&gt;
 2 1 1 2 81&lt;br /&gt;
 2.1e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (1) (1) (2) (81)&lt;br /&gt;
 (2.1e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (1): Entity tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (2): Attribute type on entity. 2 for periodic entity. &amp;lt;extra&amp;gt; field is followed with a slave entity tag&lt;br /&gt;
 (81): Slave entity tag&lt;br /&gt;
 (2.1e-4):mesh size (This is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 6: Boundary layer mesh , constant thickness ==&lt;br /&gt;
On face with tag 173 &lt;br /&gt;
 2 173   1 1 0 0 0.4e-4 3.e-4 5 0 0 0&lt;br /&gt;
 1.61e-4&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (173) (1) (1) (0) (0) (0.4e-4) (3.e-4) (5) (0) (0) (0)&lt;br /&gt;
 (1.61e-4)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (173): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (0): NumEndEnts. 0 for layers with fixed heights &lt;br /&gt;
 (0.4e-4): First layer height&lt;br /&gt;
 (3.e-4): Total height of boundary layer&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (0): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation&lt;br /&gt;
 (1.61e-4): mesh size on the surface (This value is in the second line)&lt;br /&gt;
&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
== Example 7: Boundary layer mesh, ramped thickness ==&lt;br /&gt;
On face with tag 27&lt;br /&gt;
 2 27 1 1 0 2 0 22 1.e-3 2.e-2 20 2.e-3 10.e-2 5 1 0 0&lt;br /&gt;
 0.1&lt;br /&gt;
&lt;br /&gt;
The above lines can be divided as below:&lt;br /&gt;
 (2) (27) (1) (1) (0) (2) (0) (22) (1.e-3) (2.e-2) (20) (2.e-3) (10.e-2) (5) (1) (0) (0)&lt;br /&gt;
 (0.1)&lt;br /&gt;
&lt;br /&gt;
 (2): Entity dimension, 2-D. it's a face.&lt;br /&gt;
 (27): Face tag&lt;br /&gt;
 (1): Size type on entity. 1 for absolute mesh size&lt;br /&gt;
 (1): Attribute type on entity. 1 for entity with boundary layers. &lt;br /&gt;
 (0): Boundary layer orientation (FaceSide/useDir)&lt;br /&gt;
 (2): For Layers with linearly varying height (NumEndEnts)&lt;br /&gt;
 (0): Direction of variation (pos. x-dir.)&lt;br /&gt;
 (22): Edge tag at pos. 1&lt;br /&gt;
 (1.e-3): First layer height at pos. 1&lt;br /&gt;
 (2.e-2): Total height of all layers at pos. 1&lt;br /&gt;
 (20): Edge tag at pos. 2&lt;br /&gt;
 (2.e-3): First layer height at pos. 2&lt;br /&gt;
 (10.e-2): Total height of all layers at pos. 2&lt;br /&gt;
 (5): Number of layers&lt;br /&gt;
 (1): Boundary layer Mixed topology (1 for triangles and quads)&lt;br /&gt;
 (0): Boundary layer blending.  0 for no BL blending &lt;br /&gt;
 (0): Boundary Layer propagation. 0 for no propogation&lt;br /&gt;
 (0.1): mesh size on the surface (This value is in the second line)&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=96</id>
		<title>BLMesher</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=BLMesher&amp;diff=96"/>
				<updated>2011-11-21T00:33:04Z</updated>
		
		<summary type="html">&lt;p&gt;Chitak: Created page with &amp;quot;How to create the mesh using script&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to create the mesh using script&lt;/div&gt;</summary>
		<author><name>Chitak</name></author>	</entry>

	</feed>