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

my solution depends on writeInterval entry in the controlDict

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2016, 08:15
Default my solution depends on writeInterval entry in the controlDict
  #1
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15
gaza is on a distinguished road
Hi
I found that my solution depends on writeInterval entry in the controlDict.
How is it possible?
__________________
best regards
pblasiak
gaza is offline   Reply With Quote

Old   September 2, 2016, 11:14
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Since question lacks lots of details, answer is in fact question: does your time step value depend on writeInterval?
alexeym is offline   Reply With Quote

Old   September 3, 2016, 12:54
Default
  #3
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15
gaza is on a distinguished road
Hi alexym,
I am using modified interPhaseChangeFoam from OpenFOAM extend 3.0
I set adjustTimeStep to "no" and the results also depend on the writeInterval entry.
Namely, the interface position varies significantly when I decrease writeInterval,
for example from 0.1 to 0.01. Is it bug?
__________________
best regards
pblasiak
gaza is offline   Reply With Quote

Old   September 3, 2016, 12:57
Default
  #4
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15
gaza is on a distinguished road
what can be the reason? I do not understand.
In the code I have temperature equation with term fvm::ddt(rho, T)
and I used rho.oldTimes() method in createFields.H for rho. Does rho.oldTimes() method
store the previous iteration or previous time step values?
__________________
best regards
pblasiak
gaza is offline   Reply With Quote

Old   September 3, 2016, 13:57
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

1. Does you solution depend on time step?
2. What modifications did you make?
3. What convergence criterion do you utilize (if any)?

Yes, it could be bug in:
1. your solver modification
2. your case setup
3. original solver

In general oldTime stores noting: http://cpp.openfoam.org/v4/a00931.ht...09ca405ce907a6 (though in foam-extend this could be different). There are storePrevIter (http://cpp.openfoam.org/v4/a00931.ht...7c72a819c66706) and storeOldTimes (http://cpp.openfoam.org/v4/a00931.ht...9ee55d9138fd4d) if you want to store things.
alexeym is offline   Reply With Quote

Old   September 6, 2016, 05:44
Default
  #6
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15
gaza is on a distinguished road
Hi alexeym,
Thank you for your help. I found that it is bug in my code but for now I do not know where
__________________
best regards
pblasiak
gaza is offline   Reply With Quote

Old   September 6, 2016, 06:22
Default
  #7
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15
gaza is on a distinguished road
I used in the code this line to relax TEqn
TEqn.relax(0.9);

is it the same if I have in the code
TEqn.relax();
and in the fvSolution dictionary:
relaxationFactors
{
equations
{
T 0.9;
}
}

??
__________________
best regards
pblasiak
gaza is offline   Reply With Quote

Old   September 7, 2016, 04:12
Default
  #8
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Since you relax unconditionally, it corresponds to

Code:
relaxationFactors
{
    equations
    {
        "T.*" 0.9;
    }
}
alexeym is offline   Reply With Quote

Old   September 7, 2016, 08:31
Default
  #9
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15
gaza is on a distinguished road
Hi alexeym,
I commented the line with TEqn.relax() and now the results almost does not depend on writeInterval entry. For instance I got liquid volume fraction after 10 s as:
Code:
VOF            writeInterval
0.513542    1.0 
0.513706    0.1
0.517829    0.01
0.522513    0.001
0.519461    0.0001
What can be the reason that relax() influences writeInterval and changes the solution?
__________________
best regards
pblasiak
gaza is offline   Reply With Quote

Old   September 9, 2016, 01:51
Default
  #10
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Surely it is very fascinating game called "guess what I have done wrong", and lots of people on the forum like to play it.

As I have written earlier: if your solution depends on time step, check your convergence. Did you?

Are your time steps equal and smaller than writeInterval in all cases?
alexeym is offline   Reply With Quote

Old   September 9, 2016, 03:55
Default
  #11
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 249
Rep Power: 15
gaza is on a distinguished road
I checked convergence and set timestep to be fixed
__________________
best regards
pblasiak
gaza 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
CFL Condition Matt Umbel Main CFD Forum 19 June 30, 2020 08:20
grid dependancy gueynard a. Main CFD Forum 19 June 27, 2014 21:22
Doubt on Implicit Methods analyse In India Main CFD Forum 10 March 9, 2007 03:01
Discussion about Mesh independant solution Seb Main CFD Forum 13 May 22, 2001 13:37
Wall functions Abhijit Tilak Main CFD Forum 6 February 5, 1999 01:16


All times are GMT -4. The time now is 07:54.