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

[swak4Foam] Massflow Conservation Error through faceSet using swakExpression

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   July 28, 2014, 14:30
Default Massflow Conservation Error through faceSet using swakExpression
  #1
New Member
 
Luke Weaver
Join Date: Apr 2013
Posts: 4
Rep Power: 13
lukeweaver is on a distinguished road
I'm trying to use an arbitrary "box" to calculate the flux around an actuator disc (reduced-order wind turbine model). However, the calculation for massflow over each surface is not being conserved.

The domain is a rectangular box with axial flow over a plane. The solver is simpleFoam.

The interior box is 80 x 160 x 160 m, and the surfaces are selected using the topoSet with slave cells and faceset as follows:

Code:
{
        name    north1SlaveCells;
        type    cellSet;
        action  new;
        source expressionToCell;
        sourceInfo
        {
            expression "(pos().x<=60 && pos().y>=20 && pos().y<=180 && pos().z>=20 && pos().z<=180)";
        }
}
{
        name    north1;
        type    faceSet;
        action  new;
        source  expressionToFace;
        sourceInfo
        {
            expression "(pos().x<=60 && pos().y>=20 && pos().y<=180 && pos().z>=20 && pos().z<=180)";
        }
}
This is done for all six sides (top, bottom,south,east,west). Here's three of the faceSets shown in paraView.

faceSet.jpg

Imagine the box fitting inside these three with the other three faceSets filling in the open space.

In the controlDict, I calculate the massflow:

Code:
PhiNorth1
        {
                type swakExpression;
                valueType faceSet;
                variables "direction=vector(0,1,0);dir=direction/mag(direction);";
                setName north1;
                //expression "U & Sf()";
                //expression "phi * flip()";
                expression "(U & direction) * area()";
                autoInterpolate true;
                accumulations (
                        sum
                        min //just for reference
                        max //just for reference
                );
                outputControlMode timeStep;
                outputInterval 10;
                verbose true;
        }
I used the swak tutorial angledDuctImplicitTransient files to build my topoSetDict and controlDict files.

I calculated the mass flow on each faceSet, and summing them should give Phi_In - Phi_Out = 0. After summing up the phi values on all faceSets, the values were Phi_In = 203,860 and sumPhi_Out 206,270, for a total difference of -2410.7 kg/s.

Any help/tips/explanations for this error?

EDIT: For the upstream and downstream faces, I use the U & Sf(). The phi*flip() condition didn't seem to work.
lukeweaver is offline   Reply With Quote

 

Tags
faceset, massflow, swak, toposet


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
Problem with massflow BC at inlet MrNavierStokes CFX 3 November 7, 2016 02:55
How to use "translation" in solidBodyMotionFunction in OpenFOAM rupesh_w OpenFOAM Running, Solving & CFD 5 August 16, 2016 04:27
Massflow rate at inlet and outlet different | conservation of mass manoj_nav OpenFOAM Verification & Validation 0 March 22, 2016 00:07
Massflow rate at inlet and outlet different | conservation of mass manoj_nav OpenFOAM Post-Processing 0 March 18, 2016 03:26
MassFlow Function? Absolute MassFlow? Failure in Caclulation eRzBeNgEl CFX 0 May 5, 2011 09:46


All times are GMT -4. The time now is 10:47.