1

Previous: Slip vs noSlip BC Up: User Training Next: About snappyHexMesh

This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

Meshing with snappyHexMesh

The aim of this Section is to introduce snappyHexMesh utility which can generate a computational mesh based on the input surface geometry.

 


Subsections

Evaluation script evalEff.sh

The evalEff.sh script can be found in tutorials.

Run the script evalEff.sh:

# bash evalEff.sh
A typical evaluation script output:

 

------------------------------------------------------------------
General results
------------------------------------------------------------------
Efficiency       [ - ]:       0.91985
FLow Rate In    [m3/s]:       6.80000
FLow Rate Out   [m3/s]:       6.79999
Difference Ratio [ - ]:       0.00000


------------------------------------------------------------------
Torques
------------------------------------------------------------------
                                       Overal         Blade           Hub        Shroud
Viscous Torgue   [ N.m/{rho} ]:      0.773930      0.468260      0.062495      0.243175
Pressure Torgue  [ N.m/{rho} ]:    -44.634900    -44.633100     -0.000004     -0.001819
Total Torgue     [ N.m/{rho} ]:    -43.861000    -44.164800      0.062490      0.241357


------------------------------------------------------------------
Per Interfaces
------------------------------------------------------------------
                                   Spiral-In  Spiral-Out     Stay-In    Stay-Out    Guide-In   Guide-Out    Rotor-In   Rotor-Out Drafttube-In Drafttube-Out
Flow Rate              [ m3/s ]:     -6.8000      6.8000     -6.8000      6.8000     -6.8000      6.8000     -6.8000      6.8000      -6.8000        6.8000  
Area                     [ m2 ]:      1.0897      1.4232      1.4319      1.2092      1.2092      0.9661      0.9661      0.7809       0.7811        3.2329  
Total Pressure AW  [ Pa/{rho} ]:    442.8979    441.2037    439.1629    434.4266    431.0206    427.3262    426.3046      8.3153       6.1044        2.3624  
Total Pressure FW  [ Pa/{rho} ]:    442.8979    441.1337    438.9381    435.4806    431.2533    427.6545    425.4163      9.4329       6.2056        2.5326  
Static Pressure AW [ Pa/{rho} ]:    423.4281    400.5844    400.5634    390.2462    390.2333    302.4439    302.4345    -37.0714     -37.0839       -0.0153  
Static Pressure FW [ Pa/{rho} ]:    423.4281    400.2609    400.2434    390.2402    390.2274    296.2828    296.2736    -37.1861     -37.1946       -0.0120

Previous: TCFD- Notes & Up: TCFD- Notes & Next: Turbo Blade Post –
This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

