|
[Sponsors] |
October 20, 2010, 11:59 |
sHM and cyclicGgi
|
#1 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
Hi Foamers,
when i want to run sHM, I get the following error message: Code:
Cannot handle coupled patch cyclicX of type cyclicGgi From function syncTools::getMasterFaces(const polyMesh&) in file meshes/polyMesh/syncTools/syncTools.C at line 352. FOAM aborting Aborted 1) Run blockMesh (creates the box) 2) run createPatch 3) run snappyHexMesh => crash i try to simulate the flow around a cylinder in a cuboid-box. the cylinder is placed near one side of the box to have an unsymmetric flow. so i use cyclicGgi to have a symmetric flow as i would have, if i had placed the cylinder right in the middle of the box. this is only a test case for me, because i would like to implement cyclicGgi in a case in which it is absolute necessary. have i done something wrong or it is not possible to use cyclicGgi and sHM in the same case? is cyclicGgi the rigth patch type or is cyclic better? what are the differences? as i am new in sHM and cyclic boundaries, any help is appreciated! My createPatchDict: Code:
matchTolerance 1E-3; pointSync true; patches ( { name cyclicX; type cyclicGgi; dictionary { type cyclicGgi; } constructFrom patches; patches (minX maxX);//("periodic.*"); } { name cyclicY; type cyclicGgi; dictionary { type cyclicGgi; } constructFrom patches; patches (minY maxY); } ); Code:
4 ( minZ { type patch; nFaces 100; startFace 5500; } maxZ { type patch; nFaces 100; startFace 5600; } cyclicX { type cyclicGgi; nFaces 400; startFace 5700; shadowPatch ; zone ; bridgeOverlap off; rotationAxis (0 0 1); rotationAngle 0; separationOffset (0 0 0); } cyclicY { type cyclicGgi; nFaces 400; startFace 6100; shadowPatch ; zone ; bridgeOverlap off; rotationAxis (0 0 1); rotationAngle 0; separationOffset (0 0 0); } ) |
|
October 20, 2010, 17:07 |
|
#2 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hello,
seems to me that SHM does not handle cyclic boundaries. You should change steps 2 and 3: 1) create the surrounding coarse mesh with blockMesh 2) apply SHM 3) apply createPatch to make the appropriate patches cyclic Hope that helps. Please keep us posted how it is working out. Regards Markus |
|
October 21, 2010, 04:58 |
|
#3 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
thanks for your reply, markus.
i´ve changed steps 2 and 3, and it works. but when i want to run simpleFoam, i get the following error-message: Code:
Reading field p inconsistent patch and patchField types for patch type cyclicGgi and patchField type cyclicGGi file: /srv/fabor/snap-Test-Zyl_cyclic_2/0.03/p::cyclicX from line 47 to line 47. From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&) in file /usr/local/opt/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude/newFvPatchField.C at line 140. FOAM exiting Code:
dimensions [0 2 -2 0 0 0 0]; internalField uniform 100000; boundaryField { minZ { type fixedValue; value uniform 100000; } maxZ { type zeroGradient; } Zylinder_Zylinder { type zeroGradient; } cyclicX { type cyclicGGi; } cyclicY { type cyclicGGi; } } |
|
October 21, 2010, 09:02 |
|
#4 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
the mistake of the last post was only a mistake in writing the patch names.
but i haven´t get my case running... my steps are: 1)blockMesh 2)sHM 3)createPatch 4)copy the p,U,...-files into last directory 5)run simpleFoam => crash: Code:
Create time Create mesh for time = 0.04 Reading field p Reading field U Reading/calculating face flux field phi Segmentation fault so the mistake must be related to createPatch/simpleFoam any help is much appreciated! |
|
October 22, 2010, 05:35 |
|
#5 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hello,
you should try running the solver in DEBUG-mode to obtain more information. Markus |
|
October 26, 2010, 08:29 |
|
#6 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
Hi Markus,
unfortunately i dont know how to run in debug.mode. i added the last line in simpleFoam-folder make/options: Code:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/turbulenceModels/RAS \ -I$(LIB_SRC)/transportModels \ -DFULLDEBUG -g -O0 \ then i´ve tried to run simpleFoam in my case-folder again to receive more information about the segmentation fault. but it crashs like before... can you give me a hint? thx |
|
October 26, 2010, 12:17 |
|
#7 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hi,
See http://openfoamwiki.net/index.php/Main_FAQ in 8.1 An application ends with a segmentation fault. What is wrong? ...To find out where this occurs make a separate copy of the OF-sources, recompile them with the swich WM_COMPILE_OPTION set to Debug (just uncomment the right lines in the bashrc/cshrc files). This makes OF run slower, but accesses to List<> etc are checked for ranges and the program aborts if you access outside of a range (plus you get a stack trace). This won't solve your problem, but it will help you find out where it occurs. See also General debugging tips. For recompiling OpenFOAM look at Howto_compile_OpenFOAM Markus |
|
October 27, 2010, 09:31 |
|
#8 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
Thx for the answer.
i changed lines 92, 94 and 96 in bashrc (folder: OpenFOAM/OpenFOAM-1.5-dev/etc): Code:
# Compilation options (architecture, precision, optimised, debug or profiling) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ export WM_NCOMPPROCS=2 # WM_ARCH_OPTION = 32 | 64 : ${WM_ARCH_OPTION:=64}; export WM_ARCH_OPTION # WM_PRECISION_OPTION = DP | SP : ${WM_PRECISION_OPTION:=DP}; export WM_PRECISION_OPTION WM_COMPILE_OPTION = Opt | Debug | Prof : ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION : ${WM_COMPILE_OPTION:=Debug}; export WM_COMPILE_OPTION WM_JAVAC_OPTION = Opt | Debug : ${WM_JAVAC_OPTION:=Opt}; export WM_JAVAC_OPTION # WM_MPLIB = | OPENMPI| LAM | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI : ${WM_MPLIB:=OPENMPI}; export WM_MPLIB Code:
# Compilation options (architecture, precision, optimised, debug or profiling) # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ setenv WM_NCOMPPROCS 2 # WM_ARCH_OPTION = 32 | 64 if ( ! $?WM_ARCH_OPTION ) setenv WM_ARCH_OPTION 64 # WM_PRECISION_OPTION = DP | SP if ( ! $?WM_PRECISION_OPTION ) setenv WM_PRECISION_OPTION DP WM_COMPILE_OPTION = Opt | Debug | Prof if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Debug setenv WM_COMPILE_OPTION Opt setenv WM_COMPILE_OPTION Debug WM_JAVAC_OPTION = Opt | Debug if ( ! $?WM_JAVAC_OPTION ) setenv WM_JAVAC_OPTION Opt # WM_MPLIB = | OPENMPI | LAM | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI if ( ! $?WM_MPLIB ) setenv WM_MPLIB OPENMPI But the only output was that everything is up to date. In OpenFOAM-1.5-dev folder the same (see log). If i run simpleFoam in my case-directory, because nothing changed => segmentation fault. What am I doing wrong? Attached Allwmake log and bashrc/cshrc EDIT: Now I am compiling my debug-version of OF. I followed the instructions of http://www.cfd-online.com/Forums/ope...oam-1-6-a.html post #2. Last edited by FabOr; October 27, 2010 at 10:57. |
|
October 27, 2010, 17:52 |
|
#9 |
Senior Member
Markus Rehm
Join Date: Mar 2009
Location: Erlangen (Germany)
Posts: 184
Rep Power: 17 |
Hi Fabian,
you do not need to change the bashrc or cshrc (by the way you need only one of them - depending on the type of shell you have - so let us suppose your linux uses bash-shell like for example OpenSUSE does). What you do is: 1) Change the environment variable to debug export WM_COMPILE_OPTION=Debug (check it with echo $WM_COMPILE_OPTION) 2) source your bashrc again . ~/.bashrc this will run all the initialisation scripts for OF and set the right stuff for the Debug mode 3) rerun Allwmake as before but pay attention that the executables are written to /home/fabian/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linuxGccDPDebug/ usually it is written do *Opt 4) Run the solver again - to check which one you are using type which simpleFoam To reuse the Opt branch again do export WM_COMPILE_OPTION=Opt and source again. Hope that helps. Markus |
|
October 28, 2010, 05:43 |
|
#10 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
thank you very much. the debug mode works.
so, i´ve got the following error message: Code:
Create time Create mesh for time = 0.001 Reading field p Reading field U Reading/calculating face flux field phi attempt to access element from zero sized list From function UList<T>::checkIndex(const label) in file /home/fabian/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UListI.H at line 105. FOAM aborting Aborted Code:
// Check index i is within valid range (0 ... size-1). template<class T> inline void Foam::UList<T>::checkIndex(const label i) const { if (!size_) { FatalErrorIn("UList<T>::checkIndex(const label)") << "attempt to access element from zero sized list" << abort(FatalError); } else if (i<0 || i>=size_) { FatalErrorIn("UList<T>::checkIndex(const label)") << "index " << i << " out of range 0 ... " << size_-1 << abort(FatalError); } |
|
October 28, 2010, 06:24 |
|
#11 |
Member
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17 |
Hi,
can you post your current boundary file? I use shm with cyclics by just creating the whole mesh without ggi and changing the patch type in a last step in that file by hand (don't know whether createPatch would be an alternative) Best regards, -Thomas |
|
October 28, 2010, 09:27 |
|
#12 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
Hi Thomas,
constant/polyMesh/boundary: Code:
6 ( minX { type patch; nFaces 200; startFace 5500; } maxX { type patch; nFaces 200; startFace 5700; } minY { type patch; nFaces 200; startFace 5900; } maxY { type patch; nFaces 200; startFace 6100; } minZ { type patch; nFaces 100; startFace 6300; } maxZ { type patch; nFaces 100; startFace 6400; } ) 1/polyMesh/boundary: Code:
FoamFile { version 2.0; format ascii; class polyBoundaryMesh; location "0.001/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 5 ( minY { type patch; nFaces 200; startFace 5500; } maxY { type patch; nFaces 200; startFace 5700; } minZ { type patch; nFaces 100; startFace 5900; } maxZ { type patch; nFaces 100; startFace 6000; } cyclicX { type cyclicGgi; nFaces 400; startFace 6100; shadowPatch ; zone ; bridgeOverlap off; rotationAxis (0 0 1); rotationAngle 0; separationOffset (0 0 0); } ) That would be great! |
|
October 28, 2010, 16:01 |
|
#13 |
Member
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17 |
Hi FabOr,
if the second file was your actual one, following things are strange: - there is only one cyclicGgi entry; there should be two (for example "cyclicY") - not all subentries are filled in; you have to define the correct shadow patch (if the above was correct, the shadow patch entry in "cyclicX" should be "cyclicY") - your mesh has to have the corresponding face zones which you also have to define for example via faceSet - take care of the rotation angle; fill in the correct value for your case. I'll have a look whether I can find a very simple test case to demonstrate the setup. Meanwhile, you could search the net (I remember that I derived my setup from a presentation of a member of the turbomachinery SIG, but I don't remember the name...) Regards, -Thomas |
|
October 29, 2010, 04:58 |
|
#14 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
Hi,
thanks for your answer Thomas. Let me explain you what i want to do: I´ve got a stl-file which is implemented by snappyHexMesh in a simple Box(like in attached picture). Because of unsymmetry of the stl file(but its periodic) i want to have the influence of the opposite sites in the simulation=> minX/maxX and minY/maxY. The aim of the implementation of cyclicGgi is that i dont simulate only the stl-geomatry part, but lots of them by only computing one. i hope you understand me So i dont need a rotation axis or angle. but i am not sure anymore if cyclicGgi is the right patch-type. i hope you can tell me if i am right. regards |
|
November 1, 2010, 06:08 |
|
#15 |
Member
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17 |
Hi FabOr,
The link I mentioned above is http://www.tfd.chalmers.se/~hani/kurser/OS_CFD/case_study_2010_OP.pdf where you can find informations on setting up a ggi boundary for either cyclic or translational cases. I think ggi (not cyclicGgi!) will work for your case. You could start by taking the mesh of a tutorial case (like channel395), change it to your needs and then introduce the ggi instead of the standard cyclic bc to get an idea of the correct setup. Be aware that ggi only works in 1.5-dev. Best regards, -Thomas |
|
November 1, 2010, 06:09 |
|
#16 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
Hi,
i´ve got a working case with strange results. My steps: 1) blockMesh 2) sHM 3) faceSet for minX,maxX, minY and maxY (changes needed in faceSetDict) 4) setsToZones -noFlipMap 5) change the boundary-file 6) simpleFoam I´ve getting also an uncovered faces warning message: Code:
Create time Create mesh for time = 2.92 Reading field p Reading field U Reading/calculating face flux field phi Initializing the GGI interpolator between master/shadow patches: maxX/minX Evaluation of GGI weighting factors: From function void GGIInterpolation<MasterPatch, SlavePatch>::rescaleWeightingFactors() const in file /home/fabian/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/GGIInterpolationWeights.C at line 534 Uncovered faces found. On master: 800 on slave: 1064 Largest slave weighting factor correction : 0 average: 0 Largest master weighting factor correction: 0 average: 0 Initializing the GGI interpolator between master/shadow patches: minY/maxY Evaluation of GGI weighting factors: From function void GGIInterpolation<MasterPatch, SlavePatch>::rescaleWeightingFactors() const in file /home/fabian/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/GGIInterpolationWeights.C at line 534 Uncovered faces found. On master: 1064 on slave: 800 Largest slave weighting factor correction : 0 average: 0 Largest master weighting factor correction: 0 average: 0 Selecting incompressible transport model Newtonian Selecting RAS turbulence model laminar Starting time loop Due to the upload limit, i will send you the case-files and a paraview-picture of the strange results per email... Any help is much appreciated! |
|
November 2, 2010, 04:50 |
|
#17 |
Senior Member
Ralph Moolenaar
Join Date: Aug 2010
Location: 's-Hertogenbosch, the Netherlands
Posts: 120
Rep Power: 16 |
||
November 2, 2010, 04:55 |
|
#18 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
Hi Ralph,
I´ve read in other threads that Ggi is only implemented in the developer-version, short -dev. So it is not supported in the "normal" versions. http://www.cfd-online.com/Forums/ope...confusion.html Regards |
|
November 2, 2010, 05:01 |
|
#19 |
Member
Join Date: May 2010
Posts: 33
Rep Power: 16 |
Hi all,
as i reported i get strange results using cyclicGgi and ggi. Attached is a plot over line on the x-Axis. Because of using ggi-patch, i thought that on both sides the velocity should be equal!? When running simpleFoam i get a message that there are uncovered faces on master and slave patch. Can that cause the error? If yes, how can uncovered faces be avoided? best regards |
|
November 7, 2010, 07:27 |
|
#20 |
Member
Thomas Wolfanger
Join Date: Mar 2009
Location: South West Germany
Posts: 62
Rep Power: 17 |
Hi FabOr,
I've set up a simple channel flow case with cyclics which technically works (which does not mean it has any physical meaning...). Maybe this gives you some hints for your own setup... Good luck, -Thomas |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] combine blockMesh features cyclicGgi and mixingPlane with multiregion snappyHexMesh | AmRo | OpenFOAM Meshing & Mesh Conversion | 5 | June 8, 2016 07:36 |