Skip to content

This package intends to support the solution of PDEs using the Element-based Finite Volume Method (EbFVM). The input mesh may be *.msh or *.xdmf files, and the output may be *.csv or *.cgns files.

Notifications You must be signed in to change notification settings

casfeq/PyEFVLib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyEFVLib

This package intends to support the solution of PDEs using the Element-based Finite Volume Method (EbFVM). The input mesh may be *.msh or *.xdmf files, and the output may be *.csv or *.cgns.

Dependencies & Installation

Also, for CGNS writing, C++ is used, and two libraries are required: CGNS and Boost.

Usage

from PyEFVLib import MSHReader, Grid, Point
import os, numpy as np

path = os.path.join(*[os.path.dirname(__file__), os.path.pardir, "meshes", "Square.msh"])

reader = MSHReader(path)
grid   = Grid(reader.getData())

totalVolume = 0.0
for element in grid.elements:
	for vertex in element:
		totalVolume += vertex.volume

print(totalVolume)

About

This package intends to support the solution of PDEs using the Element-based Finite Volume Method (EbFVM). The input mesh may be *.msh or *.xdmf files, and the output may be *.csv or *.cgns files.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 91.0%
  • GLSL 5.1%
  • C++ 3.3%
  • CMake 0.6%