From c2c0382c397538b5b9f3bd677b61b878c63ed0a0 Mon Sep 17 00:00:00 2001 From: L-Nafaryus Date: Mon, 26 Apr 2021 14:32:45 +0500 Subject: [PATCH] Fix: simple without fillet is stable --- config.py | 22 +-- logs/anisotrope.2.log | 302 ++++++++++++++++++++++++++++++++++++++++++ logs/tasks.2.log | 6 + run.py | 14 +- samples/__init__.py | 2 +- 5 files changed, 332 insertions(+), 14 deletions(-) create mode 100644 logs/anisotrope.2.log create mode 100644 logs/tasks.2.log diff --git a/config.py b/config.py index ce890ab..50fac3b 100644 --- a/config.py +++ b/config.py @@ -59,8 +59,8 @@ class ViscousLayers(Parameters): ## structures = [ "simple", - "bodyCentered", - "faceCentered" + #"bodyCentered", + #"faceCentered" ] class simple: theta = [c * 0.01 for c in range(1, 28 + 1)] @@ -69,11 +69,11 @@ class simple: [0, 0, 1], [1, 1, 1] ] - fillet = False + fillet = True fineness = 1 parameters = Parameters( - minSize = 0.0005, - maxSize = 0.1, + minSize = 0.005, + maxSize = 0.05, growthRate = 0.5, nbSegPerEdge = 0.5, nbSegPerRadius = 0.5, @@ -87,8 +87,8 @@ class simple: checkChartBoundary = False ) viscousLayers = ViscousLayers( - thickness = 0.001, - numberOfLayers = 3, + thickness = 0.005, # 0.01, 0.005 for 0.28, 0.01 for prism + numberOfLayers = 2, stretchFactor = 1.2, isFacesToIgnore = True, facesToIgnore = None, @@ -106,8 +106,8 @@ class bodyCentered: fillet = False fineness = 1 parameters = Parameters( - minSize = 0.0005, - maxSize = 0.1, + minSize = 0.005, + maxSize = 0.05, growthRate = 0.5, nbSegPerEdge = 0.5, nbSegPerRadius = 0.5, @@ -121,8 +121,8 @@ class bodyCentered: checkChartBoundary = False ) viscousLayers = ViscousLayers( - thickness = 0.001, - numberOfLayers = 3, + thickness = 0.01, + numberOfLayers = 2, stretchFactor = 1.2, isFacesToIgnore = True, facesToIgnore = None, diff --git a/logs/anisotrope.2.log b/logs/anisotrope.2.log new file mode 100644 index 0000000..2c567b7 --- /dev/null +++ b/logs/anisotrope.2.log @@ -0,0 +1,302 @@ +CRITICAL: Missed environment +INFO: -------------------------------------------------------------------------------- +INFO: main: + task: 1 / 84 + cpu count: 4 + structure: simple + direction: [1, 0, 0] + theta: 0.01 + fillet: False + export: /home/nafaryus/.vault/projects/anisotrope-cube/build/simple/direction-100/theta-0.01 +INFO: salome: ['start', '--shutdown-servers=1', '--port', '2810', '-t'] +INFO: enviroment: + Python 3.9.4 + Salome 9.6.0 + OpenFOAM-v2012 +INFO: -------------------------------------------------------------------------------- +INFO: main: + task: 1 / 84 + cpu count: 4 + structure: simple + direction: [1, 0, 0] + theta: 0.01 + fillet: False + export: /home/nafaryus/.vault/projects/anisotrope-cube/build/simple/direction-100/theta-0.01 +INFO: salome: ['start', '--shutdown-servers=1', '--port', '2810', '-t'] +INFO: genMesh: + structure type: simple + coefficient: 0.01 + fillet: 0 + flow direction: [1, 0, 0] + export path: /home/nafaryus/.vault/projects/anisotrope-cube/build/simple/direction-100/theta-0.01/mesh.unv +INFO: shape: + edges length: 60.95122652608073 + surface area: 37.90423023682059 + volume: 7.369852937284071 +INFO: meshCreate: + fineness: Coarse + min size: 0.005 + max size: 0.05 + growth rate: 0.5 + nb segs per edge: 0.5 + nb segs per radius: 1.5 + limit size by surface curvature: True + quad-dominated: False + second order: False + optimize: True +INFO: meshCreate: + viscous layers: + thickness: 0.005 + number: 2 + stretch factor: 1.2 +INFO: meshCompute: + Elements: 332036 + Edges: 1212 + Faces: 31402 + Triangles: 31402 + Volumes: 299422 + Tetrahedrons: 244554 + Prisms: 54868 + Pyramid: 0 +INFO: meshExport: + format: unv +INFO: createMesh: elapsed time: 0:00:56.351503 +INFO: ideasUnvToFoam: ['mesh.unv'] +INFO: createPatch: ['-overwrite', '-dict', 'system/createPatchDict.symetry'] +INFO: checkMesh: ['-allGeometry', '-allTopology'] +WARNING: checkMesh: + Cells with small determinant (< 0.001) found, number of cells: 1129 + Faces with small interpolation weight (< 0.05) found, number of faces: 65 +INFO: transformPoints: ['-scale', '(1e-05 1e-05 1e-05)'] +INFO: decomposePar: [] +INFO: renumberMesh: ['-parallel', '-overwrite'] +INFO: potentialFoam: ['-parallel'] +INFO: foamDictionary: ['processor0/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor0/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: foamDictionary: ['processor1/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor1/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: foamDictionary: ['processor2/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor2/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: foamDictionary: ['processor3/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor3/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: simpleFoam: ['-parallel'] +ERROR: simpleFoam: + [3] #0 Foam::error::printStack(Foam::Ostream&) at ??:? +[3] #1 Foam::sigFpe::sigHandler(int) at ??:? +[3] #2 ? in /usr/lib64/libpthread.so.0 +[3] #3 Foam::GAMGSolver::scale(Foam::Field&, Foam::Field&, Foam::lduMatrix const&, Foam::FieldField const&, Foam::UPtrList const&, Foam::Field const&, unsigned char) const at ??:? +[3] #4 Foam::GAMGSolver::Vcycle(Foam::PtrList const&, Foam::Field&, Foam::Field const&, Foam::Field&, Foam::Field&, Foam::Field&, Foam::Field&, Foam::Field&, Foam::PtrList >&, Foam::PtrList >&, unsigned char) const at ??:? +[3] #5 Foam::GAMGSolver::solve(Foam::Field&, Foam::Field const&, unsigned char) const at ??:? +[3] #6 Foam::fvMatrix::solveSegregated(Foam::dictionary const&) at ??:? +[3] #7 Foam::fvMatrix::solveSegregatedOrCoupled(Foam::dictionary const&) at ??:? +[3] #8 Foam::fvMesh::solve(Foam::fvMatrix&, Foam::dictionary const&) const at ??:? +[3] #9 ? in ~/programs/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/bin/simpleFoam +[3] #10 __libc_start_main in /usr/lib64/libc.so.6 +[3] #11 ? in ~/programs/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/bin/simpleFoam +[elnafo:22022] *** Process received signal *** +[elnafo:22022] Signal: Floating point exception (8) +[elnafo:22022] Signal code: (-6) +[elnafo:22022] Failing at address: 0x3e800005606 +[elnafo:22022] [ 0] /usr/lib64/libpthread.so.0(+0x13900)[0x7f628c2a3900] +[elnafo:22022] [ 1] /usr/lib64/libpthread.so.0(raise+0x141)[0x7f628c2a37a1] +[elnafo:22022] [ 2] /usr/lib64/libpthread.so.0(+0x13900)[0x7f628c2a3900] +[elnafo:22022] [ 3] /home/nafaryus/programs/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver5scaleERNS_5FieldIdEES3_RKNS_9lduMatrixERKNS_10FieldFieldIS1_dEERKNS_8UPtrListIKNS_17lduInterfaceFieldEEERKS2_h+0xee)[0x7f628ccd67ee] +[elnafo:22022] [ 4] /home/nafaryus/programs/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver6VcycleERKNS_7PtrListINS_9lduMatrix8smootherEEERNS_5FieldIdEERKS8_S9_S9_S9_S9_S9_RNS1_IS8_EESD_h+0x9b9)[0x7f628ccd85c9] +[elnafo:22022] [ 5] /home/nafaryus/programs/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver5solveERNS_5FieldIdEERKS2_h+0x60b)[0x7f628ccda76b] +[elnafo:22022] [ 6] /home/nafaryus/programs/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam8fvMatrixIdE15solveSegregatedERKNS_10dictionaryE+0x18b)[0x7f628ff9c49b] +[elnafo:22022] [ 7] /home/nafaryus/programs/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam8fvMatrixIdE24solveSegregatedOrCoupledERKNS_10dictionaryE+0x44b)[0x7f628f473d7b] +[elnafo:22022] [ 8] /home/nafaryus/programs/OpenFOAM/OpenFOAM-v2012/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZNK4Foam6fvMesh5solveERNS_8fvMatrixIdEERKNS_10dictionaryE+0x24)[0x7f628f418864] +[elnafo:22022] [ 9] simpleFoam(+0x272da)[0x55b38a1bc2da] +[elnafo:22022] [10] /usr/lib64/libc.so.6(__libc_start_main+0xea)[0x7f628c0f1e0a] +[elnafo:22022] [11] simpleFoam(+0x2872a)[0x55b38a1bd72a] +[elnafo:22022] *** End of error message *** +-------------------------------------------------------------------------- +Primary job terminated normally, but 1 process returned +a non-zero exit code. Per user-direction, the job has been aborted. +-------------------------------------------------------------------------- +-------------------------------------------------------------------------- +mpirun noticed that process rank 3 with PID 0 on node elnafo exited on signal 8 (Floating point exception). +-------------------------------------------------------------------------- + +INFO: calculate: elapsed time: 0:00:55.554469 +INFO: -------------------------------------------------------------------------------- +INFO: main: + task: 2 / 84 + cpu count: 4 + structure: simple + direction: [1, 0, 0] + theta: 0.02 + fillet: False + export: /home/nafaryus/.vault/projects/anisotrope-cube/build/simple/direction-100/theta-0.02 +INFO: salome: ['start', '--shutdown-servers=1', '--port', '2810', '-t'] +INFO: genMesh: + structure type: simple + coefficient: 0.02 + fillet: 0 + flow direction: [1, 0, 0] + export path: /home/nafaryus/.vault/projects/anisotrope-cube/build/simple/direction-100/theta-0.02/mesh.unv +INFO: shape: + edges length: 60.21103447685668 + surface area: 37.190152146750385 + volume: 7.114882727707145 +INFO: meshCreate: + fineness: Coarse + min size: 0.005 + max size: 0.05 + growth rate: 0.5 + nb segs per edge: 0.5 + nb segs per radius: 1.5 + limit size by surface curvature: True + quad-dominated: False + second order: False + optimize: True +INFO: meshCreate: + viscous layers: + thickness: 0.005 + number: 2 + stretch factor: 1.2 +INFO: meshCompute: + Elements: 322995 + Edges: 1204 + Faces: 30602 + Triangles: 30602 + Volumes: 291189 + Tetrahedrons: 237773 + Prisms: 53416 + Pyramid: 0 +INFO: meshExport: + format: unv +INFO: createMesh: elapsed time: 0:00:53.272977 +INFO: ideasUnvToFoam: ['mesh.unv'] +INFO: createPatch: ['-overwrite', '-dict', 'system/createPatchDict.symetry'] +INFO: checkMesh: ['-allGeometry', '-allTopology'] +WARNING: checkMesh: + Cells with small determinant (< 0.001) found, number of cells: 384 + Faces with small interpolation weight (< 0.05) found, number of faces: 316 +INFO: transformPoints: ['-scale', '(1e-05 1e-05 1e-05)'] +INFO: decomposePar: [] +INFO: renumberMesh: ['-parallel', '-overwrite'] +INFO: potentialFoam: ['-parallel'] +INFO: foamDictionary: ['processor0/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor0/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: foamDictionary: ['processor1/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor1/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: foamDictionary: ['processor2/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor2/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: foamDictionary: ['processor3/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor3/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: simpleFoam: ['-parallel'] +CRITICAL: Missed environment +INFO: -------------------------------------------------------------------------------- +INFO: main: + task: 1 / 84 + cpu count: 4 + structure: simple + direction: [1, 0, 0] + theta: 0.01 + fillet: True + export: /home/nafaryus/.vault/projects/anisotrope-cube/build/simple/direction-100/theta-0.01 +INFO: salome: ['start', '--shutdown-servers=1', '--port', '2810', '-t'] +INFO: genMesh: + structure type: simple + coefficient: 0.01 + fillet: 1 + flow direction: [1, 0, 0] + export path: /home/nafaryus/.vault/projects/anisotrope-cube/build/simple/direction-100/theta-0.01/mesh.unv +INFO: shape: + edges length: 67.92273385609434 + surface area: 37.44945519567929 + volume: 7.368042673884656 +INFO: meshCreate: + fineness: Coarse + min size: 0.005 + max size: 0.05 + growth rate: 0.5 + nb segs per edge: 0.5 + nb segs per radius: 1.5 + limit size by surface curvature: True + quad-dominated: False + second order: False + optimize: True +INFO: meshCreate: + viscous layers: + thickness: 0.005 + number: 2 + stretch factor: 1.2 +INFO: environment: + Python 3.9.4 + Salome 9.6.0 + OpenFOAM-v2012 +INFO: environment: + Python 3.9.4 + Salome 9.6.0 + OpenFOAM-v2012 +INFO: -------------------------------------------------------------------------------- +INFO: main: + task: 1 / 84 + cpu count: 4 + structure: simple + direction: [1, 0, 0] + theta: 0.01 + fillet: True + export: /home/nafaryus/.vault/projects/anisotrope-cube/build/simple/direction-100/theta-0.01 +INFO: salome: ['start', '--shutdown-servers=1', '--port', '2810', '-t'] +INFO: genMesh: + structure type: simple + coefficient: 0.01 + fillet: 1 + flow direction: [1, 0, 0] + export path: /home/nafaryus/.vault/projects/anisotrope-cube/build/simple/direction-100/theta-0.01/mesh.unv +INFO: shape: + edges length: 67.92273385609434 + surface area: 37.44945519567929 + volume: 7.368042673884656 +INFO: meshCreate: + fineness: Coarse + min size: 0.005 + max size: 0.05 + growth rate: 0.5 + nb segs per edge: 0.5 + nb segs per radius: 1.5 + limit size by surface curvature: True + quad-dominated: False + second order: False + optimize: True +INFO: meshCreate: + viscous layers: + thickness: 0.005 + number: 2 + stretch factor: 1.2 +INFO: meshCompute: + Elements: 478430 + Edges: 3956 + Faces: 61270 + Triangles: 61270 + Volumes: 413204 + Tetrahedrons: 298712 + Prisms: 114492 + Pyramid: 0 +INFO: meshExport: + format: unv +INFO: createMesh: elapsed time: 0:02:13.757935 +INFO: ideasUnvToFoam: ['mesh.unv'] +INFO: createPatch: ['-overwrite', '-dict', 'system/createPatchDict.symetry'] +INFO: checkMesh: ['-allGeometry', '-allTopology'] +WARNING: checkMesh: + Cells with small determinant (< 0.001) found, number of cells: 77 + Concave cells (using face planes) found, number of cells: 3 + Faces with small interpolation weight (< 0.05) found, number of faces: 128 + Faces with small volume ratio (< 0.01) found, number of faces: 2 +INFO: transformPoints: ['-scale', '(1e-05 1e-05 1e-05)'] +INFO: decomposePar: [] +INFO: renumberMesh: ['-parallel', '-overwrite'] +INFO: potentialFoam: ['-parallel'] +INFO: foamDictionary: ['processor0/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor0/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: foamDictionary: ['processor1/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor1/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: foamDictionary: ['processor2/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor2/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: foamDictionary: ['processor3/0/U', '-entry', 'boundaryField.inlet.type', '-set', 'pressureInletVelocity'] +INFO: foamDictionary: ['processor3/0/U', '-entry', 'boundaryField.inlet.value', '-set', 'uniform (0 0 0)'] +INFO: simpleFoam: ['-parallel'] diff --git a/logs/tasks.2.log b/logs/tasks.2.log new file mode 100644 index 0000000..64fa655 --- /dev/null +++ b/logs/tasks.2.log @@ -0,0 +1,6 @@ +Task 0: + structure: simple + direction: [1, 0, 0] + theta: 0.01 + mesh: True + flow: False diff --git a/run.py b/run.py index 6d40be9..55df32c 100644 --- a/run.py +++ b/run.py @@ -24,7 +24,11 @@ def main(): #global logger #logger = applogger.Logger() - checkEnv() + check = checkEnv() + + if check: + return + tasks = createTasks() for task in tasks: @@ -65,6 +69,8 @@ def main(): def checkEnv(): + missed = False + try: pythonVersion = "Python {}".format(sys.version.split(" ")[0]) salomeVersion = salome_utils.salomeVersion() @@ -72,9 +78,13 @@ def checkEnv(): except Exception: logger.critical("Missed environment") + missed = True else: - logger.info(f"enviroment:\n\t{pythonVersion}\n\t{salomeVersion}\n\t{foamVersion}") + logger.info(f"environment:\n\t{pythonVersion}\n\t{salomeVersion}\n\t{foamVersion}") + + finally: + return missed class Task: diff --git a/samples/__init__.py b/samples/__init__.py index c654bfa..6a1ae11 100644 --- a/samples/__init__.py +++ b/samples/__init__.py @@ -100,7 +100,7 @@ def genMesh(stype, theta, fillet, direction, export): facesToIgnore.append(group) viscousLayers.facesToIgnore = facesToIgnore - viscousLayers.extrusionMethod = mesh_utils.smeshBuilder.NODE_OFFSET + viscousLayers.extrusionMethod = mesh_utils.smeshBuilder.SURF_OFFSET_SMOOTH mesh = mesh_utils.meshCreate(shape, groups, fineness, parameters, viscousLayers) mesh_utils.meshCompute(mesh)