pucgen

所属分类:collect
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2022-02-03 11:43:13
上 传 者sh-1993
说明:  周期单元电池发生器,
(Periodic Unit Cell Generator,)

文件列表:
examples/ (0, 2022-02-03)
examples/example1.png (87688, 2022-02-03)
examples/example1.puc (382, 2022-02-03)
examples/example2.png (180622, 2022-02-03)
examples/example2.puc (485, 2022-02-03)
examples/example3.png (88598, 2022-02-03)
examples/example3.puc (457, 2022-02-03)
examples/example4.png (87982, 2022-02-03)
examples/example4.puc (295, 2022-02-03)
gen_mesh_utils.py (4911, 2022-02-03)
mshio.py (2598, 2022-02-03)
pucgen.py (24569, 2022-02-03)
pucgen_gui.py (15880, 2022-02-03)
pucgen_logo.png (14300, 2022-02-03)
pucgen_logo.svg (35308, 2022-02-03)
vtk_viewer.py (6059, 2022-02-03)
vtkio.py (6431, 2022-02-03)

![pucgen_logo.png](https://github.com/sfepy/pucgen/blob/master/pucgen_logo.png) # PUCGen - Periodic Unit Cell Generator A python script for generating periodic unit cells. ## Requirements * [Gmsh](https://github.com/sfepy/pucgen/blob/master/http://gmsh.info/) - three-dimensional finite element mesh generator * [PyQt5](https://github.com/sfepy/pucgen/blob/master/https://riverbankcomputing.com/software/pyqt/intro) - bindings for the Qt application framework (including OpenGL module) * [Python bindings for VTK](https://github.com/sfepy/pucgen/blob/master/https://vtk.org/download) On Ubuntu based Linux distributions users can use the following command to install the required packages: apt install gmsh python-pyqt5 python-pyqt5.qtopengl python-vtk6 or: apt install gmsh python3-pyqt5 python3-pyqt5.qtopeng python3-vtk7 for Python3. ## Installation * Download the code from the git repository: git clone git://github.com/sfepy/pucgen or * Use [pip](https://github.com/sfepy/pucgen/blob/master/https://pypi.org/project/pip/): pip install git+git://github.com/sfepy/pucgen ## Usage * Command line processing: python pucgen.py * Run the GUI: python pucgen.py ## Input file examples: #### `example1.puc`: ``` BaseCell;size=(1, 1, 1);el_size=0.1;mat_id=5 SphericalInclusion;radius=0.3;central_point=(0, 0, 0);el_size=0.5;mat_id=2 CylindricalChannel;radius=0.1;central_point=(0, 0, 0);direction=x;el_size=0.5;mat_id=2 CylindricalChannel;radius=0.15;central_point=(0, 0, 0);direction=y;el_size=0.5;mat_id=2 CylindricalChannel;radius=0.2;central_point=(0, 0, 0);direction=z;el_size=0.5;mat_id=2 ``` ![example1.png](https://github.com/sfepy/pucgen/blob/master/examples/example1.png) #### `example2.puc`: ``` BaseCell;size=(2, 1, 1);el_size=0.1;mat_id=1 SandwichLayer;thickness=0.1;central_point=(0, 0, 0);direction=x;el_size=0.5;mat_id=2 SandwichLayer;thickness=0.1;central_point=(0, 0, 0);direction=y;el_size=0.5;mat_id=2 SandwichLayer;thickness=0.1;central_point=(0, 0, 0);direction=z;el_size=0.5;mat_id=2 EllipsoidalInclusion;radius=(0.8, 0.4, 0.4);central_point=(0, 0, 0);direction=(1, 0, 0);el_size=0.5;mat_id=1 ``` ![example2.png](https://github.com/sfepy/pucgen/blob/master/examples/example2.png) #### `example3.puc`: ``` BaseCell;size=(1, 1, 1);el_size=0.1;mat_id=1 SphericalInclusion;radius=0.2;central_point=(-0.2, 0.2, -0.2);el_size=0.4;mat_id=2 CylindricalInclusion;radius=0.08;length=0.8;central_point=(0.1, -0.1, -0.2);direction=(1, 1, 0.5);el_size=0.3;mat_id=3 BoxInclusion;size=(0.2, 0.25, 0.3);central_point=(0.2, 0.2, 0.2);el_size=0.5;mat_id=4 EllipsoidalInclusion;radius=(0.4, 0.15, 0.1);central_point=(-0.15, -0.15, 0.25);direction=(1, -1, 0.5);el_size=0.3;mat_id=5 ``` ![example3.png](https://github.com/sfepy/pucgen/blob/master/examples/example3.png) #### `example4.puc`: ``` BaseCell;size=(1, 1, 1);el_size=0.1;mat_id=1 SphericalInclusion;radius=0.4;central_point=(0, 0, 0);el_size=0.5;mat_id=2 CylindricalChannel;radius=0.15;central_point=(0, 0, 0);direction=y;el_size=0.5;mat_id=2 CylindricalChannel;radius=0.2;central_point=(0, 0, 0);direction=z;el_size=0.5;mat_id=1 ``` ![example4.png](https://github.com/sfepy/pucgen/blob/master/examples/example4.png)

近期下载者

相关文件


收藏者