CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Error when running AMR on half cylinder mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 25, 2024, 00:45
Default Error when running AMR on half cylinder mesh
  #1
Member
 
Song Young Ik
Join Date: Apr 2022
Location: South Korea
Posts: 59
Rep Power: 4
songyi719 is on a distinguished road
I created half-cylinder mesh with symmetry boundary which is based on this file page 60~66



http://www.wolfdynamics.com/wiki/mes..._blockmesh.pdf


and used AMR feature by setting refiner on dynamicMeshDict.



When I used AMR on square box mesh with fully hexahedral cells it worked fine, but as I created cylindrical mesh with curved edge, it somehow aborts the refinement during solving. Is it due to shape of the mesh, or some other issue?


Below is the error code



Code:
[3] #0  Foam::error::printStack(Foam::Ostream&) at ??:?[3] 
#1  Foam::sigSegv::sigHandler(int) at ??:?[3] 
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"[3] 
#3  Foam::fvMeshTopoChangers::refiner::refineUfs(Foam::HashSet<int, Foam::Hash<int> > const&, Foam::polyTopoChangeMap const&) at ??:?[3] 
#4  Foam::fvMeshTopoChangers::refiner::refine(Foam::List<int> const&) at ??:?[3] 
#5  Foam::fvMeshTopoChangers::refiner::update() at ??:?[3] 
#6  Foam::fvMesh::update() at ??:?[3] 
#7  Foam::solvers::VoFSolver::preSolve() at ??:?[3] 
#8  Foam::solvers::twoPhaseSolver::preSolve() at ??:?[3] 
#9  ? in "/opt/openfoam11/platforms/linux64GccDPInt32Opt/bin/foamRun"[3] 
#10  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"[3] 
#11  ? in "/opt/openfoam11/platforms/linux64GccDPInt32Opt/bin/foamRun
"[song-desktop:17960] *** Process received signal ***
[song-desktop:17960] Signal: Segmentation fault (11)
[song-desktop:17960] Signal code:  (-6)
[song-desktop:17960] Failing at address: 0x3e800004628
[song-desktop:17960] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x43090)[0x7fd74c69b090]
[song-desktop:17960] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7fd74c69b00b]
[song-desktop:17960] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x43090)[0x7fd74c69b090]
[song-desktop:17960] [ 3] /opt/openfoam11/platforms/linux64GccDPInt32Opt/lib/libfvMeshTopoChangers.so(_ZN4Foam18fvMeshTopoChangers7refiner9refineUfsERKNS_7HashSetIiNS_4HashIiEEEERKNS_17polyTopoChangeMapE+0x568)[0x7fd7403dd818]
[song-desktop:17960] [ 4] /opt/openfoam11/platforms/linux64GccDPInt32Opt/lib/libfvMeshTopoChangers.so(_ZN4Foam18fvMeshTopoChangers7refiner6refineERKNS_4ListIiEE+0x559)[0x7fd7403de079]
[song-desktop:17960] [ 5] /opt/openfoam11/platforms/linux64GccDPInt32Opt/lib/libfvMeshTopoChangers.so(_ZN4Foam18fvMeshTopoChangers7refiner6updateEv+0x31e)[0x7fd7403df6de]
[song-desktop:17960] [ 6] /opt/openfoam11/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam6fvMesh6updateEv+0xa4)[0x7fd74dc38b84]
[song-desktop:17960] [ 7] /opt/openfoam11/platforms/linux64GccDPInt32Opt/lib/libVoFSolver.so(_ZN4Foam7solvers9VoFSolver8preSolveEv+0x3ad)[0x7fd7480ae41d]
[song-desktop:17960] [ 8] /opt/openfoam11/platforms/linux64GccDPInt32Opt/lib/libtwoPhaseSolver.so(_ZN4Foam7solvers14twoPhaseSolver8preSolveEv+0xd)[0x7fd742ac121d]
[song-desktop:17960] [ 9] foamRun(+0x3e30)[0x557c79e1be30]
[song-desktop:17960] [10] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fd74c67c083][song-desktop:17960] [11] foamRun(+0x42be)[0x557c79e1c2be]
[song-desktop:17960] *** End of error message ***--------------------------------------------------------------------------Primary job  terminated normally, but 1 process returneda non-zero exit code. Per user-direction, the job has been aborted.----------------------------------------------------------------------------------------------------------------------------------------------------mpirun noticed that process rank 3 with PID 0 on node song-desktop exited on signal 11 (Segmentation fault).--------------------------------------------------------------------------
songyi719 is offline   Reply With Quote

Old   January 25, 2024, 05:35
Default
  #2
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 8
saeed jamshidi is on a distinguished road
In openfoam AMR only works with polyhedral cells. However, sharing your mesh maybe help to better discussion.

Regards
saeed jamshidi is offline   Reply With Quote

Old   January 25, 2024, 06:48
Default
  #3
Member
 
Song Young Ik
Join Date: Apr 2022
Location: South Korea
Posts: 59
Rep Power: 4
songyi719 is on a distinguished road
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 11
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.0262;

