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

Change file and directory output structure for OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By rushs777

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 15, 2015, 17:26
Default Change file and directory output structure for OpenFOAM
  #1
New Member
 
Túlio Abreu Cardinal
Join Date: Oct 2015
Location: RS, Brazil
Posts: 3
Rep Power: 10
ThuliumC is on a distinguished road
Hello

I would like to have the output of OpenFOAM files and directories modified and I don't know where to get started.
The solver used for the cases is a settMixingFoam, a modified version of twoLiquidMixingFoam.
The file structure I would like to have is binary volScalarField with no header and no trailer for all fields. And the directory structure I wold like to have is one directory per field, one file per time (not one directory per time, one file per field; as is the default); all inside another directory (e.g. data). For example, the file "$FOAM_RUN/case/14/alpha1" could be "$FOAM_RUN/case/data/alpha1/014".

So I wold like to know:
Is it reasonable to write the directories in this format or is it preferable to change the structure after the case is run?
Is it possible to write and read the velocity field U (volVectorField) as Ux, Uy, Uz (volScalarField)? I believe modifying the files after the case is run would have a significant cost for processing and data storage.
Is it reasonable to write and read binary files without the header and trailer or is it preferable to remove the headers and trailers after the case is run? I believe it would be better to write the files with no headers and trailers, as this could take a significant time to write.
How do I remove the headers and trailers from binary files? I have a case that was already run and I need to do the post processing now.

Thank you


Here is an example of the header I refer to:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      binary;
    class       volScalarField;
    location    "6";
    object      alpha1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   nonuniform List<scalar>
1182465
("
Here is an example of the trailer I refer to:
Code:
        valueExpression "0";
        gradientExpression "alpha1*Res";
        fractionExpression "0";
        evaluateDuringConstruction 0;
        variables       "Res=-1600;";
        timelines       (
);
        lookuptables    (
);
    }
    frontBack
    {
        type            empty;
    }
}


// ************************************************************************* //
ThuliumC is offline   Reply With Quote

 

Tags
binary, directory, file, output, volscalarfield


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
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 08:46
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 17:18
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 06:42
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 11:46


All times are GMT -4. The time now is 07:04.