Skip to main content

A package to establish grid independent results for numerical analysis on computational grids.

Project description

PyPI license Generic badge made-with-python

Introduction

pyGCS (Grid Convergence Study) is a python package that calculates the Grid Convergence Index (GCI) for solutions obtained through numerical analysis using computational grids to establish the error-band of the solution with respect to the numerical grid used. This package implements the equations presented in [1] and [2].

Installation

To install pyCGS, run the following command

pip3 install pycgs

Usage

The following shows how to calculate the GCI and get additional information that may be useful to establish grid independence.

import pyGCS

# number of cells per grid
grids = [18000, 8000, 4500]

# volume of the simulation domain for each simulation
volume = [76, 76, 76]

# integral quantity for which to calculate the GCI
solution = [6.063, 5.972, 5.863]

# dimension of the simultion (here 2D)
dimension = 2

# create GCI object
grid_convergence_study = pyGCS.GCI(dimension, volume, grids, solution)

# get GCI and supporting information
gci = grid_convergence_study.get_gci()
asymptotic_gci = grid_convergence_study.get_asymptotic_gci()
order = grid_convergence_study.get_order()

# GCI_32 = 4.11%
print('GCI for coarse to medium grid (GCI_32): ' + str(gci[1] * 100) + '%')

# GCI_21 = 2.17%
print('GCI for medium to fine   grid (GCI_21): ' + str(gci[0] * 100) + '%')

# asymptotic GCI = 1.015
print('asymptotic GCI value (a value close to 1 indicates grid independence): ' + str(asymptotic_gci[0]))

# order = 1.53
print('order achieved in simulation: ' + str(order[0]))

References

  1. Celik et al. "Procedure of Estimation and Reporting of Uncertainty Due to Discretization in CFD Applications", Journal of Fluids Engineering, 130(7), 2008
  2. https://www.grc.nasa.gov/www/wind/valid/tutorial/spatconv.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyGCS-0.2.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyGCS-0.2.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file pyGCS-0.2.1.tar.gz.

File metadata

  • Download URL: pyGCS-0.2.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for pyGCS-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2b4e88e531cd8ba9b66d1f50160f52810b415aae8707d4db8fbe6cb6d8f25a82
MD5 86f8077c4bc620ca5214b4214975937a
BLAKE2b-256 49ef5d8c65003b8ce9ea72c7f1d843efe2a604254c883a28c4425a914b5c8e3b

See more details on using hashes here.

File details

Details for the file pyGCS-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pyGCS-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.0 importlib_metadata/3.7.3 packaging/20.9 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for pyGCS-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6f1abc789ec141d806e3a73347917c72d8ce937c826092c0cc697a36c17771ca
MD5 d5cfe2836d52bd668ae7723fb94078b9
BLAKE2b-256 aa3b72fd608374e692283e7d014783cdd342c65689e3b0c299e4072150a693c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page