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

CrankNicholson errors

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By hjasak

Reply
 
LinkBack Thread Tools Display Modes
Old   October 21, 2005, 10:40
Default Consider the movingCone case w
  #1
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
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, 10:47
Default There has been a change in the
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
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
Bahram likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 21, 2006, 13:07
Default shouldn't be CrankNicholson 1?
  #3
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 9
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, 07:01
Default Sorry, I don't understand. Wha
  #4
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 09:46
Default I mean that the previous messa
  #5
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 9
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, 21:00
Default You should be able to find thi
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
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, 03:21
Default So a factor of 1 corresponds t
  #7
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
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, 06:17
Default CrankNicholsonDdtScheme.C chan
  #8
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 9
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, 10:23
Default Could someone please explain t
  #9
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
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, 05:22
Default No basic differences between 1
  #10
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 03:14
Default Many thanks Mattijs for your c
  #11
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 9
maka is on a distinguished road
Many thanks Mattijs for your clear reply.
/Maka.
maka is offline   Reply With Quote

Old   May 29, 2006, 03:58
Default So for the record, Crank Nicho
  #12
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
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, 06:21
Default
  #13
Senior Member
 
Join Date: Jan 2013
Posts: 197
Rep Power: 4
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

Reply

Thread Tools
Display Modes

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 On
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 17:53
Bug caused by CrankNicholson scheme cbeck OpenFOAM Bugs 8 March 28, 2009 02:48
uds errors major FLUENT 0 May 28, 2008 10: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 11:09.