vertices
(
//lower plate
(-1 0 0)
(-0.707106 0.707106 0)
(0.707106 0.707106 0)
(1 0 0)
(-0.25 0 0)
(-0.25 0.25 0)
(0.25 0.25 0)
(0.25 0 0)
//upper plate
(-1 0 3)
(-0.707106 0.707106 3)
(0.707106 0.707106 3)
(1 0 3)
(-0.25 0 3)
(-0.25 0.25 3)
(0.25 0.25 3)
(0.25 0 3)

);

blocks
(
hex (4 7 6 5 12 15 14 13) (40 20 120) simpleGrading (1 1 1)
hex (4 5 1 0 12 13 9 8) (20 80 120) simpleGrading (1 1 1)
hex (5 6 2 1 13 14 10 9) (40 80 120) simpleGrading (1 1 1)
//hex (7 6 2 3 15 14 10 11) (20 80 120) simpleGrading (1 1 1) // vertex number rotate clockwise?
hex (2 6 7 3 10 14 15 11) (80 20 120) simpleGrading (1 1 1) //fixed version of upper one
);

edges
(
//lower plate
arc 0 1 45 (0 0 -1)
arc 1 2 90 (0 0 -1)
arc 2 3 45 (0 0 -1)
//upper plate
arc 8 9 45 (0 0 -1)
arc 9 10 90 (0 0 -1)
arc 10 11 45 (0 0 -1)
)

defaultPatch
{
name tank;
type wall;
}

boundary
(
sym
{
type symmetryPlane;
faces
(
(0 4 12 8)
(4 7 15 12)
(7 3 11 15)
)
}
tank
{
type wall;
faces
(
(0 1 9 8)
(1 2 10 9)
(2 3 11 10)

(0 4 5 1)
(4 5 6 7)
(1 2 6 5)
(2 3 7 6)

(8 12 13 9)
(12 13 14 15)
(9 10 14 13)
(10 11 15 14)
)
}
);


// ************************************************** *********************** //

This is my blockmeshdict file.
It divides into 4 blocks, with one square at center and curved blocks surrounding it.



I initially guessed it was because my mesh contains curved edge while defining blockmeshdict, but since cell itself doens't have curved edge, so I am doubtful about that possibility. When I run checkmesh, it shows that every cell are hexahedral. I used AMR on full hexahedral mesh before and it worked, so type of cell wouldn't be the problem, but maybe shape of the cell does. However, I can't find problem from my half-cylinder cell.
songyi719 is offline   Reply With Quote

Old   January 25, 2024, 07:28
Default
  #4
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 8
saeed jamshidi is on a distinguished road
Ok, what is your cells aspect ratio? Aspect ratio of 1 would be the best.

I couldn't run your blockMesh!

Quote:
saeedfoam@DESKTOP-TK3D7CI:/mnt/e/OpenFoam/Run/naca2412$ blockMesh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2112 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : _6e1fca0e-20220610 OPENFOAM=2112 patch=220610 version=2112
Arch : "LSB;label=32;scalar=64"
Exec : blockMesh
Date : Jan 25 2024
Time : 15:13:59
Host : DESKTOP-TK3D7CI
PID : 636
I/O : uncollated
Case : /mnt/e/OpenFoam/Run/naca2412
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Creating block mesh from "system/blockMeshDict"
Creating block edges


--> FOAM FATAL IO ERROR: (openfoam-2112 patch=220610)
Expected a '(' while reading VectorSpace, found on line 54: label 45


file: system/blockMeshDict.edges at line 54.

From bool Foam::Istream::readBegin(const char*)
in file db/IOstreams/IOstreams/Istream.C at line 118.

FOAM exiting
saeed jamshidi is offline   Reply With Quote

Old   January 25, 2024, 10:58
Default
  #5
Member
 
Song Young Ik
Join Date: Apr 2022
Location: South Korea
Posts: 59
Rep Power: 4
songyi719 is on a distinguished road
When I run checkmesh, it shows that max aspect ratio = -1, but I can't understand how one can have negative aspect ratio.



This is the image of my mesh, and I guess it will have actual max aspect ratio around 5 or something.
Attached Images
File Type: jpg 1.jpg (195.7 KB, 11 views)
songyi719 is offline   Reply With Quote

Reply

Tags
adaptive mesh refinement, blockmesh, cylinder


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] Cylinder mesh using blockMesh with m4 macro Lewis Liang OpenFOAM Meshing & Mesh Conversion 2 November 21, 2017 03:28
Unstructrued O-type Mesh of a cylinder with icoFoam kindle OpenFOAM Running, Solving & CFD 1 December 2, 2016 12:45
[ICEM] How to mesh for regular pentagonal cylinder using ICEM in 2D? ranjanrk ANSYS Meshing & Geometry 0 June 18, 2016 03:10
rotating cylinder using sliding mesh Tim Daly FLUENT 1 November 10, 2008 00:02
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09


All times are GMT -4. The time now is 11:00.