|
[Sponsors] |
August 18, 2023, 11:44 |
PLIC and 2-1 constraint
|
#1 |
Member
|
Hi Foamers,
I am working on a openfoam (Foundation, openfoam 10) case with multiphase water and air. I am now at a point where I got first results and now I want to improve especially the surface of the interface. The resulution of the surface is very bad especially next to some walls, the refinement and especially at an NCC rotating mesh which leads to an 45 degree angle between mesh & interface flow at some time steps. I read that the PLIC/MPLIC is a big improvement related to such refinement patterns. Therefore I tried to use it in my case but without success. In my last few tries I always get this error message: log.interfoam, Celllevel does not satisfy 2:1 constraint: Code:
Create mesh for time = 0 patchToPatch: Calculating couplings between 12409 source faces and 12409 target faces Source min/average/max coverage = 1/1/1 Target min/average/max coverage = 1/1/1 Source average openness/error/depth/angle = 9.16580354401e-17/6.69305003365e-15/3.40900945691e-15/3.08058343284e-07 Source max openness/error/depth/angle = 5.87708315685e-16/9.49461671876e-14/5.62411549512e-14/1.7075472925e-06 26336 couplings calculated in 1.217147s fvMeshStitcher: Connecting Cell min/avg/max openness = 0/5.81416459277e-17/3.44665579523e-16 Selecting fvMeshTopoChanger refiner [0] hexRef8 : Dumping cell as obj to "/home/benutzer/OpenFOAM/benutzer-10/run/HM150/HM15019/HM15019_Pelton_laminar_fine_test/processor0/cell_2133.obj" [0] hexRef8 : Dumping cell as obj to "/home/benutzer/OpenFOAM/benutzer-10/run/HM150/HM15019/HM15019_Pelton_laminar_fine_test/processor0/cell_2141.obj" [1] hexRef8 : Dumping cell as obj to "/home/benutzer/OpenFOAM/benutzer-10/run/HM150/HM15019/HM15019_Pelton_laminar_fine_test/processor1/cell_55.obj" [1] hexRef8 : Dumping cell as obj to "/home/benutzer/OpenFOAM/benutzer-10/run/HM150/HM15019/HM15019_Pelton_laminar_fine_test/processor1/cell_80.obj" [2] hexRef8 : Dumping cell as obj to "/home/benutzer/OpenFOAM/benutzer-10/run/HM150/HM15019/HM15019_Pelton_laminar_fine_test/processor2/cell_318.obj" [2] hexRef8 : Dumping cell as obj to "/home/benutzer/OpenFOAM/benutzer-10/run/HM150/HM15019/HM15019_Pelton_laminar_fine_test/processor2/cell_406.obj" [0] [0] [0] --> FOAM FATAL ERROR: [0] Celllevel does not satisfy 2:1 constraint. On face 6792 owner cell 2133 has refinement 2 neighbour cell 2141 has refinement 0 [0] [0] From function void Foam::hexRef8::checkRefinementLevels(Foam::label, const labelList&) const [0] in file polyTopoChange/polyTopoChange/hexRef8/hexRef8.C at line 4799. [0] FOAM parallel run aborting I asume it is related to the snappy meshing or the refinement process. Below is what I think is related to my problem. Feel free to ask for other files in the case you think it is related to somewhere else. I will sent them in a short time. The case I build up is oriented on the tutorial case of the "propeller". My Allrun script looks like this: ./Allrun: Code:
runApplication blockMesh runApplication surfaceFeatures ... ...some surFaceFeatureConvert... ... runApplication decomposePar -noFields runParallel snappyHexMesh -overwrite # --------------------------------------------------------------------- # SLIDING PATCH runParallel createBaffles -overwrite runParallel splitBaffles -overwrite # --------------------------------------------------------------------- # RENUMBER runParallel renumberMesh -noFields -overwrite # --------------------------------------------------------------------- # CREATE NON-CONFORMAL COUPLES runParallel createNonConformalCouples -overwrite nonCouple1 nonCouple2 runParallel checkMesh -allTopology -allGeometry -writeSets vtk # --------------------------------------------------------------------- # Copy the fields into the processor directories runApplication -a decomposePar -fields -copyZero # Run runParallel $(getApplication) Code:
topoChanger { type refiner; libs ("libfvMeshTopoChangers.so"); mover none; // How often to refine refineInterval 1; // Field to be refinement on field alpha.water; // Refine field in between lower..upper lowerRefineLevel 0.001; upperRefineLevel 0.999; // Have slower than 2:1 refinement nBufferLayers 1; // Refine cells only up to maxRefinement levels maxRefinement 1; // Stop refinement if maxCells reached maxCells 200000; // Flux field and corresponding velocity field. Fluxes on changed // faces get recalculated by interpolating the velocity. Use 'none' // on surfaceScalarFields that do not need to be reinterpolated. correctFluxes ( (phi none) (nHatf none) (rhoPhi none) (alphaPhi.water none) (ghf none) ); // Write the refinement level as a volScalarField dumpLevel true; } - surface of the stl file with surfaceCheck is ok. - controlDict: Code:
maxCo 0.5; maxAlphaCo 0.5; Code:
nCellsBetweenLevels 3; Code:
div(phi,alpha) Gauss PLIC interfaceCompression vanLeer 1; The case is running well with the simple interface compression without PLIC. checkMesh: Code:
***Max skewness = 5.80272181423, 2 highly skew faces detected which may impair the quality of the results ***Cells with small determinant (< 0.001) found, number of cells: 16 ***Concave cells (using face planes) found, number of cells: 23048 Best regards Michael |
|
August 21, 2023, 04:31 |
|
#2 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20 |
Hi Michael,
PLIC/MPLIC is not compatible with NCC, see https://bugs.openfoam.org/view.php?id=3999 Best regards, Jan |
|
August 21, 2023, 07:28 |
|
#3 |
Member
|
Hi Jan,
I suspected such a thing. Thanks for your reply. Seems like I have to look for some other solution. Best regards Michael |
|
Tags |
ncc, plic, refinement level |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Where PLIC stores the area of Interface in openfoam? | saicharan662000@gmail.com | OpenFOAM | 1 | January 7, 2022 00:00 |
PLIC in InterFOAM??? | lakshay26 | OpenFOAM Programming & Development | 18 | June 5, 2018 07:27 |
implementation of PLIC algorithm in ansys Fluent | Andrea1984 | FLUENT | 2 | April 24, 2012 06:11 |
I Need Source Code of PLIC method of Youngs | Kai Yan | Main CFD Forum | 6 | July 7, 2008 05:41 |
3-D PLIC (Piecewise-Linear Interface Construction) | Chih-Wei Chiu | Main CFD Forum | 0 | May 19, 2002 21:41 |