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

Issues with symmetry patches perpendicular to outlets

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2017, 17:34
Default Issues with symmetry patches perpendicular to outlets
  #1
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 9
sturgeon is on a distinguished road
I am using buoyantSimpleFoam to try and model simplified 2D atmospheric flow and convection driven by a heat source at surface level. I have been having issues therefore I have been reducing the case to a very simplified state before gradually adding elements back in. Currently, everything except the heat source is present, but I cannot get the case to solve.

The case is a 2D, rectangular domain, extending 10km vertically and 605km horizontally. I initialise the p and T fields using standard ISA equations (http://www.wxaviation.com/ISAweb-2.pdf), which I feel should initialise the model with good physical values. I use zeroGradient and fixedValue at the inlet to the left hand side for p_rgh and U respectively, and for the outlet, I use fixedValue and inletOutlet. For the upper boundary I use symmetry, and for the lower I use walls with slip condition. Initialised p and T look okay, so I think I have carried out this step fine:

p:



T:



I am really confused as to why I am getting errors, since these seem to be very standard boundary conditions and there are no obstacles or disturbances to the flow, so it should be very simple... in fact I am slightly confused that there are issues at all, since I initialise the U field with the same value as the inlet, so surely it should just converge immediately? I am very new to OpenFOAM but this seems like a trivial case. However, if I attempt to solve the case, it either immediately explodes, or if I massively relax it (default values divided by 1000) it will run for 50 or so iterations before exploding. About 20 time steps in, I have this:





Then before it crashes, I get:



So a velocity higher than the inlet and internal field has propagated back through the domain and causes a floating point error. I feel like it's an issue with the intersecting outlet and symmetry patches, since the odd backflow seems to start there. But I guess it could be the way I set my outlet boundary - but then I feel like the conditions I set are quite standard.

Here are my /0 files, with the internal field redacted to improve readability - as I said, I just initialise them with funkySetFields and the ISA equations.

T:

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      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   nonuniform List<scalar> 
605000
(
REDACTED
)
;

boundaryField
{
    inlet
    {
        type            groovyBC;
        refValue        nonuniform List<scalar> 
100
(
287.825000000000
287.175000000000
286.525000000000
285.875000000000
285.225000000000
284.575000000000
283.925000000000
283.275000000000
282.625000000000
281.975000000000
281.325000000000
280.675000000000
280.025000000000
279.375000000000
278.725000000000
278.075000000000
277.425000000000
276.775000000000
276.125000000000
275.475000000000
274.825000000000
274.175000000000
273.525000000000
272.875000000000
272.225000000000
271.575000000000
270.925000000000
270.275000000000
269.625000000000
268.975000000000
268.325000000000
267.675000000000
267.025000000000
266.375000000000
265.725000000000
265.075000000000
264.425000000000
263.775000000000
263.125000000000
262.475000000000
261.825000000000
261.175000000000
260.525000000000
259.875000000000
259.225000000000
258.575000000000
257.925000000000
257.275000000000
256.625000000000
255.975000000000
255.325000000000
254.675000000000
254.025000000000
253.375000000000
252.725000000000
252.075000000000
251.425000000000
250.775000000000
250.125000000000
249.475000000000
248.825000000000
248.175000000000
247.525000000000
246.875000000000
246.225000000000
245.575000000000
244.925000000000
244.275000000000
243.625000000000
242.975000000000
242.325000000000
241.675000000000
241.025000000000
240.375000000000
239.725000000000
239.075000000000
238.425000000000
237.775000000000
237.125000000000
236.475000000000
235.825000000000
235.175000000000
234.525000000000
233.875000000000
233.225000000000
232.575000000000
231.925000000000
231.275000000000
230.625000000000
229.975000000000
229.325000000000
228.675000000000
228.025000000000
227.375000000000
226.725000000000
226.075000000000
225.425000000000
224.775000000000
224.125000000000
223.475000000000
)
;
        refGradient     uniform 0;
        valueFraction   uniform 1;
        value           nonuniform List<scalar> 
100
(
  287.825000000000
287.175000000000
286.525000000000
285.875000000000
285.225000000000
284.575000000000
283.925000000000
283.275000000000
282.625000000000
281.975000000000
281.325000000000
280.675000000000
280.025000000000
279.375000000000
278.725000000000
278.075000000000
277.425000000000
276.775000000000
276.125000000000
275.475000000000
274.825000000000
274.175000000000
273.525000000000
272.875000000000
272.225000000000
271.575000000000
270.925000000000
270.275000000000
269.625000000000
268.975000000000
268.325000000000
267.675000000000
267.025000000000
266.375000000000
265.725000000000
265.075000000000
264.425000000000
263.775000000000
263.125000000000
262.475000000000
261.825000000000
261.175000000000
260.525000000000
259.875000000000
259.225000000000
258.575000000000
257.925000000000
257.275000000000
256.625000000000
255.975000000000
255.325000000000
254.675000000000
254.025000000000
253.375000000000
252.725000000000
252.075000000000
251.425000000000
250.775000000000
250.125000000000
249.475000000000
248.825000000000
248.175000000000
247.525000000000
246.875000000000
246.225000000000
245.575000000000
244.925000000000
244.275000000000
243.625000000000
242.975000000000
242.325000000000
241.675000000000
241.025000000000
240.375000000000
239.725000000000
239.075000000000
238.425000000000
237.775000000000
237.125000000000
236.475000000000
235.825000000000
235.175000000000
234.525000000000
233.875000000000
233.225000000000
232.575000000000
231.925000000000
231.275000000000
230.625000000000
229.975000000000
229.325000000000
228.675000000000
228.025000000000
227.375000000000
226.725000000000
226.075000000000
225.425000000000
224.775000000000
224.125000000000
223.475000000000
)
;
        valueExpression "288.15-0.0065*pos().y";
        gradientExpression "0";
        fractionExpression "1";
        evaluateDuringConstruction 0;
        variables       "";
        timelines       (
);
        lookuptables    (
);
        lookuptables2D  (
);
    }
    roof
    {
        type            symmetry;
		}
    outlet
    {
	        type            inletOutlet;
	        value           nonuniform List<scalar> 
100
(
287.825000000000
287.175000000000
286.525000000000
285.875000000000
285.225000000000
284.575000000000
283.925000000000
283.275000000000
282.625000000000
281.975000000000
281.325000000000
280.675000000000
280.025000000000
279.375000000000
278.725000000000
278.075000000000
277.425000000000
276.775000000000
276.125000000000
275.475000000000
274.825000000000
274.175000000000
273.525000000000
272.875000000000
272.225000000000
271.575000000000
270.925000000000
270.275000000000
269.625000000000
268.975000000000
268.325000000000
267.675000000000
267.025000000000
266.375000000000
265.725000000000
265.075000000000
264.425000000000
263.775000000000
263.125000000000
262.475000000000
261.825000000000
261.175000000000
260.525000000000
259.875000000000
259.225000000000
258.575000000000
257.925000000000
257.275000000000
256.625000000000
255.975000000000
255.325000000000
254.675000000000
254.025000000000
253.375000000000
252.725000000000
252.075000000000
251.425000000000
250.775000000000
250.125000000000
249.475000000000
248.825000000000
248.175000000000
247.525000000000
246.875000000000
246.225000000000
245.575000000000
244.925000000000
244.275000000000
243.625000000000
242.975000000000
242.325000000000
241.675000000000
241.025000000000
240.375000000000
239.725000000000
239.075000000000
238.425000000000
237.775000000000
237.125000000000
236.475000000000
235.825000000000
235.175000000000
234.525000000000
233.875000000000
233.225000000000
232.575000000000
231.925000000000
231.275000000000
230.625000000000
229.975000000000
229.325000000000
228.675000000000
228.025000000000
227.375000000000
226.725000000000
226.075000000000
225.425000000000
224.775000000000
224.125000000000
223.475000000000
)
;
        inletValue           nonuniform List<scalar> 
100
(
287.825000000000
287.175000000000
286.525000000000
285.875000000000
285.225000000000
284.575000000000
283.925000000000
283.275000000000
282.625000000000
281.975000000000
281.325000000000
280.675000000000
280.025000000000
279.375000000000
278.725000000000
278.075000000000
277.425000000000
276.775000000000
276.125000000000
275.475000000000
274.825000000000
274.175000000000
273.525000000000
272.875000000000
272.225000000000
271.575000000000
270.925000000000
270.275000000000
269.625000000000
268.975000000000
268.325000000000
267.675000000000
267.025000000000
266.375000000000
265.725000000000
265.075000000000
264.425000000000
263.775000000000
263.125000000000
262.475000000000
261.825000000000
261.175000000000
260.525000000000
259.875000000000
259.225000000000
258.575000000000
257.925000000000
257.275000000000
256.625000000000
255.975000000000
255.325000000000
254.675000000000
254.025000000000
253.375000000000
252.725000000000
252.075000000000
251.425000000000
250.775000000000
250.125000000000
249.475000000000
248.825000000000
248.175000000000
247.525000000000
246.875000000000
246.225000000000
245.575000000000
244.925000000000
244.275000000000
243.625000000000
242.975000000000
242.325000000000
241.675000000000
241.025000000000
240.375000000000
239.725000000000
239.075000000000
238.425000000000
237.775000000000
237.125000000000
236.475000000000
235.825000000000
235.175000000000
234.525000000000
233.875000000000
233.225000000000
232.575000000000
231.925000000000
231.275000000000
230.625000000000
229.975000000000
229.325000000000
228.675000000000
228.025000000000
227.375000000000
226.725000000000
226.075000000000
225.425000000000
224.775000000000
224.125000000000
223.475000000000
)
;
}
    coldWalls
    {
        type            zeroGradient;
    }
    hotWalls
    {
        type            zeroGradient;
    }
    defaultFaces
    {
        type            empty;
    }
}


// ************************************************************************* //
U:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1612+                                |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (5 0 0);

boundaryField
{
    inlet
    {
type fixedValue;
value $internalField;
    }
	
	    roof
    {
        type            symmetry;
    }
	
    outlet
    {
type zeroGradient;
    }
    coldWalls
    {
        type            slip;
    }
    hotWalls
    {
        type            slip;
    }
    defaultFaces
    {
        type            empty;
    }
}


// ************************************************************************* //
p_rgh:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  plus                                  |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
	    location    "0";
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 101325;

boundaryField
{

	
    inlet
{
		type zeroGradient;
		}
	    roof
    {	
        type            symmetry;
    }
	

outlet
{
				type fixedValue;
				value nonuniform List<scalar>
				100
				(101331.5
101319.5
101297
101263.5
101219
101163.5
101097.5
101021
100934
100837
100730
100613.5
100487
100351
100206
100051.15
99887.35
99714.95
99533.7
99343.85
99145.45
98938.75
98723.95
98501
98270.2
98031.7
97785.45
97531.7
97270.75
97002.55
96727.2
96444.9
96155.75
95860
95557.75
95249
94933.9
94612.65
94285.4
93952.2
93613.2
93268.55
92918.3
92562.55
92201.55
91835.4
91464.05
91087.75
90706.6
90320.7
89930.2
89535.15
89135.65
88731.9
88324
87911.9
87495.8
87075.9
86652.25
86224.9
85793.9
85359.4
84921.55
84480.45
84036.2
83588.9
83138.65
82685.5
82229.45
81770.65
81309.3
80845.45
80379.2
79910.65
79439.75
78966.6
78491.45
78014.35
77535.3
77054.4
76571.75
76087.45
75601.6
75114.15
74625.25
74135.1
73643.65
73150.95
72657.15
72162.3
71666.5
71169.85
70672.3
70173.9
69674.85
69175.3
68675.2
68174.5
67673.3
67121.9
)
;        
}

    coldWalls
    {
        type            fixedFluxPressure;
        gradient        uniform 0;
        value           uniform 101325;
    }
	
	 hotWalls
    {
        type            fixedFluxPressure;
        gradient        uniform 0;
        value           uniform 101325;
    }
	
	    frontAndBack
    {
        type            empty;
    }
	
	
	
}

// ************************************************************************* //
p:

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      [1 -1 -2 0 0 0 0];

internalField   nonuniform List<scalar> 
605000
(
REDACTED
)
;

boundaryField
{
    inlet
{
        type            calculated;
        value           nonuniform List<scalar> 
100
(
REDACTED
)
;
        valueExpression "101325*pow((1-0.0065/288.15*pos().y),5.2561)";
        evaluateDuringConstruction 0;
        variables       "";
        timelines       (
);
        lookuptables    (
);
        lookuptables2D  (
);
    
    }
    roof
    {
        type            symmetry;
		value uniform 26436.3;
    }
    outlet
    {
        type            calculated;
        value           nonuniform List<scalar> 
100
(
REDACTED
)
;
        valueExpression "101325*pow((1-0.0065/288.15*pos().y),5.2561)";
        evaluateDuringConstruction 0;
        variables       "";
        timelines       (
);
        lookuptables    (
);
        lookuptables2D  (
);
    
    }
    coldWalls
    {
        type            calculated;
		value uniform 101325;
    }
	
	 hotWalls
    {
        type            calculated;
		value uniform 101325;
    }
    defaultFaces
    {
        type            empty;
    }
}


// ************************************************************************* //
I am really not sure how to proceed from here... I can't find any posts on the forums or cases in the tutorials where people use domains large enough to need initialised like this, so I can't find anything to compare it to. Any advice or recommendations on how to get this case to solve properly would be massively appreciated.

EDIT: Whoops, just noticed my U for outlet is actually zeroGradient, from something I'd been trying earlier. However, the exact same thing happens with:

Code:
    outlet
    {
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;
    }
Which I find very strange since I thought this condition would prevent backflow? But ParaView clearly shows a backflow in the corner where the outlet meets the symmetry plane.
sturgeon is offline   Reply With Quote

Old   October 5, 2017, 12:19
Default
  #2
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 9
sturgeon is on a distinguished road
I feel like I've found something that may be indicative of the problem. I still can't figure it out, but hopefully someone will be able to use this to help:

Here's the vertical distribution of p_rgh across the outlet (orange) and a point close to the outlet (brown):



It is very similar, and closer we can see:



So throughout most of the domain, the point slightly upwind from the outlet has a pressure advantage over the outlet, which makes sense since there is a small flow passing to the outlet. However, right at the top, where outlet meets the symmetry plane:



So at the point where I am getting backflow, the two lines cross over, and the outlet has a pressure advantage compared to the point upwind. Again, this makes sense based on the results I am getting... however, this is not the pressure I defined for p_rgh at the outlet! Everywhere except the final two points are identical to that which I set in the boundary condition, but the last two cells have values higher than what I have set. It doesn't seem to matter what I set these values to - every face along the outlet has the correct values, but the final two, closest to the symmetry plane, adopt different values, which invariable causes issues which propagate back into the domain and causes the floating point errors.

Has anyone seen this behaviour before? Does anyone know what I can do to fix the problem? Thank you
sturgeon is offline   Reply With Quote

Old   October 9, 2017, 10:46
Default
  #3
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 9
sturgeon is on a distinguished road
Does anyone have any experience with this at all? If I set outlet to a constant value, it remains constant across the entire outlet, but this is physically incorrect and not what I'm trying to model. But when I try to specify values from an array, the last two adopt different values, causing issues with flow and the simulation breaks.

Please, if anyone has any advice at all I would be so grateful, I cannot make any progress with this and have been at it a very long time now.
sturgeon is offline   Reply With Quote

Reply


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
Cyclic boundaries in OF 21x morard OpenFOAM 25 May 13, 2013 23:35
[mesh manipulation] Mesh Manipulation Issues vishalsacharya OpenFOAM Meshing & Mesh Conversion 2 November 24, 2012 00:36
Changing patches vs changing mesh for multiple cases Greg Givogue OpenFOAM Running, Solving & CFD 0 March 7, 2011 17:37
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25
Properly using symmetry with both CFX and ANSYS workbench for a FSI analysis, help! Cirion0000 CFX 0 July 6, 2009 15:26


All times are GMT -4. The time now is 23:30.