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

CrankNicholson errors

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 4 Post By hjasak
  • 1 Post By KateEisenhower

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2005, 11:40
Default Consider the movingCone case w
  #1
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Consider the movingCone case with the solver icoFoamAutoMotion.

When using the second order CrankNicholson time integration I get an error message after the first mesh update.

FOAM FATAL IO ERROR : attempt to read beyond EOF

From function ITstream::read(token& t)
in file db/IOstreams/Tstreams/ITread.C at line 70.

Later I also tried this scheme in the cavity problems, but with no succes.

Is someone actually using this scheme, or am I doing something wrong.

Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   October 21, 2005, 11:47
Default There has been a change in the
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
There has been a change in the format that is not reflected in the config files. Add 0.5 after CrankNicholson (now the factor is run-time selectable):

ddtSchemes
{
default CrankNicholson 0.5;
}

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 21, 2006, 14:07
Default shouldn't be CrankNicholson 1?
  #3
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
shouldn't be CrankNicholson 1?

in the user guide:

4.4.6 Time schemeshttp://www.opencfd.co.uk/openfoam/do...#x20-1050004.4

it says:

There is an off-centering coefficient y with the CrankNicholson scheme that blends it with the the Euler scheme. A coefficient of y = 1 corresponds to pure CrankNicholson and and y = 0 corresponds to pure Euler. The blending coefficient can help to improve stability in cases where pure CrankNicholson are unstable.

best regards,
Maka
maka is offline   Reply With Quote

Old   May 22, 2006, 08:01
Default Sorry, I don't understand. Wha
  #4
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Sorry, I don't understand. What shouldn't be 1?

(I only see some duplicate 'the the' and 'and and' in that section)
mattijs is offline   Reply With Quote

Old   May 22, 2006, 10:46
Default I mean that the previous messa
  #5
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
I mean that the previous message seemed to suggest that: a pure CrankNicholson scheme is applied in OpenFOAM by setting:

ddtSchemes
{
default CrankNicholson 0.5;
}

while the help in the user guide seems to says that it is:

ddtSchemes
{
default CrankNicholson 1;
}

which is right?

Many thanks,
Maka
maka is offline   Reply With Quote

Old   May 22, 2006, 22:00
Default You should be able to find thi
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
You should be able to find this out by looking at the source code:

/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.H

//- Off-centering coefficient, 1 -> CN, less than one blends with EI
scalar ocCoeff_;


Need I say more? :-)

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 23, 2006, 04:21
Default So a factor of 1 corresponds t
  #7
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
So a factor of 1 corresponds to fully second order Crank-Nicholson? I thought it should be 0.5?

Is this changed in OpenFOAM version 1.3

Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   May 23, 2006, 07:17
Default CrankNicholsonDdtScheme.C chan
  #8
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
CrankNicholsonDdtScheme.C changed between V 1.2 and 1.3 but I have no clue if the behavior changed. I'm still using V 1.2 and have been running a one-month simulation assuming it should be CrankNicholson 0.5 as the early post suggested. Do not ask me what is right and what is wrong. All I can say, enjoy :-)

/Maka
maka is offline   Reply With Quote

Old   May 24, 2006, 11:23
Default Could someone please explain t
  #9
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
Could someone please explain the differences (if any) between v1.2 and v1.3.

Conform the theory books, a value of 0.5 would makes more sense then 1.0.

Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   May 25, 2006, 06:22
Default No basic differences between 1
  #10
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
No basic differences between 1.2 and 1.3.

//- Off-centering coefficient, 1 -> CN, less than one blends with EI
mattijs is offline   Reply With Quote

Old   May 26, 2006, 04:14
Default Many thanks Mattijs for your c
  #11
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
Many thanks Mattijs for your clear reply.
/Maka.
maka is offline   Reply With Quote

Old   May 29, 2006, 04:58
Default So for the record, Crank Nicho
  #12
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18
lr103476 is on a distinguished road
So for the record, Crank Nicholson 1.0 corresponds to fully second order accuracy, while a value less then 1.0 is less accurate.

Sorry to bother you again, but I am not really into the theory at this moment.

Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   October 20, 2013, 07:21
Default
  #13
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Hi All,

When I choose CN, but set the factor to 1. The pressure is very prone to blow up, which lead to the simulation failure. Could anyone tell me what is the reason for this problem? Thank you very much.

Quote:
Originally Posted by hjasak View Post
You should be able to find this out by looking at the source code:

/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.H

//- Off-centering coefficient, 1 -> CN, less than one blends with EI
scalar ocCoeff_;


Need I say more? :-)

Hrv
openfoammaofnepo is offline   Reply With Quote

Old   February 2, 2017, 11:45
Default
  #14
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Hi,

please have a look at CrankNicolsonDdtScheme.H:
Code:
The Crank-Nicosonl scheme is often unstable for complex flows in complex geometries and it is neccessary to "off-centre" the scheme to stabilize it ...
And in the context of this, see also the "Note" a few lines below:
Code:
The Crank-Nicolson coefficient for the implicit part of the RHS is related to the off-centering coefficient by

cnCoeff = 1.0/(1.0 + ocCoeff);
Kummi likes this.
KateEisenhower 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
CrankNicholson returns wrong dimensions and sound speed when mesh is moving lillberg OpenFOAM Bugs 6 May 4, 2009 18:53
Bug caused by CrankNicholson scheme cbeck OpenFOAM Bugs 8 March 28, 2009 02:48
uds errors major FLUENT 0 May 28, 2008 11:49
Please help see this errors liugx212 OpenFOAM Running, Solving & CFD 2 December 9, 2005 13:34
Probelm with CrankNicholson scheme in channelOodles maka OpenFOAM Pre-Processing 2 November 2, 2005 11:09


All times are GMT -4. The time now is 08:27.