|
[Sponsors] |
Write interval larger than 1 when using functions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 23, 2023, 05:50 |
Write interval larger than 1 when using functions
|
#1 |
New Member
Join Date: Nov 2023
Posts: 4
Rep Power: 3 |
Hi,
i want to calculate y+, Co and the wall shear stress and it works with the following controlDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | | | Generated by the CfdOF workbench for FreeCAD | | https://github.com/jaheyns/CfdOF | | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application pimpleFoam; startFrom startTime; startTime 0; stopAt endTime; deltaT 0.1; endTime 4.0; writeControl timeStep; writeInterval 1; purgeWrite 0; adjustTimeStep yes; maxCo 5.0; writeFormat ascii; writePrecision 8; runTimeModifiable true; libs ( // Needed for availability of porous baffle boundary in potentialFoam #include "turbulenceLib" ); functions {yPlus { type yPlus; libs (fieldFunctionObjects); writeControl writeTime; writeInterval 1; } Co1 { type CourantNo; libs ("libfieldFunctionObjects.so"); writeControl writeTime; writeInterval 1; } shearStress { type wallShearStress; libs ("libfieldFunctionObjects.so"); writeControl writeTime; writeInterval 1; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | | | Generated by the CfdOF workbench for FreeCAD | | https://github.com/jaheyns/CfdOF | | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application pimpleFoam; startFrom startTime; startTime 0; stopAt endTime; deltaT 0.001; endTime 4.0; writeControl timeStep; writeInterval 0.01; purgeWrite 0; adjustTimeStep yes; maxCo 5.0; writeFormat ascii; writePrecision 8; runTimeModifiable true; libs ( // Needed for availability of porous baffle boundary in potentialFoam #include "turbulenceLib" ); functions {yPlus { type yPlus; libs (fieldFunctionObjects); writeControl writeTime; writeInterval 0.01; } Co1 { type CourantNo; libs ("libfieldFunctionObjects.so"); writeControl writeTime; writeInterval 0.01; } shearStress { type wallShearStress; libs ("libfieldFunctionObjects.so"); writeControl writeTime; writeInterval 0.01; } } // ************************************************************************* // Code:
--> FOAM FATAL IO ERROR: (openfoam-2206) writeInterval < 1 for writeControl timeStep file: system/controlDict at line 16 to 72. From virtual void Foam::Time::readDict() in file db/Time/TimeIO.C at line 279. |
|
November 24, 2023, 05:04 |
|
#2 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20 |
from the documentation:
writeControlControls the timing of write output to file.
thus in case of timeStep for writeControl the interval must be an integer >= 1 |
|
November 24, 2023, 05:06 |
|
#3 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
You can choose different writeControl parameters. In your case, you chose timeStep. It means you will save data to disk every X time step. This interval is defined by the writeInterval parameter. If you have writeControl timeStep and writeInterval 5, data will be saved to disk every 5 time steps. Now, you chose writeInterval 0.1, but solver solves time steps, you cannot save data every 0.1 time step because this data does not exist. If you want to save data every 0.1s of physical time, you should use runTime or adjustableRunTime as writeControl. Check the user guide to know more about this: https://www.openfoam.com/documentati...output-control Cheers, Yann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The controlDict cannot control the write interval | sy2516 | OpenFOAM Programming & Development | 13 | March 6, 2017 15:53 |
[Helyx OS] Helyx-OS (GUI for SnappyHexMesh | elvis | OpenFOAM Community Contributions | 210 | January 30, 2017 19:57 |
Delta Functions within Ansys Mechanical | Stephen Waite | Structural Mechanics | 2 | July 29, 2013 09:56 |
Issue with write interval | haze_1986 | OpenFOAM | 0 | July 30, 2012 03:24 |
How to write DEFINE_UDS_FLUX functions?? | Greg Perkins | FLUENT | 0 | November 20, 2000 19:52 |