Git Product home page Git Product logo

gmsh_scripts's Introduction

readme

gmsh_scripts

Mixed (structured/unstructured) 3D mesh generator with curved cuboid elements (Primitives) based on gmsh

Installation

  1. Download and install python https://www.python.org/downloads/
  2. Install numpy and gmsh packages
pip install -r requirements.txt 
  1. Download gmsh_scripts from https://github.com/romanzes637/gmsh_scripts
  2. To create mesh use complex_factory.py script
python complex_factory -i [INPUT_FILE]

Example

Input file test_cylinder_simple.json of complex "Cylinder" (axisymmetric multilayer geometry)

{
  "metadata": {
    "type": "class_arguments",
    "class_name": "Cylinder",
    "description": "Test Cylinder simple"
  },
  "arguments": {
    "factory": "geo",
    "radii": [1, 2],
    "heights": [1, 2],
    "layers_lcs": 0.5,
    "volumes_names": ["V1", "V2"],
    "layers_volumes_names": [[0, 1], [0, 1]],
    "transfinite_r_data": [[3, 0, 1], [5, 0, 0.7]],
    "transfinite_h_data": [[3, 0, 1], [9, 1, 3.0]],
    "transfinite_phi_data": [7, 0, 1]
  }
}

File consists of 2 sections: "metadata" and "arguments". Section "metadata" describes type of input file "type", name of a Complex "class_name" and text field "description". Section "arguments" contains input data for Complex "Cylinder":

  • "factory" - gmsh kernel: “geo” (default) or “occ” (OpenCascade)
  • "radii" - radii of multilayer cylinder: two cylinders with 1 and 2 meters
  • "heights" - heights of multilayer cylinder layers: two layers of 1 and 2 meters
  • "layers_lcs" - mesh characteristic length
  • "volumes_names" - names for mesh volumes
  • "layers_volumes_names" - map of volumes names by layers: from bottom to top, from center to side
  • "transfinite_r_data" - data for structured mesh by radial layers, [number of nodes, struct type, size rate]. Struct types: 0 - linear, 1 - centered. Size rate is a change of element sizes from center to side
  • "transfinite_h_data" - data for structured mesh by height layers. Size rate is from bottom to top
  • "transfinite_phi_data" - data for circumferential structured mesh

Unstructured tetrahedral mesh

python complex_factory -i input/test_cylinder_simple.json

unstruct_tetrahedral

Structured tetrahedral mesh

python complex_factory -i input/test_cylinder_simple.json -t

struct_tetrahedral

Structured hexahedral mesh

python complex_factory -i input/test_cylinder_simple.json -tr

struct_hexahedral

Cite

gmsh

Geuzaine and J.-F. Remacle. Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities. International Journal for Numerical Methods in Engineering 79(11), pp. 1309-1331, 2009

gmsh scripts

Butov R.A., Drobyishevsky N.I., Moiseenko E.V., Tokarev Yu. N. Mesh generation for radioactive waste management tasks. Radioactive Waste, 2021, no. 1 (14), pp. 87—95. DOI: 10.25283/2587-9707-2021-1-87-95. (In Russian)

Contacts

Roman Butov

https://github.com/romanzes637

[email protected]

gmsh_scripts's People

Contributors

romanzes637 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.