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

max time step related to diffusion time

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 21, 2010, 15:15
Default max time step related to diffusion time
  #1
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
Hello all,

I am interested in adjusting the time step for a transient solver on both the Courant number (already implemented in Openfoam) and on the time required for diffusion to be captured. Right now Im starting simple, using the icoFoam solver with species transport. Since I would like to add this to a turbulent solver later (diffusivity depends on turbulent schmidt number), I have made diffusivity a field. I want to find the average diffusion time and the minimum diffusion time based on:

t_diffusion = dx^2/D

I looked at the CourantNo.H file and found:

surfaceScalarField SfUfbyDelta =
mesh.surfaceInterpolation::deltaCoeffs()*mag(phi);

CoNum = max(SfUfbyDelta/mesh.magSf())
.value()*runTime.deltaT().value();

meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
.value()*runTime.deltaT().value();

velMag = max(mag(phi)/mesh.magSf()).value();

but I need to extract the delta X values, square them, and then divide them by the cell specific diffusivity. How does one do this exactly? Any help is much appreciated.
chegdan is offline   Reply With Quote

Old   September 23, 2010, 11:52
Default
  #2
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 12
eugene is on a distinguished road
What do you mean exactly by delta X values?
eugene is offline   Reply With Quote

Old   September 23, 2010, 13:13
Default dalta x as in h, spacing, or cell-cell distance
  #3
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
Quote:
Originally Posted by eugene View Post
What do you mean exactly by delta X values?
dalta x as in h, spacing, or cell-cell distance. How far the species must diffuse across. If the time steps are too big then the result is incorrect.
chegdan is offline   Reply With Quote

Old   September 23, 2010, 18:40
Default
  #4
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 12
eugene is on a distinguished road
Ok then you can get it from

mesh.surfaceInterpolation::deltaCoeffs()

This is a surfaceScalarField with value 1/delta - the cell-centre to cell-centre distances. (Or face centre to cell centre distance at the boundary.)
eugene is offline   Reply With Quote

Reply

Tags
diffusion openfoam

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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Hydrostatic Pressure and Gravity miliante OpenFOAM Running, Solving & CFD 132 October 7, 2012 22:50
Computational time sunnysun OpenFOAM Running, Solving & CFD 5 March 16, 2009 04:32
Overflow problem in steady simulation ReeKo CFX 11 October 8, 2008 17:57
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16


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