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

Solely changing writeInterval's value affects the results -pimpleDyMFoam - AMI

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By tomf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 25, 2013, 15:52
Default Solely changing writeInterval's value affects the results -pimpleDyMFoam - AMI
  #1
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
Hi

== 1 ==

In short, the question is that:

Can specifying different values for "writeInterval" under the controlDict affect the final simulation results or not?

== 2 ==

There are 2 cases which are identical and are run at the same workstations with the same number of parallelized sub-domains. The cases are empty (i.e. no wall inside) rectangular domains wherein there are a circular rotating domain from the inlet to the outlet and the surrounding stationary domain. The inlet velocity is constant, uniform and axial only.

The only difference is the value of writeInterval.

1. Case:

Code:
startTime       0;

stopAt          endTime;

endTime         20;

deltaT          1e-5;

writeControl    adjustableRunTime;

writeInterval   1;
2. Case

Code:
startTime       0;

stopAt          endTime;

endTime         20;

deltaT          1e-5;

writeControl    adjustableRunTime;

writeInterval   0.01;
== 3 ==

Although the 2. case gives the expected constant axial speed unchanged, in the 1. case the axial velocity does increase/decrease at least 30% at certain regions (mostly inside the rotating domain).

== 4 ==

If solely changing writeInterval's value is said to be impossible to cause this, I will upload all the cases and detail all the required info.

Any help will be highly appreciated.

Many thanks in advance.
HakikiCanakkaleli is offline   Reply With Quote

Old   July 26, 2013, 04:34
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

The first thing that comes to mind is the question whether you limit the time step to a fixed Courant number? If so, the time step can vary during the simulation and the variation is such that the writeInterval should be matched exactly. So if you reduce the writeInterval it can be that the time steps are smaller and you do not solve exactly the same case.

Regards,
Tom
HakikiCanakkaleli likes this.
tomf is offline   Reply With Quote

Old   July 26, 2013, 04:41
Default
  #3
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Quote:
Originally Posted by HakikiCanakkaleli View Post
Hi

== 1 ==

In short, the question is that:

Can specifying different values for "writeInterval" under the controlDict affect the final simulation results or not?
Basically if you send shorter writeInterval you get smaller time-step. Usually OpenFOAM would like to make at least 5 steps between writes (i.e. if write interval is 1, max time step is 0.2). If your solutions is not fully converged bigger times steps can lead to different solution. There's an option maxDeltaT which can limit time step.
alexeym is offline   Reply With Quote

Old   July 26, 2013, 10:08
Default
  #4
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
Hi,

I will re-run the cases accordingly and will mention what has been changed under this thread.

Many thanks for your answers.
HakikiCanakkaleli is offline   Reply With Quote

Old   July 27, 2013, 10:30
Default
  #5
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
I confirm that I made a mistake in setting-up the identical(!) cases. Literally the previous cases were not identical.

== 1 ==

In the previous cases, the time-step of both cases had been adjusted during the run supposedly due to

Code:
adjustTimeStep  yes;
== 2 ==

In the new cases, I set up the controlDict as:

Code:
application     pimpleDyMFoam; 

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         20;

deltaT          0.001;

writeControl    runTime;

writeInterval   1;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  no;
Now, everything is the same.

== 3 ==
Further, this showed me the relative importance of the time-step setting in the problem whilst the results can be affected anyways.

Many thanks for your help pointing out exactly where I was wrong.
HakikiCanakkaleli is offline   Reply With Quote

Old   November 28, 2014, 20:00
Default difference between timeStep and clockTime
  #6
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Dear all:

I am running OpenFOAM 2.2.1, sloshingTank2D. I would like to have output at every 0.02 seconds. Can anyone tell me the advantage of using timeStep vs clockTime? It appears that both of them depend on the writeInterval to determine when to write data. If writeInterval is a real number such as 0.02, one would expect the write to occur every 0.020000000000 seconds of time. But I have seen that does not quite happen. There are instances where OpenFOAM will write the results at 0.01999999 seconds.

Any suggestions will be greatly appreciated.

Thanks
musahossein is offline   Reply With Quote

Old   November 29, 2014, 12:07
Default writeInterval in OpenFOAM does not always write at the desired time
  #7
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Quote:
Originally Posted by HakikiCanakkaleli View Post
I confirm that I made a mistake in setting-up the identical(!) cases. Literally the previous cases were not identical.

== 1 ==

In the previous cases, the time-step of both cases had been adjusted during the run supposedly due to

Code:
adjustTimeStep  yes;
== 2 ==

In the new cases, I set up the controlDict as:

Code:
application     pimpleDyMFoam; 

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         20;

deltaT          0.001;

writeControl    runTime;

writeInterval   1;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

adjustTimeStep  no;
Now, everything is the same.

== 3 ==
Further, this showed me the relative importance of the time-step setting in the problem whilst the results can be affected anyways.

Many thanks for your help pointing out exactly where I was wrong.
I was wondering if you have had any problems whith OpenFOAM when running forcing write to occur at runTime, which defaults to the writeInterval variable. I am running OpenFOAM coupled with another code, where the code generates a displacement file, consisting of two lines of data (start time, start displacement, end time, end displacement) and sends to OpenFOAM to get pressure forces. The problem I have come across is that even though I set writeInterval to 0.02 seconds of simulated time, if the start and end times are multiples of 0.02 (eg, 0.02 to 0.04; 0.04-0.06 etc), OpenFOAM will, every once in a while generate a file with a time stamp of say 0.079999. I have gotten around this problem by increasing the timePrecision variable in controlDict to 7 (default is 6), and it seems to have corrected the problem. I am not sure whether this is a temporary fix or not.
Looking forward to your thoughts on this.
Thanks
musahossein is offline   Reply With Quote

Old   January 9, 2024, 03:54
Default How to change writeInterval values preserving the results?
  #8
Member
 
Marco Bernardes
Join Date: May 2009
Posts: 59
Rep Power: 17
masb is on a distinguished road
Hi,

I would be grateful for your assistance.
Could you guide me on modifying the writeInterval values in the controlDict below from 0.25 to 10 without compromising the integrity of the results? Many thanks.

application buoyantPimpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 120;

deltaT 0.001;

writeControl adjustableRunTime;

writeInterval 0.25;

purgeWrite 10;

writeFormat binary;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 5;
masb is offline   Reply With Quote

Reply


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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 05:13
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 10:34


All times are GMT -4. The time now is 00:15.