FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Engineering_Python/pyevtk_test.py at master · OnScale/Engineering_Python · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
OnScale
/
Engineering_Python
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Issues
0
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Engineering_Python
/
pyevtk_test.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (21 loc) · 722 Bytes
Breadcrumbs
Engineering_Python
/
pyevtk_test.py
Copy path
File metadata and controls
29 lines (21 loc) · 722 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 19 15:58:45 2014
@author: adminGH
"""
from
evtk
.
hl
import
gridToVTK
import
numpy
as
np
# Dimensions
nx
,
ny
,
nz
=
nd1
,
nd2
,
nd3
lx
,
ly
,
lz
=
0.5
,
0.5
,
1.0
dx
,
dy
,
dz
=
lx
/
nx
,
ly
/
ny
,
lz
/
nz
ncells
=
nx
*
ny
*
nz
npoints
=
(
nx
+
1
)
*
(
ny
+
1
)
*
(
nz
+
1
)
# Coordinates
x
=
np
.
arange
(
0
,
lx
+
0.1
*
dx
,
dx
,
dtype
=
'float64'
)
y
=
np
.
arange
(
0
,
ly
+
0.1
*
dy
,
dy
,
dtype
=
'float64'
)
z
=
np
.
arange
(
0
,
lz
+
0.1
*
dz
,
dz
,
dtype
=
'float64'
)
# Variables
pressure
=
np
.
random
.
rand
(
ncells
).
reshape
( (
nx
,
ny
,
nz
))
temp
=
np
.
random
.
rand
(
npoints
).
reshape
( (
nx
+
1
,
ny
+
1
,
nz
+
1
))
gridToVTK
(
"./rectilinear"
,
x
,
y
,
z
,
cellData
=
{
"pressure"
:
pressure
},
pointData
=
{
"temp"
:
temp
})
Back
|
FazBrowse Home
|
New Git URL