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

snappyHexMesh multiRegion failure

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 2 Post By Rango

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 22, 2020, 03:20
Default snappyHexMesh multiRegion failure
  #1
New Member
 
Zicheng Li
Join Date: Dec 2019
Posts: 7
Rep Power: 4
Liz1219 is on a distinguished road
Hi All!

I use OF4Win 18.10 then i have a CHT test case that failed to generate the multiregion grid with snappyHexMesh.

Well,there are fluid and solid grid domains are ultimately required



there is fluid.stl



solid.stl



there is snappyHexMeshDict

HTML Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      snappyHexMeshDict;
}
castellatedMesh on;
snap            on;
addLayers       off;
geometry
{
    fluid.stl
    {
        type triSurfaceMesh;
		name fluid;
    }

	solid.stl
	{
	    type triSurfaceMesh;
		name solid;
	}
	inlet.stl
	{
	    type triSurfaceMesh;
		name inlet;
	}
	outlet.stl
	{
	    type triSurfaceMesh;
		name outlet;
	}
};
castellatedMeshControls
{
    maxLocalCells 1000000;
    maxGlobalCells 20000000;
    minRefinementCells 0;
    maxLoadUnbalance 0;
    nCellsBetweenLevels 1;
    features
    (
        {
            file "fluid.eMesh";
            level 2;
        }
		{
            file "solid.eMesh";
            level 3;
        }
	    {
            file "inlet.eMesh";
            level 2;
        }
	    {
            file "outlet.eMesh";
            level 2;
        }
    );
    refinementSurfaces
    {
        fluid
        {
            level (1 2);
			faceZone fluid;
            cellZone fluid;
            cellZoneInside inside;
			insidePoint (30 25 0);
        }
		solid
		{
			level (2 3);
		    faceZone solid;
            cellZone solid;
            cellZoneInside inside;
			insidePoint (120 25 0);
		}
		 inlet
		{

			level (1 2);
			patchInfo
			{
				type patch;
			}
		}
		outlet
		{
			level (1 2);
			patchInfo
			{
				type patch;
			}
		}
    }
    resolveFeatureAngle 30;
    refinementRegions
    {
    }
    locationInMesh (120 25 0);
    allowFreeStandingZoneFaces true;
}
snapControls
{
    nSmoothPatch 5;
    tolerance 1.0;
    nSolveIter 300;
    nRelaxIter 10;
    nFeatureSnapIter 5;
    explicitFeatureSnap false;
    multiRegionFeatureSnap false;
    implicitFeatureSnap true;
}
addLayersControls
{
    relativeSizes true;
    layers
    {
        "STL"
        {
            nSurfaceLayers 1;
        }
    }
    expansionRatio 1.0;
    finalLayerThickness 0.3;
    minThickness 0.1;
    nGrow 0;
    featureAngle 30;
    slipFeatureAngle 30;
    nRelaxedIter 3;
    nRelaxIter 3;
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedialAxisAngle 90;
    nMedialAxisIter 10;
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
    additionalReporting false;
}
meshQualityControls
{
    maxNonOrtho 65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minVol 1e-13;
    minTetQuality 1e-30;
    minArea -1;
    minTwist 0.02;
    minDeterminant 0.001;
    minFaceWeight 0.02;
    minVolRatio 0.01;
    minTriangleTwist -1;
    nSmoothScale 4;
    errorReduction 0.75;
    relaxed
    {
        maxNonOrtho 75;
    }
}
debug 0;
mergeTolerance 1e-6;
Howere ,there is no cell in my solid Zone



when i execute splitMeshRegions -cellZones -overwrite,it would generate a domain(blue) that i dont know how it got cut out.



And it makes me wonder and tired.Can anyone please guide me how to do

this? It would be a great help.

Thank you.
(Please send email to 2685306635@qq.com if you need mesh case folder)
Liz1219 is offline   Reply With Quote

Old   June 23, 2020, 03:45
Default Use topoSet / setSet
  #2
New Member
 
Thangasivam
Join Date: Sep 2012
Location: India
Posts: 5
Rep Power: 12
namsivag is on a distinguished road
Hello,


Try to use toposet. Follow the links to learn
https://www.youtube.com/watch?v=6bx1...iaQc3I&index=8

