Merge branch 'master' of github.com:L-Nafaryus/anisotrope-cube
Merge: forgotten pull request
This commit is contained in:
commit
5ac5231574
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,6 +2,8 @@ __pycache__
|
|||||||
build/
|
build/
|
||||||
logs/
|
logs/
|
||||||
storage/
|
storage/
|
||||||
|
*.gz
|
||||||
|
*.xz
|
||||||
*.fls
|
*.fls
|
||||||
*.aux
|
*.aux
|
||||||
*.bbl
|
*.bbl
|
||||||
|
11
config.py
11
config.py
@ -59,9 +59,10 @@ class ViscousLayers(Parameters):
|
|||||||
##
|
##
|
||||||
structures = [
|
structures = [
|
||||||
#"simple",
|
#"simple",
|
||||||
#"bodyCentered",
|
"bodyCentered",
|
||||||
"faceCentered"
|
"faceCentered"
|
||||||
]
|
]
|
||||||
|
|
||||||
class simple:
|
class simple:
|
||||||
theta = [c * 0.01 for c in range(1, 28 + 1)]
|
theta = [c * 0.01 for c in range(1, 28 + 1)]
|
||||||
directions = [
|
directions = [
|
||||||
@ -103,7 +104,7 @@ class bodyCentered:
|
|||||||
[0, 0, 1],
|
[0, 0, 1],
|
||||||
[1, 1, 1]
|
[1, 1, 1]
|
||||||
]
|
]
|
||||||
fillet = True
|
fillet = True
|
||||||
fineness = 3
|
fineness = 3
|
||||||
parameters = Parameters(
|
parameters = Parameters(
|
||||||
minSize = 0.005,
|
minSize = 0.005,
|
||||||
@ -137,8 +138,8 @@ class faceCentered:
|
|||||||
#[0, 0, 1],
|
#[0, 0, 1],
|
||||||
[1, 1, 1]
|
[1, 1, 1]
|
||||||
]
|
]
|
||||||
fillet = True
|
fillet = True
|
||||||
fineness = 1
|
fineness = 3
|
||||||
parameters = Parameters(
|
parameters = Parameters(
|
||||||
minSize = 0.005,
|
minSize = 0.005,
|
||||||
maxSize = 0.05,
|
maxSize = 0.05,
|
||||||
@ -155,7 +156,7 @@ class faceCentered:
|
|||||||
checkChartBoundary = False
|
checkChartBoundary = False
|
||||||
)
|
)
|
||||||
viscousLayers = ViscousLayers(
|
viscousLayers = ViscousLayers(
|
||||||
thickness = 0.001,
|
thickness = 0.001, # Failing on 0.13-111
|
||||||
numberOfLayers = 2,
|
numberOfLayers = 2,
|
||||||
stretchFactor = 1.2,
|
stretchFactor = 1.2,
|
||||||
isFacesToIgnore = True,
|
isFacesToIgnore = True,
|
||||||
|
79
extra/theta-flowrate.py
Normal file
79
extra/theta-flowrate.py
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
import matplotlib.pyplot as plt
|
||||||
|
from math import sqrt
|
||||||
|
import sys, os
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
|
||||||
|
BUILD = "../build"
|
||||||
|
postProcessing = "postProcessing/flowRatePatch(name=outlet)/0/surfaceFieldValue.dat"
|
||||||
|
|
||||||
|
#structures = [
|
||||||
|
# "simple",
|
||||||
|
# #"bodyCentered",
|
||||||
|
# #"faceCentered"
|
||||||
|
#]
|
||||||
|
|
||||||
|
theta = [c * 0.01 for c in range(1, 28 + 1)]
|
||||||
|
directions = [
|
||||||
|
[1, 0, 0],
|
||||||
|
[0, 0, 1],
|
||||||
|
[1, 1, 1]
|
||||||
|
]
|
||||||
|
flowrate = [ [] for n in range(3) ]
|
||||||
|
|
||||||
|
#nu = 1e-06
|
||||||
|
#p = [1e-03, 0]
|
||||||
|
|
||||||
|
for num, d in enumerate(directions):
|
||||||
|
for t in theta:
|
||||||
|
path = os.path.join(
|
||||||
|
BUILD,
|
||||||
|
"simple",
|
||||||
|
"direction-{}{}{}".format(*d),
|
||||||
|
"theta-{}".format(t),
|
||||||
|
postProcessing
|
||||||
|
)
|
||||||
|
|
||||||
|
with open(path, "r") as io:
|
||||||
|
lastLine = io.readlines()[-1]
|
||||||
|
|
||||||
|
value = lastLine.replace(" ", "").replace("\n", "").split("\t")[1]
|
||||||
|
flowrate[num].append(float(value))
|
||||||
|
|
||||||
|
k2, k3 = [], []
|
||||||
|
|
||||||
|
for n, _ in enumerate(flowrate[0]):
|
||||||
|
k2.append(2 * flowrate[1][n] / flowrate[0][n])
|
||||||
|
k3.append(2 * flowrate[2][n] / flowrate[0][n])
|
||||||
|
|
||||||
|
|
||||||
|
plt.figure(1)
|
||||||
|
|
||||||
|
ax = plt.subplot(211)
|
||||||
|
line, = ax.plot(theta, flowrate[0], "o")
|
||||||
|
line.set_label("[1, 0, 0]")
|
||||||
|
|
||||||
|
line, = ax.plot(theta, flowrate[1], "o")
|
||||||
|
line.set_label("[0, 0, 1]")
|
||||||
|
|
||||||
|
line, = plt.plot(theta, flowrate[2], "o")
|
||||||
|
line.set_label("[1, 1, 1]")
|
||||||
|
|
||||||
|
ax.set_yscale("log")
|
||||||
|
|
||||||
|
plt.legend()
|
||||||
|
plt.grid(True)
|
||||||
|
plt.xlabel("theta")
|
||||||
|
plt.ylabel("flowRate")
|
||||||
|
|
||||||
|
ax = plt.subplot(212)
|
||||||
|
line, = ax.plot(theta, k2, "o")
|
||||||
|
line.set_label("k2")
|
||||||
|
line, = ax.plot(theta, k3, "o")
|
||||||
|
line.set_label("k3")
|
||||||
|
plt.legend()
|
||||||
|
plt.grid(True)
|
||||||
|
plt.xlabel("theta")
|
||||||
|
plt.ylabel("k")
|
||||||
|
|
||||||
|
plt.show()
|
@ -29,7 +29,8 @@ def simpleCubic(theta = 0.01, fillet = False, direction = [1, 0, 0]):
|
|||||||
C1, C2 = 0.8, 0.5 #0.8, 0.05
|
C1, C2 = 0.8, 0.5 #0.8, 0.05
|
||||||
theta1, theta2 = 0.01, 0.28
|
theta1, theta2 = 0.01, 0.28
|
||||||
Cf = C1 + (C2 - C1) / (theta2 - theta1) * (theta - theta1)
|
Cf = C1 + (C2 - C1) / (theta2 - theta1) * (theta - theta1)
|
||||||
filletradius = 0.2 - Cf * (radius - r0)
|
delta = 0.2
|
||||||
|
filletradius = delta - Cf * (radius - r0)
|
||||||
|
|
||||||
scale = 100
|
scale = 100
|
||||||
oo = geompy.MakeVertex(0, 0, 0)
|
oo = geompy.MakeVertex(0, 0, 0)
|
||||||
@ -168,7 +169,8 @@ def simpleHexagonalPrism(theta = 0.01, fillet = False, direction = [1, 1, 1]):
|
|||||||
C1, C2 = 0.8, 0.5 # 0.8, 0.05
|
C1, C2 = 0.8, 0.5 # 0.8, 0.05
|
||||||
theta1, theta2 = 0.01, 0.28
|
theta1, theta2 = 0.01, 0.28
|
||||||
Cf = C1 + (C2 - C1) / (theta2 - theta1) * (theta - theta1)
|
Cf = C1 + (C2 - C1) / (theta2 - theta1) * (theta - theta1)
|
||||||
filletradius = 0.2 - Cf * (radius - r0)
|
delta = 0.2
|
||||||
|
filletradius = delta - Cf * (radius - r0)
|
||||||
|
|
||||||
scale = 100
|
scale = 100
|
||||||
oo = geompy.MakeVertex(0, 0, 0)
|
oo = geompy.MakeVertex(0, 0, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user