CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   help: results depend on writeInterval (https://www.cfd-online.com/Forums/openfoam/74386-help-results-depend-writeinterval.html)

ckoch March 31, 2010 05:10

help: results depend on writeInterval
 
Hi everyone !

I am using OpenFOAM for simulating solidification of a two immiscible fluids. For that, I augmented the interFoam solver with a few things such as heat-treatment, thermophysical properties and a solidification model. As you can imagine, the solver-code now looks pretty different to the original one. So far, my first runs gave me promising results.
BUT
yesterday when I did a long-time simulation, the results differed heavily from former ones.
My first runs, which gave me physically feasible results, used a delta_t of 1e-3 sec and I wrote out every 10th timestep.
Then the long-time run used the same delta_t of 1e-3 sec but a writeInterval of 1000 timesteps (to have one data folder for each second). So far the code ran smoothly with little courant-no and continuity-errors. But the visualization showed highly unphysical behaviour that differed heavily from the runs with every 10th timestep written out.
I did NOT change the delta_t, ONLY the writeInterval.
Has anyone made a similar experience ?
Any idea on what could cause that behaviour ?
I guess my code overwrites a variable from the last timestep with a value that it reads from the last written-out folder. But apart from the createFields.H (which I definately only use once BEFORE the time-loop) I could not find any read-and-write command, at least in the code lines I did by myself.
Does anyone know of OpenFOAM reading values from the last WRITTEN-OUT timestep rather than using the value from the actual last timestep ?
I am using 1st order "Euler" as ddt-scheme and my controlDict looks as follows

application myFreezeFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 20;
deltaT 0.001;
writeControl timeStep;
writeInterval 1000;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable no;
adjustTimeStep no;
maxCo 0.1;
maxDeltaT 0.1;

Thanks a lot for any suggestions and best regards,

Chris

thekay March 31, 2010 07:39

Have you made sure that you don't have alpha1=0 in your visualising of the results? This can give strange results with phases.

farhagim September 1, 2010 18:42

Hi Chris,

Have you managed to solve your problem? Would you please explain how did you implement a solidification in interFoam.
Is it possible to share your implementation?

Thanks,

Mehran

Quote:

Originally Posted by ckoch (Post 252439)
Hi everyone !

I am using OpenFOAM for simulating solidification of a two immiscible fluids. For that, I augmented the interFoam solver with a few things such as heat-treatment, thermophysical properties and a solidification model. As you can imagine, the solver-code now looks pretty different to the original one. So far, my first runs gave me promising results.
BUT
yesterday when I did a long-time simulation, the results differed heavily from former ones.
My first runs, which gave me physically feasible results, used a delta_t of 1e-3 sec and I wrote out every 10th timestep.
Then the long-time run used the same delta_t of 1e-3 sec but a writeInterval of 1000 timesteps (to have one data folder for each second). So far the code ran smoothly with little courant-no and continuity-errors. But the visualization showed highly unphysical behaviour that differed heavily from the runs with every 10th timestep written out.
I did NOT change the delta_t, ONLY the writeInterval.
Has anyone made a similar experience ?
Any idea on what could cause that behaviour ?
I guess my code overwrites a variable from the last timestep with a value that it reads from the last written-out folder. But apart from the createFields.H (which I definately only use once BEFORE the time-loop) I could not find any read-and-write command, at least in the code lines I did by myself.
Does anyone know of OpenFOAM reading values from the last WRITTEN-OUT timestep rather than using the value from the actual last timestep ?
I am using 1st order "Euler" as ddt-scheme and my controlDict looks as follows

application myFreezeFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 20;
deltaT 0.001;
writeControl timeStep;
writeInterval 1000;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable no;
adjustTimeStep no;
maxCo 0.1;
maxDeltaT 0.1;

Thanks a lot for any suggestions and best regards,

Chris



All times are GMT -4. The time now is 13:57.