https://openfoamwiki.net/index.php/TopoSet

or
Try to use setSet. Follow the links to learn
https://www.youtube.com/watch?v=5PtNS1Nc_u0

https://openfoamwiki.net/index.php/SetSet

Cheers,
Sivam
namsivag is offline   Reply With Quote

Old   June 23, 2020, 10:39
Default
  #3
New Member
 
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 4
Rango is on a distinguished road
Hi,


Can you please share your snappyHexMesh log file? And also have you checked your "stl" files using "surfaceCheck" utiliy to see if they are closed?


Cheers
Rango is offline   Reply With Quote

Old   June 23, 2020, 10:56
Default
  #4
New Member
 
Zicheng Li
Join Date: Dec 2019
Posts: 7
Rep Power: 4
Liz1219 is on a distinguished road
Quote:
Originally Posted by namsivag View Post
thank u bro,but this is my SHM-multiRegion test case,i dont wanna use toposet or setset. we will going to use compliex model with SHM-multiRegion ,right?I wonder it will hard to solve by sotoposet or setset .
best wishes!
Liz1219 is offline   Reply With Quote

Old   June 24, 2020, 00:02
Default
  #5
New Member
 
Zicheng Li
Join Date: Dec 2019
Posts: 7
Rep Power: 4
Liz1219 is on a distinguished road
Quote:
Originally Posted by Rango View Post
Hi,


Can you please share your snappyHexMesh log file? And also have you checked your "stl" files using "surfaceCheck" utiliy to see if they are closed?


Cheers
Hi Rango!
i sure that my "stl"files are closed by "surfaceCheck".I huaven't seen any cell in my solid zone and this is my snappyhexmesh.log file.
thank u bro!
Best Wishes!
Attached Files
File Type: zip log.zip (166.7 KB, 8 views)
Liz1219 is offline   Reply With Quote

Old   June 25, 2020, 07:17
Default
  #6
New Member
 
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 4
Rango is on a distinguished road
Hi,

First, as the snappyHexMesh log shows, the cellZone detection goes a bit off and selects two cellZones: "Fluid" and "Fluid-out", which the later is "Solid" plus a portion of the fluid around.

Just a few point:
1) You should remove the edge feature refinement for the sphere solid from "features" part since a sphere does not have any edge.
2) The same applies to the inlet and outlet edge features since they have already been captured in the fluid edge feature!
3) Also you'd better not to define inlet and outlet (or in general any surface patch) as separate geometry regions.

I have shared a test case for your geometry (maybe with different dimensions) which does the job using OpenFOAM-5.x:
sphereMultiRegion_case


Cheers
MoCFD and Liz1219 like this.
Rango is offline   Reply With Quote

Old   June 30, 2020, 05:09
Default
  #7
New Member
 
Zicheng Li
Join Date: Dec 2019
Posts: 7
Rep Power: 4
Liz1219 is on a distinguished road
Quote:
Originally Posted by Rango View Post
Hi,

First, as the snappyHexMesh log shows, the cellZone detection goes a bit off and selects two cellZones: "Fluid" and "Fluid-out", which the later is "Solid" plus a portion of the fluid around.

Just a few point:
1) You should remove the edge feature refinement for the sphere solid from "features" part since a sphere does not have any edge.
2) The same applies to the inlet and outlet edge features since they have already been captured in the fluid edge feature!
3) Also you'd better not to define inlet and outlet (or in general any surface patch) as separate geometry regions.

I have shared a test case for your geometry (maybe with different dimensions) which does the job using OpenFOAM-5.x:
sphereMultiRegion_case


Cheers
thank u bro,thank u very much!I have benefits me a lot from your test case。
I get it!
Best wishes!
Liz1219 is offline   Reply With Quote

Old   March 5, 2021, 06:00
Default p_rgh devergence with chtMutiRegionFoam in first iteration
  #8
New Member
 
Zicheng Li
Join Date: Dec 2019
Posts: 7
Rep Power: 4
Liz1219 is on a distinguished road
Hi all! The p_rgh appeared "nan" when my case is solved with chtMultiRegionFoam for fluid region in first iteration.I tried many ways, but still couldn't solve it.Now, I am very upset then wishing lovely people can give me some pertinent advice.Vielen Dank!
Well ,these my codes of fluid.Have a look ,please.

