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

Continuing field average in LES simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By Eman.
  • 1 Post By fumiya
  • 1 Post By Eman.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2017, 16:20
Default Continuing field average in LES simulation
  #1
Member
 
Join Date: Apr 2016
Posts: 34
Rep Power: 10
Eman. is on a distinguished road
Hi,


I am doing a large LES simulation with OF 2.2.1, therefore the simulation exceeds the wall time and I need to continue it multiple times. However, the problem is that every time that I restart it, it doesn't read the old values of my field averages so it starts averaging those fields all over again. Any ideas how this problem can be solved?

Thanks in advance.
Eman. is offline   Reply With Quote

Old   July 22, 2017, 00:44
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
In system.controldict use
Code:
startFrom       latestTime;
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 22, 2017, 07:33
Default
  #3
Member
 
Join Date: Apr 2016
Posts: 34
Rep Power: 10
Eman. is on a distinguished road
Quote:
Originally Posted by piu58 View Post
In system.controldict use
Code:
startFrom       latestTime;
thanks for the reply. Of course, I already did that. The simulation starts from the latest time but averaging is done all over again.
Eman. is offline   Reply With Quote

Old   July 29, 2017, 09:55
Default
  #4
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16
Bazinga is on a distinguished road
I did this in v. 4.x without any problems. Can you post the file?
Bazinga is offline   Reply With Quote

Old   July 29, 2017, 10:24
Default
  #5
Member
 
Join Date: Apr 2016
Posts: 34
Rep Power: 10
Eman. is on a distinguished road
Quote:
Originally Posted by Bazinga View Post
I did this in v. 4.x without any problems. Can you post the file?
Thanks a lot for the reply. I'm using 2.3 version and here is the ControlDict content:


Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
libs (
"libOpenFOAM.so"
"libsimpleSwakFunctionObjects.so"
"libswakFunctionObjects.so"
"libgroovyBC.so"
);


application pimpleFoam;

startFrom latestTime;

//startTime 0;

stopAt endTime;

endTime 10;

deltaT 2e-06;

writeControl timeStep;

writeInterval 500;

purgeWrite 50;

writeFormat ascii;

writePrecision 6;

writeCompression on;

timeFormat general;

timePrecision 6;

runTimeModifiable true;



functions
{
probes
{
type probes;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl timeStep;
outputInterval 1;

fields
(
p
);

probeLocations
(
( -0.016522372 -0.015013 0.020)
( -0.016522372 0.002985 0.020)
( -0.016522372 -0.015013 0.021)
( -0.016522372 0.002985 0.021)
( -0.016522372 -0.015013 0.022)
( -0.016522372 0.002985 0.022)



( -0.016522372 -0.014 0.020)
( -0.016522372 0.0018 0.020)
( -0.016522372 -0.014 0.021)
( -0.016522372 0.0018 0.021)
( -0.016522372 -0.014 0.022)
( -0.016522372 0.0018 0.022)





);

}





fieldAverage1
{
type fieldAverage;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl outputTime;

fields
(
U
{
mean on;
prime2Mean on;
base time;
}

p
{
mean on;
prime2Mean on;
base time;
}
);
}




surfaceSampling
{

type surfaces;

functionObjectLibs ("libsampling.so");
enabled true;
outputControl outputTime;

interpolationScheme cellPoint;

surfaceFormat vtk;

fields
(
U
p
UMean
pMean
);

surfaces
(
MainMidplane
{
//type plane;
//patches ( lowerWall );
//distance 1E-6;
//interpolate true;
//triangulate false;

type plane; // always triangulated
planeType pointAndNormal;
basePoint (-0.016522372 -0.01501396 0.0);
normalVector (1 0 0);
interpolate true;
}



SecondMidplane
{
//type plane;
//patches ( lowerWall );
//distance 1E-6;
//interpolate true;
//triangulate false;

type plane; // always triangulated
planeType pointAndNormal;
basePoint (-0.016522372 -0.00601399 0.0);
normalVector (0 1 0);
interpolate true;
}

);
}
}


// ************************************************** *********************** //
Eman. is offline   Reply With Quote

Old   July 29, 2017, 14:55
Default
  #6
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16
Bazinga is on a distinguished road
There are flags like "resetOnRestart" and "resetOnOutput" that you could use which would lead to the behavior you mentioned but I didn't see them added to your file.

