|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Jan Majcher
Join Date: Nov 2018
Posts: 39
Rep Power: 7 ![]() |
Hi all,
I am trying to run a simulation, where a timeStep is 0.1, the output is saved each 500 time steps (meaning 50s). Additionally, I want to have averages of all the fields each 100 seconds (therefore the average should be calculated each 1000 timeSteps. My timeEnd is 1000, meaning that I want 10 averages (each 100 seconds). I need to admit that I totally don't get the restartOnRestart restartOnOutput periodicRestart fields, even after reading the documentation. restartOnRestart seems totally non-intuitive to me, restartOnOutput means that averaging is restarted upon every output I guess and periodicRestart should restart the averaging every x seconds. Are periodicRestart units in timeStep units or rather simulation run time? E.g. if I set it as 100, will it restart every 100 timeSteps or rather 100 s of sim runtime? I realise that these are quite basic questions, but I got lost after multiple attempts. Here is my control dict, which unfortunately doesn't serve the purpose. Any suggestions how should I amend it? Thanks a million to anyone willing to help. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application pimpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 1000; deltaT 0.1; writeControl timeStep; writeInterval 500; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { wallShearStress1 { // Mandatory entries (unmodifiable) type wallShearStress; libs ("libfieldFunctionObjects.so"); // Optional entries (runtime modifiable) patches ("barkley"); // Optional (inherited) entries writePrecision 8; writeToFile true; useUserTime true; enabled true; log true; timeStart 0; timeEnd 1000; executeControl timeStep; executeInterval 1; writeControl timeStep; writeInterval 500; } fieldAverage1 { type fieldAverage; libs ("libfieldFunctionObjects.so"); writeControl writeTime; //maybe timeStep instead? restartOnRestart false; restartOnOutput false; periodicRestart true; restartPeriod 100; fields ( U { mean on; prime2Mean off; base time; //maybe timeStep? window 100.0; //maybe 1000 with timeStep as base? windowName w1; } p { mean on; prime2Mean off; base time; window 100.0; windowName w1; } k { mean on; prime2Mean off; base time; window 100.0; windowName w1; } epsilon { mean on; prime2Mean off; base time; window 100.0; windowName w1; } wallShearStress { mean on; prime2Mean off; base time; window 100.0; windowName w1; } ); } } // ************************************************************************* // Last edited by MaySea; September 24, 2020 at 11:52. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Sep 2020
Posts: 3
Rep Power: 5 ![]() |
Been having a similar issue with the averaging, anyone able to resolve this for me?
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Jan Majcher
Join Date: Nov 2018
Posts: 39
Rep Power: 7 ![]() |
Hi,
I am still having the problem. Code:
fieldAverage1 { type fieldAverage; libs ("libfieldFunctionObjects.so"); executeControl timeStep; executeInterval 1; writeControl adjustableRunTime; writeInterval 100; restartOnRestart false; restartOnOutput false; periodicRestart true; restartPeriod 100; fields ( U { mean on; prime2Mean off; base time; window 100.0; windowName w100; allowRestart true; } p { mean on; prime2Mean off; base time; window 100.0; windowName w100; allowRestart true; } k { mean on; prime2Mean off; base time; window 100.0; windowName w100; allowRestart true; } omega { mean on; prime2Mean off; base time; window 100.0; windowName w100; allowRestart true; } wallShearStress { mean on; prime2Mean off; base time; window 100.0; windowName w100; allowRestart true; } ); } } Thanks, Jan |
|
![]() |
![]() |
![]() |
Tags |
averaging, controldict, functions, openfoam 6 |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about symmetry in Autodesk Cfd 2016 | ecto | Autodesk Simulation CFD | 0 | October 20, 2015 04:16 |
small question about the functionalities of topological changes in OpenFoam | ngj | OpenFOAM Running, Solving & CFD | 2 | February 28, 2013 10:02 |
Question Re Engineering Data Source | imnull | ANSYS | 0 | March 5, 2012 13:51 |
internal field question - PitzDaily Case | atareen64 | OpenFOAM Running, Solving & CFD | 2 | January 26, 2011 15:26 |
Poisson Solver question | Suresh | Main CFD Forum | 3 | August 12, 2005 04:37 |