LogoLogo
  • 1. GASFLOW Code
    • 1.1. Overview
    • 1.2. Code Approach
    • 1.3. Code Features
    • 1.4. Graphical User Interface
    • 1.5. Code V&V
    • 1.6. Application Highlights
    • 1.7. Publications
    • 1.8. Current Activities
  • 2. Tutorials
    • 2.1. Overview
    • 2.2. Sod's Shock Tube Problem
    • 2.3. Mesh Generation from CAD Models
    • 2.4. 2D Lid-driven Cavity Flow
    • 2.5. Hydrogen Diffusion into Air in a 1D Duct
    • 2.6. Supersonic Flow over a Forward-facing Step
    • 2.7. Vented Explosion of Premixed Hydrogen-Air Mixtures
    • 2.8. Transient Laminar Jet Flow at Low Mach Number Regime
  • 3. Brief User Guide
    • 3.1. Overview
    • 3.2. General User Guidance
    • 3.3. Unit System and Files
    • 3.4. Mesh Generation
    • 3.5. Geometry Definition
    • 3.6. Numerical Control
    • 3.7. Gas Species and Properties
    • 3.8. Initial and Boundary Conditions
    • 3.9. Solid Heat Structures
    • 3.10. Physical Models
    • 3.11. Restart and Output
    • 3.12. GASFLOW Parallelization
  • 4. Pre- and Post-Processing Tools
    • 4.1. GASVIEW
    • 4.2. Pyscan
    • 4.3. Create3D
  • 5. Verification and Validation
    • 5.1.Overview
    • 5.2. Fluid Dynamics
      • [AS-FD 1] Steady-State and Laminar Flow Startup
      • [AS-FD 2] Transient Compressible Flow
      • [AS-FD 3] Diffusion of Hydrogen into Air
      • [AS-FD 4] Flow past a Rectangular Block
      • [AS-FD 5] 1D Flow with an Orifice
      • [ED-FD 1] Incompressible Laminar Flow in a Lid-driven Cavity
      • [ED-FD 2] Stationary Turbulent Channel Flow
      • [ED-FD 3] Turbulent Flow between Two Parallel Plates
      • [ED-FD 4] Flow over Backward-Facing Step
      • [ED-FD 5] Transient Supersonic Flow at Mach 3 over a Forward-facing Step
      • [ED-FD 6] Large Eddy Simulations of the Turbulent Jet Flow
      • [ED-FD-7] Hydrogen Turbulent Dispersion in Nuclear Containment Compartment
      • [ED-FD 8] Buoyant Jet from Unintended Hydrogen Release
      • [ED-FD 9] Radiolytic Gas Accumulation in a Pipe
      • [ED-FD 10] Supersonic Flow at Mach 2 over a Backward Facing Step
    • 5.3. Combustion
      • [ED-CM 1] BOM Spherical Combustion Chamber
      • [ED-CM 2] SNL Flame Acceleration Measurement Facility Experiment
      • [ED-CM 3] Hydrogen Deflagration in a Multi-compartment System
      • [ED-CM 4] Hydrogen Jet Fire in a Compartment with Venting Hole
      • [ED-CM 5] Hydrogen-Air Fast Deflagration in ENACCEF Facility
      • [ED-CM 6] Detonation of Premixed H2-Air Mixture in a Hemispherical Balloon
      • [ED-CM 7] H2 Deflagration at a Refueling Station
      • [ED-CM 8] Methane-Air Explosion in LLEM
      • [ED-CM 9] Hydrogen-Methane Combution in a 20 L Spherical Vessel
    • 5.4. Heat and Mass Transfer
      • [AS-HT 1] Steady-State Heat Transfer through a Wall
      • [AS-HT 2] Pressure-Volume Work Term 1: Equilibrium Case
      • [AS-HT 3] Thermodynamic Benchmarks
      • [AS-HT 4] Uniform Energy Addition to Stagnant Fluid
      • [ED-HT 1] Natural Convection in an Air-filled Square Cavity
      • [ED-HT 2] Validation of the condensation model with COPAIN facility
      • [ED-HT 3] Heat and mass transfer of a thin film model in a channel
      • [ED-HT 4] Validation of the Film Model in the Integral Test Facility for Passive Containment Cooling
      • [ED-HT 5] Stratification Erosion Benchmark
      • [ED-HT 6] Battelle Containment HYJET Test JX7
      • [ED-HT 7] Battelle GX Tests
      • [ED-HT 8] Tests in ThAI Facility
      • [ED-HT 9] HDR Tests
      • [ED-HT 10] Phebus Thermal Hydraulic Tests
      • [ED-HT 11] Test Tosqan ISP47
      • [ED-HT 12] Test MISTRA ISP47
      • [ED-HT 13] Panda SETH Test Program
    • 5.5. Multiphase Flow
      • [AS-MP 1] Particle Terminal Velocity
      • [AS-MP 2] Water droplet evaporation
      • [ED-MP 1] Spray Single Droplet Test
      • [ED-MP 2] Spray Droplets Test 113 at IRSN TOSQAN
      • [ED-MP 3] Spray Droplets Test 101 at IRSN TOSQAN
  • 6. APPLICATION HIGHLIGHTS
    • 6.1. H2 Fuel Cell Vehicle Accident in Tunnel
    • 6.2. Hydrogen Explosion in a Refueling Station
    • 6.3. Hydrogen Explosion at Fukushima Accident
    • 6.4. Methane Explosion in the Roadway of a Coal Mine
    • 6.5. Aerosols and Droplets
      • 6.5.1. Coronavirus Aerosol Transmission
      • 6.5.2. Water Droplets
  • 7. Ongoing Development and Enhancements
    • 7.1. Combustion Modeling
      • 7.1.1. Multi-step Global Methane Combustion Models
        • 7.1.1.1. One-step Reaction Mechanism
        • 7.1.1.2. Two-step Reaction Mechanism
        • 7.1.1.3. Three-step Reaction Mechanism
        • 7.1.1.4. Four-step Reaction Mechanism
        • 7.1.1.5. Five-step Reaction Mechanism
        • 7.1.1.6. FAQ
      • 7.1.2. Laminar Flame Speed Correlations for Methane-air Mixtures
        • 7.1.2.1. Stone's Correlation
        • 7.1.2.2. Elia's Correlation
        • 7.1.2.3. Takizawa's Correlation
        • 7.1.2.4. Liao's Correlation
      • 7.1.3. Turbulent Flame Speed Correlations for Methane-air Mixtures
      • 7.1.4. Correction of Effective Turbulent Burning Velocity for Lean Hydrogen-air Mixtures
      • 7.1.5. Induction Time Model
      • 7.1.6. Detailed Chemical Kinetic Modeling
      • 7.1.7. Jet Flame Modeling
    • 7.2. Discrete Particle Modeling
      • 7.2.1. Particle mass in user-defined volumes - volpardef
      • 7.2.2. Particle injection from ring shaped volumes
    • 7.3. Heat Transfer Modeling
      • 7.3.1. Time-dependent tables for heat flux and heat transfer coefficient in sinkdef
      • 7.3.2. Thermal Radiation Model for Water Vapor and Carbon Dioxide
  • 8. INPUT FILE EXAMPLES
    • 8.1. Overview
    • 8.1. Fluid Dynamics
  • 8.2. Combustion
  • 8.3. Heat Transfer
  • 8.4. Multiphase Flow
  • 8.5. Applications
  • 9. Frequently Asked Questions
    • 9.1. How to set up models for the flashing of pressurized water?
  • 9.2. How to run GASFLOW on Windows?
  • 9.3. How to export/import WSL distribution?
