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

negative time step, possible to set?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 26, 2014, 06:39
Default negative time step, possible to set?
  #1
Member
 
Tom
Join Date: Jan 2012
Location: France
Posts: 43
Rep Power: 5
sawyer86 is on a distinguished road
hi there,

Do you know if it possible to introduce in OF, icoFoam algorithm in particular, a time step (adjusted or not) which is negative?

I mean, can I run a simulation in OF that start from t=0 and it goes till t=tstar with tstar<0 with a deltaT<0?

Thank you in advance

Regards
sawyer86 is offline   Reply With Quote

Old   March 26, 2014, 12:50
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 727
Rep Power: 18
mturcios777 will become famous soon enough
I don't believe you can do that with the default time classes, as there is only has increment operator:
http://foam.sourceforge.net/docs/cpp/a02579.html

I'm not sure in what situation these would be useful. If you really wanted it you would have to have your own time counter and decrement it, although this would only mean that your simulation was still evolving forward in time and you've flipped your time axis.

That, or you could find a flux capacitor and drive 88 mph...
mturcios777 is offline   Reply With Quote

Old   March 26, 2014, 12:57
Default
  #3
Member
 
Tom
Join Date: Jan 2012
Location: France
Posts: 43
Rep Power: 5
sawyer86 is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
I don't believe you can do that with the default time classes, as there is only has increment operator:
http://foam.sourceforge.net/docs/cpp/a02579.html

I'm not sure in what situation these would be useful. If you really wanted it you would have to have your own time counter and decrement it, although this would only mean that your simulation was still evolving forward in time and you've flipped your time axis.

That, or you could find a flux capacitor and drive 88 mph...
You got me. This was just the theoretical plot draft for "back to future IV"!

Anyway my question was bad posed. Indeed the equation I want to solve are not NS classic ones but a motification of them with the temporal term which is going to be -ddt(U)...OF icofoam solver comes to be just the skeleton of the algorithm...

How can I create "my own time counter"?

Thank you in advance to support my idea
sawyer86 is offline   Reply With Quote

Old   March 26, 2014, 13:06
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 727
Rep Power: 18
mturcios777 will become famous soon enough
I don't think you would need a negative time-step to do what you want. Is ddt(U) negative because it absolutely needs to be, or just because its on the RHS of the equation you are solving (a reference to the equations you are solving would be helpful)?
mturcios777 is offline   Reply With Quote

Old   March 26, 2014, 13:15
Default
  #5
Member
 
Tom
Join Date: Jan 2012
Location: France
Posts: 43
Rep Power: 5
sawyer86 is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
I don't think you would need a negative time-step to do what you want. Is ddt(U) negative because it absolutely needs to be, or just because its on the RHS of the equation you are solving (a reference to the equations you are solving would be helpful)?
No, it is not just a change of hand side. It is the prescription of the equation, indeed I am dealing with the Adjoint Navier Stokes equation wich prescribe this procedure...
sawyer86 is offline   Reply With Quote

Old   March 27, 2014, 05:40
Default
  #6
Member
 
Tom
Join Date: Jan 2012
Location: France
Posts: 43
Rep Power: 5
sawyer86 is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
I don't think you would need a negative time-step to do what you want. Is ddt(U) negative because it absolutely needs to be, or just because its on the RHS of the equation you are solving (a reference to the equations you are solving would be helpful)?
I was thinking about it...could it work if I would just change the sing in the time schemes discretization that OF does in CrankNicholson (for instance)?

I mean leaving the time flows as positive but introducing at the place of Dt the term -1*Dt in the CrankNicholson schemes...

My question at this point could be. If it is possible, where is that OF does compute the CrankNicholson scheme, where is the exact file where it does the discretization?
sawyer86 is offline   Reply With Quote

Old   November 6, 2014, 05:36
Default
  #7
New Member
 
Join Date: Apr 2012
Posts: 6
Rep Power: 5
tom ato is on a distinguished road
Dear Tom, Dear Foamers,

In my point of view, the problem here is to set the right boundary conditions in time for the adjoint NSE. To make sure, that the problem is well posed, one definitely is forced to compute the solution of ANSE backward in time.

Tom, did you find a way to realize a computation in openFOAM with negative timeSteps? I tried a lot so far, but haven't find a satisfying answer yet, so even short hints might be very useful ( I hope you're still familiar with the subject posted above...).

Kind regards

Tom
tom ato is offline   Reply With Quote

Reply

Tags
negative time step

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
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20
InterFoam negative alpha karasa03 OpenFOAM 7 December 12, 2013 04:41
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Native Meshers: blockMesh 2 March 14, 2012 10:56
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03


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