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

Problem tool: Snip calculating mass flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2013, 10:47
Default Problem tool: Snip calculating mass flow
  #1
New Member
 
Join Date: Jul 2013
Posts: 14
Rep Power: 13
Kenna is on a distinguished road
Hi everyone,

I found a tool called "Snip calculating mass flow" for calculating the mass flow through patches for every time step.
It is explained here:
http://openfoamwiki.net/index.php/Sn...ting_mass_flow
Originally from here:
http://www.cfd-online.com/Forums/openfoam-solving/58109-calculation-integral-boundary-values.html

I use OpenFOAM 2.2.0 and wanted to add this tool in my custom compressibleTwoPhaseEulerFoam-Solver.

I tried to follow the step explained in the first link, but I might interpreted some instructions wrong:

- I created the calculatee massFlux.H and the buildGlobalBoundaryList.H (from the first Link) in the main folder of the solver. - Next to createFields.H etc.

- I included those files in the compressibleTwoPhaseEulerFoam.C like this:
Code:
#include "fvCFD.H"
#include "MULES.H"
#include "subCycle.H"
#include "rhoThermo.H"
#include "nearWallDist.H"
#include "wallFvPatch.H"
#include "fixedValueFvsPatchFields.H"
#include "Switch.H"

#include "SortableList.H" //mass flow calculation

#include "IFstream.H"
#include "OFstream.H"

#include "phaseModel.H"
#include "dragModel.H"
#include "heatTransferModel.H"
#include "kineticTheoryModel.H"

#include "pimpleControl.H"

#include "IOMRFZoneList.H"



// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{
    #include "setRootCase.H"

    #include "createTime.H"
    #include "createMesh.H"

    #include "readGravitationalAcceleration.H"
    #include "createFields.H"

    #include "createMRFZones.H"
    #include "readPPProperties.H"
    #include "initContinuityErrs.H"
    #include "readTimeControls.H"
    #include "CourantNos.H"
    #include "setInitialDeltaT.H"

    #include "buildGlobalBoundaryList.H" //mass flow calculation


    pimpleControl pimple(mesh);

    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    Info<< "\nStarting time loop\n" << endl;
- At the end of the same file put this:
Code:
        #include "write.H"
    #include "computeMassFlux.H" //mass flow calculation.

        Info<< "ExecutionTime = "
            << runTime.elapsedCpuTime()
            << " s\n\n" << endl;
If I try "wmake" or "./Allwmake" in the console it says:
Code:
my3_compressibleTwoPhaseEulerFoam.C:77:65: schwerwiegender Fehler: buildGlobalBoundaryList.H: Datei oder Verzeichnis nicht gefunden
Kompilierung beendet.
or translated:
Code:
my3_compressibleTwoPhaseEulerFoam.C:77:65: critical Error: buildGlobalBoundaryList.H: Data or file not found.
stopped compiling.
I don't understand where computeMassFlux.H should even exist.

I tried quite a while to understand it but I am making no progress. I would apprciate your help.
Sincerely Kenna
Kenna is offline   Reply With Quote

Reply

Tags
mass flow, snip calculating


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
is there a post processing keyword for obtaining mass flow rate and total mass? immortality OpenFOAM Post-Processing 29 July 6, 2013 02:08
combustion problem mcnair CFX 9 March 22, 2011 15:06
Problem of mass conservation in multispecies flow in porous media and T° gradient pilou FLUENT 0 January 31, 2011 09:19
Problem for Mass flow average in Post... ST CFX 2 October 27, 2005 14:35
Mass Flow Rate Conservation Problem philippe FLUENT 8 May 5, 2003 12:43


All times are GMT -4. The time now is 06:26.