
[Sponsors] 
Solely changing writeInterval's value affects the results pimpleDyMFoam  AMI 

LinkBack  Thread Tools  Display Modes 
July 25, 2013, 14:52 
Solely changing writeInterval's value affects the results pimpleDyMFoam  AMI

#1 
Member
Join Date: Aug 2012
Posts: 74
Rep Power: 4 
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 subdomains. 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 1e5; writeControl adjustableRunTime; writeInterval 1; Code:
startTime 0; stopAt endTime; endTime 20; deltaT 1e5; writeControl adjustableRunTime; writeInterval 0.01; 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. 

July 26, 2013, 03:34 

#2 
Senior Member

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 

July 26, 2013, 03:41 

#3 
Senior Member
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,110
Rep Power: 19 
Basically if you send shorter writeInterval you get smaller timestep. 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.


July 26, 2013, 09:08 

#4 
Member
Join Date: Aug 2012
Posts: 74
Rep Power: 4 
Hi,
I will rerun the cases accordingly and will mention what has been changed under this thread. Many thanks for your answers. 

July 27, 2013, 09:30 

#5 
Member
Join Date: Aug 2012
Posts: 74
Rep Power: 4 
I confirm that I made a mistake in settingup the identical(!) cases. Literally the previous cases were not identical.
== 1 == In the previous cases, the timestep of both cases had been adjusted during the run supposedly due to Code:
adjustTimeStep yes; 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; == 3 == Further, this showed me the relative importance of the timestep setting in the problem whilst the results can be affected anyways. Many thanks for your help pointing out exactly where I was wrong. 

November 28, 2014, 20:00 
difference between timeStep and clockTime

#6 
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 307
Rep Power: 9 
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 

November 29, 2014, 12:07 
writeInterval in OpenFOAM does not always write at the desired time

#7  
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 307
Rep Power: 9 
Quote:
Looking forward to your thoughts on this. Thanks 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
mixerVesselAMI2D's mass is not balancing  sharonyue  OpenFOAM Running, Solving & CFD  6  June 10, 2013 09:34 
AMI speed performance  danny123  OpenFOAM  19  October 24, 2012 07:44 