mesh


field p
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location 0/domain;
object p;
}
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 101325;
boundaryField
{
domain_INLET
{
type calculated;
value $internalField;
}
domain_WALL
{
type calculated;
value $internalField;
}
domain_OUTLET
{
type calculated;
value $internalField;
}
domain_TOP
{
type calculated;
value $internalField;
}
domain_to_left
{
type cyclicAMI;
value $internalField;
}
domain_to_front
{
type cyclicAMI;
value $internalField;
}
domain_to_right
{
type cyclicAMI;
value $internalField;
}
domain_to_feet
{
type calculated;
value $internalField;
}
domain_to_shoe
{
type calculated;
value $internalField;
}
left_to_domain
{
type cyclicAMI;
value $internalField;
}
left_to_shoe
{
type calculated;
value $internalField;
}
front_to_domain
{
type cyclicAMI;
value $internalField;
}
front_to_shoe
{
type calculated;
value $internalField;
}
right_to_domain
{
type cyclicAMI;
value $internalField;
}
right_to_shoe
{
type calculated;
value $internalField;
}
}
field p_rgh
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location 0/domain;
object p_rgh;
}
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 101325;
boundaryField
{
domain_INLET
{
type fixedFluxPressure;
value $internalField;
}
domain_WALL
{
type fixedFluxPressure;
value $internalField;
}
domain_OUTLET
{
type uniformTotalPressure;
p0 $internalField;
}
domain_TOP
{
type fixedFluxPressure;
value $internalField;
}
domain_to_left
{
type cyclicAMI;
value $internalField;
}
domain_to_front
{
type cyclicAMI;
value $internalField;
}
domain_to_right
{
type cyclicAMI;
value $internalField;
}
domain_to_feet
{
type fixedFluxPressure;
value $internalField;
}
domain_to_shoe
{
type fixedFluxPressure;
value $internalField;
}
left_to_domain
{
type cyclicAMI;
value $internalField;
}
left_to_shoe
{
type fixedFluxPressure;
value $internalField;
}
front_to_domain
{
type cyclicAMI;
value $internalField;
}
front_to_shoe
{
type fixedFluxPressure;
value $internalField;
}
right_to_domain
{
type cyclicAMI;
value $internalField;
}
right_to_shoe
{
type fixedFluxPressure;
value $internalField;
}
}
field T
Quote:
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location 0/domain;
object T;
}
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
domain_INLET
{
type fixedValue;
value $internalField;
}
domain_WALL
{
type zeroGradient;
}
domain_OUTLET
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
domain_TOP
{
type zeroGradient;
}
domain_to_left
{
type cyclicAMI;
value $internalField;
}
domain_to_front
{
type cyclicAMI;
value $internalField;
}
domain_to_right
{
type cyclicAMI;
value $internalField;
}
domain_to_feet
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;
}
domain_to_shoe
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;
}
left_to_domain
{
type cyclicAMI;
value $internalField;
}
left_to_shoe
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;
}
front_to_domain
{
type cyclicAMI;
value $internalField;
}
front_to_shoe
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;
}
right_to_domain
{
type cyclicAMI;
value $internalField;
}
right_to_shoe
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;
}
}
field U
Quote:
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location 0/domain;
object U;
}
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
domain_INLET
{
type surfaceNormalFixedValue;
refValue uniform -3;
}
domain_WALL
{
type noSlip;
}
domain_OUTLET
{
type pressureInletOutletVelocity;
value $internalField;
}
domain_TOP
{
type noSlip;
}
domain_to_left
{
type cyclicAMI;
value $internalField;
}
domain_to_front
{
type cyclicAMI;
value $internalField;
}
domain_to_right
{
type cyclicAMI;
value $internalField;
}
domain_to_feet
{
type noSlip;
}
domain_to_shoe
{
type noSlip;
}
left_to_domain
{
type cyclicAMI;
value $internalField;
}
left_to_shoe
{
type noSlip;
}
front_to_domain
{
type cyclicAMI;
value $internalField;
}
front_to_shoe
{
type noSlip;
}
right_to_domain
{
type cyclicAMI;
value $internalField;
}
right_to_shoe
{
type noSlip;
}
}
field fvSchems
Quote:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system/domain";
object fvSchemes;
}
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
grad(U) Gauss linear;
}
divSchemes
{
default none;
div(div(phi,U)) Gauss linear;
div(phi,U) Gauss linearUpwindV grad(U);
div(phi,h) bounded Gauss upwind;
div(phid,p) bounded Gauss upwind;
div(phi,K) Gauss linear;
div(phi,k) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div(phi,R) bounded Gauss upwind;
div((rho*R)) Gauss linear;
div(R) Gauss linear;
div(U) Gauss linear;
div(phi,muTilda) Gauss linear;
div(phi,Ekp) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear uncorrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default uncorrected;
}
fluxRequired
{
default no;
p;
}
wallDist
{
method meshWave;
}
field fvSolution
Quote:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system/domain";
object fvSolution;
}
solvers
{
U
{
solver PBiCGStab;
smoother DILU;
preconditioner DILU;
tolerance 1e-6;
relTol 0.01;
nSweeps 2;
}
epsilon
{
solver PBiCGStab;
smoother DILU;
preconditioner DILU;
tolerance 1e-6;
relTol 0.01;
nSweeps 2;
}
h
{
solver PBiCGStab;
smoother DILU;
preconditioner DILU;
tolerance 1e-6;
relTol 0.01;
nSweeps 2;
}
k
{
solver PBiCGStab;
smoother DILU;
preconditioner DILU;
tolerance 1e-6;
relTol 0.01;
nSweeps 2;
}
p_rgh
{
solver GAMG;
smoother GaussSeidel;
preconditioner GaussSeidel;
tolerance 1e-6;
relTol 0.01;
nSweeps 2;
}
rho
{
solver smoothSolver;
smoother GaussSeidel;
preconditioner GaussSeidel;
tolerance 1e-5;
relTol 0.01;
nSweeps 2;
}
UFinal
{
$U;
relTol 0;
}
epsilonFinal
{
$epsilon;
relTol 0;
}
hFinal
{
$h;
relTol 0;
}
kFinal
{
$k;
relTol 0;
}
p_rghFinal
{
$p_rgh;
relTol 0;
}
rhoFinal
{
$rho;
relTol 0;
}
}
PIMPLE
{
momentumPredictor yes;
transonic no;
consistent no;
nOuterCorrectors 2;
nCorrectors 2;
nNonOrthogonalCorrectors 1;
residualControl
{
e 1e-3;
h 1e-3;
p 1e-2;
p_rgh 1e-3;
rho 1e-3;
t 1e-3;
turbulence 1e-3;
u 1e-4;
}
}
relaxationFactors
{
"p.*" 0.3;
p_rgh 0.3;
"rho.*" 0.1;
equations
{
"U.*" 0.7;
"h.*" 0.5;
"e.*" 0.5;
"(k|epsilon|omega|R|nuTilda|pollutant|epsilon) " 0.7;
T 0.5;
}
}
potentialFlow
{
nNonOrthogonalCorrectors 10;
PhiRefCell 0;
PhiRefValue 0;
}
cache
{
grad(U);
}
Thanks all!

Last edited by Liz1219; March 5, 2021 at 22:39.
Liz1219 is offline   Reply With Quote

Reply

Tags
multiregion, snappyhexmesh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[snappyHexMesh] Doubts regarding the use of snappyHexMesh for multiregion meshing Shibi OpenFOAM Meshing & Mesh Conversion 4 October 22, 2021 11:38
[snappyHexMesh] Multiregion snappyhexmesh obiscolly50 OpenFOAM Meshing & Mesh Conversion 0 April 18, 2019 00:51
snappyHexMesh axisymmetric multiRegion Henning86 OpenFOAM Running, Solving & CFD 0 October 23, 2014 12:05
[snappyHexMesh] SnappyHexMesh and MultiRegion - get regions from Salome to OF dzi OpenFOAM Meshing & Mesh Conversion 2 September 4, 2014 10:04
Simulation of SnappyHexMesh multiregion nithishgupta OpenFOAM Running, Solving & CFD 0 June 24, 2014 05:31


All times are GMT -4. The time now is 04:55.