General Notes & Recommendations

  1. TCFD input is the surface geometry and physical settings being read from TCFD Configuration File (*.tcfd). The configuration file can be either created manually (e.g. modifying existing tutorial), or configuration file can be even created in special graphic interface in ParaView called TCFDSource.
  2. Any number of model components is allowed.
  3. Each component has to be waterproof, typically inlet + wall + outlet.
  4. Watch out the model dimensions, they are critical.
  5. STL surface model files has to be in ASCII format.
  6. Ideally, each component surface STLs should fit vertex-to-vertex. Not necessary, but safest.
  7. All the interfaces between two components should overlap, or at least to fit each other very well.
  8. Mesh size – the most important mesh parameter of each component is 0_backgroundMeshSize, which is a basic mesh block (cell) to be refined. Three dimensions x y z in meters (scaleFactor parameter may change the dimension).
  9. If command line used – the CFD Processor has several options. Custom case name. Writing the case. Writing the mesh. Run the simulation. Write the report. See all the options: $ CFDProcessor -help .
  10. Log files – are located in ./logRun/* .
  11. It is not suitable to have “Trailing edge fixed on outlet” of the Impeller for any CFD simulation. It is recommended, when simulate, to extend the hub and shroud a little bit.
  12. Compressibility: pump and waterTurbine are always incompressible; compressor and turbine are always compressible; fan can be both compressible and incompressible.
  13. rotatingPatches: If rotatingRegion is false. RotatingPatches (if any) have rotatingWallVelocity (symmetric rotation – no MRF).
  14. Rotation direction has signum minus for clockwise direction (right hand rule).
  15. Cavitation risk is evaluated by function object cavitation. Saturated vapour pressure is evaluated using Antoine equation (see wikipedia), coefficients are taken from NIST. Relevant entries are referenceTemperature and referencePressure. Field cavitation is saved alongside other fields, which has values either 1 (cells with pressure below saturated vapour pressure) or 0 (other cells). Statistics such as number of cavitating cells, their volume and percentage of cavitating volume from whole computational domain are printed each time step.
  16. Convergence Auto Stop – if convergenceCheck is true – each simulation point run is skipped – if the total machine efficiency change is lower than 0.1% over the last X iterations. X is equal to averagingWindow value.
  17. Circumferential and Meridional angle – tangent is chosen in such a way that axis, radial and tangent (in this order) form a right-handed coordinate system. U is relative velocity, Um is projection of U into meridional plane, Ur is projection of U into radial plane, Ut is projection of U into tangential plane. Meridional angle is angle between axis and Um. It is positive, when Um points away from axis and negative when Um points toward axis. Axial circumferential angle , is angle between tangent and Ut. Radial circumferential angle is angle between tangent and Ur. It is positive when Ur points out (of the cylinder in the picture), it is negative when Ur points in.

    tangent and Ur. It is positive when Ur points out (of the cylinder in the picture), it is negative when Ur points in.

TCFD Meridional Circumferential Angle
Figure: Cylindrical background mesh (here viewed along the axis) is fully specified by its length (not shown) and six more parameters. The parameter $ r_2$ is the radius of the outer cylinder. The parameter $ r_1$ is the radius of the middle cylinder. The inner “cylinder” is cylinder only when $ d = r_0$, which is just a special case. Generally it is allowed $ d < r_0$ and the derived parameter $ w = 1 - r_0/d\sqrt{2}$ is called warp and is equal to 1 for ideally cylindrical shape and to 0 when the inner “cylinder” collapses to the dashed rectangular shape. The numbers $ g_0$ and $ g_1$ specify the mesh grading (gradual change of cell sizes).
cfd processor cylindrical mesh

18. Cylindrical background mesh can be used. Three radii, two gradients and warping. 

19. CFD Processor is capable of scheduling MPI jobs to remote machines. This can be used with OpenMPI in Linux. The keyword “hosts” in the configuration file is followed by a list of nodes (hostnames or IP addresses). Password-less SSH access to those machines must be possible and the OpenMPI package, as well as the calculation directory itself, must be accessible at the same filesystem path, e. g. through the use of a disk shared among the machines. The parameter “bindToCore” is ignored when “hosts” is used. *-clearance – non-mandatory parameter which can be used to improve robustness of meshing at clearance between bladeCap and shroud *-toInterfaceDistance – non-mandatory parameter which can be used to improve robustness of meshing at small gaps between particular part of blade and neighbouring geometry 

20. Currently, there are two possible transport models: sutherland (default) and constant. If “sutherland” is used, then is it possible to set also the parameters of the Sutherland model: As (default 1.512e-06) and Ts (default 120). If “constant” is used, then the parameter Pr (default 0.7 for air, 7 for water) are available. 

21. There are three possible turbulence models: kOmegaSST (default), kEpsilon and laminar. The names and default values of the optional parameters of the models are: kOmegaSST-alphaK1 (0.85), kOmegaSST-alphaK2 (1.00), kOmegaSST-alphaOmega1 (0.5) kOmegaSST-alphaOmega2 (0.856), kOmegaSST-beta1 (0.075), kOmegaSST-beta2 (0.0828), kOmegaSST-betaStar (0.09), kOmegaSST-gamma1 (0.5555556), kOmegaSST-gamma2 (0.44), kOmegaSST-a1 (0.31), kOmegaSST-b1 (1.00), kOmegaSST-c1 (10.0), kOmegaSST-F3 (false); kEpsilon-Cmu (0.09), kEpsilon-C1 (1.44), kEpsilon-C2 (1.92), kEpsilon-C3 (-0.33), kEpsilon-sigmak (1.00), kEpsilon-sigmaEps (1.30). 

22. CFD Processor allows a straighforward extension of the built-in workflow by user-defined functions. These take form of a Python scripts and can be executed in several places along the workflow. The keyword for setting used defined functions is userDefinedFunctions and has the following syntax: userDefinedFunctions script locations [ script locations … ] The word script is a path (no spaces!) to the Python script to be executed. During write-out of the case is will be written to the subdirectory “scripts” of the case directory and executed from that place. The word locations is a comma-separated list (no spaces!) of execution points during the workflow, when the script is to be executed. The possible execution points are: afterWrite, beforeMeshing, afterMeshing, beforeCalculation, afterCalculation, beforeEverySpeedline, afterEverySpeedline, beforeReport, afterReport. The script can use common Python functions and also two special predefined functions SetEntry and WriteFile. E.g. SetEntry(‘system/fvSolution’, ‘SIMPLE/nNonOrthogonalCorrectors’, ‘5’) WriteFile(‘system/fvSolution’) Finally, the special predefined variable CaseDirectory contains full path to the directory with the case. 

23. END.