I checked my old files from 2.4.0 where I think it worked as intended and the only difference I found is the output line where I have

writeControl writeTime;
writeInterval 1;

instead of

outputControl timeStep;
outputInterval 1;

I do not exactly know the difference between the two.

Also, I have time start set (timeStart) but I do not think that this makes the difference.

If I have some minutes later, I will try to check, if it continues the averaging after a restart of the simulation.
Bazinga is offline   Reply With Quote

Old   July 29, 2017, 15:18
Default
  #7
Member
 
Join Date: Apr 2016
Posts: 34
Rep Power: 10
Eman. is on a distinguished road
Quote:
Originally Posted by Bazinga View Post
There are flags like "resetOnRestart" and "resetOnOutput" that you could use which would lead to the behavior you mentioned but I didn't see them added to your file.

I checked my old files from 2.4.0 where I think it worked as intended and the only difference I found is the output line where I have

writeControl writeTime;
writeInterval 1;

instead of

outputControl timeStep;
outputInterval 1;

I do not exactly know the difference between the two.

Also, I have time start set (timeStart) but I do not think that this makes the difference.

If I have some minutes later, I will try to check, if it continues the averaging after a restart of the simulation.
Thanks a lot, I really appreciate it. I'll try using write control and see if it works.
Eman. is offline   Reply With Quote

Old   July 29, 2017, 15:23
Default
  #8
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16
Bazinga is on a distinguished road
So I just tested it on 2.4.0 with an old simulation of mine. It is continuing to average and is reading from the e.g. UMean file from the last time directory. I compared the UMean file of both time steps and they are basically identical. There is even an output in the terminal during the solving saying

fieldAverage fieldAverage:
Reading/initialising field UMean

Well, I guess you already checked it, but is there and output of the Mean fields in the time directories?
Bazinga is offline   Reply With Quote

Old   July 29, 2017, 15:52
Default
  #9
Member
 
Join Date: Apr 2016
Posts: 34
Rep Power: 10
Eman. is on a distinguished road
Quote:
Originally Posted by Bazinga View Post
So I just tested it on 2.4.0 with an old simulation of mine. It is continuing to average and is reading from the e.g. UMean file from the last time directory. I compared the UMean file of both time steps and they are basically identical. There is even an output in the terminal during the solving saying

fieldAverage fieldAverage:
Reading/initialising field UMean

Well, I guess you already checked it, but is there and output of the Mean fields in the time directories?
I just checked it out. UMean is in all time directories but for some reasons, it doesn't read it when I continue the simulation instead, it recomputes it all over again.
atulkjoy likes this.
Eman. is offline   Reply With Quote

Old   July 30, 2017, 00:54
Default
  #10
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19
fumiya is on a distinguished road
There was a bug in the fieldAverage function object:
Not continuous averaging when restarting a calculation
https://bugs.openfoam.org/view.php?id=898

I am afraid that you use the version with this bug.

Best regards,
Fumiya
atulkjoy likes this.
__________________
[Personal]
fumiya is offline   Reply With Quote

Old   July 30, 2017, 07:02
Default
  #11
Member
 
Join Date: Apr 2016
Posts: 34
Rep Power: 10
Eman. is on a distinguished road
Quote:
Originally Posted by fumiya View Post
There was a bug in the fieldAverage function object:
Not continuous averaging when restarting a calculation
https://bugs.openfoam.org/view.php?id=898

I am afraid that you use the version with this bug.

Best regards,
Fumiya
Thanks a lot for the reply. I guess this is the problem, I need to compile another version on the cluster.
atulkjoy likes this.
Eman. is offline   Reply With Quote

Reply

Tags
continue from file, field average, latesttime, openfoam


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
Estimating confidence intervals for average results from LES flotus1 Main CFD Forum 10 February 3, 2017 09:24
Field average pappo1890 OpenFOAM 0 October 12, 2016 09:11
How to make grid for LES simulation dinhanh Main CFD Forum 3 November 11, 2015 03:37
Temperature field error in compressible LES aljo OpenFOAM Running, Solving & CFD 4 December 10, 2013 04:30
outlet profiles of LES simulation as transient inlet b.c. for LES of a bend pipe Henny FLUENT 0 March 28, 2013 05:02


All times are GMT -4. The time now is 17:12.