|
[Sponsors] |
April 27, 2017, 11:56 |
Strange results and how to debug them
|
#1 |
Senior Member
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9 |
Hello,
I'm pretty sure I'm not the only one with this problem. I have set up a simulation (simpleFoam, pimpleFoam, pimpleDyMFoam) and it often looks like everything seems ok at first but very soon courant number jumps up and deltaT looks like 1e-9 or even lower. The residuals are all OK... When I interrupt the solver and check progress in paraFoam, there are usually just a few spots in the whole domain that claim to bear pressure and velocity about 1000+ times greater than expected. Sometimes I manage to get rid of that problem with some fiddling around but I never really know what I did and what's wrong. So, what's your suggestion where to start? (a similar topic from this forum would do for a start, but I couldn't find anything useful)... Thanks! |
|
April 27, 2017, 13:24 |
|
#2 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
I see two general problems:
- The mesh is not well adapted. Meshing is more a kind of art. Especial problematic are meshes form automatic mesh programs. Manual made meshes are often much better - In correct boundary conditions Your current problem: Are the pressure bearing spots always at the same place in the mesh? Then look what happens here. Are they moving? Look where they come from.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
April 28, 2017, 19:17 |
|
#3 | |
Senior Member
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9 |
I guess you're right, it looks like it's the mesh's fault... The spots are mostly on AMI faces and on sharp edges that didn't mesh well. I thought that wouldn't make too much trouble since this page says:
https://openfoam.org/release/2-3-0/non-conforming-ami/ Quote:
Are there any special tricks other than refinement for getting nice AMI faces and their edges? I'm meshing inlet pipe, impeller and volute of a pump, each model with a separate mesh. I could probably use the single region-approach and mesh everything in a single step, would that help with anything? I've been wrestling with snappyHexMesh for quite a while and I only got fair results with explicit feature refinement and refinement levels as low as 0, 1 and 2. Anything else produced junk meshes. Thanks for your help. |
||
April 29, 2017, 02:13 |
|
#4 | |
Senior Member
|
Quote:
I suggest to use refinement surfaces into SHM dict and specify them as cellZones and faceZones. This will give you a better starting mesh and you could reduce the problem. You can find how to do it on the openfoam userguide. Regards Sent from my ASUS_X008D using CFD Online Forum mobile app |
||
May 3, 2017, 18:54 |
|
#5 |
Senior Member
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9 |
Actually, I was going to ask about an explanation of cellZones, faceZones, etc. I can't seem to find very basic information like, for example, what's the difference between a patch and a faceZone...
Also, I'm confused about MRF and dynamic mesh. At the moment I have both MRF in fvOptions and dynamicMeshDict for mesh rotation. What's the point of having both? How can I run a simplified steady MRF case when there's a SRFSimpleFoam but not a MRF* solver? Thanks again! |
|
May 4, 2017, 01:14 |
|
#6 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
> difference between a patch and a faceZone
A face zone is some primitive version of a patch. A real patch can be defined while meshing, in particular you may choose it's form. A face zone is constructed from faces of the ready mesh. In some cases this is sufficient, when there is no need to describe the exact form and position.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
May 4, 2017, 07:49 |
|
#7 |
Senior Member
|
MRF used with fvOptions, as in your case, are used to perform a "Freeze rotor analysys".
Dynamic mesh is used to make the mesh rotate or others... So the first, it is a steady state analysys with a fixed position of the rotor and a extra momentum source given. Roughly speaking that's it . If you use simplefoam eg, std solver can't perform a transient analysys, so dynamicDict has no influence. If you use pimpleFoam eg, maybe fvOption could give problems, because that dictionary generates an extra momentum in your cellZone....i think that's the probable consequence Sent from my ASUS_X008D using CFD Online Forum mobile app |
|
May 4, 2017, 16:43 |
|
#8 |
Senior Member
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9 |
Thanks for your replies.
It seems after some investigation the problem is not connected with dynamic mesh or boundary conditions but within the mesh itself. I'm attaching a screenshot of a few cells that cause trouble. The thing is that I can't simplify the geometry any more and I have no idea how to make a better mesh. I can't just keep increasing the number of elements. |
|
May 5, 2017, 00:17 |
|
#9 |
Senior Member
|
How did you get to this conclusion? Have you checked the mesh?...by the way...I can't see trough your eyes, but sorry, with this picture i cant understand much...i can't read p values and I can't properly understand your domain set up..
Before moving to the numerics, have you triple checked your BC settings? Sent from my ASUS_X008D using CFD Online Forum mobile app |
|
May 5, 2017, 00:47 |
|
#10 | |
Senior Member
|
I suppose the red cell is upon a wall patch, but no layer added...is it correct?
And Quote:
Sent from my ASUS_X008D using CFD Online Forum mobile app |
||
May 5, 2017, 07:34 |
|
#11 |
Senior Member
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9 |
Yeah, sorry I obviously took on the spirit in which OF documentation is "written" where everything is assumed to be known or obvious
I'm attaching more screenshots of the model and meshes. Impeller is rotating and there are two AMI interfaces, suction pipe -- impeller inlet and impeller outlet -- volute. I (mostly) followed this tutorial, i guess you know it already: http://www.cfdsupport.com/Turbomachi...l/node159.html I can't run the simulation anymore so I can't give you more screenshots of the results. The picture posted above is a zoom-in on the bottom side of the impeller. Both pressure and velocity seem OK everywhere in the whole domain but in those spots values jump by a factor of +/- 1 000 for velocity and +/- 1 000 000 for pressure, all in those few neighbour cells. I'm not adding layers (yet) since they're not exactly required and I have enough problems already without them. I also turned turbulence modeling off for the time being. Here are my boundary conditions: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { suction_inlet { type zeroGradient; } "(.+_walls|rotating_volute)" { // impeller_walls // volute_walls // suction_walls type zeroGradient; } ".+ami." { // impeller_inlet_ami // impeller_outlet_ami // volute_ami type cyclicAMI; value $internalField; //lowWeightCorrection 0.2; } volute_outlet { type fixedValue; value uniform 0; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { suction_inlet { type fixedValue; value uniform (0 -5.5 0); } "(.+_walls|rotating_volute)" { // impeller_walls // volute_walls // suction_walls type noSlip; } ".+ami." { // impeller_inlet_ami // impeller_outlet_ami // volute_ami type cyclicAMI; value $internalField; lowWeightCorrection 0.2; } volute_outlet { type zeroGradient; } } // ************************************************************************* // |
|
May 5, 2017, 14:03 |
|
#12 |
Senior Member
|
If I were you, I should work mainly on the mesh to have good response from checkmesh utility.
Then, in case work on the bc. One dummy error is not to set as not rotating AMI patches. Then triple check bc, try to change them. Then, go to numerical schemes. Good luck. Sent from my ASUS_X008D using CFD Online Forum mobile app |
|
May 11, 2017, 15:09 |
|
#13 |
Senior Member
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9 |
so yes, i took some time to do a gazillion of meshing experiments and it indeed is a mesh problem. i even managed to make it work once or twice but i still can't create a proper mesh (a.k.a. know what i'm doing).
i guess i got the answer for this thread, but my problems stay... thanks for your help. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|