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

disable solver output openfoam..use writeRegisteredObject to write only certain field

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2018, 20:42
Default disable solver output openfoam..use writeRegisteredObject to write only certain field
  #1
New Member
 
MASc Student
Join Date: Sep 2016
Posts: 25
Rep Power: 10
New-to-CFD is on a distinguished road
Hello all...I am trying to disable output from the openfoam solver, and use a writeRegisteredObject function in the controlDict to only output one field (p). I am doing this because I don't need the rest, and it's taking up too much memory.

I have pasted my controlDict below...I have changed my writeinterval to a very large value to disable solver output, and included the function however I am not getting any output at all now when I run the solver?

Anyone have an idea what I can change? I want to output the results of p every 0.05s

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.3 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
location "system";
class dictionary;
object controlDict;
}

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

application olaFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 60;

deltaT 0.001;

writeControl adjustableRunTime;

writeInterval 100;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;
adjustTimeStep on;

maxCo 0.99;
maxAlphaCo 0.99;

maxDeltaT 0.01;

functions
{
name4me
{
type writeRegisteredObject;
functionObjectLibs ( "libIOFunctionObjects.so" );
objectNames ("p");
outputControl timeStep;
outputInterval 1;
}
}
}
New-to-CFD is offline   Reply With Quote

Old   November 16, 2018, 16:56
Default
  #2
New Member
 
Chen Shen
Join Date: Sep 2018
Posts: 14
Rep Power: 8
Giantsda is on a distinguished road
libIOFunctionObjects is deprecated.
Use:

Code:
functions
{
  writeOptional
    {
        type        writeObjects;
        libs        ("libutilityFunctionObjects.so");
        writeControl    timeStep;
        writeInterval   1;
        objects     (U);
    }
}
reference:
https://github.com/OpenFOAM/OpenFOAM...c36fbd9fe9f1e4 Line 42


https://www.openfoam.com/documentati...teObjects.html



Chen
Giantsda is offline   Reply With Quote

Reply

Tags
controldict, field, openfoam, output data, writeregisteredobject


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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 12:58
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 06:29
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology wyldckat OpenFOAM 17 November 10, 2017 16:54
Sharing links for two phase solver packages developed by openfoam community swap_9068 OpenFOAM Programming & Development 1 April 2, 2017 06:43
[Helyx OS] Helyx-OS (GUI for SnappyHexMesh elvis OpenFOAM Community Contributions 210 January 30, 2017 19:57


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