|
[Sponsors] |
[blockMesh] Writing a blockMeshDict file with variables |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 23, 2015, 07:39 |
Writing a blockMeshDict file with variables
|
#1 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
Hi there,
I'm trying to write a blockmesh file using variables for the vertices and the number of cells but I'm not quite sure how to do this. At the moment, I'm trying this: Code:
convertToMeters 1; x 20.0; // Length of tank y1 -3.0; // Width of tank/2 y2 3.0; // Width of tank/2 zf -0.4; // Water depth za 0.2; // Distance above free surface L 3.6942; // Wavelength n 5; // Number of cells per wavelength xn ($x/$L)*$n; // Calculating the number of cells //yn //zn vertices ( ( 0 $y1 $zf ) // 0 ( $x $y1 $zf ) // 1 ( $x $y2 $zf ) // 2 ( 0 $y2 $zf ) // 3 ( 0 $y1 $za ) // 4 ( $x $y1 $za ) // 5 ( $x $y2 $za ) // 6 ( 0 $y2 $za ) // 7 ); blocks ( hex (0 1 2 3 4 5 6 7) ($xn 10 10) simpleGrading (1 1 1) //(1 10 0.1) ); edges ( ); boundary ( inlet { type patch; faces ( ( 0 3 7 4 ) ); } outlet { type patch; faces ( ( 1 2 6 5 ) ); } atmosphere { type patch; faces ( ( 4 5 6 7 ) ); } front { type symmetryPlane; faces ( ( 3 2 6 7 ) ); } Thanks in advance for any advice |
|
Tags |
blockmeshdict, variable definition |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Thermophysical Properties | wsmith02 | OpenFOAM | 4 | June 1, 2023 14:30 |
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 | Seroga | OpenFOAM Community Contributions | 9 | June 12, 2015 17:18 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 06:42 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 03:23 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |