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

writeFormat and timeFormat in functions subDict in controlDict

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2015, 04:53
Default writeFormat and timeFormat in functions subDict in controlDict
  #1
Member
 
Karelke Yu
Join Date: Dec 2014
Posts: 96
Rep Power: 9
cfdopenfoam is on a distinguished road
deal foamers,

i am wondering if we can set the writeFormat and timeFormat in functions sub-dictionary in the controlDict.

the functionObjects i am using are faceSource and cellSource. and i test with
Code:
writeFormat bababa;
timeFormat bababa;
both not work. no error message. and the timeFormat and writeFormat set in controlDict seem not valid for data output by functionObject.

if there is a method to do this, please give me some hints.

thanks for your attention.
cfdopenfoam is offline   Reply With Quote

Old   November 8, 2015, 14:22
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,965
Blog Entries: 45
Rep Power: 126
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: I've checked the source code and those controls are not available independently for each function object.

As for the format... yeah, it's hard-coded to a specific format: https://github.com/OpenFOAM/OpenFOAM...jectFile.C#L39

Please report this in the bug tracker: http://www.openfoam.org/bugs/
wyldckat is offline   Reply With Quote

Old   November 20, 2015, 01:43
Default
  #3
Member
 
Karelke Yu
Join Date: Dec 2014
Posts: 96
Rep Power: 9
cfdopenfoam is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: I've checked the source code and those controls are not available independently for each function object.

As for the format... yeah, it's hard-coded to a specific format: https://github.com/OpenFOAM/OpenFOAM...jectFile.C#L39

Please report this in the bug tracker: http://www.openfoam.org/bugs/
thanks for your reply. too much current work made this belated.

i will report it right now.
cfdopenfoam is offline   Reply With Quote

Old   March 5, 2021, 08:29
Default
  #4
Senior Member
 
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 102
Rep Power: 6
lukasf is on a distinguished road
Hi,


have there been any changes for the most recent versions?


I found a source for OpenFOAM V2006

(https://www.openfoam.com/documentati...8H_source.html)


which says to use


Code:
     surfaces 
     {
 
         type            surfaces;
 
         fields          ( p );
 
         surfaceFormat   boundaryData;
 
         formatOptions
 
         {
 
             boundaryData
 
             {
 
                 format  binary;
 
             }
 
         }
 
         surfaces
 
         {
 
             outlet
 
             {
 
                 type            patch;
 
                 patches         (outlet);
 
                 interpolate     false;
 
             }
 
         }
 
     }
but it does not work for v1902 (the files are still in ASCII format).

I found the file OpenFOAM-v1912/tutorials/incompressible/pimpleFoam/LES/vortexShed/system/controlDict

in which the same code is used for ensight. It works for e.g. the ensight format but not for boundaryData which is just written in ASCI.

Code:
    cuttingPlane
    {
        type            surfaces;
        libs            (sampling);
        writeControl    timeStep;
        writeInterval   1;
        timeStart       0;

        surfaceFormat   boundaryData; //ensight;
        formatOptions
        {
            boundaryData //ensight
            {
                format binary;
                collateTimes true;
            }
        }
        fields          (U);

        interpolationScheme cellPoint;

        surfaces
        (
            zNormal
            {
                type            cuttingPlane;
                planeType       pointAndNormal;
                pointAndNormalDict
                {
                    point       (0 0 -0.01);
                    normal      (0 0 1);
                }
                interpolate     false;
            }
        );
    }
I might give OpenFOAM V2006 a try.





Best regards,


Lukas

Last edited by lukasf; March 5, 2021 at 13:30. Reason: improving answer
lukasf is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forces not calculated when including a library in controlDict fusij OpenFOAM 2 May 13, 2011 07:25


All times are GMT -4. The time now is 18:57.