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

Local time step

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By akidess
  • 1 Post By ramhari

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2011, 02:23
Default Local time step
  #1
New Member
 
Join Date: Aug 2010
Location: Chennai
Posts: 24
Rep Power: 15
ramhari is on a distinguished road
I want to use local time steps to converge to steady state quickly. I have fixed the maxCo and want to calculate deltaT for each cell (local time step). My Openfoam rho (for e.g.) equation reads :

rho = rho - runTime.deltaT()*fvc::div(phi); ......

I checked setDelta.H, compressibleCourantNo.H which tells runTime.deltaT() as a scalar.

But I want a runtime.deltaT() as volScalarField which has delta time defined for each cell.

Can anyone help me in this regard
ramhari is offline   Reply With Quote

Old   June 16, 2011, 11:10
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
The runTime scalar is used in the fvc and fvm namespaces in the discretization process. If you want to have any of these functions work with the local time, then you are looking at a complex problem. If, on the other hand, you just want to store a "local time" field that you use independently, that would be much easier. How do you plan to use the local time?
marupio is offline   Reply With Quote

Old   June 16, 2011, 14:16
Default
  #3
New Member
 
Join Date: Aug 2010
Location: Chennai
Posts: 24
Rep Power: 15
ramhari is on a distinguished road
" If, on the other hand, you just want to store a "local time" field that you use independently, that would be much easier"

Exactly the second one. A false time field just to update rho,rhoU and rhoE For e.g.

rho = rho - runTime.deltaT()*fvc::div(phi)
rhoU = rhoU - ...
rhoE = rhoE - ...


runTime.deltaT() is very local (or which only plays around setDelta.H, readTimecontrols.H and compressibleCourantNumber.H) and nothing to do with ddt schemes I specify. (whatever ddtscheme in the fvSchemesDict)


& Hopefully, I didn't confuse you

Thanks, hari
ramhari is offline   Reply With Quote

Old   June 16, 2011, 14:43
Default
  #4
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
Take a look at the SLTSDdtScheme in $(FOAM_SRC)/finiteVolume/ddtSchemes/SLTSDdtScheme
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   June 17, 2011, 04:02
Default
  #5
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Also, the just released new version of OpenFoam uses a local time step for their new VOF solver:

http://www.openfoam.com/version2.0.0/steady-vof.php

You might want to have a look at that.
sharonyue and Thamali like this.
akidess is offline   Reply With Quote

Old   July 6, 2011, 09:37
Default
  #6
New Member
 
Join Date: Aug 2010
Location: Chennai
Posts: 24
Rep Power: 15
ramhari is on a distinguished road
Dear all,

( Please check the previous posts in this thread to have an idea)

I have slightly modified the inviscid solver rhoCentralFoam in order to improve the acceleration to steady state using local time step without touching any other part (e.g. reconstruct(). - flux calculations). And it seems working for my case.

If anyone have a word/doubt in my modification please post it.

//////////Local time step - false time step
forAll (mesh.C(),i)
{
cell faces = mesh.cells()[i];
denom = 0.0;
forAll (faces,j)
{
denom = denom + ( (U[i] & mesh.Sf()[j]) + c[i]*mesh.magSf()[j] );
}
falseTime[i] = maxCo * mesh.V()[i] / denom;
}


//////// Conservation equations
// --- Solve density
rho = rho - falseTime*fvc::div(phi);

// --- Solve momentum
rhoU = rhoU - falseTime*fvc::div(phiUp);

// --- Solve energy
rhoE = rhoE - falseTime*fvc::div(phiEp);
mm.abdollahzadeh likes this.
ramhari is offline   Reply With Quote

Old   January 9, 2012, 13:49
Default
  #7
Member
 
Eric M. Tridas
Join Date: May 2011
Location: Tampa, Florida
Posts: 48
Rep Power: 14
eric.m.tridas is on a distinguished road
Has anyone else done this? I'm really interested in speeding up my rhoCentralFoam simulations but am having some trouble implementing it. I'd really appreciate the help anyone else can give!

Thanks,

-Eric
eric.m.tridas is offline   Reply With Quote

Old   March 25, 2012, 11:19
Default
  #8
Senior Member
 
Ehsan
Join Date: Mar 2009
Posts: 112
Rep Power: 17
ehsan is on a distinguished road
Dear all

I need a reference which describes by more details the new local-time stepping (LTS) approach applied in VOF in openfoam.

Thanks
ehsan is offline   Reply With Quote

Old   October 7, 2012, 12:23
Default
  #9
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Quote:
Originally Posted by ramhari View Post
Dear all,

( Please check the previous posts in this thread to have an idea)

I have slightly modified the inviscid solver rhoCentralFoam in order to improve the acceleration to steady state using local time step without touching any other part (e.g. reconstruct(). - flux calculations). And it seems working for my case.

If anyone have a word/doubt in my modification please post it.

//////////Local time step - false time step
forAll (mesh.C(),i)
{
cell faces = mesh.cells()[i];
denom = 0.0;
forAll (faces,j)
{
denom = denom + ( (U[i] & mesh.Sf()[j]) + c[i]*mesh.magSf()[j] );
}
falseTime[i] = maxCo * mesh.V()[i] / denom;
}


//////// Conservation equations
// --- Solve density
rho = rho - falseTime*fvc::div(phi);

// --- Solve momentum
rhoU = rhoU - falseTime*fvc::div(phiUp);

// --- Solve energy
rhoE = rhoE - falseTime*fvc::div(phiEp);

Dear Friend

There is one question:

the falsetime that you are calculating is the local deltaT. so its changing from cell to cell.
so its almost the same as the local euler or coeuler scheme in openfoam?

secondly this scheme is not giving unsteady result. just the final result could be correct?

How can u access the simulationtime? how you will control writting the variables according the controldict writecontrol ( considering that u have local time )

Best
Mahdi
mm.abdollahzadeh is offline   Reply With Quote

Old   September 27, 2015, 12:24
Default
  #10
New Member
 
Kadu
Join Date: Jun 2015
Location: India
Posts: 6
Rep Power: 10
Pravin Kadu is on a distinguished road
Dear friend,
Can you please provide the 'local time stepping' related theory.
Because I am not getting that how the cells will have different time steps, since they would be interdependent?

Thanks.
Pravin Kadu 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
Time step size and max iterations per time step pUl| FLUENT 33 October 23, 2020 22:50
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 16, 2019 23:12
Forces in OF15 richard OpenFOAM Running, Solving & CFD 180 July 9, 2018 10:54
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 05:36
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09


All times are GMT -4. The time now is 06:16.