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

FanPressure BC direction reversal

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2017, 10:26
Default FanPressure BC direction reversal
  #1
New Member
 
Matt Houchin
Join Date: Mar 2017
Location: London
Posts: 11
Rep Power: 9
HouchinM is on a distinguished road
Hi FOAMers,

I am trying to set a fanPressure boundary condition within a ducted fan, using the createBaffles function to create two patches within a ducted fan casing.

I have created the baffles and assigned them as fanPressure boundaries in the p initial conditions as such:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
|*---------------------------------------------------------------------------*|
|* OpenFOAM for Windows 16.06 (v1)                                           *|
|* Built by CFD Support, www.cfdsupport.com (based on Symscape).             *|
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      binary;
    class       volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0;

boundaryField
{
    atmosphereBoundary
    {
        type            fixedValue;
        value           uniform 0;
    }
    ductWork
    {
        type            zeroGradient;
    }
    fanCasing
    {
        type            zeroGradient;
    }
    plenumWall
    {
        type            zeroGradient;
    }
    systemBoundary
    {
        type            fixedValue;
        value           uniform 0;
    }
    fanOutlet
    {
        type            fanPressure;
		fileName        "fanCurve";
		outOfBounds     clamp;
		direction       out;              // in | out
		p0              uniform 0;
		value           uniform 50;
		gamma			0;
    }
    fanInlet
    {
        type            fanPressure;
		fileName        "fanCurve";
		outOfBounds     clamp;
		direction       in;              // in | out
		p0              uniform 0;
		value           uniform -50;
		gamma			0;
    }
}
I cannot seem to reverse the direction of the fan by switching the direction within the p initial conditions file. Is the direction of the boundary condition reversible?

Regards,

Matt
HouchinM is offline   Reply With Quote

Old   December 11, 2017, 08:42
Default
  #2
New Member
 
Matt Houchin
Join Date: Mar 2017
Location: London
Posts: 11
Rep Power: 9
HouchinM is on a distinguished road
All,

I have found a solution to the above problem in case you are looking for a solution...

The direction of the fan can be switched by reversing the actions.sourceInfo.options variable from master to slave in the toposet dict:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
	{
		name 	fanSource;
		type	faceZoneSet;
		action 	new;
		source	searchableSurfaceToFaceZone;
		sourceInfo
		{
			surface triSurfaceMesh;
			name	baffle_1.stl;
		}
	}
	{
		name	fanSourceSlave;
		type	cellSet;
		action	new;
		source	faceZoneToCell;
		sourceInfo
		{
			name	fanSource;
			option	slave;
		}
	}
	{
		name		fanSourceFace;
		type		faceZoneSet;
		action		new;
		source		setsToFaceZone;
		sourceInfo
		{
			faceSet	fanSource;
			cellSet	fanSourceSlave;
		}
	}
);

// ************************************************************************* /
/
HouchinM 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
ERROR: Flow direction on the boundaries must not be tangential to the boundary. turbomax CFX 2 August 6, 2015 11:05
fanPressure BC pingat OpenFOAM Running, Solving & CFD 0 November 8, 2013 02:52
Changing inflow velocity direction deteriorates lift and drag ziggo FLUENT 3 July 24, 2013 08:39
[ICEM] Changing edge direction la7low ANSYS Meshing & Geometry 2 June 7, 2010 13:26
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15


All times are GMT -4. The time now is 13:39.