|
[Sponsors] |
Big jumps in pressure distribution over surface |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 17, 2023, 00:04 |
Big jumps in pressure distribution over surface
|
#1 |
New Member
Ben
Join Date: Feb 2023
Posts: 8
Rep Power: 3 |
Hello. I'm trying to analyse the flow over a semi-cylindrical structure. I have found that on the windward edge the pressure varies wildly between neighbouring cells, with the pressure increasing and decreasing rapidly in a non-physical manner. I was wondering what would be the cause of this error, and how I would go about fixing this. I'm using the LES Smagorinsky turbulence model, if that is relevant. Some screenshots are attached. Thanks.
|
|
May 17, 2023, 03:14 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello,
Have you meshed your case with snappyHexMesh? How does your STL look like? Yann |
|
May 17, 2023, 19:04 |
|
#3 |
New Member
Ben
Join Date: Feb 2023
Posts: 8
Rep Power: 3 |
Hi Yann,
Thanks for the quick response. I have meshed this case using snappyHexMesh. I believe my stl is of a decent quality but perhaps not, I've attached it to this reply (I've just changed the file type to .txt so I could attach it to this reply directly). Below is my snappyHexMeshDict: Code:
FoamFile { format ascii; class dictionary; object snappyHexMeshDict; } castellatedMesh on; snap on; addLayers off; mergeTolerance 1e-6; geometry { domain { type closedTriSurfaceMesh; file "Domain.stl"; regions { inlet {name inlet; } outlet {name outlet; } free {name free; } floor {name floor; } buildingWall {name buildingWall; } } } }; castellatedMeshControls { maxGlobalCells 20000000; maxLocalCells 2000000; minRefinementCells 0; resolveFeatureAngle 15; nCellsBetweenLevels 5; allowFreeStandingZoneFaces false; locationInMesh (0.123 0.123 0.123); features ( { file "Domain.eMesh"; level 0; } ); refinementSurfaces { domain { level (0 0); regions { floor { level (0 3); patchInfo { type wall; } } buildingWall { level (3 3); patchInfo { type wall; } } free { level (0 0); patchInfo { type patch; } } inlet { level (0 0); patchInfo { type patch; } } outlet { level (0 0); patchInfo { type patch; } } } } } } snapControls { nSmoothPatch 5; tolerance 2.0; nSolveIter 500; nRelaxIter 15; nFeatureSnapIter 50; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { layers { } relativeSizes true; expansionRatio 1.2; finalLayerThickness 0.5; minThickness 1e-3; featureAngle 30; nGrow 1; maxFaceThicknessRatio 0.5; nBufferCellsNoExtrude 0; nLayerIter 50; } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness -1; minVol 1e-13; minTetQuality 1e-15; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.05; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } writeFlags ( ); |
|
May 18, 2023, 09:42 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello Ben,
Thanks for sharing your files. The triangles on your STL are pretty elongated. Can you remesh your STL with smaller triangles? Something like the right cylinder part on this image: http://dawningresearch.org/img2/crea...aorticroot.png I cannot guarantee it, but I remember a Tips & Tricks session at an OpenFOAM conference where this exact problem was mentioned: elongated triangles on a curved STL surface caused weird pressure jumps even if the OpenFOAM mesh looked OK. Hope this helps, Yann |
|
May 18, 2023, 22:30 |
|
#5 |
New Member
Ben
Join Date: Feb 2023
Posts: 8
Rep Power: 3 |
Hi Yann,
Thanks for the suggestion. Unfortunately, I've remeshed and rerun the analysis with a refined stl file with no elongated triangles and the results have come back pretty much the same. However, I've done some more investigating and found that the values of nut vary in the same manner as pressure, changing rapidly along the surface (see image nut1). I then looked at how nut varies along the floor, and I was surprised to see that it changes drastically whenever the mesh size changes (see image nut2). Looking back at the building, it's clear that the varying nut occurs when there are changes in the size of the mesh elements (see image nut3). I'm assuming these changes are what's driving the varying pressure distribution. Would you (or anyone else) know why nut changes so drastically with mesh size? Is this an error or am I misinterpreting something? Below is a copy of my 0/nut file. Code:
FoamFile { format binary; class volScalarField; location "0"; object nut; } dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { buildingWall { type nutkWallFunction; value uniform 0; } inlet { type calculated; value uniform 0; } outlet { type calculated; value uniform 0; } free { type calculated; value uniform 0; } floor { type nutkWallFunction; value uniform 0; } } |
|
May 21, 2023, 06:28 |
|
#6 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33 |
Your surface is not smooth. Calculate the curvature and plot it - it will show you what’s going on.
With a smooth mesh it will be fine
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk Last edited by hjasak; May 21, 2023 at 06:50. Reason: Typo |
|
May 21, 2023, 18:34 |
|
#7 |
New Member
Ben
Join Date: Feb 2023
Posts: 8
Rep Power: 3 |
Hi Hrvoje,
Could you elaborate on how I would calculate curvature? And how I would generate a smooth mesh? Is snappyHexMesh able to do this or would I need some other tool? Thanks. |
|
May 24, 2023, 01:28 |
|
#8 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34 |
Quote:
This is most probably relevant as you can see that viscosity in this case is control volume dependent and you can see the jumps. The pressure follows the viscosity as you noted. Try the calculation without LES model and if these jumps disappear then it is the reason why this is happening. |
||
May 24, 2023, 01:41 |
|
#9 |
New Member
Ben
Join Date: Feb 2023
Posts: 8
Rep Power: 3 |
Hi Arjun,
I did actually try this model earlier using RANS as the turbulence model instead of LES. It gave me quite similar results and the jumps in pressure were still there, although they were slightly less pronounced due to the "smearing" RANS does. I haven't run the model without a turbulence model yet, and I agree with you that this would probably solve the problem. Unfortunately, the flow is most definitely turbulent given my wind speed, so a laminar analysis would be quite inaccurate. I was hoping to fix this issue in general too, not just for this particular case. I think at this point the best way to fix this issue would be with a better quality mesh. I've tried changing the minVolumeRatio parameter in snappyHexMesh dict, but I still get these sudden cell volume changes along the surface of the obstacle. Perhaps an external meshing tool like Salome is necessary. |
|
May 24, 2023, 03:35 |
|
#10 |
Senior Member
Join Date: Dec 2021
Posts: 207
Rep Power: 5 |
I would give cfMesh a try too, if you think the mesh is the culprit here. Your geometry looks simple enough that it won't take long to generate a decent mesh.
|
|
May 25, 2023, 04:21 |
|
#11 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34 |
Well the idea of laminar flow is to see if turbulent viscosity is causing it.
What you describe about the behaviour of turbulence models here makes sense because in LES the turbulent viscosity is function of velocity gradients and volume and in RANS models while control volume does not play direct role, the flow gradients certainly decide the turbulent viscosity. Now flow gradients do depend on the control volumes and aspect ration and skew etc. So I believe this is what is causing the jump in turbulent viscosity and correspondingly jumps in pressure. In the solvers that are Rhie and Chow based, many times this variation is reflected in momentum coefficient used in flux calculation and this causes this type of behaviour (Still can't say yet if this is really causing here but mostly seen this case cause in other simulations based on experience). Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure fields in FOAM, p field, total pressure, etc. | Tobi | OpenFOAM Post-Processing | 9 | March 25, 2022 01:33 |
Generate convective pressure fluctuation | Bananenflanke | CFX | 10 | May 12, 2021 18:33 |
static vs. total pressure | auf dem feld | FLUENT | 17 | February 26, 2016 13:04 |
pressure distribution in water flow, differences in icoFoam and COMSOL | deniggo | OpenFOAM Running, Solving & CFD | 14 | September 30, 2010 03:48 |
Gas pressure question | Dan Moskal | Main CFD Forum | 0 | October 24, 2002 22:02 |