Powered by GitBook
On this page
  • 3.4.1. Cell Labeling Convention
  • 3.4.2. Mesh Generation
  • 3.4.2.1. Direct Input of Grid Locations
  • 3.4.2.2. Automatic Mesh Generator
  • 3.4.3. Automatic Mesh Refinement

Was this helpful?

  1. 3. Brief User Guide

3.4. Mesh Generation

Previous3.3. Unit System and FilesNext3.5. Geometry Definition

Last updated 2 years ago

Was this helpful?

3.4.1. Cell Labeling Convention

In GASFLOW-MPI two coordinate systems are available:

  • Cartesian or rectangular system: the coordinate axes are x, y, and z, and their corresponding logical indices are i, j, and k.

  • Cylindrical system: the logical coordinate indices i,j, and k correspond, respectively, to the radial (r), azimuthal (θ), and axial direction (z).

The finite-difference mesh used for discretizing the geometry consists of computational cells that are logically ordered in three dimensions with indices i,j, and k. The maximum number of cells in each direction is designated imax, jmax, of kmax.

A layer of fictitious cells is used just beyond each boundary of the computational domain to accommodate general boundary condition treatment. The total number of real cells in the entire mesh is the product (imax-2)*(jmax-2)*(kmax-2).

The GASFLOW-MPI convention is that the i-th grid line refers to the cell face between a cell with index i and the next cell with index i+1.

Example. In the figure below is shown the computational cell scheme in i-direction with imax=7.

The fictitious boundary cells are shaded, i.e., cell numbers 1 and 7. The real fluid cells are numbered from 2 to 6. The physical computation volume ranges from cell face number 1 and cell face number 6.

