Fix: missed inlet/outlet boundary
This commit is contained in:
parent
8df065d5aa
commit
604a877b6e
@ -146,7 +146,7 @@ class BodyCentered(Periodic):
|
|||||||
fNorm = self.normal(face)
|
fNorm = self.normal(face)
|
||||||
fAngle = self.angle(vecFlow, fNorm)
|
fAngle = self.angle(vecFlow, fNorm)
|
||||||
|
|
||||||
if fAngle == 0:
|
if fAngle == 0 or fAngle == numpy.pi:
|
||||||
if (face.center.pos() == inletface.center.pos()).prod():
|
if (face.center.pos() == inletface.center.pos()).prod():
|
||||||
face.name = "inlet"
|
face.name = "inlet"
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ class FaceCentered(Periodic):
|
|||||||
fNorm = self.normal(face)
|
fNorm = self.normal(face)
|
||||||
fAngle = self.angle(vecFlow, fNorm)
|
fAngle = self.angle(vecFlow, fNorm)
|
||||||
|
|
||||||
if fAngle == 0:
|
if fAngle == 0 or fAngle == numpy.pi:
|
||||||
if (face.center.pos() == inletface.center.pos()).prod():
|
if (face.center.pos() == inletface.center.pos()).prod():
|
||||||
face.name = "inlet"
|
face.name = "inlet"
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ class Simple(Periodic):
|
|||||||
fNorm = self.normal(face)
|
fNorm = self.normal(face)
|
||||||
fAngle = self.angle(vecFlow, fNorm)
|
fAngle = self.angle(vecFlow, fNorm)
|
||||||
|
|
||||||
if fAngle == 0:
|
if fAngle == 0 or fAngle == numpy.pi:
|
||||||
if (face.center.pos() == inletface.center.pos()).prod():
|
if (face.center.pos() == inletface.center.pos()).prod():
|
||||||
face.name = "inlet"
|
face.name = "inlet"
|
||||||
|
|
||||||
|
@ -21,7 +21,8 @@ class TestCore(unittest.TestCase):
|
|||||||
|
|
||||||
self.core = core
|
self.core = core
|
||||||
|
|
||||||
self.outputPath = os.path.join(os.path.abspath("."), "tests/test_core_output")
|
self.currentPath = os.path.abspath(".")
|
||||||
|
self.outputPath = os.path.join(self.currentPath, "tests/test_core_output")
|
||||||
os.makedirs(self.outputPath, exist_ok = True)
|
os.makedirs(self.outputPath, exist_ok = True)
|
||||||
|
|
||||||
def test_config(self):
|
def test_config(self):
|
||||||
@ -54,12 +55,12 @@ class TestCore(unittest.TestCase):
|
|||||||
self.assertTrue(path.isfile(path.join(runner.casepath(), "mesh.mesh")))
|
self.assertTrue(path.isfile(path.join(runner.casepath(), "mesh.mesh")))
|
||||||
|
|
||||||
runner.computeFlow()
|
runner.computeFlow()
|
||||||
#self.assertTrue(path.isfile(path.join(runner.casepath(), "mesh.mesh")))
|
self.assertTrue(path.isfile(path.join(runner.casepath(), "mesh.mesh")))
|
||||||
|
|
||||||
os.chdir(pathOld)
|
os.chdir(pathOld)
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
pass
|
os.chdir(self.currentPath)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user