3.4.2. Mesh Generation

Before generating mesh, the user must specify which coordinate system is to be used for the computation. The input variable for this is cyl (=0 for Cartesian coordinate system and =1 for Cylindrical coordinate system) in the NAMELIST group xput. The computational mesh is defined by one of two methods avaible (Direct or Automatic). Input variables for both methods are in the NAMELIST group meshgn.

Note that user only defines geometry for the real physics domain and fictitious boundary cells are assigned automatically by the code.

3.4.2.1. Direct Input of Grid Locations

This method consists in the direct entering of the coordinate values of each grid point in each direction.

The input array variables xgrid, ygrid, and zgrid are used to specify grid point locations in the x-, y-, and z-directions in Cartesian coordinates.

Example.

xgrid = 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.,10.,

This specifies that the mesh in the x-direction goes from 0 to 10 cm and has nine cells. The first eight cells have a cell-width of 1 cm and the last one is 2 cm wide.

Note that in the figure above cells are 11, this because the first and the last cell are the fictitious boundary cells.

If cylindrical coordinates are used, then xgrid refers to grid point locations in the radial (r) direction, and ygrid (θ) and zgrid (z) refer respectively to the azimuthal and axial directions. The measure of θ should be in degrees.

Example.

ygrid = 0., 15., 30., 45., 60., 75., 90.,

This specifies a mesh that is a quadrant of a cylinder and has six layers of cells in the azimuthal direction, all evenly spaced 15° apart.

3.4.2.2. Automatic Mesh Generator

This method uses an automatic mesh generator which allows easy generation of a mesh composed of cells with either fixed or variable sizes. The basic idea is to build a mesh by stacking together a series of submeshes in each coordinate direction.

Definition:

  • nkx defines the total umber of subintervals in the x-direction.

  • xl(k) sets the location of the left boundary of subdivision k.

  • xc(k) sets the "convergence point" where the minimum cell spacing occurs in the subdivision k.

  • nxl(k) specifies the number of cells to the left of xc(k).

  • nxr(k) specifies the number of cells to the right of xc(k).

  • dxmn(k) specifies the minimum cell size in the x-direction in subdivision k.

The maximum number of mesh subdivisions allowed is 50.

Example.

Cartesian Mesh. The first example involves Cartesian geometry (cyl = 0.0). Here we show how to generate a uniform mesh in the z-direction extending from 0 to 12 cm containing 10 cells. In the x-direction, the mesh also extends from 0 to 12 cm and consists of 10 cells, but has a minimum cell size of 0.2 cm on both sides of the line x = 5 cm. The following input specifications in NAMELIST group meshgn will generate such a mesh for 3D block number 1, as shown in the figure below.

iblock = 1,

nkx = 1, nkz = 1,

xl(1) = 0, xc(1) = 5, nxl(1) = 5, nxr(1) = 5, dxmn(1) = 0.2, xl(2) = 12.,

zl(1) = 0, zc(1) = 0, nzl(1) = 0, nzr(1) = 10, dzmn(1) = 1.e9, zl(2) = 12.,

Example.

Cylindrical Mesh. The example shows the mesh in two dimensions generated by the following input in NAMELIST group meshgn.

iblock = 1,

nkx = 1, nky = 1,

xl(1) = 0, xc(1) = 15, nxl(1) = 10, nxr(1) = 0, dxmn(1) = 0.5, xl(2) = 15.,

yl(1) = 0, yc(1) = 0, nyl(1) = 0, nyr(1) = 24, dymn(1) = 1.e9, yl(2) = 360.,

3.4.3. Automatic Mesh Refinement

The user can refine the mesh without changing anything else in the input file, such as the geometry, boundary conditions, points for outputs and so on. All these will be handled automatically inside the code.

Usefulness: Sensitivity analysis.

The input parameters in $xput for automatic mesh refinement are as follow:

xmrefactor Mesh refinement factor in x-direction, default = 1. Must be an integer.

ymrefactor Mesh refinement factor in y-direction, default = 1. Must be an integer.

zmrefactor Mesh refinement factor in z-direction, default = 1 Must be an integer.

The user can start a new calculation from 0 sec with the original mesh (refinement factors = 1), and then restart a calculation with a refined mesh.

Example. The mesh is refined 2 times in the x-direction, 3 times in the y-direction and 4 times in the z-directions.

xmrefactor = 2,

ymrefactor = 3,

zmrefactor = 4.

Be careful! After a calculation with a refined mesh it is not allowed to restart a calculation with a coarser mesh.

Note! Computational effort may increase dramatically when using automatic mesh refinement. Therefore, refine the mesh only when it is necessary.